AwakeToEscape
miss1.osm 2

Will fail objective 1 if the AI is killed or knocked-out.

WhistleCall
miss1.osm 2

Responds to FrobInvEnd. Looks for a ScriptParams link from this object where the distance between it and the destination is no more than what is specified in the data of the link. Will signal the destination object with GoTo and mark objective 0 as "complete". Does nothing if the objective is already complete.

Basso
miss1.osm 2

Manages the behavior of the AI Basso in the Thief 2 mission "Running Interferene". Actions are controlled by a Timer message with the name Think. When the Timer is set, the Original Location of AI\State\Idling: Origin is set to the current position. When it expires, the script looks for a Route link from the object. An AIWatchObj link will be created to the destination of the Route link, and the AI\Responses\Signal response property will be copied from the destination object to this one. The AI is signalled with GoTo and a think timer is set for 5 seconds. The Route link will be re-read when the script receives a GoTo message. An initial think timer of 11 seconds is started when Sim starts. If objective 0 is incomplete when the timer expires, and the object GatehouseDoor is between this object and the Player, then GatehouseDoor is locked and the Engine Features\KeyDst property from the object named FrontGateRight is copied to it. When the message StartPicking is received, all Route and AICurrentPatrol links from the object are removed, and the meta-property M-DoesPatrol is removed. A think timer of 11 seconds is set. On DoorPickSpoof, the object named JenivereDoor will play the schema lockpik and its joint tweq will be activated. On FinishPicking, the schema and joint tweq on JenivereDoor are halted and the meta-property M-DoesPatrol is added to this object. For StartJenConv, a think timer is set for 15 seconds. In response to GrabJen, the message FollowBasso is sent to the object named Jenivere and the Route link is re-read.

Jenivere
miss1.osm 2

When the script receives the message SeeBasso, a conversation will be started if there is an AIConversationActor link to this object. On FollowBasso, then 666 AIWatchObj links will be created from this object to the object named Basso. While adding the links, the meta-property M-Follow is added to the object; it is removed afterwards.

JenDoor
miss1.osm 2

Will play the voice-over schema gar0112 the first time it is selected in-world. The schema will not play if the door has been opened.

GatehouseDoor
miss1.osm 2

When unlocked, the properties Engine Features\Locked and Engine Features\KeyDst are removed from the object.

ExtractionZone
miss1.osm 2

A Room script. Sets the quest variables BassoOK, JenOK, and PlayerOK respectively when either of the objects Basso, Jenivere, or Player. When all three quest variables are set, then objective 1 is marked as "complete".

MapTipster
miss1.osm 2

On TurnOn, sends the message CheckMap to Player.

VisGemText
miss1.osm 2

On TurnOn, sends the message VisGem to Player.

Training
miss1.osm/miss2.osm 2

Displays in-game instructions in response to various actions and events. Tips are displayed with red text for 30 seconds, and lock-out other tips from being displayed. If a tip mentions a command, the key binding for the command is also displayed. The tips and commands are retrieved from the string files PlayHint.str, PlayAct.str, and PlayCmd.str. When a tip is displayed, the campaign quest variable named "tr_" then the tip name is set to "1"; a tip will not be displayed more than once. This script uses the tip names: UseDoorOpen, UseDoorClose, UseKeyTake, UseLootTake, UsePortable, SelectWaterArrow, PullArrow, ReleaseArrow, SelectBlackjack, PullBackArm, ReleaseArm, ReleaseArmClose, SelectKey, SelectNonTool, UseKeyUnlock, UseKeyLock, GoFindKey, UsePotionHeal, DropOrUseFlashbomb, DropFlashbomb, UseFlareLight, DropFlare, DropOrUseFlare, UsePickpocket. The message CheckMap will display a tip about the auto-map. VisGem will display a tip about the light meter. The script also listens for Popup, Prompt, Damage, QuestChange, and Container messages, and Timer messages with the names Prompt and Update. The meta-properties M1_TrackWorld, M1_TrackInv, and M1_TrackDoor are automatically added, where appropriate, to all objects. The quest variables WorldID, InvID, and WeapID are used to identify the objects that are currently focused or selected. The quest variables InvUI and WeapUI signify when the respective items are visible in the user interface. The tip GoFindKey is only displayed when the object in question is named JenivereDoor. The tips related to the blackjack are displayed when the player is in a room named CoshPromptRoom and there is an AI named CoshTarget. The voice-over schema gar0108 is played when entering the room. SelectWaterArrow is triggered by a room named TorchTrig and plays the voice-over schema gar0106.

PromptOnTrig
miss1.osm/miss2.osm 2

When any message is received by this script, the message Prompt is sent to the object named Player.

ScoreLesson
miss1.osm/miss2.osm 2

A child of PromptOnTrig. On TurnOn, sets the campaign quest variable specified in Trap\Quest Var to "1".

TrackDoor
miss1.osm/miss2.osm 2

