These scripts can be found in the free-to-use module tnhScript.osm. Fan-mission authors may include the script module in their mission as long as they fully comply with the Dromed EULA.
This fan-mission contains sample uses of most of the scripts.
Dromed provides standard properties and links for scripts to use. The ControlDevice link is most often used to assocated a trigger (the source of the links) with a trap (the destination). Scripts which have a delayed effect usually check the Script→Timing property for the time value.
Custom scripts often require settings not provided by the standard properties. The Editor→Design Note property is used for additional configuration options.
When a special type of link is required, the association is made with a ScriptParams link and the data of the link tells what the special meaning is.
Many of the scripts share common features. These are implemented in three generic scripts.
| GenericTrap | A switch-like script which responds to TurnOn and TurnOff messages. |
| GenericScale | A knob-like script which works with a numerical argument. |
| GenericControl | A script which can take a string argument. |
| GenericTrigger | A script that is more likely to send triggers, than receive them. |
All of the generic scripts should put a meaningful value in the message return argument, or at least set it to non-zero if I couldn’t think of anything “meaningful.” This is so the scripts can be used directly in a pseudo-script. Returning zero causes the pseudo-script to abort, which usually is too drastic.
| ScriptController | Send a ScriptControl message to other objects. The first message data argument is the control string, as usual. The second argument can name the object to send … |
| CommandControl | Executes an internal Dromed command. Multiple commands may be executed by separating them with ;. You can get a list of commands by typing in Dromed: dump_c… |
| TrapFrobber | Translate a TurnOn message into FrobWorldEnd. Most useful for converting a book, plaque, or scroll into a trap. It is not necessary for the object to have the… |
| TrigFrobber | Translate a FrobWorldEnd into TurnOn. The reverse of TrapFrobber, basically. The trap control flags are ignored, so you can use them for a more useful script. … |
| TrapMoveRelative | Move and apply velocity to an object relative to its current position. Works similarly to a teleport trap. Instead of a reference object, you specify the posit… |
| TrapCampaignQVar | Set the value for a quest variable that is stored in the campaign database. The quest variable will always be saved to the campaign database, even if it was pr… |
| TrapKillEvents | This can disable user input. All user input, which means even the escape key doesn’t work. So the script will always time out even if you don’t set the Script\T… |
| TrapCamAttach | Attach the camera to this object. Returns to normal viewing when turned off. When the camera is attached to an object that isn’t the player, it may have a lens… |
| TrapFreezePlayer | Prevent the player from moving. Basically, the extreme opposite of a speed potion. The TurnOn and TurnOff responses are more like a trap than a scale. Turning … |
| TrapThreshold | Will send TurnOn after having received a certain number of prior TurnOn messages. That is, every nth TurnOn will be relayed. The counter that tracks messages ca… |
| TrapRandomTimer | Relay TurnOn and TurnOff along ControlDevice links after a random delay. The time will be at least min_time and no more than max_time. Respects all TrapContro… |
| TrapRelayRepeat | Relay TurnOn a repeated number of times with a delay between firings. By default, the relay will repeat indefinitely. The parameter repeat will limit how many … |
| TrapRenderFlash | Display a render flash and optionally play a sound. Make a RenderFlash link from the object (or its archetype) to the archetype of a flash SFX. To play a sound,… |
| TrapDisarmPlayer | Remove offensive items from the player’s inventory. Items are returned to the player when the trap is turned off. Removes object of type Weapon, Projectile, C… |
| ObjFrobInert | Keeps linked objects frob-inerted until the object is Slain. Most useful for door-like objects such as a window, but it doesn’t need the door properties. Messa… |
| DoorFrobInert | Add and remove the FrobInert metaproperty based on the door state of this object. If the door is breakable, then the metaproperty is permanently removed when t… |
| GrabFrobInert | Removes the FrobInert metaproperty when the object is picked up. The effect can also be achieved by adjusting the Inventory\Pick Bias property. Inherits ObjF… |
| TweqFrobInert | Add and remove the FrobInert metaproperty based on the state of a joint tweq. When the primary joint is in Reverse, then the objects are frobbable. This works… |
| TrapFrobInert | TurnOn makes the objects frobbable, TurnOff the opposite. Has all the expected behaviors of a trap. Inherits ObjFrobInert Messages TurnOn, TurnOff, Timer P… |
| UnlinkOnContained | When the object is contained, delete all links from another object. The source(s) of the links is determined from a ScriptParams link with data Unlink. Use th… |
| TimedGrenade | A timed grenade is armed when it is thrown (but not dropped) from the player’s inventory. The grenade arms itself by playing a schema and activating a model twe… |
| ZeroGravRoom | A room script. It sets the player’s gravity to zero when entered, and to normal gravity when exited. This is a copy of a script used in System Shock 2. Create … |
| TrapFadeOut | Gradually fade-out to black. The argument is the duration of the fade, in seconds. The screen will remain black until a TurnOff message is sent to the script. T… |
| LockHelper | Script that sends TurnOn based on various interactions with a locked object. The triggers are sent along ScriptParams links that have the data set to a correspo… |
| TrapSiblingRelay | Aids when multiple objects can be used to control a trap. Create a group of relays with this script on them. Using ScriptParams links with the data Sibling, co… |
| TrigContact | Sends TurnOn and TurnOff when another object makes or breaks contact with this one. Link from this object to another using ScriptParams with the data set to Con… |
| TrapText | Displays book text when turned on or frobbed. If there is no Book\Text then Editor\Design Note is displayed. Putting book text in Editor\Design Note is conveni… |
| FocusPlaque | Display the book text on-screen when the object is hilighted. Will remove the text when unfocused, unless the trap control flag NoOff is set. Messages WorldSe… |
| ContainerPhysics | Transfers the velocity of a container to the items it contains when the container is slain. The objects are randomly distributed within the dimensions of the co… |
| RandomPatrolPath | This script allows you to create multiple patrol paths for a single AI. Create the different patrol paths as normal, but manually link the AI to the each possib… |
| RandomStartingPoint | Moves the starting point to a randomly-selected location before the Player object is created. A single starting point is created as normal. From that point, cre… |
| TrigDoorOpening | Sends messages when a door opens or closes. The messages sent can be handled by the script TweqOnOff to control a tweqable object. The Invert trap control flag … |
| InvCarryOver | The first of a pair of scripts that allow you to have persistant containers. To make an object carry over, create a ScriptParams link with data CarryOver from t… |
| InvLoadUp | Creates objects based on quest variables that were set in a previous mission. It looks for quest variables that begin with inv_. If the parameter inv_code is se… |
| GenericPotion | Works with the standard script TimedPotion. On StartPotion, add a metaproperty to the recipient. Recipient is usually the frobber, or specified by the optiona… |
| InventoryMetaprop | Adds a metaproperty to the Player while the object is in his inventory. Messages Contained Parameters inv_effect (object) Metaproperty to add. |
| TrapContainer | Moves the items that are contained by this object to a ControlDevice linked object. Turning off the trap will move contained items out of the linked container a… |
| TrapDispenser | Creates a new object and places it into a container. Link to the destination, which may be the starting point, with ControlDevice. Inherits GenericTrap Links… |
| TrigPurchase | Put this script on an item in the pre-mission store and it will trigger whether or not it was purchased. Specifically, it will test if the object is in the play… |
| SimpleGun | This is a demo script and (probably) may not be around for long. You frob an object and it shoots a projectile. Simplistic and boring and not at all Thief-like… |
| TurnAtWaypoints | Will turn a moving terrain object so it has the same orientation of the waypoint it just reached. This looks best when the objects are turned so they point in t… |
| VisibleRelay | Relays TurnOn and TurnOff conditional on whether an object is currently on-screen. With the trap control flag Invert, it relays when the object is not shown. Th… |
| ResetTweqState | Works with all tweq types except Lock or Delete. When the tweq halts, the appropriate properties for the object will be reset to default values. The defaults ar… |
| RecallDevice | When turned on, all ControlDevice linked objects are teleported to the location of the Player object. This is meant to be used to move a teleport trap so when … |
| TrigProxFrob | When frobbed, TurnOn will be sent if the frobber is currently within a certain area. A proximity object, identified by a Route link, will be checked for Populat… |
| PoliteVOTrap | Plays a voice-over schema only if there are no AIInvest links to the Player object. Why? Because it doesn’t make sense for Garrett to be cutting wisecracks whi… |
| TrigSchemaDoneSpec | Triggers on SchemaDone with a specific schema name Inherits GenericTrigger Messages SchemaDone Parameters schema (object) |
| AIGoMissing | When slain or knocked-out, a marker is created at the idling origin of the AI. The archetype MissingPerson is used and should be created with an appropriate sus… |
| MissingMarker | Delayed response when an object goes missing. Makes the object suspicious after a timer. Messages GoMissing, NotMissing Parameters missing_delay (time) |
| UndeadRadar | React to an UndeadStim stimulus by adjusting the Renderer\Dynamic Light proportional to the intensity of the stim. The Script\Timing property controls how long … |
| TrigBreadcrumb | A bounding-box trigger in which a passing AI can “sense” the Player. Place these in hallway junctions then link each trap to each of the nearby traps that the … |
| FollowBreadcrumb | Responds to the message Breadcrumb. The AI will be directed to go to the object the message specifies. If the AI is at high alert, then nothing happens. The min… |
| RainSFX | Turn off particles when weather effects are disabled. Messages Sim, DarkGameModeChange |
| TrackAttach | Adjusts the position of an attached object to follow the moving base object. Requires the DarkHooks helper module. Messages DHNotify Links PhysAttach Prop… |
| ElevatorCar | When the lift is about to move, activate the joint tweq in reverse and wait for it to complete. On TweqComplete, activate the lift. On WaypointReached, stop the… |
| TrigElevator | Triggers when moving terrain starts and stops. Messages Starting, Stopping |
| TrapPhysical | Control an object’s presence in the world. Inherits GenericTrap Properties Renderer\Has Refs |
| TrigProximity | Trigger for activating devices when the Player is nearby. Inherits GenericTrigger Messages TurnOn, TurnOff Parameters proximity (number) Radius of the a… |
| ScaleTweqJoints | Manipulates a joint tweq of an object. The tweq range in Tweq\Joints is multiplied by the scale value to set the joint position. Inherits GenericScale Proper… |
| KnockOnDoor | Signal an AI when you frob a door that is closed and locked. The AI has an Owns link to the door it will respond to. Messages FrobWorldEnd Links Owns Signa… |
| OnScreenText | Display text from a book file on-screen. Supports multiple pages, color, and auto-scroll. All of the page options are written in the book file. The object only … |
| InteractFrobHack | Like the script CorpseFrobHack but allows you to frob an active AI. To use it, you need the metaproperty FrobInteract. Set the Engine Features\FrobInfo propert… |
| AIInteraction | Triggers an object in response to an Interact message. The object is chosen from any number of ScriptParams links that have the same data as was sent with the I… |
| PlayerInteraction | When the object is tool-frobbed, an Interact message is sent to the destination of the frob. The Inventory\Object Name of the object is sent with the message. O… |
| AwarenessFilter | When placed on another object, an AI can send a CanISeeYou or CanIHearYou message to test for awareness of the object from the AI. When placed on an AI, it can … |
| TrapSignalAwareness | When turned on, a signal is sent to all AI that have an AIAwareness link to some other object. Objects to check for are specified with ControlDevice links. By… |
| PrivateRoom | Allows an AI that is normally non-hostile to become alarmed if it sees the Player in a room. When the Player enters the room, a metaproperty (M-PlayerBreach) is… |
| HighlySuspicious | A replacement for SuspiciousReactions. Responds to a Suspicious message (which is usually sent from a pseudo-script) based on parameters read from the string fi… |
| VendorRelay | Will relay TurnOn, at a price. Loot cost can be given as the total value, or as three numbers for gold, gems, and goods. Inherits GenericTrigger Links Cont… |
| LootExchange | On TurnOn, converts an amount of the Player’s loot from gems/goods into gold. The exchange rate is a real number and can be given as a fraction. Inherits Gen… |
| PurchaseItem | Trap for managing a single item that can be bought from an in-game store. Uses ScriptParams links to coordinate with the item being purchased, the store script,… |
| ShoppingCart | The main part of an in-game store. Purchased tems are added to the object’s inventory before being paid for. If there is a Cart link, then that object is the co… |
| LootStats | Tracks loot that is acquired/spent during a mission. Allows loot carry-over like LastMissionLoot. You should only use one of the scripts at a time. Messages … |
| AIFactory | Creates a random AI. Link to a number of archetypes. Properties and links from this object will be copied to the AI. Messages Sim Links ScriptParams(Spawn) |
| NewCrystal | Substitute this object for another when contained by the player. Acts like the standard Crystal script, but lets you specify what the arrow (or whatever) will b… |
| NewKey | The StdKey script of Thief has a bug that prevents schemas with the tags LockState and Event StateChange from playing correctly. Specifically, the script is sup… |
| NewGasLight | An enhanced replacement for GasLight or Extinguishable. With this script, frobbing a light turns it off, as well as on. You can also add an emitter tweq to the… |
| NewSecurityDoor | This version of the SecurityDoor script will ignore state changes when there is an AIDoor link to the door. It also recognizes double-doors linked with ScriptPa… |