[[index]]
 

Public Scripts

The Public Scripts package is a group of script modules for Dark Engine based games. These modules collect a number of well-known scripts into a single place. So fan-mission designers have greater freedom to create novel and entertaining experiences.

License Agreement

Public Scripts are copyright © 2005-2009 Tom N Harris.
This software is released under the terms of the GNU General Public License.

Unmodified copies of the compiled binary files may be distributed along with fan-missions and expansion packs intended for use with Dark Engine based games without the creator being required to provide the source code for this software. The fan-mission or expansion pack must completely comply with the terms of the Dromed License issued by Eidos Interactive, and the fan-mission or expansion pack must include the following copyright information:

This fan-mission uses Public Scripts. Copyright © 2009 Tom N Harris

This software is licensed under terms of the GNU General Public License.
Please see http://whoopdedo.org/doku/public_scripts/index for more information,
or write to [insert your email address here].

You must then be prepared to answer any queries regarding the scripts, which may include offering copies of the original software package in case the official website is inaccessible.

Third-party distributors must include the complete Public Scripts package in their archive if they distribute any fan-missions or expansion packs that use this software.

You may use the comment forms to contribute helpful information about your experiences with the scripts. If you need to report a bug or want to suggest a new feature, please contact me by email or on at The Editor’s Guild.

How to Use Scripts

The Scripts