When a door state of the object changes, and the quest variable WorldID is the ID of this object, then the message Prompt is sent to Player. On FrobWorldEnd by a type of Avatar, the appropriate campaign quest variable tr_UseDoorOpen or tr_UseDoorClose is set to "1". If there is an AIDoor link to the object named Basso when the door is opening, then the data of the link will be set to "0".

TrackInv
miss1.osm/miss2.osm 2

Monitors item usage for the automatic help messages displayed in the game. When an item in the player's inventory is selected, focused, or frobbed, one of the quest variables InvUI or WeapUI is set to "1" and InvID or WeapID is set to the item's ID. While a weapon is in use (the attack key or button is being pressed), the quest variable WeapUI is set to "2". When the item is defocused, deselected, or destroyed, the quest variables are set to "0". If this object is a Flare, then FrobInvBegin will set the campaign quest variable tr_UseFlareLight to "1". If the object is a FlashBomb, then when it is Slain the campaign quest variables tr_DropOrUseFlashBomb and tr_DropFlashBomb will be set to "1".

TrackWorldObj
miss1.osm/miss2.osm 2

Sets the quest variable WorldID to the ID of the object that is currently selected in-world, or to 0 if there is no world selection.

TwoPickTraining
miss4.osm 2

On InvSelect, sets the quest variable PickID to the object's ID. The quest variable is set to 0 on InvDeSelect.

TwoPickDoorTraining
miss4.osm 2

Displays instructions for using the lockpicks when the object is focused on. If the currently selected inventory object is a type of Lockpick, then the string LockpickDoor2 from PlayHint.str is shown, along with the Use command keys. Otherwise, the string SelectPickDoor from PlayHint.str is shown with the key commands CycleInventory and Countercycle. The ID of the current inventory object is read from the quest variable PickID. When the object loses focus, any message being displayed is erased. Once the object has been unlocked, it will not show any messages. Messages are displayed with red text for 30 seconds.

SpecialGoals 4
miss4.osm 2

Counts the number of AI that have been knocked-out. The total number of knockouts is the value of the quest variable DrSKnockout plus the number of times the message J'Accuse was received from an object that had the meta-property M-WasKnockedOut. When the knockout count exceeds a particular quest variable, then an appropriate objective is marked as "failed". The quest variable casualty_limit_0 is associated with objective 1, casualty_limit_1 with objective 2, and casualty_limit_2 with objective 3.

AlarmRadius
miss4.osm 2

When turned on, the script begins to periodically check the distance from the object to the Player. The object will turn itself on if the Player is within 75 feet, otherwise it turns itself off. The periodic checks override any other control, and continue forever.

ListenClosely
miss6.osm 2

A derivative of VictoryCheck. Manages a sequence of schemas using ScriptParams links. When the game starts, a random number from 1 to 9 is chosen, or it may be manually set with the config variable eaves. A message named "eaves" plus the chosen number is sent to objects that are linked with data soundset or keyobj. The object linked to with data keyobj will get another link to it from the Player with data keyobject. If an object is linked to with data convtrig, and there is a ScriptParams link from it to itself, then the data of that link is set to the number. The player's current room is tracked using a link with data playroomloc. When the current room is self-linked with data convroom, then the schema sequence is begun. If the player leaves the room before the sequence is completed, then objective 0 is marked as "failed". The sequence begins with the convroom object, and the current object is tracked using a link with data convobject. The schema linked from the room with SoundDescription will be played as an ambient sound. A link with data bellsound is created to the room. When the schema finishes playing, the sequence will continue to the object that is linked with data convcont. If the object that just finished is self-linked, then the sequence is considered finished, for the sake of objective 0, but will continue playing. Objective 0 is completed, and objective 1 is made visible. If the object that is linked with data keyobject is in the player's inventory, then heardit is sent to the key. If the object linked with data waxobject is in the inventory, heardit is sent to it and objective 3 is made visible. A second later, the schema gar0607 is played, or if objectives 1 through 3 are already completed, then a schema that is linked with data havewax from the waxobject linked object is played. If the player already has the key, then after playing gar0607 the schema that is linked using data havekey from the keyobject is played. When that finishes, or if the link doesn't exist, then if the player has the wax, a knewwax linked schema from the waxobject is played; otherwise getwax from the keyobject is played. When the message gotthekey is recieved, a link with data keyobject is created to the sender, and if the schema sequence has been played, the message heardit is sent. When gotthewax is received, a waxobject link is created to the sender and objective 2 is completed. If the sequence was played, objective 3 is made visible. On lostthewax, any waxobject link is deleted and objective 2 is marked as "incomplete". When the script receives the message badkey and the schema sequence has been played, then a schema linked with SoundDescription from the sender of the message is played. Finally, on QuestChange, the first time objective 2 is marked as "complete", the schema gar0617 is played. And if objectives 0 through 3 are all completed, and one of either objective 4 or 5 is, then gar0618 is played.

See, it's so obvious.

SoundGuy
miss6.osm 2

Listens for a message named "eaves" then a number from "1" to "9". When received, the script looks for ScriptParams links from the object where the data begins with the number of the message. A SoundDescription link will then be created from the destination of the ScriptParams link to a schema. The data after the number that was matched is the name of the schema.

