• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Set attack = 0

peteralto

Member
Joined
Nov 1, 2020
Messages
116
Solutions
1
Reaction score
22
What would need to be changed in the source to accept attack = 0? TFS 1.4+

XML:
        <attribute key="attack" value="0" />


Code:
Amber Axe
(Atk: 0 + 46 Ice, Def: 32 +3, Axe Fighting +4).
It can only be wielded properly by Knights of level 330 or higher.
Augments: (Annihilation - Critical Extra Damage +14%, Annihilation -> Cooldown -8s).
Imbuement Slots: 2.
Classification: 4. Max. Tier: 10
It weighs 53.00 oz.
 
Solution
This does not exist in TFS.
Weapons with 0 attack and XX element attack works fine on TFS 1.4 - it still does normal attack (physical attack, not element attack), as 10.98 attack damage is based on weapon attack and player level, so even with 0 attack you get some damage from level.
Problem is description of items , ex. I set Ice attack to 48 and attack to 0:
Code:
23:48 You see an icy mystic blade (Def:25 +2) that has 90 charges left.
It can only be wielded properly by players of level 60 or higher.
It weighs 35.00 oz.
It's processed by this line to hide damage description:
If you got problem with damage calculation, it's some downgrade problem, not TFS...
You don't want the attack at 0, you simply want to write a special description for that item and transform all it's damage into ice damage... but for the record, you don't change source code to alter the attack of an item....
 
What would need to be changed in the source to accept attack = 0? TFS 1.4+

XML:
        <attribute key="attack" value="0" />


Code:
Amber Axe
(Atk: 0 + 46 Ice, Def: 32 +3, Axe Fighting +4).
It can only be wielded properly by Knights of level 330 or higher.
Augments: (Annihilation - Critical Extra Damage +14%, Annihilation -> Cooldown -8s).
Imbuement Slots: 2.
Classification: 4. Max. Tier: 10
It weighs 53.00 oz.

in combat.cpp function: getAttackValue()
change skill any value to 0, if weapon->getAttack() is 0.
to not damage weapons because skills value.

C++:
if (weapon) {
    if (weapon->getAttack() == 0) {
        skill = 0;
        return;
    }
switch (weapon->getWeaponType()) {
case WEAPON_AXE: {//...
 
Last edited:
in combat.cpp function: getAttackValue()
change skill any value to 0, if weapon->getAttack() is 0.
to not damage weapons because skills value.

C++:
if (weapon) {
    if (weapon->getAttack() == 0) {
        skill = 0;
        return;
    }
switch (weapon->getWeaponType()) {
case WEAPON_AXE: {//...

This does not exist in TFS.
 
This does not exist in TFS.
Weapons with 0 attack and XX element attack works fine on TFS 1.4 - it still does normal attack (physical attack, not element attack), as 10.98 attack damage is based on weapon attack and player level, so even with 0 attack you get some damage from level.
Problem is description of items , ex. I set Ice attack to 48 and attack to 0:
Code:
23:48 You see an icy mystic blade (Def:25 +2) that has 90 charges left.
It can only be wielded properly by players of level 60 or higher.
It weighs 35.00 oz.
It's processed by this line to hide damage description:
If you got problem with damage calculation, it's some downgrade problem, not TFS 1.4 problem. Tell us which downgrade you use.
 
Solution
Weapons with 0 attack and XX element attack works fine on TFS 1.4 - it still does normal attack (physical attack, not element attack), as 10.98 attack damage is based on weapon attack and player level, so even with 0 attack you get some damage from level.
Problem is description of items , ex. I set Ice attack to 48 and attack to 0:
Code:
23:48 You see an icy mystic blade (Def:25 +2) that has 90 charges left.
It can only be wielded properly by players of level 60 or higher.
It weighs 35.00 oz.
It's processed by this line to hide damage description:
If you got problem with damage calculation, it's some downgrade problem, not TFS 1.4 problem. Tell us which downgrade you use.
Thank you Gesior!
 
Last edited:
Back
Top