TrapMetaProp Manipulates metaproperties. When turned on, A linked objects have a metaproperty added, and R linked objects have a metaproperty removed. The metaproperty can b…
ToolMP Manipulates metaproperties on an object when it is frobbed using the script object as a tool. The A and R links can link to an archetype and the script will wor…
TrapScrMsgRelay Trap that sends an arbitrary message when turned on or off. Each ScriptParams link names the message to send to the destination of the link. The message is sent…
TrapSMTrans Trigger when any message is received. Each object linked to with ScriptParams will get TurnOn when the message named in the link is received by the script. Only…
Forwarder Relays a message to objects that are linked with a ScriptParams link having the name of the message. None of the trap control flags, lock, or timing have any me…
Validator Relay TurnOn and TurnOff to one of many destinations. ScriptParams links with the data set to an integer index identify the destinations. Initially, the link in…
LinkTemplate Manipulates links. The object parameter identifies the source that the links will be added to or removed from. Template links are created from the script object…
TrapTeleportDelta Teleports the object linked with ControlDevice to somewhere nearby this object. The dm link identifies a reference object. The new position is the same distance…
RandomRelay Randomly picks a link and relays the TurnOn or TurnOff along it. A weighted relay lets you use an uneven probability of choosing links. Instead of ControlDevice…
TrigSim Generate a trigger when the game starts. Since the script has no use after it activates, the object will be destroyed to save object ID space. Objects that desc…
TrapStim Applies a stimulus to linked objects when triggered. Turning off the trap sends a negative intensity. Inherits BaseTrap Links ControlDevice Stims ScriptSt…
TimedStimulator Applies a stimulus to ControlDevice linked object many times until the trap is turned off. Each successive stim will be multiplied the intensity (see TrapStim) …
TrigOBBSpec Triggers when objects of a specific type enter the bounding box. The arc link identifies the type of objects that will trigger the trap. Every time an object en…
TrigBodyPickup Turns on when the object is picked up. Turns off when dropped. Inherits BaseScript Messages Contained
TrigDamageRTC Triggers the object that caused damage. The first message data argument is the amount of damage. Inherits BaseScript Messages Damage
TrapHP Increases the hit-points of target when turned on. Damages the object by the same amount when turned off. Inherits BaseTrap Parameters target (object) Vic…
AIItemGiver Takes an item contained by this object and gives it to another object. The script can be used in a conversation or response so the AI running the pseudo-script …
IntrinsicText Displays text on-screen when turned on. If the Book\Text property is set, the first page of the book file will be shown. Otherwise, the text is given in the des…
IntrinsicPlaque Displays text on-screen when frobbed. Inherits IntrinsicText Messages FrobWorldEnd
IntrinsicCover Displays text on-screen when highlighted. The WorldAction of the property Engine Features→FrobInfo must be set to FocusScript. Inherits IntrinsicText Message…
InvSchema Play a sound when an inventory object is frobbed. In Thief, use a SoundDescription link to the schema. In System Shock 2, set the Sound\Object Sound property. T…
Sippable The object can be frobbed a limited number of times. After all the sips have been used, it is destroyed. Put the string %i somewhere in the inventory name of th…
Zapper Stimulates an object when it is attacked by an AI. Uses a MagicZapStim in Thief or Anti-Human in System Shock 2, or the stimulus in the zap_stim parameter. Unle…
PhysModelCorrect Automatically adjusts the physical dimensions of an object to match the Shape\Scale property. Activates when the game start, when a scale tweq completes, and wh…
TrapPhantom Gradually changes the Renderer\Transparency of an object when turned on or off. Turning on the trap will increase the value, turning off decreases it. When the …
TrapMotion Make an AI play a motion. Link to the AI with ControlDevice. The parameter is the name of the motion file (without a .mi extension), not the motion schema. Howe…
TrapCamShift Changes the player’s viewpoint to this object while the trap is turned on. In System Shock 2 it is necessary to assign a name to the object. This script isn’t s…
TrigAIAwareShift Triggers when an AI becomes aware of other objects. Create a ScriptParams link to each object to watch for and set the link data to af plus a code that identifi…
Spy Developers can use this script to trace messages received by an object. The information is displayed on-screen and also printed to the monolog.
TrapTimer Relays messages after a delay. Inherits BaseTrap Properties Script\Timing, Script\Delay Time
TrapFlipFlop Alternately relays TurnOn and TurnOff when it receives TurnOn. The trap control flags and delay time have no meaning for this script. Inherits BaseTrap
TrapCinema Plays a video from the Movies folder. Inherits BaseTrap Parameters movie (string)
TrapQVarText Shows text on-screen when turned on. The text will be formatted with quest variable substitutions. If you write… You get… %{qvar} The value of the quest v…
QVarPlaque Shows text on-screen when frobbed. The text will be formatted with quest variable substitutions. Inherits BaseScript, BaseQVarText Messages FrobWorldEnd S…
QVarScroll Shows text on-screen when frobbed in inventory. The text will be formatted with quest variable substitutions. Inherits BaseScript, BaseQVarText Messages Fro…
TrapMissionQVar Trap for setting a quest variable for a single mission. The Trap→Quest Var property describes the name and how to change the variable value. The first character…
TrapCampaignQVar Sets a quest variable that is shared between missions. Inherits TrapMissionQVar Properties Trap\Quest Var, Script\QB Name
TrigQuestVar Triggers when the value of a quest variable matches a condition. The Trap→Quest Var property is written with an operator, number, and variable name like TrapMis…
TrigQVarChange Triggers when the value of a quest variable changes. The property is just the name of the quest variable. Inherits BaseTrap Properties Trap\Quest Var, Scrip…
TrapQVarFilter Relay that works only when the value of a quest variable matches a condition. Inherits BaseTrap, BaseQuestVariable Properties Trap\Quest Var, Script\QB Name…
BasePostRead Display text then, after it has been displayed, triggered and perform some action. When there is a SoundDescription link or Sound\Object Sound property, it will…
PostReadPlaque Displays text when frobbed, then triggers after it is shown. Inherits BasePostRead Messages FrobWorldEnd
PostReadScroll Displays text when frobbed in inventory, then triggers after it is shown. Inherits BasePostRead Messages FrobInvEnd
TrigWaypoint Use on a moving terrain waypoint. Sends TurnOn when the moving terrain reaches this object. Inherits BaseMovingTerrainScript Messages WaypointReached
TrapDestroyDoor Destroy trap that first opens doors so they don’t leave behind a black rectangle. Inherits BaseTrap Links ControlDevice, SwitchLink Properties Door\Rotati…
TrigOBBCreature Bounds trigger that reacts to objects that are a Creature or Monsters. Inherits TrigOBBSpec Messages PhysEnter, PhysExit, Obituary Links Population, Scrip…
TrapFader Turns the screen black when turned on. Turning off the trap will restore the screen. In Thief 1, the screen jumps back immediately, Thief 2 will gradually fade …
Transmogrify When the object is picked-up by the Player, create a different object and add that to the inventory instead. The Engine Features\Stack Count is copied to the ne…
TrapRequireOne Counts how many different devices have sent TurnOn to the trap and triggers when it is an odd number. This is the traditional three-way switch, but can work wit…
TrapRequireOneOnly Triggers when only one device has sent TurnOn to the trap. Inherits BaseTrap, BaseRequirement Links ScriptParams(Require)
TrapSquelch Ignores rapidly repeating messages. If a trigger is sending more than one TurnOn or TurnOff at a time, this script will relay just the first message and stop ot…