KeyGuy
miss6.osm 2

The script is initialized by sending a message named "eaves" then a number from "1" to "9". An object linked with ScriptParams and the data set to the number of the message will be replaced with this object, moving any Contains links if necessary. A ScriptParams link with data keyrightroom is then created to the current room object. The script tracks the current room with a ScriptParams link that has the data keycurroom. When the message heardit is received, the Inventory\Object Name is changed to Name_SDBoxKey. On Contained by the Player, the message gotthekey is sent to the Player object. If objective 0 has been completed when picked-up, then the schema that is linked to with ScriptParams and the data returnme is played. When dropped or picked-up, then if the current room is the right room, and the object is not in the player's inventory, objective 3 is marked as "complete", otherwise it is incomplete. On FrobToolEnd, the message realkeyfrob is sent to the object being frobbed.

BadKey
miss6.osm 2

When Contained by the Player, the message BadKey is sent to the Player object. On FrobToolEnd, the message fakekeyfrob is sent to the object it is frobbed on.

PuttyKnife
miss6.osm 2

On FrobToolEnd, sends the message puttyknifefrob to the frobbed object.

WaxCube
miss6.osm 2

On realkeyfrob or fakekeyfrob, if the source of the message inherits from Key, and there is a ScriptParams link with the data realkey from this object to the other, then the wax is good. If the object is a key, but does not have the link, the wax is bad. Otherwise, the wax is junk. The Shape\Model Name of the object is modified by reading the fields of Tweq\Models. Model 0 is used for junk, 1 for bad, and 2 for good. When the puttyknifefrob message is received, one of a JunkWax, BadWax, or GoodWax object is created and added to the inventory of the object that contains the source of the message. (Which will probably be the Player.) The Engine Features\Combine Type of the created object will be the combine type of the object that was frobbed on the wax, plus "wax", or blank if the wax is junk. If the created object is good, then a ScriptParams link with data havewax will be copied from this object to the container. If objective 0 is completed, the good object will have an Inventory\Object Name of Name_WaxBankKey. The first time the wax is set to bad, the schema linked to with ScriptParams and data screwed is played. When set to good, objective 1 is completed, and objective 2 is made visible if objective 1 was already visible.

WaxDoll
miss6.osm 2

When Contained by the Player, the message gotthewax is sent to the Player if being picked-up, and lostthewax if it is dropped. When the message heardit is received, the Inventory\Object Name is changed to Name_WaxBankKey.

KillWax
miss6.osm 2

Activates Tweq\DeleteState when dropped, and deactivates it when picked-up.

CameraKiller
miss7.osm 2

On Sim start, randomly selects a number of objects (intended to be cameras) that are linked to with ControlDevice and destroys them. When a camera is destroyed, it will also destroy certain linked objects: a type of Turret linked to with ControlDevice, a type of Switches linked from with ControlDevice, or any object linked to with ScriptParams. The number of cameras to destroy is determined by the quest variable cam_kill_x on expert difficulty, cam_kill_h on hard difficulty, and cam_kill_n otherwise. Nothing is destroyed if there is no quest variable.

AIKillerWork
miss7.osm 2

On Sim start, randomly selects a number of objects (intended to be robots) that are linked to with ControlDevice and destroys them. The contents of the object are also destroyed. The number of objects to destroy is read from a quest variable: work_kill_x on expert difficulty, work_kill_h on hard difficulty, and work_kill_n for all else.

AIKillerLong
miss7.osm 2

Does the same thing as AIKillerWork. Uses the quest variables long_kill_x, long_kill_h, and long_kill_n.

"Long" is short for long-range patrollers.

AIKillerHX
miss7.osm 2

The same as AIKillerWork, but does nothing on normal difficulty. Reads the quest variable hx_kill_x for expert, and hx_kill_h otherwise.

LobbyCamera
miss7.osm 2

When Slain, TurnOn is sent to ControlDevice links. TurnOff will be sent 60 seconds later.

GuardSummoner
miss7.osm 2

Sends the message ComeARunnin to all ControlDevice linked objects when turned on.

SummonableGuard
miss7.osm 2

When a ComeARunnin message is received, a Route link is created to the object that sent the message. A second later, the minimum alert level is set to high, and the AI will go to the location of the Route linked object. When the AI arrives at the summoner, the Route links from it are destroyed. The minimum alert level is reset 8 seconds after the actions complete.

DiffBasedKeyDst
miss7.osm 2

Activates on Sim start. If the difficulty is greater than 1, then the LockID field of Engine Features\KeyDst is set to 9.

DoorTranslator
miss7.osm 2

Relays TrapLock in response to TurnOn, and TrapUnlock for TurnOff. The messages are sent along ControlDevice links.

TrapDoorLock
miss7.osm 2

Sets or unsets the Engine Features\Locked property in response to TrapLock and TrapUnlock.

FrobTracker
miss7.osm 2

Counts the number of times the message IveBeenFrobbed is received, and after 60 times, sends TurnOn along ControlDevice links. TurnOn is also sent 8 hours after the game starts.

