• 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!

Most viable way to handle % bonus to damage (read text)

reisbro

Member
Joined
May 15, 2017
Messages
94
Solutions
1
Reaction score
7
I'm currently working on a strategized PvP/PvE project, and I want to encourage players to rely more on elemental resistances, and I also want to implement a bonus % to x type of damage system, where X would be ice, fire, death, holy, energy, earth, melee and distance.

I was wondering if I should implement it via LUA, and creating dynamic storages for players and checking those values using the Stat Change function. I know that it can be done, but I don't know how optimized this would be.

I could also edit the sources which is obviously more complicated, but I could add those bonus % to damage attributes there and check them using combat.cpp maybe? I don't know exactly which .cpp file handles damage/healing but I would figure it out.

Anyways, which option would be more viable in your opinion? Thanks for your attention!
 
I did something like this and its easier to go with creaturescripts.

Just use onHealthChange, remember that you can add % damage as primaryDamage or SecondaryDamage. The only problem I had is that
you can't add 2 SecondaryDamage at same time, so you will be boosting either ice, fire, death, holy, energy or earth, etc..

Storages and onHealthChange worked fine for me! Wish it helps!
 
I did something like this and its easier to go with creaturescripts.

Just use onHealthChange, remember that you can add % damage as primaryDamage or SecondaryDamage. The only problem I had is that
you can't add 2 SecondaryDamage at same time, so you will be boosting either ice, fire, death, holy, energy or earth, etc..

Storages and onHealthChange worked fine for me! Wish it helps!
Thanks for the quick reply! I will definitely do that haha

I did something like this and its easier to go with creaturescripts.

Just use onHealthChange, remember that you can add % damage as primaryDamage or SecondaryDamage. The only problem I had is that
you can't add 2 SecondaryDamage at same time, so you will be boosting either ice, fire, death, holy, energy or earth, etc..

Storages and onHealthChange worked fine for me! Wish it helps!
Oh and btw, what do you mean by primary and secondary damage?

If I have an enchanted sword that deals physical damage and fire damage as well, the primary would be physical and the secondary would be fire damage?
 
Last edited by a moderator:
Back
Top