- Joined
- Nov 17, 2010
- Messages
- 6,756
- Solutions
- 578
- Reaction score
- 5,305
The idea is simple.
onHealthChange / onManaChange is when all calculations are completed, and the final amount +/- that the player is going to receive.
(name of functions pending... xD)
onStatsChange / onDamageReceived is before any calculations are completed.
Ideally this will only be a pass-thru function, where we are able to modify the damage/healing/modifier values before they are number crunched by the source.
args.. (creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin, modifiers)
modifiers -> anything in the source that can potentially modify the damage.
Such as.. item attributes(resistance, armor, block chance), critical chance/damage, et cetera
--
This function would be incredibly useful, since there is currently no simple way to get at damage values until after all these calculations are completed.
There are some things that are literally impossible to resolve without this function, and the reason I'm suggesting it.
--
Some quick scenario's off of the top of my head where this would be useful.
Event area creatures could get a damage boost depending on how many players were in the event.
-> (alternative would be to create custom spells for your event monsters)
Equipped items with modifications that boost/lower resistances.
-> (Currently impossible. Every alternative method has small to large issues. Some scenario's are possible, where others are not.)
Leech effects for the player could be based off of the initial damage instead of the damage taken.
-> (Alternative would be to have every weapon / spell modified to check for the damage and apply leech?)
-> (And you'd have to create your own leech attribute in Lua, otherwise you'd get double leech.)
--
As you can see there are some easily thought of scenario's where the effort : reward ratio would be minimized by the function and also other scenario's that are impossible to achieve without this function.
So, that's my idea.
Let me know what you think?
onHealthChange / onManaChange is when all calculations are completed, and the final amount +/- that the player is going to receive.
(name of functions pending... xD)
onStatsChange / onDamageReceived is before any calculations are completed.
Ideally this will only be a pass-thru function, where we are able to modify the damage/healing/modifier values before they are number crunched by the source.
args.. (creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin, modifiers)
modifiers -> anything in the source that can potentially modify the damage.
Such as.. item attributes(resistance, armor, block chance), critical chance/damage, et cetera
--
This function would be incredibly useful, since there is currently no simple way to get at damage values until after all these calculations are completed.
There are some things that are literally impossible to resolve without this function, and the reason I'm suggesting it.
--
Some quick scenario's off of the top of my head where this would be useful.
Event area creatures could get a damage boost depending on how many players were in the event.
-> (alternative would be to create custom spells for your event monsters)
Equipped items with modifications that boost/lower resistances.
-> (Currently impossible. Every alternative method has small to large issues. Some scenario's are possible, where others are not.)
Leech effects for the player could be based off of the initial damage instead of the damage taken.
-> (Alternative would be to have every weapon / spell modified to check for the damage and apply leech?)
-> (And you'd have to create your own leech attribute in Lua, otherwise you'd get double leech.)
--
As you can see there are some easily thought of scenario's where the effort : reward ratio would be minimized by the function and also other scenario's that are impossible to achieve without this function.
So, that's my idea.
Let me know what you think?