IveBeenFrobbed
miss7.osm 2

Relays the message IveBeenFrobbed in response to FrobWorldEnd.

NaggingLever
miss7.osm 2

Uses a Timer to check which message should be sent based on the state of a joint tweq. While the Player is close to the object (within 50 feet), the tweq is checked as often as possible; otherwise it only checks every 10 seconds. If the Reverse flag of Tweq\JointsState is set, then TurnOn is sent along ControlDevice links. If it is not set, then TurnOff is sent.

SmoothRelay
miss7.osm 2

On TurnOn, the script will wait 250 milliseconds before relaying the message. The message will not be relayed again until TurnOff is received. If TurnOff is received during the waiting period, the message is not sent.

HackOnConvDone
miss7.osm 2

Listens for the message ConversationDone. The AI\Ability Settings\Patrol: Does patrol property is turned on, and an AIWatchObj link will be created to each object that is linked to with ScriptParams.

HackTrigSchemaDone
miss7.osm 2

Acts as a simple timer. TurnOn will be relayed along ControlDevice links after the number of seconds specified in Script\Timing.

LootVO
miss7.osm 2

Plays the voice-over schema gar0703 when an object with the Dark Gamesys\Loot property is contained. The schema isn't played until after the game has started.

TheRecording
miss7.osm/miss9.osm 2

On FrobInvEnd, the SoundDescription linked schema is played. The schema must play to the end before it can be triggered again.

GoalScroll
miss8.osm 2

Monitors the distance between the Player and this object or, if it is contained by another object, the container. If the distance exceeds the value of Script\Timing, which defaults to 100, then objective 0 is failed. When the object is dropped, then the Physics\Model\Type property is added if necessary, and the meta-property MostlyFrobInert is removed. If the container is not a type of Avatar, and was not visible when the object was dropped, then the object will be teleported to the container's location. On FrobInvEnd, objective 1 is marked as "complete" and the schema gar0804 is played. The schema gar0802 is played in response to WorldSelect

If StdBook or a similar script is also in effect, then the frob schema will play after returning from book mode.

Conspirator
miss8.osm 2

A base for other scripts in this mission. Does nothing by itself.

Courier
miss8.osm 2

On BeginScript, the object named TheNote in the object's inventory has the meta-property MostlyFrobInert added. If the AI dies or is knocked-out, the meta-property is removed. On HighAlert, if TheNote is contained by the object, then objective 0 is marked as "failed". When the script receives the message Reached, it replies "true" if a random number from 1 to 100 is less than the value of the first parameter.

Moseley
miss8.osm 2

On AIModeChange to 4 (Combat) or 5 (Dead), and the AI Contains an object named TheNote, then objective 0 is marked as "failed". The objective also fails on HighAlert with TheNote in the inventory. When the script receives the message Stakeout, then a TurnOn message is sent to the objects that are linked to with ScriptParams. Each message is delayed by the time specified, as milliseconds, in the data of the link.

ThePagan
miss8.osm 2

Will fail objective 0 on HighAlert or AIModeChange to Dead or, if TheNote is in the inventory, to Combat. When on object named TheNote is picked-up, then an AIWatchObj link is created to the object named CemGateLookback. If objective 1 is incomplete when it happens, then it is marked as "failed". The script responds to the message WantNote by checking if TheNote is contained by the object. If not, the response is "true" and it will check again in 30 seconds. If it still doesn't have TheNote, then the quest variable EndingTime is set to "0" and objective 0 is failed. The message NoteGone will fail objective 0. JigUp will also fail it if this object is visible or the Player is within 40 feet. The message HaveIGotNote will simply reply whether the object contains TheNote. On PortalFade, the meta-property M-AI-Stasis is added and M-DoesPatrol is removed. The Renderer\Transparency is set to "1.875" and the message PhantomEnd is sent to this object. Two seconds later, TheNote and this object are destroyed. If objective 1 was not complete, then it is marked as "failed". When the script receives StartAttack, then AI\AI Core\Team is set to "3" and TurnOn is sent to all ControlDevice linked objects. The AI linked to with ScriptParams will be signalled with StartAttack. The attack will be ended in 15 seconds, or if Damage is received where the culprit is a type of Mechanist. Once the attack begins, then objective 0 will not fail because of HighAlert. When the attack ends, then the AI\AI Core\Team is set to "1" and any AIAttack or AIAwareness links to this object are removed. An emitter tweq on the object will be activated. The value of the Script\Timing property on TheNote will be increased by 400. The AI\Ability Settings\Flee: Condition for flee property is copied from the object named M-OnlyFlee, and AIFlee and AICurrentPatrol links are set to the object named MawPortal. The AI will then damage itself by 1 point with a WeaponStim. The ScriptParams links from the object are also scanned. Each linked object has the meta-properties M-AlertCapHigh and M-M8NonHostile removed, and the AI\State\Current alertness is set to "0". If the linked object has a Route link from it, and the object that links to is part of an AIPatrol network, then an AICurrentPatrol link is made and the ScriptParams linked AI has AI\Ability Settings\Patrol: Does patrol set. Otherwise, if the position of the Route linked object is set as the AI\State\Idling: Origin of the ScriptParams linked AI, and AI\Ability Settings\Idle: Returns to origin is turned on. If any of the linked AI have a AIConversationActor link to it, then the conversation (only one) is started.

