Traps in NWN can actually be relatively advanced; although have their limits.

Trap XP System

A automatic trap XP system might be a good idea for disarming traps. There is no "On Recovered" only an OnDisarm event, which is set usually on the blueprints of the triggers. Traps placed by players don't set this event so it's relatively "safe".

However for traps in a module already placed these won't get the event set. It might be a script can set this event properly on all traps in the game.

Standardise trap script

The trap script should probably be all made into one file, eg; op_trap.nss - which deals with each type of trap based on the trap firing (which can be found by the object firing it's blueprint name). Or we run separate scripts with some include file for them to standardise.

Bugs

Some traps don't check if the people in a given area are friendly. Do reputation checks even work with traps? Need to test.

Some DC's are not really standardised or even consistent.

Any DelayCommand issued from the trap script may not fire since the trap object may disappear before it can be done - need to double check this. Possibly have a script execute on the area to apply the damage/vfx instead. It's one thing some traps lag a lot since a lot of VFX fire instantly.

Note that there are bugs around firing EffectDamage instantly from any script with a loop (the loop may reset due to other scripts being run) - and current traps commonly do this.

Additional Trap Types and Difficulties

It would be good to add some easier and harder trap difficulties and flesh out all the options for them, as in having Epic versions of each trap type. This will also require item blueprints.

Some new trap types below would allow PCs to use additional trap types in perhaps more interesting ways as well.

Trap Types

iprp_trapcost.2da and versions are put into traps.2da / as blueprints.

IDNameLabelCostDefault Versions MissingEffectPathetic SpecMinor SpecAverage SpecStrong SpecDeadly SpecExpert SpecEpic SpecGodly SpecNotes and Description
12258Spike0.2EpicPiercing Damage on entering object only

DC 15 reflex adjusted

2d6 Piercing Damage

Entering object only

DC 15 reflex adjusted

3d6 Piercing Damage

Entering object only

DC 15 reflex adjusted

5d6 Piercing Damage

Entering object only

DC 15 reflex adjusted

25d6 Piercing Damage

Entering object only




Really odd how the DC doesn't increase past 15, although reflex adjusted damage does make it possible to still take quite a bit from the deadly one
22259Holy0.5EpicDivine Damage on entering object only

4d10 vs. Undead

2d4 vs. Other

Entering object only

5d10 vs. Undead

3d4 vs. Other

Entering object only

8d10 vs. Undead

6d4 vs. Other

Entering object only

1d12 vs. Undead

8d4 vs. Other

Entering object only




Oddly no saving throw (the script suggests a "Attack roll" was going to be used but functionally the code isn't in use).
32260Tangle0.7EpicEffectSlow in area

DC 20 reflex save

3 round duration

Small radius size

DC 25 reflex save

4 round duration

Small radius size

DC 30 reflex save

4 round duration

Medium radius size

DC 35 reflex save

5 round duration

Medium radius size




EffectSlow applied for 4 rounds on all people failing a reflex saving throw, in a medium radius around the target

No reputation checks

42261BlobOfAcid1Epic

Acid Damage (always)

EffectParalyze (reflex save)

Entering target only


DC 15 reflex save

3d6 acid damage

2 round duration

DC 20 reflex save

5d6 acid damage

3 round duration

DC 25 reflex save

12d6 acid damage

4 round duration

DC 25 reflex save

18d6 acid damage

5 round duration




Oddly the Deadly trap doesn't have an increased saving throw
51028Fire1.4
Fire damage in area (reflex adjusted)

DC 18 reflex adjusted

5d6 fire damage

Small radius size

DC 20 reflex adjusted

8d6 fire damage

Small radius size

DC 23 reflex adjusted

15d6 fire damage

Medium radius size

DC 26 reflex adjusted

25d6 fire damage

Medium radius size


DC 33 reflex adjusted

50d6 fire damage

Medium radius size


This does GetIsReactionTypeFriendly, wonder if that works
61030Electrical1.8
Electrical damage in area








72262Gas2.5EpicEffectPoison AOE which lasts a while







Really overpriced IMO
86617Frost0.4
Cold damage and paralysis on entering object only








96618Acid_Splash0.4EpicAcid damage on entering object only








106619Sonic0.4

Sonic Damage (always)

EffectStunned (will save)

Affects an area










116620Negative0.5Epic

Heals undead always

Negative damage on others always

EffectAbilityDecrease - Strength on failed fortitude save

Entering object only












Boulder1.5

Bludgeoning damage vs. reflex adjusted

Area of effect









Classic "rocks falls" trap. Spike trap variant.


Swinging_Axes1.5

Slashing damage vs. reflex adjusted

(small) Area of effect or single target









Rocking those swinging blades! Spike trap variant.


Dart0.1
Piercing Damage







Comes from a given placeable, or creates a placeable to fire it from if not.


Arrow0.4
Piercing Damage







Comes from a given placeable, or creates a placeable to fire it from if not.


Bolt0.4
Piercing Damage







Comes from a given placeable, or creates a placeable to fire it from if not.


Shuriken0.1
Piercing Damage







Comes from a given placeable, or creates a placeable to fire it from if not.
































Dispel_Magic2.0
EffectDispelMagicBest







Runs EffectDispelMagicBest(DC). This hopefully works from trap objects. If not a placeable could be created for the purpose of applying it. Might be applied in an area ala the spell.


Dispel_Magic_All5.0
EffectDispelMagicAll







Really crazy powerful this option...


spell_magic_missile1.0









Spells are hard to do:

  • The caster level of a given spell (used for resisting it primarily, but also duration of effects commonly) will be auto determined based on the level of the spell making it difficult to override for higher level traps
  • Require a placeable to cast (and if the target is out of range...welp? can of course create it on them)
  • For AOE's if the placeable that was used to cast them is destroyed it makes the AOE stop working. Can the area create the AOE instead perhaps? Need to test else we'll be leaving placeables everywhere.

We could for each one actually have a different spell cast in each "slot" but this is...somewhat difficult. The trap names would also need to be thematically similar. Mmmm.



spell_sleep













spell_flame_arrow













spell_negative_energy_burst













spell_stinking_cloud













spell_web













spell_blindness_deafness


























Trap Difficulties

iprp_traps.2da line

IDNameLabelCostNotes
06606

Minor

0.4
16607Average0.7
26608Strong0.9
36609Deadly 1.4
483333Epic2.8
5tbcPathetic0.2Very limited damage and super low DCs
6tbcExpert2.2Between Deadly and Epic, top end of level 20's perhaps
7tbcGodly4.2Going beyond Epic...!
  • No labels