spell_data: value2
Posted: Wed Dec 03, 2008 1:29 pm
LE, is there any way we can start using value2 again for range data? Having to put index_fields in for min/max is actually going to make scripting more complex. I am hoping to minimize the number of scripts necessary to handle our spells. Things start getting pretty complex when you have ranges for damage and/or siphons on some spells, while others are static.
Example:
One spell will do between 1-5 slashing damage, and then apply a DOT for 1 damage (no range).
Another may do crushing damage for 5 (only), and heal the caster for 4hp.
Yet another may want a range for the DOT, too. min/max damage.
As you can see, using a single generic script becomes problematic in that you are now forced to set spell_data values to fill in the otherwise unused parameters (DType, DMin, DMax, Effect, EMin, EMax - etc).
If we used the value / value2 fields already in spell_data, we could set one record for the damage type, the next for the range of damage for the type - then in the script, simply check if value2 ~= nil to determine the need for a math.random().
We talked about this before, but I do not remember the reason value2 was no longer used. What do you think?
Example:
One spell will do between 1-5 slashing damage, and then apply a DOT for 1 damage (no range).
Another may do crushing damage for 5 (only), and heal the caster for 4hp.
Yet another may want a range for the DOT, too. min/max damage.
As you can see, using a single generic script becomes problematic in that you are now forced to set spell_data values to fill in the otherwise unused parameters (DType, DMin, DMax, Effect, EMin, EMax - etc).
If we used the value / value2 fields already in spell_data, we could set one record for the damage type, the next for the range of damage for the type - then in the script, simply check if value2 ~= nil to determine the need for a math.random().
We talked about this before, but I do not remember the reason value2 was no longer used. What do you think?