MawPortal
miss8.osm 2

Listens for PhysEnter. If the colliding object is a type of Creature, then the message PortalFade is sent to it. If an Avatar, then the quest variable EndingTime is set to "0" and objective 0 is marked as "complete". Any optional, non-reversed objectives that aren't completed are marked as "failed".

StickingPoint
miss8.osm 2

On TurnOff, creates an AIWatchObj link from ThePagan to this object. On TurnOn, the link is removed.

PickPocketGoalScript
miss8.osm 2

Checks every 5 seconds for a pick-pocket objective. Also checks on Contained messages. The target pick-pocket count is read from the quest variabled named "QPickPocketTarget" plus the difficulty level. When the current number of pick-pockets, as read from the quest variable DrSPocketOk, reaches the target, then the quest variable PickPockStat is set to "1". If the maximum number of possible pick-pockets, as determined by scanning every Contains link, cannot satisfy the target, then PickPockStat is set to "-1". A Contains link is a valid pick-pocket if the data is either Belt or Alternate, the object's Engine Features\FrobInfo has a WorldAction of Move, and the container's AI\State\Current mode is not Dead.

Notice that the script doesn't check if the container is actually an AI.

OhMyGod
miss9.osm 2

In response to the message OhMyGod, objective 1 is marked as "disabled" and objective 2 is made visible.

FixLootGoal
miss10.osm 2

Activates on Difficulty. Increases the value of one of the loot objectives by the value of the quest variable total_loot. The objective number is specified in Trap\Quest Var.

The total_loot quest variable contains the amount of loot collected in the previous mission. This script is intended for when the LastMissionLoot script is being used.

ParticleFillPhysOBB
miss10.osm 2

On BeginScript, resets the properties SFX\Particles and SFX\Particle Launch Info to the values from the archetype, then changes Box Min and Box Max of SFX\Particle Launch Info to match Physics\Model\Dimensions. The number of particles in the SFX will be multiplied by the volume of the bounding box.

DewDropDoll
miss10.osm 2

If the container of this object is being attacked by at least three Mechanist type AI, and one of the attackers is within 10 feet, then the ghost is activated. The ghost object is linked to with ScriptParams with the data set to myghost. It is teleported 4 feet above the location of the container, a blinding flash is triggered, and the message PowerOn is sent to the ghost. The check is performed every 3 seconds until it is activated.

If the archetype of the ghost has a RenderFlash link to a flash SFX, then the flash will be visible to the player.

DewDropGhost
miss10.osm 2

Activates in response to the PowerOn message. Plays the schema pg31001c and begins to fade the object. Every second, the Renderer\Dynamic Light and Renderer\Transparency properties are reduced by 10 percent. The object is destroyed after 24 seconds.

GarrettSighter
archer.osm 2

Creates a ScriptParams link from the object to itself at Sim start. The link has data GarSighting:0. When the AI has a first-hand awareness of the Player with a level of at least 2, then the data of the link is changed to GarSighting:1.

PostFightAlertResetter
archer.osm 2

Waits until there is an AIAttack link from the object. When there are no more AIAttack links, the script checks the first ScriptParams link from the object to itself and if the data is not GarSighting:1, then the AI's alertness is cleared, actions cancelled, and the maximum alert level capped at 0. After 5 seconds, the alertness cap is reset and any AIAlertness and AIWatchObj links are removed.

SetupCampaignQVars
miss12.osm 2

On Sim start, if objective 4 is not complete, then the quest variable goal_visible_4 is moved from the campaign database to the mission database. On Difficulty, the quest variables goal_state_3 and goal_visible_4 are moved from the mission database to the campaign database.

M13Goals
miss12.osm 2

Listens for the Container message. If the object being contained has an Engine Features\Combine Type of LCMask then objective 0 is marked as "complete", and if the Engine Features\Stack Count is at least 3, objective 2 is completed. If Engine Features\Combine Type is LCMaskSpecial, objective 1 is also marked as "complete". The Engine Features\Combine Type is changed to LCMask and the object is re-combined with other LCMask objects. If the object being contained is named Cultivator then objectives 3 and 4 are marked as "complete".

SpecialGoals 12
miss12.osm 2

On Sim start, a campaign quest variable is created for each object in the inventory. The name of the quest variable is "CarryInv" plus the value of the Engine Features\Combine Type property. The value is the Engine Features\Stack Count of the object, and the variable is not set if it is 0.

This is not the same as the SpecialGoals script in miss4.osm.

AICatchPlayer
miss12.osm 2

On HighAlert, then objective 11 is marked as "failed". When the object receives AIModeChange to "5" (Dead) but the Game\Damage Model\Hit Points is greater than zero (probably because the AI was knocked-out), then the objective will fail.

