BioWare Atari
BioWare Info BioWare Games Support Forums Visit the BioWare Store
Neverwinter Nights Home
Neverwinter Nights Home

Creating a Hidden Trap Door

Intended Audience: For Builders
By Robert Babiak

Summary

Be sure to also check out the Hidden Wall Door tutorial that uses a new upright door item!


Before Detection

No dungeon is complete without those tricky secret doors that lead to untold riches... or a horrible squishy death. Mighty BioWare programmer, Robert Babiak, has created a system that will allow the devious DM to include secret trap doors in their campaign.

The trap door will remain hidden and invisible until discovered by PCs that are proficient with the Search skill.


After Detection

Basically, a hidden trap door will remain invisible until a PC succeeds on a skill check. When the PC succeeds on this check, the trap door will become visible and useable. The location of the trap door is specified by the use of an invisible object. There is also a Blueprint of the trap door placable object that is created by the triggering invisible object to provide the door.

Importing the Hidden Trap Door Into the Toolset

  1. Download the Hidden_Door.erf - version 1.3 (13 KB)
    (Updates are listed here)
  2. Save it to a location where you can find it.
  3. Open the toolset.
  4. Under the File menu select the 'import' option.
  5. Browse to where the Hidden_Door.erf is saved.
  6. Select OK. Read the Comments if you wish.
  7. Look in the placable pallet for the two blueprints on the 'Custom' tab.
  8. Under Miscellaneous Interior you will find Hidden Trap Door and Hidden Trap Door Trigger

Using the Hidden Trap Door In Your Module

The use of the hidden trap door is based on three things:

  • The radius in which the PC can attempt to find this door,
  • The DC (difficulty rating) to locate the door based on the PC's Search skill.
  • The TAG of the hidden door trigger. This is used to locate the Waypoint that the player should be moved to.

9. Open your module in the Toolset.

10. On the placable's pallet select custom and locate the Hidden Trap Door Trigger.

11. Select it, and paint this object onto your map.

12. Right-Click the trigger and select the Properties.

13. Select the Tag field and enter a tag for this hidden door. Name it something meaningful, in this case I will name it 'Basement'.

14. Next select the Reflex Save field, which is used to control the distance at which a PC can search for this door. Set it to the distance you want the PC to be able to find this door. In my example I am going to set it to 15 meters. 10 meters is the size of one tile so 15 meters will be a tile and a half.

15. Now select the Will Save field, which is used to control the DC of finding this door. Set this value to what you wish. In my example, I am going to make it a moderately difficult door to find and set it to a 20. An easy door to find is a DC 15 and a very hard door is a DC 30. An untrained check is based on a D20 roll so anything over 20 will be VERY hard to find. It should be noted that the way this door is written it will be doing a check every heartbeat on the trigger (approximately every 2 seconds) so a player standing around may find it possible with sufficient time.

16. Select OK to close the properties dialog .

17. From the Waypoints pallet select a generic Waypoint and place it where the hidden door trigger is. This is not needed for functionality but it lets you find it again easier. This is because the trigger is based off an invisible object and therefore does not display in the toolset unless it is selected.

18. Now place a waypoint where you want your trap door to go to.

19. Right click on this Waypoint and select the properties.

20. Select the Tag field and enter DST_ and the tag from your hidden door trigger as you entered it in Step 13. In my example, I will enter DST_Basement. Note: this is case sensitive.

21.Select OK to close this dialog.

22. Now save and load your module.

23. Load your friendly neighborhood Rogue and go stand near your hidden door. When it is found it will fade in and you will be able to open it. It will now act as a regular door.

Viewing the Code

If you are interested in viewing the 2 scripts used to create the Hidden Door functionality, you will find them listed under 'Scripts' directory in the Toolset. Right-click and select 'Edit' on either the 'detectsecret' script, or the 'trapdoor' script. Both scripts are well commented and should be easy to understand.

Script Updates - added in version 1.3

  • Fixed error in the 'detectsecret' script.
  • The orientation of the trigger object will now be set to the trap door. This allows the direction of the final trapdoor to be set.
  • Added a reset ability to the door. Set a local integer on the trigger object named "Reset" and set its value to 1.
  • Added a optional delay to the hidding of the door. Set a local FLOAT on the door named "ResetDelay" and give it the delay before destruction. This should be done before seting the Reset flag.

Comments from Robert B. about the Hidden Door

"The development of this pair of placables was not too hard. I started with a standard trigger that created an object. This approach worked, but I had two difficulties. The first difficulty was the trapdoor would appear where ever the start of the trigger was placed, and second difficulty is that you had to enter the trigger to detect the door. This prevented the casual discovery of the secret door as it only checked the trigger the first time upon entering and would never check again.

The next idea was to use the invisible object to check on a heartbeat if a PC was close to the object and then do the skill check to see if the PC finds the door.

Once I had the door being created, I played around with the code moving to a waypoint. At first I was planning on having each secret door have a custom script to move the PC to a waypoint, but then decided that it could be done with a generic script. "

 

 

BioWare Blog
Neverwinter Nights 2 Forums
Hide/Show

English
Deutsch
Français
Español
Italiano

Hide/Show

View Latest Screenshots 

View Latest Screenshots
Hide/Show

Multiplayer Games at Neverwinter Connections

Today
Schedule a Game...



Current time is: (set time)
Sat, 04 July 2009 10:33AM

Hide/Show

Buy Premium Modules

Top NWN: HotU Modules:
1. Good vs Evil III
2. More...

Top NWN: SoU Modules:
1. Good vs Evil III
2. More...

Top CEP Modules:
1. The Lord of Terror The Diablo Campa...
2. More...

Top Modules - NWVault:
1. Hall of Fame
2. More...

Total Modules: 4423

Hide/Show

4,502,790 BioWare Users:
  59 Logged In
  4 Hidden
  164 Guests

865 Playing Online
  100% NWN
  100% NWN: SoU
  99% NWN: HotU

465 Registered Guilds

8,344,603 posts in forums

Newest Forum Topics:
1. Playing from a backup of a full ... (Baldur's Gate II: SoA and ToB Technical Support)

2. In that video.. (Mass Effect 2 General Discussion (No Spoilers Allowed))

3. r (Dragon Age: Origins General Discussion)

4. Plugin to remove/hide temporaril... (NWN2: Tools and Plugin Developers)

5. Is it possible to....? (Xbox Version (Spoilers Will Be Moved) - Star Wars: Knights of the Old Republic)