Author Topic: thinking about traps  (Read 456 times)

Legacy_azaz1234

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
thinking about traps
« on: January 12, 2016, 01:33:24 pm »


               

i'm trying to make traps work correctly w/flying and non-corporeal creatures [i.e., NOT go off when they pass over them...]. unfortunately nwnx doesn't hook the 'trap triggered' event, so just about everything i've come up with relies on using generic triggers. i've got something that works... kinda. it's pretty kludgey and convoluted and hand-wavey, though.


a player using a trap kit will [using nwnx] lay down a generic trigger 1m bigger than a typical trap. the trigger's on-enter script checks to see if the entering creature is flying or is in the trap-setter's party, and if it is, the script exits. otherwise, a trap of the appropriate type is spawned in at the trigger's location. a subsequent immediate search roll determines whether or not the newly-spawned trap is revealed. if the trap remains undiscovered, or if the entering creature is already within the trap area, the trap goes off. the trigger's on-exit event could be used to destroy the trap until the next go-round.


i'm not happy w/this approach because there are reliability issues, w/trap detection [esp when passive detection is used], triggering, and accurate trap generation. i'm just having trouble coming up w/a better solution.


thoughts ?

 



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
thinking about traps
« Reply #1 on: January 12, 2016, 02:03:43 pm »


               

hm maybe you missed Community Patch?



               
               

               
            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
thinking about traps
« Reply #2 on: January 12, 2016, 07:23:22 pm »


               

To be fair, the CPP doc section on traps doesn't directly describe any changes to flying creatures or hooks into trap events.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
thinking about traps
« Reply #3 on: January 12, 2016, 08:05:40 pm »


               

right. sorry, i should be more clear


 


this functionality ís in 1.72beta using nwnx and nwncx_patch plugins it uses the list of apperances + variable FLYING int 1 (as establishedf in 1.71 documentation) to determine flying creatures - those then ignore ground traps



               
               

               
            

Legacy_azaz1234

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
thinking about traps
« Reply #4 on: January 12, 2016, 08:56:05 pm »


               

sounds promising !


 




[...] those then ignore ground traps




 


this is the key point. finding out which are flying is pretty easy, but how do they then simply ignore ground traps ?



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
thinking about traps
« Reply #5 on: January 12, 2016, 09:08:58 pm »


               


this is the key point. finding out which are flying is pretty easy, but how do they then simply ignore ground traps ?




again this functionality is provided by nwnx_patch (or nwncx_patch) i hooked internal function that checks if trap is gona be fired or not.


               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
thinking about traps
« Reply #6 on: January 12, 2016, 10:31:08 pm »


               

You could also give flying and non-corporeal creatures the effect granting trap immunity.  It would be a slight addition to the OnSpawn script as well as require editing of the polymorph scripts to link the effects.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
thinking about traps
« Reply #7 on: January 13, 2016, 02:21:40 am »


               


You could also give flying and non-corporeal creatures the effect granting trap immunity.  It would be a slight addition to the OnSpawn script as well as require editing of the polymorph scripts to link the effects.




Yes actually this should work as well. I think I decided for the NWNX as it wil enable it in every module automatically without relying on OnSpawn scripts.


               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
thinking about traps
« Reply #8 on: January 13, 2016, 03:25:16 am »


               

What about doors and placeables? Fliers should not be able to avoid those traps.



               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
thinking about traps
« Reply #9 on: January 13, 2016, 04:50:02 am »


               

With immunity to traps you are unable to use doors and placeables that are trapped.  You may still bash them without triggering the trap, however, the use prohibition also means that PCs with this immunity have an indirect way of knowing if a placeable/door is trapped without having to detect the trap or trigger it.


 


However, the main use for trap immunity is probably just for NPCs who have no need of chests, and do not typically open doors on their own.



               
               

               
            

Legacy_azaz1234

  • Full Member
  • ***
  • Posts: 154
  • Karma: +0/-0
thinking about traps
« Reply #10 on: January 13, 2016, 10:07:11 am »


               

these are all great ideas. thanks much for the tips, i think i've got some good possibilities to work with. '<img'>