savingthrowtypes.2da allows changes to existing and adding custom saving throw types (eg editing Fire or adding Psychic). Changes in iprp_saveelement.2da allows for items to also point to the new entries you create. It was added in 1.89.8193.37

Hardcoded Aspects

Line 0 cannot be used and refers to "no saving throw versus" in the engine.

Death Saving Immunity Note

While mind spells, poison etc correctly check for immunties, Death saves do not. Instead the game engine is bugged so it never got checked. Instead EffectDeath is when the immunity is checked. Developers left the state of it as it is since otherwise some spells would bug out (Eg Implosion).

Adding New Saving Throw Types

Primarily you need to add a new valid row here, then add a related change in iprp_saveelement.2da

Then use it in your own spell scripts, since the engine by default won't use them. The messages sent to clients are then identical to usual.

2da Columns

ColumnExample ContentsValid ValuesDescription and Notes
ID0Integers 0-255

These line IDs are the SAVING_THROW_TYPE_* values. 255 limit due to network traffic.

LabelMind_SpellsText

Simple label unused by the engine

Strref8107String reference

Used for messages on the client

Immunity1Reference to IMMUNITY_TYPE_* values.

See https://nwnlexicon.com/index.php/Immunity_type

Thesr are checked and change the result of the save functions. So if you changed death immunity to be added for line 11 (putting in 32 in this column) both the in engine and spell scripts would start to respond however this may make that more powerful than intended (see Saving Throws).

ImmunityOnlyIfSpell01 or 0 (or **** which counts as 0)

Would have been used for death immunity but the engine was not checking it at all properly (it checked the target's spell ID being cast, which is usually cleared outside of a spell script itself). But you can combine this with the Immunity column to have the immunity only apply when a spell is detected (so death immunity can apply to just spell applied versions).

To contrast mind spells immunity actually makes you immune to all mind effects not just spell applied ones (although ones from items etc could be considered spell like).

What counts as a spell for the purposes of this column? If the saving throw is running from a spell script or if from an AOE script with a valid spell ID, and that Spell ID maps to a spells.2da entry where UserType is either Spell or Spell Ability (values 1 or 2).

2da Contents

2DA V2.0

        Label           Strref   Immunity   ImmunityOnlyIfSpell
0       Universal       ****     ****       ****
1       Mind_Spells     8107     1          0
2       Poison          879      2          0
3       Disease         1006     3          0
4       Fear            804      4          0
5       Sonic           2202     ****       ****
6       Acid            1027     ****       ****
7       Fire            1028     ****       ****
8       Electricity     8114     ****       ****
9       Positive        5159     ****       ****
10      Negative        5158     ****       ****
11      Death           4722     ****       ****
12      Cold            1029     ****       ****
13      Divine          5155     ****       ****
14      Trap            5563     5          0
15      Spell           2295     ****       ****
16      Good            265      ****       ****
17      Evil            266      ****       ****
18      Law             4943     ****       ****
19      Chaos           4944     ****       ****
20      Paralysis       5161     6          ****

  • No labels