The row number for the entry you made is the number used in EffectPolymorph();
For example if I made a dragon in row 107 (the row after the last standard BioWare entry), I would use EffectPolymorph(107) to reference that polymorph. You can also define a scripting constant to be used for the custom polymorph. For example if you put
const int POLYMORPH_TYPE_CUSTOM_DRAGON = 107;
into an include file, then all scripts using that include file would know that POLYMORPH_TYPE_CUSTOM_DRAGON would refer to your custom polymorph you defined on row 107 of polymorph.2da.
The "Name" column of polymorph.2da does not specify the scripting constant as far as the game engine is concerned. Rather this column is just to help the reader know what polymorph is being used. Not all polymorphs have scripting constants. The dragonkin polymorph and all polymorphs after row 78 do not have constants. For these you need to use the row number to reference them. For example, Polymorph(84) would specify the wisp form. What determines whether or not the game has associated a constant is found in the script "nwscript". In that script all constants that exist are defined and all core functions are declared.
Modifié par WhiZard, 23 juin 2013 - 02:21 .