• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Holy damage enchanted weapon

przemo244

New Member
Joined
Jul 24, 2010
Messages
3
Reaction score
0
Hello guys, i have little problem, but my english skills are bad so ill just post some screenshots

SjeEIa4.jpg

I've done this analogic to other enchanted weapons, "elementFire" or "elementEarth"

But only "elementHoly" doesn't work for me:
IAPwLiD.jpg


Please help me, how i can add some Holy Damage to meele weapon?
 
https://github.com/otland/forgotten...81d9c1f742c36614035f2/src/items.cpp#L948-L951

after:
Code:
} else if (tmpStrValue == "elementenergy") {
Abilities& abilities = it.getAbilities();
abilities.elementDamage = pugi::cast<uint16_t>(valueAttribute.value());
abilities.elementType = COMBAT_ENERGYDAMAGE;

add:
Code:
} else if (tmpStrValue == "elementholy") {
Abilities& abilities = it.getAbilities();
abilities.elementDamage = pugi::cast<uint16_t>(valueAttribute.value()); 
abilities.elementType = COMBAT_HOLYDAMAGE;
 
https://github.com/otland/forgotten...81d9c1f742c36614035f2/src/items.cpp#L948-L951

after:
Code:
} else if (tmpStrValue == "elementenergy") {
Abilities& abilities = it.getAbilities();
abilities.elementDamage = pugi::cast<uint16_t>(valueAttribute.value());
abilities.elementType = COMBAT_ENERGYDAMAGE;

add:
Code:
} else if (tmpStrValue == "elementholy") {
Abilities& abilities = it.getAbilities();
abilities.elementDamage = pugi::cast<uint16_t>(valueAttribute.value());
abilities.elementType = COMBAT_HOLYDAMAGE;

But i'm using nightly precompiled TFS.

Can i do this other way? e.g by using weapon script "runed_sword.lua"
My goal is just to add 20 holy damage to Runed Sword. Ofc it must scale with my sword fighting skill, like other enchanted weapons.
 
"However you could also make it into a custom weapons script, and add holy damage that way."
That has nothing to do items.xml
I quoted your post advising what you said was true, then I explained an alternative way to get the results he wanted, and also advised why his method was not working.
Nothing I said was advising he could, in fact, do it the way he intended.
 

Similar threads

Back
Top