Thief 1

TrapOffFilter Relays only TurnOff messages. Inherits BaseScript Messages TurnOff Links ControlDevice
TrapOnce Will relay a single TurnOn or TurnOff message. Subsequent messages are ignored. Inherits BaseScript Messages TurnOn, TurnOff Links ControlDevice
TrapRevert Relays TurnOn and TurnOff. After a delay, the opposite message will be sent. If a message is sent to the trap before it has timed-out, the previous message will…
TrapDirection When turned on, the trap sends GoForward along ControlDevice links. GoReverse is sent when it is turned off. Inherits BaseTrap Messages GoForward, GoReverse…
TrapPatroller Sets the Patrol: Does patrol property of objects linked with ControlDevice. Inherits BaseTrap Links ControlDevice Properties AI\Ability Settings\Patrol: D…
TrapNonFinalComplete Quest Vars: goal_state_n, goal_visible_n Trigger when all required objectives have been completed. Objectives are ignored if they are hidden, optional, or marke…
TrapTexture Change the texture on nearby terrain. Use the properties Script\TerrReplaceOn and Script\TerrReplaceOff with Thief. These aren’t available in System Shock 2, s…
TrigOBBPlayer Sends TurnOn when the Player object enters the bounding-box, and TurnOff when he exits. An environmental schema will be played if the tags are defined for the b…
TrigRoomPopChange Sends TurnOn when anyone enters a room, and TurnOff when anyone leaves. Inherits BaseRoomScript Messages CreatureRoomEnter, CreatureRoomExit, PlayerRoomEnte…
TrigRoomObject Trigger when this object is inside a designated room. Link from the object to any number of rooms using Route links. The script sends TurnOn when the object ent…
TrigRoomDelivery Triggers when an object enters a designated room while it is being held by a player. Inherits TrigRoomObject Messages Contained
TrigRoomDeposit Triggers when an object enters a designated room, but only when it is not in a container. If the object is removed from the container (because the player droppe…
TrapFindSecret Marks a secret as found when the trap is turned on. Inherits BaseTrap, BaseFindSecret
FrobFind Marks a secret as found when the object is frobbed. Inherits BaseScript, BaseFindSecret Messages FrobWorldEnd
SlayFind Marks a secret as found when the object is destroyed. Useful with banners. Inherits BaseScript, BaseFindSecret Messages Slain
HiddenDoor Marks a secret as found when the door is opened. Inherits BaseDoorScript, BaseFindSecret Messages DoorOpen
NonAutoDoor A door that does not automatically open when it is unlocked. In all other respects, it behaves the same way as the StdDoor script. Inherits BaseDoorScript Me…
TransformLock Activates the model tweq of an object when it is unlocked. The key region mask is cleared so the object can’t be locked again. Inherits BaseScript Messages …
CleanUpAttack Sends the message AbortAttack to itself when the AI is slain or knocked-out. This solves a problem where particle SFX remain active if an AI is killed while in …
NoPingBack Add the metaproperty NoPingBack when an AI is killed or knocked-out. This prevents bodies from setting-off mines and other things. Inherits BaseAIScript Mess…
NoticesPlayerBumps Briefly raises an AI’s alertness if it is touched by the Player. Inherits BaseAIScript Messages PhysCollision Properties AI\AI Core\Alertness cap
ShutUpYerDead Resets an AI’s awareness of other objects. The message IgnorePotion is sent to the AI for the QuaffHeal script. This script should be set in a metaproperty that…
SlayHaltSpeech Stops all speech schemas by this AI when it is killed. Inherits BaseScript Messages Slain
TimedPotion Frobbing a timed potion starts a timer for either 8.6 seconds or the time in Script\Timing. An invisible clone of the object is created for applying the effect …
Invisible Makes the player invisible. Responds to the message Invisible by setting the current visibility to 0. All AIAttack links to this object are removed. Put this in…
InvisiPotion A potion for making the player invisible. When the potion is frobbed, the metaproperty M-Invisible is added to the Player then the message Invisible is sent to …
LoGravPotion Potion that divides the player’s weight and speed in half. Inherits TimedPotion Properties Physics\Model\Attributes
LastMissionLoot Quest Vars: total_loot Sets the Dark Gamesys\Loot property to the value of the total_loot quest variable. Activates in response to the Difficulty message, so th…
PhysARContact Stimulates objects that come in contact with this one. Inherits BaseScript Messages PhysContactCreate, PhysContactDestroy
ReGravitize When the object collides with something else, its gravity is set to about 3.25. Inherits BaseScript Messages PhysCollision Properties Physics\Model\Attrib…
TrapSlayer Slay linked objects by damaging them with a BashStim. Inherits BaseTrap Links ControlDevice Properties Game\Damage Model\Hit Points Stims BashStim Para…
TrapTerminator Simply destroys linked objects. Doesn’t use Slain. Don’t use this for doors or pressure plates that have the Blocks vision flag set. Inherits BaseTrap Links …

Thief 2

Burplauncher Destroys emitted objects when this one is slain. This script is used for burricks’ burp projectile. Each projectile continually emits a cloud of gas. When the p…
CollapseFloor A collapsing floor is a pressure plate that will disappear when depressed. Use a Corpse or Flinderize links to have a solid object be created in its place that …
Elemental An elemental AI grows and shrinks based on its health. When it is Slain, a Tweq\Scale is activated so it shrinks before being destroyed. To get the complete Thi…
FireElement Changes color and transparency based on alertness level. A Mood message is sent to ParticleAttachement links that matches the level. On high alert, the metaprop…
FireElemSparx Controls particle SFX. The Mood messages change the color of the particles. The object is destroyed when Die is received. Inherits BaseScript Messages TurnO…
HotPlate Initiate stimulus contact with object that touch this one. When it gets the message HotPlateHeat, the Renderer\Extra Light property will be set according to the…
HotPlateControl A flicker tweq periodically checks the position of the first joint on this object. Each linked object will get the message HotPlateHeat with the joint position …
ModelByCount Changes the shape of the object based on the stack count. This makes a combining object look different when more pieces are picked up. But it does not change th…
SecureDoor Creates AIWatchObj links when a door is opened or closed. If the door starts closed the links are added when the door is opened, and vice-versa. Inherits Base…
StickyVines When the object collides with the Player, a JunkEarthWebs object is created and added to his inventory. Inherits BaseScript Messages PhysCollision Objects …
JunkVines Initiates stimulus contact when it is in the Player‘s inventory. Inherits BaseScript Messages Contained
TrapCreate When turned on, contained objects are teleported here then the links are destroyed. Inherits BaseTrap Links Contains
WatchMe Creates AIWatchObj links when the object is created. Inherits BaseScript Messages BeginScript Links AIWatchObj Parameters watcher (object) Archetype o…
WindowShade A breakable animated light for windows. Textures on nearby terrain are changed to match the light state. When the light is slain, a broken texture will permanen…
ControlWindowShade Window light that automatically toggles at random intervals. Periodically, the script turns the light on or off. The Script\Timing property is the probability t…
TrapSlayer Slay linked objects by damaging them with a BashStim. Inherits BaseTrap Links ControlDevice Properties Game\Damage Model\Hit Points Stims BashStim Para…
TrapTerminator Simply destroys linked objects. Doesn’t use Slain. Don’t use this for doors or pressure plates that have the Blocks vision flag set. Inherits BaseTrap Links …
CorpseFrobFixed Makes AI frobbable when they are disabled. This script corrects a bug in CorpseFrobHack when searching a corpse. Objects contained by the AI that can’t be picke…
ReallyLocked Makes an object unfrobbable while it is locked. Inherits BaseScript Messages NowLocked, NowUnlocked Metaproperties FrobInert
FactoryBase A factory is a group of levers, molds, cauldrons, and gauges that can be used to manufacture new objects. This script controls the joint tweqs on the objects. I…
FactoryLever Levers in a factory can be frobbed. Using a lever sends TurnOn to LockMe links. Trying to frob a locked lever will send TurnOn to ErrorOutput links. How to Use…
FactoryMold A mold can be moved onto a socket where it will create an object. Using the mold as a tool will send SocketMe to the socket. UnsocketMe is sent when the mold is…
MoldSocket Movable molds are placed on a socket before they can be used. The socket holds template links that are transfered to the mold when it is placed on the socket. T…
FactoryCauldron A cauldron manipulates the model tweq and light as well as the joints of the object. Another tweqable object can be linked to with Synch and it will receive GoF…
FactoryGauge A guage has two stages. When activated, it moves to the end of the first stage, then sends Full to the Mold link. The guage will stop moving when it gets the Ha…
FactoryLight The light will automatically turn off when turned on. It will be active for the duration of Script\Timing which defaults to 550 ms. The Renderer\AnimLight prope…
FactoryWork A factory worker is an AI that moves to factory objects and frobs them to create copies of an object, usually a hammer. The script should be in a metaproperty n…
Prisoner When turned on, the signal Escape is sent to AI that have the metaproperty M-Escapee. Inherits BaseScript Messages TurnOn Metaproperties M-Escapee Signal…
ResetLockbox A lock that automatically resets itself. Set the Tweq\Flicker property to the time delay. The tweq is activated when unlocked, and the object is locked when the…
TrapSecureDoor Trap that makes the object suspicious when turned on. The suspiciousness can be activated in one of two ways. If the property Engine Features\Suspicious is on t…
TrigOBBPlayerStuff Triggers when the Player or something the player threw enters the bounding-box. Inherits BaseTrap Messages PhysEnter Links Firer
CuttyCell Send Presence along ControlDevice links when the Player enters a room. Send Absence when he leaves. Inherits BaseRoomScript Messages PlayerRoomEnter, Player…
NearCuttyCell Activates when a hostile AI enters the room and deactivates when they have all left. The message Intrusion is sent along ControlDevice links on entry and Privac…
ConvControl Allows for a long conversation that can be interrupted then resumed where it left off. The controller links to conversation traps with ControlDevice. When turne…
ConvSpeaker Extra actions for conversations and pseudo-scripts. Put this script on the AI and use the Script message action. Conversation argument 1 is the name of the mess…
HeStartedIt Activates if the Player damages, slays, or knocks-out the AI. The metaproperty M-Swaying Burrick will be removed from all Creature objects. The AI must have a r…
Horn Activates when picked up. The metaproperty M-Swaying Burrick is removed from all Creature objects, and the ambient schemas of the object are turned off. Inheri…
MagicBones Bone objects are meant to be placed on a coffin object. The coffin has Owns links to all the bones. When the bone touches the coffin, it is slain and the coffin…
MagicCoffin Listens for the BoneSlain message. When all the Owns links from this object have been removed, then TurnOn is relayed along ControlDevice links. Inherits Base…
TrapAIWake Sends the message WakeyWakey along ControlDevice links when turned on. Inherits BaseTrap Messages TurnOn, WakeyWakey Links ControlDevice See Also * W…
WakeableAI Activates frozen AI when the message WakeyWakey is received. The AI mode is changed from Asleep to Normal. Inherits BaseScript Messages WakeyWakey Properti…
CleanObjDestroy Sneakily destroy objects behind the player’s back. An object will not be destroyed if it is in the player’s field of view, or is held by the player. The trap ke…

System Shock 2

NotifyRegion Sends an Obituary message when slain. The message is sent to objects that link to this one with a ScriptParams link that has the data set to Population. OBB and…
StdParticleGroup Controls SFX particles. The object is destroyed when it gets the Die message. Inherits BaseScript Messages TurnOn, TurnOff, Die Properties SFX\Particles
TrapCapacitor Relays TurnOn and TurnOff. When turned on, the trap will not relay any messages until the timer has expired. A message sent to the trap during the delay will be…
TrapConverse Starts a conversation when turned on. Turning off the trap does nothing. Inherits BaseTrap Links AIConversationActor Properties AI\Conversations\Conversat…
TrapPatrol Sets the Patrol: Does patrol property of objects linked with SwitchLink. Inherits BaseTrap Links SwitchLink Properties AI\Ability Settings\Patrol: Does pa…
TrapRevert Relays TurnOn and TurnOff. After a delay, the opposite message will be sent. If a message is sent to the trap before it has timed-out, the previous message will…
TrapTexture Change the texture on nearby terrain. Use the properties Script\TerrReplaceOn and Script\TerrReplaceOff with Thief. These aren’t available in System Shock 2, s…
TrigAIAlert Sends TurnOn when the AI goes to high alert. Inherits BaseAIScript Messages Alertness Links SwitchLink
TrigWorldFrob Sends TurnOn when the object is frobbed. Inherits BaseTrap Messages FrobWorldEnd
TrigWorldFocus Sends TurnOn and TurnOff when the object is hilighted. Inherits BaseTrap Messages WorldSelect, WorldDeSelect
TrigInvFrob Sends TurnOn when the object is frobbed in the player’s inventory. Inherits BaseTrap Messages FrobInvEnd
TrigFlicker Uses a flicker tweq to send alternate TurnOn and TurnOff messages. The tweq can be activated and deactivated by sending TurnOn and TurnOff to the trap. TurnOff …
TrigUnlock Triggers when the object is locked and unlocked. Inherits BaseScript Messages NowLocked, NowUnlocked Links SwitchLink
TrigPPlate A pressure plate that triggers when it stops moving. Inherits BasePPlateScript Messages PressurePlateActive, PressurePlateInactive Links SwitchLink
TrigPPlateImmed A pressure plate that triggers when it starts moving. Inherits BasePPlateScript Messages PressurePlateActivating, PressurePlateDeactivating Links SwitchLi…
TrapRequireAll Counts the SwitchLink links that control this object and trigger when all of them have sent TurnOn. Inherits TrapRequirement Links SwitchLink
TrapRequireAny Trigger when at least one TurnOn has been received. The messages don’t have to come from SwitchLink links. Inherits TrapRequirement
TrigContained Sends TurnOn when the object is picked up or dropped. Inherits BaseTrap Messages Contained
TrigRoomPlayerTrans Triggers when the player moves between two designated rooms. This script is used on one of the rooms. A ScriptParams link with the data Route is made to another…
TrigRoomCreature Triggers when any AI or player is in the room. Inherits BaseRoomScript Messages CreatureRoomEnter, CreatureRoomExit, PlayerRoomEnter, PlayerRoomExit, Obitua…
TrigRoomPopChange Sends TurnOn when anyone enters a room, and TurnOff when anyone leaves. Inherits BaseRoomScript Messages CreatureRoomEnter, CreatureRoomExit, PlayerRoomEnte…
TrigRoomObject Trigger when this object is inside a designated room. Link from the object to any number of rooms using Route links. The script sends TurnOn when the object ent…
TrigRoomDelivery Triggers when an object enters a designated room while it is being held by a player. Inherits TrigRoomObject Messages Contained
TrigRoomDeposit Triggers when an object enters a designated room, but only when it is not in a container. If the object is removed from the container (because the player droppe…
AnimLight Properties Renderer\AnimLight, Renderer\Self Illumination, AmbientHacked, Tweq\Flicker Control an animated light. The light can be turned on, turned off, or swi…
TrapAddPsi Give the player psi points. The psi is added when the trap is turned on and subtracted when turned off. Inherits BaseTrap Parameters psi (number)
TrapKeypad Shows the keypad when turned on. If the correct code is entered, then TurnOn is sent along SwitchLink links. An incorrect code will send TurnOn along ScriptPara…
TrapNanites Relays TurnOn and TurnOff if the player has sufficient nanites. With a positive value, this trap will give nanites to the player when turned on. The trap always…
TraitMachineReusable An upgrade panel that can be used more than once. The machine is usable if it is unlocked. Sending TurnOn will unlock (enable) the machine and TurnOff will lock…
PhysARContact Stimulates objects that come in contact with this one. Inherits BaseScript Messages PhysContactCreate, PhysContactDestroy
CloneContactFrob Stimulates the player when it is frobbed in inventory. Most often used to give health points. Inherits BaseScript Messages FrobInvEnd Properties Engine Fe…
 
  public_scripts/index.txt · Last modified: 2009/05/08 14:07 by telliamed
 
Recent changes RSS feed Creative Commons License Tip Bucket Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki