This is complicated, let me try:
itemproperties.xls defines all item properties, some of which match to ENCHANTEMENT_* constants
each item property defines an effect id which is generated and has it's data fields populated from the 2da.
these effects are most often effects applied to the wearer of the item while it is equipped - they are not the effect that is applied to the target.
The field of the effect defined in the 'scaling vector' column is multiplied with the POWER of the item (as defined on the item template) when the effect is created. If no item is involved (e.g. with enchantment spells, the script that applies the item property sets the power by it's own rules (e.g. char level /5)).
However there is a special type of item properties (type field) that defines active 'on hit' behavior. OnHit type item properties have a 'post procssing' handler which is invoked from the engine whenever a physical hit happens during a COMMAND_ATTACK, which is defined in rules core.
It invokes the handler from there which is defined in sys_itemprops or something (don't remember right now, no
toolset handy). All OnHit effect logic is in that script - nothing hardcoded there.
I wouldn't give to much about those comments, I know Peter reworked a lot of the poison stuff pretty close to ship, not sure if those comments got updated all along with that.
Hope that helps you out.
Bidby is credit to team

Bibdy wrote...
1.4 is up, complete with potion and trap tooltips!
Would anyone be so kind as to figure out how in the heck poisons work? Right now, all I have to go on are some comments in the effect_enchantment_h file, which state
const int ENCHANTMENT_FIRE_COATING = 3003; // 2 fire damage per power
const int ENCHANTMENT_COLD_COATING = 3004; // 2 cold damage per power
const int ENCHANTMENT_LIGHTNING_COATING = 3005; // 2 electricity damage per power
const int ENCHANTMENT_NATURE_COATING = 3006; // 2 nature damage per power
const int ENCHANTMENT_SPIRIT_COATING = 3007; // 2 spirit damage per power
const int ENCHANTMENT_VENOM = 3008; // 1 nature damage per power, 0.1 slow per power for 5s (unresistable)
const int ENCHANTMENT_DEATHROOT_EXTRACT = 3009; // 1 nature damage per power, 2s stun per power (resistable)
const int ENCHANTMENT_CROW_POISON = 3010; // 2 nature damage per power, 0.1 slow per power for 5s (unresistable), 2s stun per power (resistable)
const int ENCHANTMENT_SOLDIERS_BANE = 3011; // 5 stamina damage per power (non-mages only)
const int ENCHANTMENT_MAGEBANE = 3012; // 5 mana damage per power (mages only)
const int ENCHANTMENT_DEMONIC_POISON = 3013; // 5 spirit damage per power
const int ENCHANTMENT_QUIET_DEATH = 3014; // 10 nature damage per power, instant kill creatures 20% or less max health
Which isn't very clear. I have a hunch that power means ([Character level/5]+1), but beyond that, I haven't a clue where the numbers come from, or if they're even still accurate.
Modifié par Georg Zoeller, 05 décembre 2009 - 02:54 .