InvCache
miss12.osm 2

A derivative of LoadoutCache. On Difficulty, it scans the objects that it Contains. If there is a quest variable with the name "CarryInv" plus the value of Engine Features\Combine Type of the object, then the Engine Features\Stack Count property of the object is set to the value of the quest variable. If the value is 0, or the quest variable doesn't exist, then the object is destroyed. The quest variable is then set to "0". The remaining objects are handled by LoadoutCache. Then the script object is destroyed.

If the game is allowed to start without this script receiving a Difficulty message the game will crash.

KeyCache
miss12.osm 2

A derivative of InvCache. Appears to be non-functional.

The script looks for the link kind Contents, which doesn't exist.

BarkLetter
miss12.osm 2

On FrobInvEnd, a schema that is linked to with SoundDescription will be played as a voice-over after a slight pause.

KarrasLetter
miss12.osm 2

A derivative of BarkLetter. When the schema plays (in response to FrobInvEnd), objective 3 is completed and objective 4 will be made visible. When the Contained by an Avatar, the quest variable GotLetter is set to "1" if the object is being picked-up, and "0" if dropped. On Sim start, if there is a quest variable with the name "CarryInv" plus the value of Engine Features\Combine Type, then the object is moved into the player's inventory.

KarrasLetter12
miss12.osm 2

Like KarrasLetter. Objective 4 is also marked as "complete" when the schema is played.

LibraryBook
miss12.osm 2

Controls the state of an AmbientHacked property on the object based on whether the book has been read. A book is read if its book number bit is set in the quest variable LibBooks. The book number is the value from a Trap\Quest Var property from this object, or an object that is linked to with ControlDevice. The data is in the format expected by TrapSetQVar. The script will extract the number from that property and bitwise-and it with the value of the quest variable LibBooks. If the result is not "0", then the book had been read and the AmbientHacked property has the TurnedOff flag set. Otherwise, the flag is cleared. The script checks once on BeginScript, and again on QuestChange by listening for the LibBooks quest variable.

What you likely want is to use this script with TrigWorldFrob and link to a QuestVarTrap that uses the data "!<n>:LibBooks".

ConvJukebox
miss12.osm 2

Listens for QuestChange with the variable LibBooks and unlocks the object when it changes. On TurnOn, a random ControlDevice link from the object is selected. If there is an AIConversationActor link from the ControlDevice linked object, then the actor is teleported to the location of the object that sent the TurnOn message. The source object is then destroyed. The actor AI will have the AI\State\Idling: Origin property removed. Regardless of whether there is an AIConversationActor link, a conversation is started on the ControlDevice linked object. Then all ControlDevice links to that object are removed, and the Locked property of this object is set to "1".

CrazyClock
miss12.osm 2

A derivative of Clock. If the object is locked, then the clock does not run.On FrobWorldEnd when the object is locked, the time is moved forward 205 minutes. When the time is 12-o'clock, TurnOn is sent to all ControlDevice linked objects, and TurnOff will be sent when the time changes from that.

Cultivator
miss12.osm 2

On WorldSelect, the voice-over schema gar1308 is played and objective 3 is marked as "complete". Does nothing if the objective is already completed.

TrackHid
miss12.osm 2

On Sim start, a quest variable with the name "Hid" plus the name of this object is read. If it is not 0, then the Hidden flag of Dark GameSys\Stats is cleared, and the quest variable DrSScrtCnt is decreased by 1. On EndScript, if Dark GameSys\Stats exists but does not have the Hidden flag set, then a campaign quest variable named "Hid" plus the name of this object is set to "1".

PlayerTally
miss8.osm/miss14.osm 2

When Sim ends, saves the contents of this object's inventory as quest variables. Only objects with the Engine Features\Combine Type property are saved. The name of each variable is "CarryInv" plus the value of Engine Features\Combine Type. The value of Engine Features\Stack Count is stored in the quest variable.

Loadup
miss10/miss15.osm 2

When Sim starts, the script looks for quest variables describing certain items, and will add them to the player's inventory. The quest variable names are formed by combining "CarryInv" and the value of Engine Features\Combine Type. An object is created if the quest variable is greater than 0. If the object has a default Engine Features\Stack Count, then it will be changed to the value of the quest variable. The quest variables are set to 0 after the objects are created. This script will add objects that descend from Grenadz, and any of SpeedPotion, AirPotion, HealingPotion, InvisiPotion, SlowfallPotion, Flare, broadhead, water, firearr, noise, EarthArrow, GasArrow, RopeArrow.

Note that if an object's archetype doesn't have the Engine Features\Stack Count property, then only one object will be created even if the quest variable specifies more than one.

MrCavador
miss15.osm 2

On Slain, objective number 1 is marked as "failed". When knocked-out, all AIWatchObj links to this object are removed.

FaceWaypoint
miss15.osm 2

On MovingTerrainWaypoint, the Tweq\Rotate property will be modified and the tweq activated so that the object turns to have the same orientation as the waypoint. The object will only turn on the Z-axis. The rate of the tweq is not changed.

