Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The iprp_onhitspell.2da is used for the On Hit: Cast Spell item property and defines the spells that are cast. These can be put on weapons and ammo to hit a target, or be on shields or armor when hit by an attacker.

Additional Values

You can simply add additional spells into this 2da as new lines, since there is a SpellIndex column to link to the appropriate spells.2da entry.

...

Only one On Hit: Cast Spell on an attacking item can fire at once in a given attack meaning with multiple properties only the first added will fire. To work around this you could have a custom spell fire which then fires whatever effects you need (albeit with some problems if you have other scripts looking for particular spell IDs, although NWNX can work around this).

...

When added to ammunition a bug is present: if the last arrow/bolt/bullet is fired then the On Hit: Cast Spell fails since the projectile lands after the ammunition is destroyed.

When applied to armor or shields the attacker is hit with the spell on the defenders item.

Note that in cases of the plot flag, On Hit: Cast Spell will fail to fire at all.

Spell Information Used

The spells will have this set of information when "cast" in the triggering script and acts very similar to the Cast Spell item property (Eg scrolls, potions etc.):

...