The iprp_onhit.2da defines the On Hit item properties, notably all hardcoded and can be applied to weapons, gloves and ammunition. There are two other on hit kinds, On Hit: Cast Spell, which fires a spell script and Monster On Hit which does a similar set of effects. The Holy Agenger property also has in-built On Hit effects.
Additional Values
You cannot add additional values they are hardcoded. Best you can do is cast a custom spell (script) that does what you want which is a different item property, called On Hit: Cast Spell. See iprp_onhitspell.2da for details.
Engine Functionality
Firstly you can have multiple of these on one weapon, which can be incredibly powerful, and all will fire (if the % chance activates for them at the same time). They can overlap with a single On Hit: Cast Spell property.
Note unlike On Hit: Cast Spell they cannot be added to armor or shields to "reflect" on hit effects. Since On Hit: Cast Spell can this can be remedied by simply adding such effects there however.
Weapons with ammunition will use the ammunitions properties, eg; Arrows of Dispel Magic can work.
The Dispel and Knock range of properties are evidence there was no On Hit: Cast Spell earlier in development, and these were left in for some reason (perhaps just backwards compatibility with items already using them). These basically act like On Hit: Cast Spell with a set caster level see the table below.
Durations, Chances to Affect and So On
There are some irregularities among the On Hit properties since several allow a chance and duration to be chosen and several do not. Since they are hardcoded (except you can add more % chance / duration / DC amounts) notes are specifically below.
The reason some do not allow it is because they are instant (no duration needed) or have additional parameters that require the use of the Parameter 1 table, like what Poison to apply.
It's a bit annoying the Dispel ones don't use this however, since it's quite powerful to have it happen 50% of the time even at a set caster level.
Note that there are no checks for if the effect already exists, you can have multiple stuns, or confusion effects applied at the same time from the same source.
For dispel purposes since most are magical effects it simply uses the last spell cast level, so 0 if not cast a spell or any value if they have. This is rarely an issue since the duration are so short however. All effect have a spell ID of -1 of course.
Monster versions of these effects are generally the same but not always; eg they always have 100% chance to apply on hit.
| ID | On Hit Sub Property | Chance To Trigger | DC | Duration | Effects (think "mini spell script" with everything hardcoded) | Notes |
|---|---|---|---|---|---|---|
| 0 | Sleep | Parameter 1 (iprp_onhitdur.2da) Default: 5% up to 75% | Item Cost Parameter (iprp_onhitcost.2da) Will save vs. Mind Spells | Parameter 1 (iprp_onhitdur.2da) Default: 5 rounds down to 1 round | VFX: VFX_IMP_SLEEP applied instantly to target. Magical (caster level: last cast spell level) linked effect consisting of:
Applied for the amount of rounds given. | |
| 1 | Stun | Parameter 1 (iprp_onhitdur.2da) Default: 5% up to 75% | Item Cost Parameter (iprp_onhitcost.2da) Will save vs. Mind Spells | Parameter 1 (iprp_onhitdur.2da) Default: 5 rounds down to 1 round | Magical (caster level: last cast spell level) linked effect consisting of:
Applied for the amount of rounds given. | |
| 2 | Hold | Parameter 1 (iprp_onhitdur.2da) Default: 5% up to 75% | Item Cost Parameter (iprp_onhitcost.2da) Will save | Parameter 1 (iprp_onhitdur.2da) Default: 5 rounds down to 1 round | Magical (caster level: last cast spell level) linked effect consisting of:
Applied for the amount of rounds given. | Yes the save has no sub-type |
| 3 | Confusion | Parameter 1 (iprp_onhitdur.2da) Default: 5% up to 75% | Item Cost Parameter (iprp_onhitcost.2da) Will save vs. Mind Spells | Parameter 1 (iprp_onhitdur.2da) Default: 5 rounds down to 1 round | Magical (caster level: last cast spell level) linked effect consisting of:
Applied for the amount of rounds given. | |
| 4 | n/a | Unused by the game here for reference only (possibly was Charm or Dominate, which is even more dumb then Sleep since hitting them again will cause them to lose it!) | ||||
| 5 | Daze | Parameter 1 (iprp_onhitdur.2da) Default: 5% up to 75% | Item Cost Parameter (iprp_onhitcost.2da) Will save vs. Mind Spells | Parameter 1 (iprp_onhitdur.2da) Default: 5 rounds down to 1 round | Magical (caster level: last cast spell level) linked effect consisting of:
Applied for the amount of rounds given. | Oddly uses VFX_DUR_MIND_AFFECTING_DOMINATED not DISABLED which probably is a small bug. |
| 6 | Doom | Parameter 1 (iprp_onhitdur.2da) Default: 5% up to 75% | Item Cost Parameter (iprp_onhitcost.2da) Will save | Parameter 1 (iprp_onhitdur.2da) Default: 5 rounds down to 1 round | VFX: VFX_IMP_DOOM applied instantly to target. Magical (caster level: last cast spell level) linked effect consisting of:
Applied for the amount of rounds given. | |
| 7 | Fear | Parameter 1 (iprp_onhitdur.2da) Default: 5% up to 75% | Item Cost Parameter (iprp_onhitcost.2da) Will save vs. Fear | Parameter 1 (iprp_onhitdur.2da) Default: 5 rounds down to 1 round | Magical (caster level: last cast spell level) linked effect consisting of:
Applied for the amount of rounds given. | |
| 8 | Knock | 100% chance | Item Cost Parameter (iprp_onhitcost.2da) DC is used as per Effects column | n/a | Fires the spells.2da line 93, which is hardcoded (usually Knock). Only fires if the target is locked placeable or door with a open DC of <= the DC on the item property. The caster level in the script is set to 1. The DC is not passed through. | Can fire at the same time as a On Hit: Cast Spell property. Is an unusual case of a spell.2da line being hardcoded into the engine. If spells.2da is altered this will still fire. |
| 9 | Slow | Parameter 1 (iprp_onhitdur.2da) Default: 5% up to 75% | Item Cost Parameter (iprp_onhitcost.2da) Will save | Parameter 1 (iprp_onhitdur.2da) Default: 5 rounds down to 1 round | VFX: VFX_IMP_SLOW applied instantly to target. Magical (caster level: last cast spell level) linked effect consisting of:
Applied for the amount of rounds given. | |
| 10 | Lesser Dispel | 50% chance | Ignored | n/a | Fires the spells.2da line 94, which is hardcoded (usually Lesser Dispel). The caster level in the script is set to 5 (hardcoded). | Can fire at the same time as a On Hit: Cast Spell property. Is an unusual case of a spell.2da line being hardcoded into the engine. If spells.2da is altered this will still fire. |
| 11 | Dispel Magic | 50% chance | Ignored | n/a | Fires the spells.2da line 41, which is hardcoded (usually Dispel Magic). The caster level in the script is set to 10 (hardcoded). | Can fire at the same time as a On Hit: Cast Spell property. Is an unusual case of a spell.2da line being hardcoded into the engine. If spells.2da is altered this will still fire. |
| 12 | Greater Dispel | 50% chance | Ignored | n/a | Fires the spells.2da line 67, which is hardcoded (usually Greater Dispel). The caster level in the script is set to 15 (hardcoded). | Can fire at the same time as a On Hit: Cast Spell property. Is an unusual case of a spell.2da line being hardcoded into the engine. If spells.2da is altered this will still fire. |
| 13 | Mordenkainens Disjunction | 50% chance | Ignored | n/a | Fires the spells.2da line 122, which is hardcoded (usually Mordenkainens Disjunction). The caster level in the script is set to 20 (hardcoded). | Can fire at the same time as a On Hit: Cast Spell property. Is an unusual case of a spell.2da line being hardcoded into the engine. If spells.2da is altered this will still fire. |
| 14 | Silence | Parameter 1 (iprp_onhitdur.2da) Default: 5% up to 75% | Item Cost Parameter (iprp_onhitcost.2da) Will save | Parameter 1 (iprp_onhitdur.2da) Default: 5 rounds down to 1 round | VFX: VFX_IMP_SILENCE applied instantly to target. Magical (caster level: last cast spell level) linked effect consisting of:
Applied for the amount of rounds given. | |
| 15 | Deafness | Parameter 1 (iprp_onhitdur.2da) Default: 5% up to 75% | Item Cost Parameter (iprp_onhitcost.2da) Fortitude Save | Parameter 1 (iprp_onhitdur.2da) Default: 5 rounds down to 1 round | VFX: VFX_IMP_BLIND_DEAF_M applied instantly to target. Magical (caster level: last cast spell level) linked effect consisting of:
Applied for the amount of rounds given. | |
| 16 | Blindness | Parameter 1 (iprp_onhitdur.2da) Default: 5% up to 75% | Item Cost Parameter (iprp_onhitcost.2da) Fortitude Save | Parameter 1 (iprp_onhitdur.2da) Default: 5 rounds down to 1 round | VFX: VFX_IMP_BLIND_DEAF_M applied instantly to target. Magical (caster level: last cast spell level) linked effect consisting of:
Applied for the amount of rounds given. | |
| 17 | Level Drain | 50% chance | Item Cost Parameter (iprp_onhitcost.2da) Fortitude Save vs. Negative | Permanent | VFX: VFX_IMP_REDUCE_ABILITY_SCORE applied instantly to target. Extraordinary (caster level: last cast spell level) effect consisting of:
Applied permanently. | Monster version can drain more than 1 level and is supernatural. |
| 18 | Ability Drain | 50% chance | Item Cost Parameter (iprp_onhitcost.2da) Fortitude Save vs. Negative | Permanent | VFX: VFX_IMP_REDUCE_ABILITY_SCORE applied instantly to target. Extraordinary (caster level: last cast spell level) effect consisting of:
Applied permanently. | Monster version is supernatural. |
| 19 | Poison | 50% chance | Item Cost Parameter (iprp_onhitcost.2da) See EffectPoison for details. | Special | EffectPoison() with the given ability damage - 1d2 of any of the particular ability scores, 2 saves done - 1 instantly and 2nd after 60 seconds. If ability scores are decreased it is a magical EffectAbilityDecrease applied. Appears in GetEffectInteger as posion ID "2". More info: EffectPoison | Monster On Hit version applies a particular poison.2da one. |
| 20 | Disease | 50% chance | Special: Dependent on disease chosen from disease.2da | Special | EffectDisease() of the given disease type is applied. | See disease.2da for more info on diseases. |
| 21 | Slay Racial Group | 50% chance | Item Cost Parameter (iprp_onhitcost.2da) Fortitude Save vs. Death | Instant | EffectDeath(FALSE, TRUE) applied with the instant VFX VFX_IMP_DEATH | |
| 22 | Slay Alignment | 50% chance | Item Cost Parameter (iprp_onhitcost.2da) Fortitude Save vs. Death | Instant | EffectDeath(FALSE, TRUE) applied with the instant VFX VFX_IMP_DEATH | |
| 23 | Slay Alignment Group | 50% chance | Item Cost Parameter (iprp_onhitcost.2da) Fortitude Save vs. Death | Instant | EffectDeath(FALSE, TRUE) applied with the instant VFX VFX_IMP_DEATH | |
| 24 | Vorpal | 100% chance if a critical | Item Cost Parameter (iprp_onhitcost.2da) Reflex save | Instant | EffectDeath(FALSE, TRUE) applied | Notably no VFX is run, and the saving throw isn't vs. Death (Which is more "death magic" really). |
| 25 | Wounding | 100% chance | Item Cost Parameter (iprp_onhitcost.2da) Fortitude Save | Permanent | Internal Wounding effect draining 1 HP/round, the effect type isn't magical it's the same as Feat: Knockdown and others being "not of any type" (or subtype: 0) | Notably no VFX is run Monster version doesn't use the saving throw it seems, and will apply variable amount of damage. |
2da Columns
Since the 2da is hardcoded changing any of these values isn't that useful, except maybe if you've replaced Knock or the Dispel spells with alternatives and need to rename or alter them.
| Column Label | Example | Valid Values | Description and Notes |
|---|---|---|---|
| Name | 986 | Dialog.tlk string reference | The TLK entries simply state the number - eg; 986 is "Sleep" |
| Label | Sleep | Human readable string | Unused by the game |
| Cost | 2 | Float | See parent page on how costs are calculated |
| Param1ResRef | 1 | Index into iprp_paramtable.2da | Reference into what parameters this item property uses. See notes above. Some don't have any. |
2da Contents
2DA V2.0
Name Label Cost Param1ResRef
0 986 Sleep 2 1
1 987 Stun 1 1
2 988 Hold 2 1
3 989 Confusion 1 1
4 **** **** **** ****
5 991 Daze 0.75 1
6 992 Doom 2 1
7 993 Fear 1 1
8 994 Knock 1 ****
9 995 Slow 1 1
10 996 LesserDispel 2 ****
11 997 DispelMagic 3.5 ****
12 998 GreaterDispel 5 ****
13 999 MordsDisjunction 6.5 ****
14 1000 Silence 1 1
15 1001 Deafness 1.5 1
16 1002 Blindness 1.5 1
17 1003 LevelDrain 3.5 ****
18 1004 AbilityDrain 2.5 2
19 1005 ItemPoison 2 10
20 1006 Disease 2 6
21 1007 SlayRG 3 5
22 1008 SlayAG 4 3
23 1009 SlayAlignment 3.5 4
24 740 Vorpal 5.0 ****
25 741 Wounding 2.0 ****