RandPatrolPt
miss15.osm 2

A derivative of TrigQVar. When the game starts, a random number from 1 to 3 will be assigned to the quest variable specified in Trap\Quest Var. If the quest variable condition is false, the object is destroyed. If the config variable CavadorRoute is set, then that will be used instead of a random number.

BlueLightSensor
miss15.osm 2

Checks every 5 seconds if a single object that is linked from this object with ScriptParams is within the radius specified in the link data. When the object has moved from outside the radius to inside, then TurnOn is sent to all ControlDevice links. When it has moved away, then the script will wait for 4 minutes, or the time specified in Script\Timing, before sending TurnOff along the ControlDevice links. If the object moves back in range, the Timer is aborted. TurnOff will not be sent if the object is locked, but TurnOn will.

Karras
miss16.osm 2

Relays TurnOn and TurnOff messages to all ControlDevice linked objects.

Really, that's it? Just a bloody relay? Heh... Go figure. Thief 2 controls this with an AI Response pseudo-script.

BroadcastSchemaListNoRep
miss16.osm 2

On TurnOn, randomly select a ScriptParams from this object which doesn't have the data set to "1". If all the ScriptParams links are set to "1", it clears the data then selects one. Sends PlaySchema to the object named LoudspeakerRelay with the object ID of the linked-to schema. The data of the selected link is set to "1". If the Script\Timing property exists, a Timer will be started at Sim start. The Timer period is a random number of seconds from 80–120% of Script\Timing. When the Timer expires, it is retriggered for another random period, and TurnOn is sent to the script object and to all ControlDevice linked objects.

LoudspeakerRelay
miss16.osm 2

Plays schemas at the location of all objects that are linked to with ControlDevice. Listens for the PlaySchema message with the object ID of the schema as the first parameter. The script classifies the current schema as "Attack", "Intro", "Ramble", or "Other". It does this by looking for a ScriptParams link to the schema from one of the objects KarrasAttack, KarrasIntro, or KarrasRamble. "Attack" schemas will not play if another schema is currently playing, nor will an "Attack" schema that is being played be interrupted. When all of the schemas have finished playing, it looks for a ScriptParams link from the schema that was just played and will send PlaySchema to itself with the destination of the link.

AntennaManager
miss16.osm 2

Responds to TurnOn and TurnOff. Will count the number of objects which link to this object with ControlDevice and have a joint tweq in the active state. Compares this to the value of num_antenna_norm, num_antenna_hard, or num_antenna_exp depending on the difficulty. If the number of levers is at least the value of the quest variable, the goals 3, 4, and 5 are completed, otherwise they are marked as incomplete. In either case, TurnOn is sent to an object named AntVORelay.

HomingInProgress
miss16.osm 2

Changes the model of the object when it receives a Transmogrify message. The current stage of the object is tracked so it can only change to a specific model from each stage. A message from Machine1 changes it to homing2 from stage 1. Machine2 to homing3. Machine3 to homing4. When transmogrified by Machine4, this object is teleported to the location of GuidingBeacon and GuidingBeacon is teleported to the location of the first object that Machine4 has a ControlDevice link to. Goal 1 is set to completed.

This script represents an earlier version of the process. It isn't actually used in Thief 2.

GuidingBeacon
miss16.osm 2

On FrobWorldEnd, sends TurnOn to the object named GuidBeacVO.

Socket
miss16.osm 2

When unlocked, sets goal 2 to completed.

Machine
miss16.osm 2

On PhysCollision, waits for 5 seconds then teleports the object that collided with it to the destination of the first ControlDevice link. The colliding object receives a Transmogrify message.

This script was dropped from the final game in favor of MachineSlot and the TransmogrifyMachine scripts.

MachineSlot
miss16.osm 2

Listens for PhysContactCreate and PhysContactDestroy. When an object makes or breaks contact, an Enter or Exit message is sent along a ScriptParams link. The ID of the colliding object is the first parameter, and the data of the ScriptParams link is the second.

TransmogrifyMachine
miss16.osm 2

This is a base script for the various manufacturing scripts. A TransmogrifyMachine listens for Enter and Exit with the object ID to be processed as the first parameter, and the input slot number as the second. It also responds to TurnOn.

AmalgMachine
miss16.osm 2

Collects IronChassis, QuickLimeMixture, AcidMixture, and FlareMixture. Anything else is immediately sent to the destination of a ScriptParams link with data "1". When turned on, an IronChassis and QuickLimeMixture are combined into a MineBulb. Or a QuickLimeMixture and an AcidMixture is combined into a FlareMixture. Or an IronChassis is mixed with a FlareMixture to create a FlashMine. Creating a FlashMine will send TurnOn to the object named ManufactureSecret1. Created objects are teleported to the destination of a ScriptParams link with data "1" and given a slight upward nudge (0.1 Z-axis velocity).

BellowingMachine
miss16.osm 2

