Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN SCRIPTS

- Jump to comments -
Title  Sir Elric's Random Respawning Traps v2.7
Author  Sir Elric
Submitted / Updated  02-01-2006 / 12-21-2007
Category  Scripting routines
Expansions  HOTU-1.67
Format  Module and Code
Type  Type - Spawning
Includes  None
Description
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.

eg. float TRAP_AREA_TIMER = 3600(1 hr)
float TRAP_AREA_TIMER = 1800(30 mins)

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.

(Minor, Average, Strong & Deadly)
1 = ACID
2 = ACID SPLASH
3 = ELECTRICAL
4 = FIRE
5 = FROST
6 = GAS
7 = HOLY
8 = NEGATIVE
9 = SONIC
10 = SPIKE
11 = TANGLE

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

Files

NameTypeSizeDownloads
se_trap_v27.rarse_trap_v27.rar
Submitted: 02-01-2006 / Last Updated: 12-21-2007
rar15.62Kb1467
Respawnable Traps v2.7 erf
Respawnable_Traps_v27.rarRespawnable_Traps_v27.rar
Submitted: 02-01-2006 / Last Updated: 12-21-2007
rar32.56Kb1261
Respawnable Traps v2.7 demo module

SCORE OUT OF 10
10
41 votes
View Stats
Cast Your Vote!

AWARDS



PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS
No Images




You Must Be Logged In to Participate.
Comments (30):

1 2 3

Posted by Sir_Elric at 2007-12-2118:46:36    
@ 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 on12/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 on12/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 on12/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 on12/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 on10/03/07
Simply awesome!! Taino

Posted by MeriLina at on04/05/07
Hey, this is great stuff! I can use this in my mod. Thanks for making it! *big smile*

Posted by markrendl at on02/17/07
Excellent little script. Using this to great effect on my server. markrendl

Posted by Mr__Damage at on02/12/07
Very nicely done !

Posted by Shargast at on01/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

1 2 3

You must be Logged In to post comments in this section.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Prefab Areas


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters