Spawn random traps on the ground, objects or doors:
Spawn a random trap on any or all objects or doors in an area, dependant on the percentage and category type set by the user and also random locations within the area.
If the trap is disabled or triggered it will respawn after a user set delay.
The traps can be stock Bioware traps or custmomize any or all of the settings to suit your module.
Full instructions for respawning random traps:
==============================================
1) Open the area propeties and in the OnEnter event add the script:
se_oea_rsp_traps
Optional - You can set a local float TRAP_AREA_TIMER = (in seconds) on each,
area for faster or slower respawns otherwise the default is used,
see se_inc_resp_trap.
2) Place the invisible object with the tag INVIS_TRAP_SPAWNER_RANDOM,
anywhere in the area.
3) Set a variable(int) on the invisible object to choose the percentage
chance of creating a trap on each object or door in the area.
TRAP_PERCENTILE int = 25 (25% chance of trapping each object/door)
*Note - If the trap percentile is not defined it will default to 50%
4) Set a variable(float) on the invisible object for the trap size.
TRAP_SIZE float = 2 (ie. 2 game meters)
*Note - If no trap size is defined it will default to 1(ie. 1 game meter)
5) Set a variable(int) on the invisible object for the trap strength.
TRAP_TYPE int = 1 (ie. 1 Minor, 2 Average, 3 Strong, 4 Deadly, 5 Epic)
A random trap will be selected from that category.
*Note - If no trap type is defined it will default to 2(Average)
6) Trap DisarmDC is randomly chosen depending on the trap type category ie:
1 Minor = 25 - 35 DC range
2 Average = 25 - 35 DC range
3 Strong = 30 - 40 DC range
4 Deadly = 35 - 45 DC range
5 Epic = 50 - 60 DC range
This can be set to suit your module (see se_inc_resp_trap)
7) For random ground traps place a waypoint tagged RANDOM_GROUND_TRAP_LOCATION,
in various places in the area that will suit a ground trap position.
When the spawner scans the area for objects, depending on the percentile,
each one of these may have a random trap spawned at their location.
*Note - If no trap size is defined it will default to 1.0
(This is not totally random but gives the builder control of where the,
random placement of these traps will/can occur)
8) To ensure a placeable or door is always trapped set this local int on it:
TRAP_ALWAYS int = 1
9) To ensure a placeable or door is never trapped set this local int on it:
TRAP_NEVER int = 1
10)If you want the random traps to be randomized each time a player enter
set this local int on the spawner:
RANDOMIZE_EVERYTIME int = 1
This will remove all previously spawned traps and randomly select new,
objects and locations for the new ones.
11) New optional setting(new to v2.6)
PRESET_TYPE int = 1 to 11
If set that type of trap will be selected rather than a random trap.
PRESET_TYPE int = 1 to 4
(Epic only)
1 = ELECTRICAL
2 = FIRE
3 = FROST
4 = SONIC
12) Optional settings(new to v2.7)
TRAP_DETECTABLE int = 1 (Non-Detectable)
TRAP_DETECT_DC int = 1 to 250
TRAP_DISARM int = 1 (Non-Disarmable)
TRAP_RECOVERABLE int = 1 (Non-Recoverable)
TRAP_MULTI_SHOT int = 1 (Multiple shot traps, new to v2.3)
Optional: Reward XP to the disabler of the trap.
Full instructions are within the read me or play the demo module.
v2.3 added SetTrapOneShot() to the optional settings - 1st May, 2006
v2.4 added optional setting, randomize trap placement every time a player enters - 7th May, 2006
v2.5 minor bug found and fixed
v2.6 added an optional setting to predetermine the type of traps to randomly spawn in the area ie. frost, fire, acid ect.
v2.7 the random trap spawner object can now handle optional settings
Hi. I already added those changes to v2.8 but never got around to releasing it, and yes it makes sence to me btw.
Send me a copy over if you like. It's been awhile since I looked at this system or the changes I made in v2.8 _________________________ City of Melnibone
ausnwn.dyndns.org:5121
Posted by Thales Darkshine at 2008-08-17 00:50:39 Voted 10.00 on 08/16/08
Ok I was a bit off on my version numbers, I started using it all the way back in version 1.3 :)
I was working with the system today and discovered that the one thing that is missing from the system is the ability to set both the created traps tag and specify a script for the OnTriggered event. (specificly for projectal trap triggers)
I made modifications to both the "se_respawn_trap" and "se_inc_resp_trap" scripts changing the default "" value in the CreateTrapAtLocation call for the custom "SE_SpawnTrapAtLocation" function. to "GetLocalString" checks on the invisable spawner object.
(does that make any sence to anybody?)
Sir Elric, I would be happy to send you a copy of the modified DEMO mod that I tested the changes with.
Posted by Thales Darkshine at 2008-08-16 23:56:21 Voted 10.00 on 08/16/08
I have been using Sir Elric's Re-spawning traps on my PW server sence version 2.4 and absoulutly love it. sorry for taking so long to vote on it SE.
Posted by Saduj at 2008-06-05 15:50:23 Voted 10.00 on 06/05/08
Posted by KiRin at 2008-06-05 14:57:20 Voted 9.75 on 06/05/08
really nice idea, works great.
Posted by shockwolf at 2008-03-08 07:35:50 Voted 10.00 on 03/08/08
This is awesome! I'm using it for my NWN2 PW and it works just as well! _________________________ ShockWolF - Author of Wulverheim
Zhjaeve � Know that I must begin every sentence with the word �Know�. Know that everything I say must be known. Know that it is important that you know this.
Only standard traps. Adding custom traps to this package would require some 2da editing and extensive changes to the core code. _________________________ City of Melnibone
ausnwn.dyndns.org:5121
Posted by Serrahn at 2008-02-21 02:04:36 Voted 10.00 on 02/21/08
well just a little maybe stupid question.
what about selfmaded traps? like traps with a bigby spell when triggerd.
does ur script place them too or just simply the nwn standard traps?
so far i just have to say same as most others above: realy a great work.
greetings
Serrahn
Posted by Jargh193 at 2008-02-07 11:39:34 Voted 10.00 on 02/07/08
Sry for duoble post...but scripters should take note and follow in SEs footsteps with the script names. Easy to find to modify or even remove by looking for the scripts with the SE_ at the begining.
Posted by Jargh193 at 2008-02-07 11:36:00 Voted 10.00 on 02/07/08
I forgot all about this script when making Liffe, but when goofing off on another Mod I was helping on (Asvhbourne) I saw it and felt really stupid for not remembering it. Truely a great script, Rates up there with the NESS and DMFI for must haves in a PW.
Posted by Poetic Colossus at 2008-01-20 21:15:29 Voted 10.00 on 01/20/08
Changing vote to 10/10 for ease of use and also for author's through documentation and willingness to help. _________________________ Poetic Colossus
Posted by Poetic Colossus at 2008-01-20 16:24:46 Voted 10.00 on 01/20/08
Truly beautiful piece of work bro - this bad boy is going into little PW project. _________________________ Poetic Colossus
Posted by sporaxis at 2007-12-22 04:56:26 Voted 10.00 on 12/22/07
Actually upgrading my vote. Review, interation and rapid turn around on adding extra functionality pushes this to a 10. _________________________
Sporaxis
"Smashing other peoples bits together to make a better world"
blog: Link
Posted by sporaxis at 2007-12-21 23:41:30 Voted 10.00 on 12/22/07
Sir Elric, Awesome work and thanks, very much appreciated the timely and rapid code update. Impacts two PWs, so very happy.
Sporaxis _________________________
Sporaxis
"Smashing other peoples bits together to make a better world"
blog: Link
@ sporaxis; I have tweaked the code so you can now pass optional settings to the random trap spawner object as requested, such as TRAP_DETECTABLE = 1
Setting optional variables on the random trap spawner object will pass them to the random traps that are spawned(note that specific trap spawner objects in the same area will use their own settings and will NOT be overridden by these changes).
Merry Xmas! _________________________ City of Melnibone
ausnwn.dyndns.org:5121
Posted by issendriel at 2007-12-20 10:05:59 Voted 10.00 on 12/20/07
Tested the system and was extremely impressed with it. It works exactly as described, adding a lot of flavor and mystery to traps. Players will no longer take for granted that they ever "know" a dungeon inside out with this system installed. As usual, great work Sir Elric. Thank you once again for your great work and awesome scripting.
Posted by sporaxis at 2007-12-15 23:57:23 Voted 10.00 on 12/22/07
AS I keep looking at things, one question I have is... Do the random traps have optional settings, especially making them non detectable? _________________________
Sporaxis
"Smashing other peoples bits together to make a better world"
blog: Link
Posted by sporaxis at 2007-12-15 23:23:48 Voted 10.00 on 12/22/07
Just been testing this and noted that the optional switch TRAP_DETECTABLE =1 does not seem to woek. If I set it on the inv placeable, as I understand it, I should not be able to see the traps in the area. Has anyone else observed this behaviour or am I getting things wrong? _________________________
Sporaxis
"Smashing other peoples bits together to make a better world"
blog: Link
Posted by sporaxis at 2007-11-19 03:15:28 Voted 10.00 on 12/22/07
Simply sweet, does more than I thought and does it well. _________________________
Sporaxis
"Smashing other peoples bits together to make a better world"
blog: Link
Posted by DM-Taino at 2007-10-03 03:46:54 Voted 10.00 on 10/03/07
Simply awesome!!
Taino
Posted by MeriLina at 2007-04-05 12:08:03 Voted 10.00 on 04/05/07
Hey, this is great stuff! I can use this in my mod. Thanks for making it! *big smile*
Posted by markrendl at 2007-02-17 14:55:25 Voted 10.00 on 02/17/07
Excellent little script. Using this to great effect on my server.
markrendl
Posted by Mr__Damage at 2007-02-12 22:57:23 Voted 10.00 on 02/12/07
Very nicely done !
Posted by Shargast at 2007-01-25 11:42:27 Voted 10.00 on 01/25/07
Incorporates all the things that I want in a trap system. Easy to use and configure and it delivers what it promises.
Why didn't I think of this!?
Good work
Cheers
Sai aka Shargast _________________________ Realms of Shargast V1-V5ab, LOTR V15, The Undeath Clave & Faithful of Aerth