Activates when an object enters the slot. Collects FluxSpheroid and BantamNode objects and combines a pair into a CameraGrenade. A HIPStage0 will be converted into a HIPStage1. All other objects pass through unmodified. The output object is teleported to the destination of a ScriptParams link with data "1" and given a slight upward nudge (0.1 Z-axis velocity).

FusingMachine
miss16.osm 2

Collects AcidMixture, WireSpool, PlateO'Metal, and FluxSpheroid. When turned on, an AcidMixture will be combined with a WireSpool and create a FluxSpheroid. A HIPStage3 will be changed into a HomingIntact and goal_state_1 will be set to 1. A PlateO'Metal will be combined with a FluxSpheroid into a FlashBomb and TurnOn will be sent to ManufactureSecret2. The FlashBomb will be created without a physics model. A created object is sent to output 1. Any object not processed by the machine will go directly to output 2.

LinkingMachine
miss16.osm 2

This machine collects InvGauge and BantamNode objects. All others are immediately passed through to output 1. When the machine is turned on, it combines a pair of the objects into a RegRound sent to output 1.

RollingMachine
miss16.osm 2

When turned on, checks the objects in slots 1 and 2. Slot 2 must be a PlateO'Metal to process the object in slot 1. If slot 1 is a FlareMixture, it outputs a Flare. A HIPStage1 will become a HIPStage2. A CombatBotBoiler in slot 1 will increment a counter. When the counter gets to 5, a QuoteList is created and the counter is set to 0. When an object is processed, the objects in both slots are destroyed, otherwise the object in slot 1 is output unmodified and the object in slot 2 remains where it is. The output object is teleported to the destination of a ScriptParams link with data "1".

SealingMachine
miss16.osm 2

When turned on, the objects in slots 1 and 2 are output. If the objects are a MineBulb and a PlateO'Metal, a Mine is output. If they are a HIPStage2 and a RegRound, a HIPStage3 is output. For those two combinations, either object can be in either slot. If a MineBulb is in slot 1 and a BantamNode is in slot 2, an ExplosiveCharge is created and TurnOn is sent to the object ManufactureSecret3. Combined objects are destroyed and the output sent through a ScriptParams link with data "1". Otherwise, the object in input slot 1 is sent to output 1 and input slot 2 is sent to output 2.

BotStationBot
miss16.osm 2

On TurnOn, wakes up the AI and sets the minimum alert level to 3. The AI will quickly go to the destination of a ControlDevice link, or to the Player if there is no link. When the action is complete, the AI\Ability Settings\Patrol: Does patrol property is turned on if the first ScriptParams link to the AI has the data patrol. After the time specified in Script\Timing, which defaults to 60 seconds, the AI\AI Core\Alertness cap is reset to a minimum level of 0.

BotStationManager
miss16.osm 2

When turned on, sends TurnOn to the first object linked to with ScriptParams that inherits from Door. And sends TurnOn to all objects linked with to ScriptParams that inherit from Robot.

HealingWaterFont
miss16.osm 2

On FrobWorldEnd, "damages" the frobber by -4 points with a RestoreStim; disables the font; sends TurnOff to itself, and to objects that link to it with ParticleAttachement; and sets a Timer for 3 minutes. When the Timer expires, the font is re-enabled and TurnOn is sent to the script object, and to objects that link to it with ParticleAttachement.

OnOffFlame
miss16.osm 2

Responds to TurnOn and TurnOff. Will add or remove the meta-property LowPeriodHeatSource and sets the Renderer\Has Refs property accordingly.

RenewableResource
miss16.osm 2

This script creates new objects periodically. The type of object is specified by a ScriptParams link to an archetype. The data of the link is the maximum number of created objects that can be in the player's inventory. When the limit is reached, no new objects of that archetype will be created until one of the already existing ones is destroyed or dropped. The standard crystal types are accounted for. The Script\Timing property specifies the number of seconds for the regeneration timer. The default is 3 minutes. The timer begins at Sim start. When it expires, a new object will be created if the old object has been picked up or destroyed and the maximum object limit has not been reached. Then the timer starts over again. The timer is not interrupted by picking up or destroying the created object. Created objects will not have a physics model (Physics\Model\Type property) or an initial velocity (Physics\Projectile\Initial Velocity). The script TrigWorldFrob will be added to an empty slot in the Scripts property; the script does not clear the Don't Inherit flag when it adds a Scripts property. A ControlDevice link is added from the created object to this one and it will be removed when the object is frobbed.

In my initial study, only four instances of the script were able to regenerate any one type of object. I'm not so sure any more.

TrapAddMetaProp
miss16.osm 2

On TurnOn, adds the meta-property linked to by a ScriptParams link to the objects linked from this object by ControlDevice. Does not respond to TurnOff.

TrapDelayer
miss16.osm 2

Relays TurnOn and TurnOff along its ControlDevice links after waiting a period of time. The delay is specified in Script\Timing as seconds and defaults to 5 seconds. The Timer is named Delay and contains the name of the delayed message in the first data parameter. Each message is delayed independently and is not interrupted by receiving another message (unlike TrapTimedRelay).