View previous topic View next topic Go down


Post  DM Ramen on Sat Dec 13, 2008 1:19 pm

Quoted from Dranfaelarun

Secret Doors

I have been working on a secret door script that is based on the system described above but allows two extra degrees of flexibility:

1) You can choose the Secret Object placeable that appears by setting a variable to the resref of the Secret Object placeable you want created - thats one Secret Object Trigger instead of one for each placeable.

The change from PJR's description would be that instead of selecting "Secret Trapdoor Trigger - Reset" and painting with that, you'd be selecting "TSM Secret Door Trigger (Reseting, Variable-based)" (thats what i called it, found under Custom/Triggers/Secret), painting it, and then setting a variable with the value "x0_sec_tdoor2". If you want it to reveal not a trapdoor but maybe a grate, you change that variable to "x0_sec_grate2" instead. has the list of NWN Standard secret objects, but the charm is that any future Custom Secret Objects created don't require a whole separate trigger to be created too, just this one generic trigger with the variable set correctly.

2) I have implemented a pseudoheartbeat on the secret door detection, which I deem as not so costly, and justifiable given that the trigger sizes are generally small, not too many pseudoheartbeats will be firing at the same time. OnEnter, the pseudo heartbeat will fire and run a detection attempt. Every ten seconds until the door is found or the trigger is exited, it will check again.

The heartbeat way is more intuitive to use, as it assumes that if you're standing in an area, the longer you stay there the more chances you'll have to find the door. The way it was before, if you passed by a secret door, you'd have one chance to find it, and if you stayed there where the door should be, you'll never find it - you'd have to leave the area and come back again.

Here's the preliminary documentation I jotted up; when its more revised it should be better to remove the docs for the old way.

Secret Door Trigger (Resetting)

This is a trigger for the origin of a secret door or passageway. It is where the PC needs to stand to search/notice the secret door.

-The tag for the trigger must be identical to the tag of the Origin Waypoint and Destination Waypoint, except without either the LOC_ or DST_ prefix (for details, see below)
-The Search DC to find the secret door is set in Advanced Tab of this trigger, under Key Tag. The default is 15.

The "Reset" or Resetting" part of the trigger name merely means that the secret door or passageway will re-hide itself after being found. This is good for persistent servers like TSM.

How To Make A Secret Door:

To make a one-way secret door or secret anything, three components are needed: 2 Waypoints, and 1 Trigger.
1) An origin waypoint with the tag named appropriately to give a hint of where the secret door is. (Emphasis: based on the ORIGIN) This tag will begin with a prefix "LOC_". This waypoint is placed where the secret door placeable will appear.
2) A secret object trigger (preferably one that resets) with the trigger's tag set to be identical to the locations waypoint's tag (except without the LOC_ part). This trigger is drawn around the area where the PC can search to find the secret door.
3) A destination waypoint with the tag named identically to the origin waypoint (except with a DST_ prefix instead of LOC_) (Remember, the tag is named based on the ORIGIN. It can get confusing sometimes.)

The ORIGIN waypoint is formatted as follows:
LOC_<origin map>_<origin description>
For instance, if the secret door we came through was a door along a cooridor in Cold Bone Castle Level 3, we might have a tag as:
The origin waypoint of a secret trapdoor that is found in the floor of High Hold's magery might be tagged as:

Since the TRIGGER tag is the same as the ORIGIN waypoint's tag without the LOC_ prefix, the trigger tag for the Cold Bone door would be: coldbone3_CooridorDoor. Similarly, the High Hold magery trigger would be: hh_MageryTrapDoor. The Search DC to find the door is set in the Trigger, on the Advanced Tab under Key Tag. The default Search DC is 15.

The DESTINATION waypoint is the same as the ORIGIN waypoint's tag, except with the DST_ prefix instead of the LOC_ prefix. The destination waypoint for the Cold Bone door would be DST_coldbone3_CooridorDoor. Similarly, the High Hold magery trigger would be: DST_hh_MageryTrapDoor.

Casing is not so important except for standardization and ease of reading. Consistency and Uniqueness are more important.

To create the effect of a two-way secret door, it is really just making another one-way secret door in the other direction. Be mindful of the tag name. For instance, if our High Hold trapdoor leads into a treasure room, to create the (second) secret door back, you could create a new origin waypoint tagged LOC_hh_MageryTreasureRoom, trigger tagged hh_MageryTreasureRoom, and the destination waypoint tagged DST_hh_MageryTreasureRoom.

Again, casing and the actual format of the tag is not so important except for standardization and ease of reading. Consistency and Uniqueness are more important.
DM Ramen

Male Number of posts : 354
Registration date : 2008-12-04

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum