Trespasser Script Reference

This document describes the classes and values of the scripting used by Trespasser. The syntax of the script is that used by TresEd, the Trespasser Level Editor.

Script Reference:
General Script Classes
Trigger Classes
Trigger Actions

Notes:

Disclaimer: This page is work in progress, is far from complete, and has not been thoroughly checked so use it just as a guide.


General Script Classes and Values

Values are case sensitive and strongly typed. This means that if you type "moveable" instead of "Moveable" or "int Frame" instead of "float Frame", Trespasser will ignore the value. Where the default value is listed as "must specify", Trespasser may behave badly or even crash if the value is not specified.

The Class value determines the type of object, and all objects should specify it.

Type Name Default Description
string Class "CInstance" Class of object, described below.

Example:

group MyTerrainTexture = {
  string Class = "CTerrainObj"
  int Height = 1
  string SoundMaterial = "Grass"
}

Classes:
AI Command
CAnimal
CBackdrop
CEntityAttached
CEntityWater
CGun
CHitSpang
CInstance
CJoint
CLightDirectional
CMagnet or MasterMagnet
SlaveMagnet
CSocket
CMuzzleFlash
CParticles
CSky
CSubsystem
CTerrainObj
CTest
CWaterDisturbance or Disturbance
Player
Player Settings
Settings
Teleport
Marker
TerrainPlacement
<no Class specified>
IGNORE
See also Trigger classes

Possible classes, with unknown usage (not used in original levels): CHitSpang, CInput, CSocket, Default, Marker, TerrainExtent, CTest, CSubsystem.


AI Command

Specifies the sounds to use for CAnimals. See a level for examples.

Example:

group VocalTriceratopsRoar = {
    string Class = "AI Command"
    int Dinosaur = 3
    int Vocal = 2
    string A00 = "TRIC-CALL-03"
    string A01 = "TRIC-STLK-01"
    string A02 = "TRIC-WMPR-02"
}

Vocal values are as follows: 0=Pain, 1=Call, 2=Roar, 3=Snarl, 4=Stalk, 5=Whimper, 6=Dying, 7=Attack, 8=Bite, 9=Chew, 10=Drink, 11=Swallow, 12=Sniff, 13=Tear


CAnimal

A dinosaur, see a level for examples. See also the trigger actions "CSetAIAction", "CSetAnimatePropertiesAction" and "CWakeAIAction".

Type Name Default Description
int ArcheType must specify What this dino eats. A "Not-Anne" Carnivore has no interest in eating Anne, though they may still kill her if she gets in the way.
1 = Herbivore
0 = Carnivore
-1 = Not-Anne Carnivore
int Dinosaur must specify Used by vocals (class AI Command). Not sure if it means anything more than which sounds to use. (Could affect dino AI behaviour?)
0 = Raptor
1 = T-rex
2 = Parasaurolophus
3 = Triceratops
4 = Stegosaur
5 = Brach
6 = Albertosaur
int Team must specify What team this dinosaur belongs to. Dinosaurs on the same team won't fight each other, even if they are of different species.
int PVA must specify ? Always -2 in original levels
float WalkOver -0.3 Obstacle relative height over which the dinosaur can walk.
float JumpOver 0.5 Obstacle relative height over which the dinosaur must jump.
float WalkUnder 3.0 Obstacle relative height under which the dinosaur can walk.
float CrouchUnder 2.0 Obstacle relative height under which the dinosaur must crouch.
float JumpDistance 3.0  
float JumpUp 1.0  
float JumpDown 1.0  
float Bravery 0.5 Dinosaur bravery.
float HitPoints 100.0 Starting hitpoints of dinosaur, decreases with damage received.
float MaxHitPoints 100.0 Maximum hitpoints of dinosaur, if not specified equal to HitPoints.
float CriticalHit unknown Decrease in HitPoints due to a single damage hit that is considered critical. See also CCreatureTrigger.
float Regeneration 1.0 Rate at which the HitPoints are increased per second after receiving damage until reaching MaxHitPoints again.
float ReallyDie -20.0 Value at which the HitPoints don't decrease anymore.
float DieRate 1.0 Rate at which the HitPoints decrease per second automatically after reaching a value equal or less than 0.0 until reaching ReallyDie.
float Width 1.0 Maybe used by physics engine in movement calculations?
float Height 1.0 Maybe used by physics engine in movement calculations?
float HeadReach 2.0 Maybe used by physics engine in movement calculations?
float TailReach 4.0 Maybe used by physics engine in movement calculations?
float ClawReach unknown Maybe used by physics engine in calculations involving removed ActClaw activity?
float MoveableMass 0.5 Maybe used by physics engine in movement calculations?
Physics
string Type must specify Arrangement of physics boxes:
"Trike" = Four legged creature
"Raptor" = Two legged creature
"TRex" = Two legged creature, seems to be the same as Raptor
float WakeUp 30.0 Distance from the player at which the physics of the animal are activated.
float Sleep 30.0 Distance from the player at which the physics of the animal are deactivated. Sleep >= WakeUp
string Head must specify Physics object used for collisions. (Named '$' object must exist.)
string Neck must specify Physics object used for collisions. Posssibly meant at one time for Brachiosaurus? (Named '$' object must exist.)
string Body must specify Physics object used for collisions. (Named '$' object must exist.)
string Tail must specify Physics object used for collisions. (Named '$' object must exist.)
string Foot, LeftFoot, RightFoot,
LeftRearFoot, RightRearFoot
unknown Physics objects used for collisions. In the original levels these are not set - Trespasser uses default foot models. They can be set, though. For two-legged creatures, use "Foot" for the right foot, and "LeftFoot" for the left one. For four-legged creatures, use "Foot" for the right rear foot, "LeftRearFoot" for the left one, and "RightFoot" and "LeftFoot" for both front feet. (Named '$' objects must exist.)
int NumJoints must specify Number of joints (not including double joints). See CJoint .
int NumDoubleJoints must specify Number of interpolated joints.
Emotions
float Fear 0.2 Starting value for dinosaur's fear. Valid range is 0.0-1.0.
float Love 0.2 Starting value for dinosaur's love. Valid range is 0.0-1.0.
float Anger 0.2 Starting value for dinosaur's anger. Valid range is 0.0-1.0.
float Curiosity 0.2 Starting value for dinosaur's curiosity. Valid range is 0.0-1.0.
float Hunger 0.5 Starting value for dinosaur's hunger. Valid range is 0.0-1.0.
float Thirst 0.5 Starting value for dinosaur's thirst. Valid range is 0.0-1.0.
float Fatigue 0.0 Starting value for dinosaur's fatigue. Valid range is 0.0-1.0. Decreases slowly with time.
float Pain 0.0 Starting value for dinosaur's pain. Valid range is 0.0-1.0. Decreases quickly with time.
float Solidity 1.0 Starting value for dinosaur's solidity. Valid range is 0.0-1.0.
float HumanFear 0.2 Dinosaur's fear towards player. Valid range is 0.0-1.0. If not specified, same as Fear.
float HumanLove 0.2 Dinosaur's love towards player. Valid range is 0.0-1.0. If not specified, same as Love.
float HumanAnger 0.2 Dinosaur's anger towards player. Valid range is 0.0-1.0. If not specified, same as Anger.
float HumanCuriosity 0.2 Dinosaur's curiosity towards player. Valid range is 0.0-1.0. If not specified, same as Curiosity.
float HumanHunger 0.5 Dinosaur's hunger towards player. Valid range is 0.0-1.0. If not specified, same as Hunger.
float HumanThirst 0.5 Dinosaur's thirst towards player. Valid range is 0.0-1.0. If not specified, same as Thirst.
float HumanFatigue 0.0 Dinosaur's fatigue towards player. Valid range is 0.0-1.0. If not specified, same as Fatigue.
float HumanPain 0.0 Dinosaur's pain towards player. Valid range is 0.0-1.0. If not specified, same as Pain.
float HumanSolidity 1.0 Dinosaur's solidity towards player. Valid range is 0.0-1.0. If not specified, same as Solidity.
float DamageFear 0.0 Factor for increase in dinosaur's fear when taking damage.
Fear = Fear + DamageFear * Gun_Damage * $Object_Armour / MaxHitPoints
float DamageLove 0.0 Factor for increase in dinosaur's love when taking damage.
Love = Love + DamageLove * Gun_Damage * $Object_Armour / MaxHitPoints
Use negative values to decrease (otherwise, you're looking at "amor serrano" - "highlands love": "the more you beat me, the more I love you").
float DamageAnger 0.0 Factor for increase in dinosaur's anger when taking damage.
Anger = Anger + DamageAnger * Gun_Damage * $Object_Armour / MaxHitPoints
float DamageCuriosity 0.0 Factor for increase in dinosaur's curiosity when taking damage.
Curiosity = Curiosity + DamageCuriosity * Gun_Damage * $Object_Armour / MaxHitPoints
Use negative values to decrease.
float DamageHunger 0.0 Factor for increase in dinosaur's hunger when taking damage.
Hunger = Hunger + DamageHunger * Gun_Damage * $Object_Armour / MaxHitPoints
float DamageThirst 0.0 Factor for increase in dinosaur's thirst when taking damage.
Thirst = Thirst + DamageThirst * Gun_Damage * $Object_Armour / MaxHitPoints
float DamageFatigue 0.0 Factor for increase in dinosaur's fatigue when taking damage.
Fatigue = Fatigue + DamageFatigue * Gun_Damage * $Object_Armour / MaxHitPoints
float DamagePain 0.0 Factor for increase in dinosaur's pain when taking damage.
Pain = Pain + DamagePain * Gun_Damage * $Object_Armour / MaxHitPoints
float DamageSolidity 0.0 Factor for increase in dinosaur's solidity when taking damage.
Solidity = Solidity + DamageSolidity * Gun_Damage * $Object_Armour / MaxHitPoints
Use negative values to decrease.
Activities
bool ActEat false Move head to target, chew noisily. Maybe lift head while chewing.
bool ActBite false Attempts to bite target. Move head to target. Opens mouth when close, closes mouth when on target. See also BiteTargetDistance.
bool ActFeint false A fake bite. Stops just short of the target. Requires ActJumpBack to be cool. See also FeintTargetDistance.
bool ActRam false The dinosaur hits the target with its head physics box. Put head down and run through target. Should try to keep running past a bit. The head physics box needs a damage value.
bool ActDrink false Move head to target, slurp noisily. Jiggle the head up and down a tad.
bool ActJumpBite false Not implemented? Leap into the air and bite the target. Not useful, but very cinematic.
bool ActShoulderCharge false Not implemented? The dinosaur hits the target with its body physics box, mostly using the shoulder area. The body physics box needs a damage value. Like Ram, but instead of hitting with the head we try to hit with the side of the neck (or shoulder, if we are lucky).
bool ActTailSwipe false Lash tail at target. The dinosaur hits the target with its tail physics box. It will run backward while doing this action. The tail physics box needs a damage value.
bool ActOuch false Not implemented? Make a sound. Use vocal cube with "int Vocal = 0".
bool ActHelp false Not implemented? Make a sound. Use vocal cube with "int Vocal = 1".
bool ActHowl false Not implemented? Make a sound. Use vocal cube with "int Vocal = 2".
bool ActSnarl false Make a sound. Use vocal cube with "int Vocal = 3".
bool ActCroon false Make a sound. Use vocal cube with "int Vocal = 5"?
bool ActDie false Not implemented? Make a sound. Use vocal cube with "int Vocal = 6".
bool ActMoveToward false Move body closer to the target.
bool ActJump false Not implemented? Perform a jump.
bool ActMoveAway false Not implemented? Move body farther from the target.
bool ActDontTouch false Not implemented? The dino will not touch the player; use it with ActCircle. Make sure that you don't touch target, but you can get close.
bool ActWander false Move about randomly.
bool ActStalk false Not implemented? Follow target and make stalking sounds. Use vocal cube with "int Vocal = 4". Move body closer to the target stealthily. Move slow, crouch a bit.
bool ActCircle false Not implemented? Dino will circle around target surrounding it. Move body in an orbit around the target.
bool ActStayNear false When you get far enough away, run back to target. See StayNearOK, StayNearMax and StayNearTarget.
bool ActStayAway false Stay away from target. See StayAwayOK, StayAwayMin and StayAwayTarget.
bool ActFlee false Move body away from target at top speed.
bool ActPursue false Move towards the target at top speed.
bool ActJumpBack false A quick retreat.
bool ActGetOut false Move body outside thing it is inside. Pathfinding fix. This will help dinos get unstuck.
bool ActApproach false Perform a cinematic approach. Zig, zag, and show the profile.
bool ActDash false Not implemented? Move body in a random direction for ten meters. Good for compies and frantic dinos.
bool ActMoveBy false Perform a run-by.
bool ActLookAt false Not implemented? Dino will look at target without doing anything else. Turn head so we are looking at target.
bool ActTaste false Not implemented? Dino takes a little nibble at the back of the target. Move head to target slowly, open mouth slightly, and make a licking sound.
bool ActSniffTarget false Move head to target slowly, close mouth, and make a sniffing sound. Use vocal cube with "int Vocal = 12".
bool ActCockHead false Look at target, but cock head. Maybe twist it a bit to give one eye a good view.
bool ActRearBack false Lift head up high, but keep looking at target. Indicates fear or surprise.
bool ActBackAway false Not implemented? Seems to make the dino casually take a couple of steps back. The dino will turn away if it sustains too much damage/fear. Back up slowly away from target.
bool ActCower false Crouch down, lower the head, look at target. Maybe back away slowly. Indicates fear, submission.
bool ActGlare false Look at the target, but somehow make it seem more menacing.
bool ActSniff false Lift head into the air. Play a sniff sound and jerk head back/up a tiny bit. Repeat. Use vocal cube with "int Vocal = 12".
bool ActLookAround false Look about to see if anyone is there.
bool ActNothing false Do absolutely nothing. Used for tranquilized dinos.
bool ActTestHeadCock false Not implemented? Cocks the dino's head around the nose vector.
bool ActTestHeadOrient false Not implemented? Points the dino nose vector in a random direction. When directed to look behind self, body turns very slowly.
bool ActTestWagTail false Not implemented? Wags the tail with a random amplitude and frequency.
bool ActTestHeadPosition false Not implemented? Dino puts its head in a random spot in the world (near the origin).
bool ActTestMouth false Not implemented? Moves the mouth to a random openness with random speed. Speed ignored.
float ActEatFear, ActEatLove, ActEatAnger, ActEatCuriosity, ActEatHunger, ActEatThirst, ActEatFatigue, ActEatPain, ActEatSolidity, ActBiteFear, ActBiteLove, ... ActTestMouthPain, ActTestMouthSolidity (too many to be listed) Rating feeling, how much each emotion influences in each activity. Valid range: -10.0 to 10.0.
For example, Anger and Hunger will have a great influence in ActBite, while Love and Fatigue affect it negatively, and Pain will have a great influence on ActOuch.
It's likely disabled activities like ActJump have simply had their default values set to 0, so the activity is never triggered...
string StayNearTarget must specify Object near which the dinosaur should stay. Can be of any class.
float StayNearMax must specify Maximum distance from target at which dinosaur can get before turning back towards the target (ActStayNear is triggered).
float StayNearOK must specify Distance from target at which dinosaur doesn't need to get closer anymore (ActStayNear isn't enforced anymore). StayNearOK < StayNearMax
string StayAwayTarget must specify Object from which the dinosaur should stay away. Can be of any class.
float StayAwayMin must specify Minimum distance from target at which dinosaur can get before turning back away from the target (ActStayAway is triggered).
float StayAwayOK must specify Distance from target at which dinosaur doesn't need to get further away anymore (ActStayAway isn't enforced anymore). StayAwayOK > StayAwayMin
float BiteTargetDistance must specify Distance from target at which ActBite is triggered.
float FeintTargetDistance must specify Distance from target at which ActFeint is triggered.


CBackdrop

Used in original levels to represent Mt. Watson from great distances, either when terrain is too distant to be rendered or does not extend far enough to have it included. CBackdrop is excluded from the normal render-distance restriction for visible models in Trespasser, where the mesh begins to disappear at a certain range, and as such will be viewable in full quality across any ingame distance. CBackdrop is also excluded from Occlusion objects. In the original levels, the CBackdrop always takes on the color of the level's fog setting. New CBackdrop objects are colored black when within a certain viewing distance, for uknown reasons. They can sometimes take on the level's fog color when far enough away. CBackdrop objects cannot use textures, however if one is textured, it will take on an average color of the texture rather than black in the afore mentioned circumstances. CBackdrop meshes copied in TresEd from other CBackdrop meshes can appear as gray-textureless rather than black unless reimported, suggesting lighting settings used by GeomAdd are required for CBackdrop to work properly and would also be why new CBackdrop objects do not work like those in the original levels. No original instances contain other values, just "string Class = "CBackdrop"". Initialized as standard instance (may have different function in-game).


CEntityAttached

Pretty much like a CInstance, but has a "string Target" value, which is the object it is attached to. Beware, if it's tangible and it's colliding with the "parent" object, it will attempt to "free" itself.


CEntityWater

Ripples happen on water entities when objects collide with it. See also CWaterDisturbance.

Type Name Default Description
float ResolutionRatio 1.0 Optional. One original level has this as 2.0, the others do not specify it. Range is 0.0 to 2.0? Specifies scales of ripples on water.
string SoundMaterial none Optional. For the few original levels that have this, it is "Water".


CGun

See a level for examples..

Type Name Default Description
string MFlashObject0, MFlashObject1, ... MFlashObject9 must specify CMuzzleFlash for gun (Named object must exist.)
string MFlashOrg must specify Origin for CMuzzleFlash animations. The animations will be pointed towards the gun's positive Y-axis, regardless of the MFlashOrg $object's orientation. (Named $object must exist.)
bool RandomRotate false? If true, CMuzzleFlash animations will rotate around Y-axis while firing.
float MFlashDuration none Duration of the CMuzzleFlash animations. Usually set to 0.0
bool AutoFire false? If true, gun is automatic and will use both Sample and RingSample.
string Sample must specify Name of sound effect from Effects.tpa to play for every shot or burst (for guns with AutoFire set to true) fired.
string RingSample must specify Name of sound effect from Effects.tpa to play at the end of every burst fired (for guns with AutoFire set to true only).
string EmptyClipSample must specify Name of sound effect from Effects.tpa to play for after all ammo has been expended.
string SoundMaterial must specify There are two specific sound materials designed to be used by guns, appropiately named "Pistol" and "Rifle".
string RecoilOrg must specify Origin of the gun's RecoilForce, applied in the direction of the positive Y-axis of the $object. Named $object must exist.
float RecoilForce must specify Amount of recoil applied each time the gun is fired.
string Barrel must specify Origin of the gun's firepower (Push). Shots will be fired along the gun's positive Y-axis from this point, regardless of the Barrel $object's orientation. Named $object must exist.
float Push must specify Amount of force with which a shot fired from the gun hits its target. Negative values can be used to "attract" objects.
float Damage must specify Amount of damage caused by a shot fired from the gun upon hitting a CAnimal or Player. Value isn't affected by Scale parameter.
float DamageMultiplier must specify Multiplies the amount of damage caused by a shot fired from the gun upon hitting a CAnimal or Player. Possibly designed so that damage from a bullet hit can be higher than damage from being hit by the gun?
float TranqDamage must specify Amount of tranquilizer "damage" caused by a shot fired from the gun upon hitting a CAnimal or Player. Value isn't affected by Scale parameter.
float Range must specify Maximum range at which a shot fired from the gun is able to hit its intended target. Value is affected by Scale parameter (guns were designed to be 2.0m long and appropiately reduced by applying a Scale parameter between 0.0 and 1.0), so often it's higher than the real-life range to compensate.
float ROF must specify Rate of fire, how quickly the ammo is spent, in shots per second.
int MaxAmmo must specify Maximum number of rounds the gun can be loaded with.
int Ammo must specify Number of rounds the gun has when you pick it up. If not specified, gun is assumed to have MaxAmmo rounds.
bool AltAmmoCount false Enables the usage of "alternate" ammo counting by the player (giving out expressions like "It's half gone." instead of actually saying how much ammo is left). Weapons with an ammo load over 30 need the bool AltAmmoCount = true parameter added, otherwise you won't get any ammo count until it's down to 30. If you haven't specified an Ammo value and the MaxAmmo value is over 100, even with this parameter, you won't get a proper count, you'll get "almost out" and "half full" notifications when it's not the case yet. To prevent that, you must have set the Ammo value properly.

Other possible values: Kick

Example:

group Pak47drumagazine-00 = {
    string MFlashOrg = "$FAKDFlash-00"
    string MFlashObject0 = "FMFrifleMF03-00"
    string MFlashObject1 = "FMFrifleMF04-00"
    string MFlashObject2 = "FMFrifleMF05-00"
    bool RandomRotate = true
    float MFlashDuration = 0.000000
    bool AutoFire = true
    string Sample = "GUN - AK47 SHOT"
    string RingSample = "GUN - AK47 REL"
    string EmptyClipSample = "GUN - AUTOMATIC DRYFIRE 01"
    string SoundMaterial = "Rifle"
    float WakeUp = 175.000000
    float RecoilForce = 55.000000
    float ROF = 10.000000
    float Push = 230.000000
    float Damage = 15.000000
    float DamageMultiplier = 1.000000
    float Range = 200.000000
    int MaxAmmo = 100
    bool AltAmmoCount = true
    string Class = "CGun"
    bool Tangible = true
    bool Moveable = true
    float Density = 0.080000
    string Type = "Compound"
    string Model00 = "$Fak47drum00-00"
    string Model01 = "$Fak47drum01-00"
    string Detail1 = "$Pak47drumagazineDRC-00"
    float A01 = 30.000000
    string DetailShadow = "$Pak47drumagazineShdw-00"
    string Barrel = "$FAKDbarrel-00"
    string RecoilOrg = "$FAKDrecoil-00"
    float Diffuse = 1.200000
    float Specular = 1.200000
    float SpecularAngle = 37.000000
}


CHitSpang

Is not implemented in executable (no initialization function). However, there seem to be some properties related to it (like SpangCount).


CInstance

General object in world. See also the trigger actions "CAnimateTextureAction", "CSetPhysicsAction", and "CSubstituteMeshAction".

Type Name Default Description
Misc
bool AI true If true, object is considered in calculations for pathfinding, if false, object is ignored. If true and a dino has ActGetOut=true, the dino won't go into this bounding volume. I think the default value of AI is true if object is Visible, and false if it has Visible=false.
bool Climb false If true, dinos can step over object. AI must be set to true in order for it to work.
float AIMass unknown ? Used in Anne and dinos.
int AIType unknown What AI sees this object as:
0 = don't care
1 = unknown
2 = animal (dinosaur)
3 = meat (carnivore food)
4 = grass (herbivore food)
5 = human (Anne)
6 = node hint
7 = water (both for herbivores and carnivores)
8 = end
float Damage 1.0 Base value for calculating damage caused by an object to Anne or CAnimals in collisions. Set it to 0.0 if you want it to cause no damage at all.
float Armour 1.0 In physics boxes for CAnimals or Player, factor for calculating how much the HitPoints are to be decreased when sustaining damage. Set it to 0.0 if you want it not to receive any damage at all.
HitPoints = HitPoints - $Object_Armour * Weapon_Damage
float Height unknown Use if Planted=true. See Planted for more info.
bool Planted false Stretches the vertices of a mesh between the lowest boundary and the specified Height value onto the terrain. Will cause rendering anomalies when part of the mesh lies underground. Used for certain tree models in original levels. One of its intended purposes is likely to prevent underground portions of the trees from casting shadows on the terrain.
string Mesh none Use mesh of given object instead of own mesh.
string Physics none Use physics properties of given object instead of own ones.
string SoundMaterial none Used for determining sound effect(s) played when object collides with another, looking both soundmaterials up in the Foley table. The same strings can be used by CCollisionTrigger, and to define custom particle effects (see CParticles).
bool Merge true ?
bool Split true ?
bool Wrap true ?
Rendering
int AlphaChannel none 0,1,8 in original levels. Make object transparent, according to predefined settings. See Settings for more info. Used by LightBeam in testscene, and also by many triggers.
bool AlwaysFace false True to create a 'billboard'. Rotates around (world) Z-axis (object's Z-axis is aligned with the world's), Y-axis of object faces viewer.
bool Bumpmaps unknown ? Ignored if all textures are 8bit. Ignored completely?
float Bumpiness unknown How bumpy are unspecified bumpmaps (normal maps).
bool Curved false True for curved bumpmaps (normal maps).
float Diffuse 1.0 Amount of diffuse lighting.
WARNING: If this value is changed, Trespasser won't load the level unless the PID is updated. This is because the Diffuse value is used in the hash function that converts texture names in the GRF with texture IDs in the PID.
float Emissive 0.0 Emissive lighting parameter, often used by billboards and detail objects that are Unlit.
bool MipMap true Used during level creation, unclear whether used by engine. Specifies whether mipmaps are to be generated and used for the textures of this mesh. If true, only the smallest mipmap is permanently in memory. If false, the whole texture always resides in memory, so use with care. Must be false for CSky, and perhaps TerrainPlacement.
int Normals unknown (does this work? perhaps only used during level creation) Which sort of face normals to use.
0 = Use vertex normals?
1 = Use face normals?
2 = ? (used on Anne, GoldBar on JR)
3 = ? (used on GoldBar in TestScene)
bool Reflect unknown ? Only used on GoldBar (in jr?)
bool Refract unknown ? Only used on GoldBar (in jr?) (mistyped with lowercase 'r')
float RefractIndex unknown ? Only used on GoldBar (=1.1, in jr?)
float Specular 0.0 1.1 to 1.9 in original levels.
float SpecularAngle unknown 0.2 to 37 in original levels.
bool Shadow true If true cast shadow onto terrain.
bool Unlit false If true don't apply diffuse light (nor ambient as well?) to this object. Will usually specify Emissive=1.0 in this case.
bool Visible true If true object can be seen. (Can be used if it's a CInstance, CAnimal, or if it has no valuetable entry.) See also the trigger action "CHideShowAction".
Physics
bool Moveable false Object can be moved (perhaps only works if it's Tangible?).
bool Tangible false Is this a physical object ie. one that feels solid.
bool Floats false If set to true, object floats on water.
bool Frozen false If set to true, object won't move until 'unfrozen'.
float Density 0.1 Used to compute mass from bounding volume.
float Elasticity 0.2 Original levels have 0.1-0.2, except for PBasketBall00-00=2.0
float Friction 5.0 Ranges 0 to 10 in original levels.
float Mass unknown Explicitly set mass (ie. not using Density).
string Type "Box" Arrangement of pysics boxes:
"Box" = Simple box-shaped object (regardless of actual shape)
"Compound" = Compound object (array of boxes)
If "Compound" then use Model00s for the physics. Both this object and Model00's should have Tangible=true, and the Moveable flags must match as well.
string Model00, Model01, ... none Physics sub-object. Specifies object(s) whose bounding boxes should be used for physics instead of this object's bounding box. Type must be "Compound". Trespasser files only use numbers 00-09.
Note: I believe that if geometry type2 objects are used as subobjects, the name must begin with '$', and the values cannot contain "Visible=false" (having the name start with '$' will make it invisible).
(Named '$' object must exist.)
Animated textures
For a scrolling texture, set DeltaX and Delta. For animated texture, specify some Anim00s. When the current animation Frame changes, all textures in the object are replaced with the new Anim texture. Note that a model retains it's original textures until the first frame change (which occurs after Interval seconds).
float DeltaX 0.0 For scrolling texture, X texture coords/second.
float DeltaY 0.0 For scrolling texture, Y texture coords/second.
string Anim00, Anim01, ... 0 If specified, defines an animated texture. Name of texture must be without path eg. "AnneHealth100.bmp". Can have up to Anim31. See also the trigger action "CAnimateTextureAction".
int Frame 0 Initial frame number. Note: even if this is specified, the model retails original textures until the animation first updates.
int FreezeFrame -1 Stop animation when this frame is reached. -1 means don't stop, loop through the textures continuously.
float Interval unknown Delay in seconds between changing animated texture, -1 to freeze.
int TrackTwo 0 (optional, default is one track only) Set first frame of second animation track If Frame gets to the end of the first track, it loops back to zero. If Frame gets to the last Anim frame, it loops to TrackTwo. Change tracks by setting Frame in the "CAnimateTextureAction" action.
Visibility culling and image caching:
float Culling unknown Don't draw if object is further away than this.
float ShadowCulling unknown Don't draw shadow if object is further away than this.
bool CacheIntersecting false Set to true to prevent "Z-fighting" between two closely layered objects.
float CacheMul 1.0 Cache object at further distance than normal (eg. 2, 3, 4).
bool NoCache false If true, don't use an image cache for this object.
bool NoCacheAlone false If true, don't use an image cache for this object alone (but OK if it's together with some other).
bool HardwareOnly false Only draw object when Trespasser runs in Hardware mode.
bool SoftwareOnly false Only draw object when Trespasser runs in Software mode.
bool NoLowRes false  
bool TrrMovingShadows true False to not draw shadows while object is moving. (Not used in original levels.)
string DetailShadow none Object to use for shadow. (Named object must exist.)
int Priority unknown 1,2,3 in original levels. Tied to video quality settings. (Not sure of exact usage, but eg. at low quality option, Priority 1 objects are not rendered, but Priority 3 objects are.)
string Detail1 none LOD mesh. Specifies models (eg. with reduced detail) to use when object is less than a certain number of pixels in height (specified by A00, A01). (Named '$' object must exist.)
float A01 none See Detail1. (In original levels, A01 is always greater than A02. ie. A01 is larger pixel size so used when object is closer).
string Detail2 none See Detail1. (Named '$' object must exist.)
float A02 none See Detail1.


CJoint

CAnimal (and Anne also) have joints, which have no Class specified, and are named $J<objectname>XX where XX is the joint number (starting at 00). Basic joints have a list A00, A01,... of vertices attached to the joint. "Double" joints also have "int Anim00,Anim01" specifying parent joints, and "float Ratio,RotationRatio" specfying an interpolation between the parent joints. (Not sure exactly how the interpolation is done.)

Example:

group $JRaptorB05 = {
    int A00 = 24
    int A01 = 25
}
group $JRaptorB26 = {
    int Anim00 = 7
    int Anim01 = 6
    float Ratio = 0.500000
    float RotationRatio = 0.500000
    int A00 = 0
    int A01 = 1
    int A02 = 2
    int A03 = 15
}


CLightDirectional

Light direction is along the Z axis of the model. Not all levels have this. Always has "bool Visible = false". See also the trigger action "CSetRendererAction".

Example:

group DLight_JungleRoad = {
  string Class = "CLightDirectional"
  bool Visible = false
}

Type Name Default Description
float Intensity 0.99  


CMagnet or MasterMagnet

Magnets are used to create rotational joints, slide joints, attach a slave object to a master, and attach master objects to Anne's hand or shoulder. See also the trigger action "CMagnetAction". (Suspected invalid value: "float RestoringForce", only specified once (=2.5) in original levels, not mentioned in exe.)

Type Name Default Description
int AngleMin unknown Rotation angle limit.
int AngleMax unknown Rotation angle limit.
bool Breakable false If true, magnet can be broken (uses BreakStrength).
float BreakStrength unknown 1-150 in original levels.
float RestoreStrength unknown Restoring force (opposed to BreakStrength?). Not used in original levels.
float Drive 0.0 Rotational driving force if ZFree=true (X,Y too?).
float Friction 0.0 Rotational friction.
bool HandPickup false Can Anne grab this magnet? Specify MasterObject only, and use Instance=true. Can specify a Substitute mesh for Anne.
bool Instance false Apply to all instances of SlaveObject/MasterObject?
string MasterObject none If not specified, slave is attached to world. (Named object must exist.)
string SlaveObject none (Named object must exist.)
string SlaveMagnet none (Named object must exist.)
group CMagnet unknown  
bool ShoulderHold false This magnet will attach to Anne's shoulder. Specify MasterObject only, and use Instance=true.
int Substitute none Substitute mesh for Anne if HandPickup.
bool XFree, YFree, ZFree false Axes to allow rotation around. eg. ZFree for a door, all free for a swivel joint. Note that Trespasser ignores the MasterObject if any of these are true (ie. rotation joints can only be attached to the world).
bool XTFree, YTFree, ZTFree false Axes to allow translation along.

Possible additional values (but not used in original levels): Delta, Delay, Gender, Magnet, X, Z.


SlaveMagnet

Initialized as standard instance (may have different function in-game).


CSocket

This classs shares several properties with CMagnet, but unlike it, CSocket objecs can be visible, tangible and moveable. Not used in original levels.

Type Name Default Description
int AngleMin unknown  
int AngleMax unknown  
bool Breakable false  
float BreakStrength unknown  
float RestoreStrength unknown  
float Drive 0.0  
float Friction 0.0  
int Gender unknown  
float Radius 0.0  
bool HandPickup false  
bool ShoulderHold false  
int Substitute none  
bool XFree, YFree, ZFree false  
bool XTFree, YTFree, ZTFree false  

CMuzzleFlash

Muzzle flashes are used by CGun.MFlashObject0, and are always of the form:

Example:

group FMFrifleMF03-00 = {
  string Class = "CMuzzleFlash"
  bool Unlit = true
  bool Shadow = false
}


CParticles

Particle system definition. See a level for examples.

Type Name Default Description
string A00, A01, ...   ? Show particles only when these SoundMaterial are hit? Original levels have up to A03.
group Min, Max must specify Range for random particle parameters (see a level for examples).
int R,G,B must specify Color
bool Solid ? ?

Example:

group EffectDefault = {
    string Class = "CParticles"
    int R = 188
    int G = 188
    int B = 188
    bool Solid = true
    group Min = {
        float Threshold = 0.500000
        float Number = 15.000000
        float Velocity = 0.900000
        float Lifespan = 0.300000
        float Size = 0.003000
        float Length = 0.050000
        float Gravity = 0.050000
        float StuckGravity = 0.000000
        float Spread = 20.000000
    }
    group Max = {
        float Threshold = 1.000000
        float Number = 30.000000
        float Velocity = 1.250000
        float Lifespan = 0.500000
        float Size = 0.007000
        float Length = 0.050000
        float Gravity = 0.050000
        float StuckGravity = 0.000000
        float Spread = 35.000000
    }
    string A00 = "Default"
}

Retail levels have "GravityStuck", which is a typo. Other possible values: Log, Dust.


CSky

The sky object. Always has "bool MipMap = false". See also the trigger action "CSetSkyAction".

Example:

group MySky-00 = {
  string Class = "CSky"
  bool MipMap = false
    // MUST specify false, so sky texture is always loaded
  int SkyFlatColour = 0 // Always 0 in original levels
}
Type Name Default Description
int SkyFlatColour unknown  


CSubsystem

Recognized by executable, but does not appear to accept any parameters.


CTerrainObj

Can have CInstance values Culling and SoundMaterial. (Also AI, CacheMul and CacheIntersecting, but I'm not sure if Trespasser uses those three). See also the trigger action "CSetTerrainAction".

Type Name Default Description
int Height must specify Specifies layering of terrain objects. Higher numbers are drawn on top of lower ones, base objects should have Height = 1. If terrain objects have the same height, they are drawn in an unspecified order, so best set the Heights appropriately.
string SoundMaterial none  
float Friction unknown  

Example:

group MyTrnobj-00 = {
  string Class = "CTerrainObj"
  int Height = 2
  string SoundMaterial = "Terrain - Cement"
}


CTest

Scans for at least one script entry of each type (int, bool, float, string, and type 2 - presumably "char"). Does not appear to create an explicit instance.


CWaterDisturbance

I assume that if an instance of this is placed by a CEntityWater object it creates some waves. A couple of instances of this class have some other values (like "Visible=false") but I think Trespasser ignores them.

Example:

group WaterDisturb1-00 = {
    string Class = "CWaterDisturbance"
    float Interval = 1.0  // Either 1,2,3 in original levels
    float Strength = 0.1  // Either 0.1,0.2 in original levels
}

Also uses float Radius to indicate the size of the disturbance.

Type Name Default Description
float Strength unknown  
float Interval unknown  
float Radius unknown  


Player

This is Anne, the player in Trespasser. Not much to modify here, just use Anne from an existing level. Note that values in the script refer to Anne as "Player" instead of the instance name "Anne".

Example:

group Anne = {
    string Class = "Player"
    int PVA = -2
    int NumJoints = 20
    int NumDoubleJoints = 2
    int Normals = 2
    int AnimSubMaterial = 8
    string Anim00 = "Anne2_Health_100t2.bmp"
    string Anim01 = "Anne2_Health_90t2.bmp"
    string Anim02 = "Anne2_Health_80t2.bmp"
    string Anim03 = "Anne2_Health_70t2.bmp"
    string Anim04 = "Anne2_Health_60t2.bmp"
    string Anim05 = "Anne2_Health_50t2.bmp"
    string Anim06 = "Anne2_Health_40t2.bmp"
    string Anim07 = "Anne2_Health_30t2.bmp"
    string Anim08 = "Anne2_Health_20t2.bmp"
    string Anim09 = "Anne2_Health_10t2.bmp"
    string Anim10 = "Anne2_Health_deadt2.bmp"
    string A00 = "$Anne_Gun1-00"
    string A01 = "$Anne_Bat-00"
    string A02 = "$Anne_Gun2-00"
    string A03 = "$Anne_Barrett-00"
    string A04 = "$Anne_TranqPistol-00"
    string A05 = "$Anne_Benelli-00"
    string A06 = "$Anne_ButtonFinger-00"
    string A07 = "$Anne_Natural-00"
    string A08 = "$Anne_Rock-00"
    string A09 = "$Anne_Bird-00"
    string A10 = "$Anne_HamRev-00"
    string A11 = "$Anne_KeyCard-00"
    string A12 = "$Anne_HuntRifle-00"
    bool Merge = false
    bool Split = false
    bool Wrap = false
    bool Shadow = false
    string Hand = "$AnneHand"
    string Foot = "$AnneFoot"
    string Body = "$AnneBody"
}

Doesn't need to be called "Anne", Shadow can be set to true and the substitute meshes (A00 to A12) need to exist in order to pick up objects without the level crashing.


Player Settings

Specifies the sounds to use for Anne. Just copy from an existing level if needed.

Example:

group VocalAnneJump = {
    string Class = "Player Settings"
    group JumpUp = {
        string A00 = "ANNEJUMP"
    }
}

group VocalAnneFall = {
    string Class = "Player Settings"
    group Fall = {
        group A00 = {
            float Damage = 0.650000
            string A00 = "ANNEFALLDAMAGE01"
            string A01 = "ANNEFALLDAMAGE02"
            string A02 = "ANNEFALLDAMAGE03"
            string A03 = "ANNEFALLDAMAGE04"
            string A04 = "ANNEFALLDAMAGE05"
        }
        group A01 = {
            float Damage = 0.000000
            string A00 = "ANNEFALLDEATH01"
            string A01 = "ANNEFALLDEATH02"
            string A02 = "ANNEFALLDEATH03"
            string A03 = "ANNEFALLDEATH04"
            string A04 = "ANNEFALLDEATH05"
        }
    }
}

group VocalAnneAmmoPickup = {
    string Class = "Player Settings"
    group AmmoPickup = {
        group AmmoAlmostEmpty = {
            string A00 = "ANNEAMMOAUTO1"
            string A01 = "ANNEAMMOAUTO2"
            string A02 = "ANNEAMMOAUTO3"
        }
        group AmmoHalfFull = {
            string A00 = "ANNEAMMOAUTO4"
            string A01 = "ANNEAMMOAUTO5"
            string A02 = "ANNEAMMOAUTO6"
        }
        group AmmoFull = {
            string A00 = "ANNEAMMOAUTO7"
        }
        group AmmoReallyFull = {
            string A00 = "ANNEAMMOAUTO8"
            string A01 = "ANNEAMMOAUTO9"
        }
        group A00 = {
            string A00 = "ANNEAMMOPHRASE2"
            string A01 = "ANNEAMMOPHRASE1"
        }
        group A01 = {
            string A00 = "ANNEAMMOPHRASE3"
            string A01 = "ANNEAMMOPHRASE4"
        }
        group A02 = {
            string A00 = "ANNEAMMOPHRASE5"
            string A01 = "ANNEAMMOPHRASE6"
        }
        group A03 = {
            string A00 = "ANNEAMMOPHRASE7"
            string A01 = "ANNEAMMOPHRASE8"
        }
        group A04 = {
            string A00 = "ANNEAMMOPHRASE9"
            string A01 = "ANNEAMMOPHRASE10"
        }
        group A05 = {
            string A00 = "ANNEAMMOPHRASE11"
            string A01 = "ANNEAMMOPHRASE12"
        }
        group A06 = {
            string A00 = "ANNEAMMOPHRASE13"
            string A01 = "ANNEAMMOPHRASE14"
        }
        group A07 = {
            string A00 = "ANNEAMMOPHRASE15"
            string A01 = "ANNEAMMOPHRASE16"
        }
        group A08 = {
            string A00 = "ANNEAMMOPHRASE18"
            string A01 = "ANNEAMMOPHRASE19"
        }
        group A09 = {
            string A00 = "ANNEAMMOPHRASE20"
            string A01 = "ANNEAMMOPHRASE21"
        }
        group A10 = {
            string A00 = "ANNEAMMOPHRASE22"
            string A01 = "ANNEAMMOPHRASE23"
        }
        group A11 = {
            string A00 = "ANNEAMMOPHRASE24"
            string A01 = "ANNEAMMOPHRASE25"
        }
        group A12 = {
            string A00 = "ANNEAMMOPHRASE24"
            string A01 = "ANNEAMMOPHRASE25"
        }
        group A13 = {
            string A00 = "ANNEAMMOPHRASE24"
            string A01 = "ANNEAMMOPHRASE25"
        }
        group A14 = {
            string A00 = "ANNEAMMOPHRASE9"
            string A01 = "ANNEAMMOPHRASE10"
        }
        group A15 = {
            string A00 = "ANNEAMMOPHRASE26"
            string A01 = "ANNEAMMOPHRASE27"
        }
        group A16 = {
            string A00 = "ANNEAMMOPHRASE26"
            string A01 = "ANNEAMMOPHRASE27"
        }
        group A17 = {
            string A00 = "ANNEAMMOPHRASE26"
            string A01 = "ANNEAMMOPHRASE27"
        }
        group A20 = {
            string A00 = "ANNEAMMOPHRASE28"
            string A01 = "ANNEAMMOPHRASE29"
        }
        group A30 = {
            string A00 = "ANNEAMMOPHRASE30"
            string A01 = "ANNEAMMOPHRASE31"
        }
    }
}

group VocalAnneAmmoCount = {
    string Class = "Player Settings"
    group Ammo = {
        group A00 = {
            string A00 = "ANNEAMMOPHRASE2"
            string A01 = "ANNEAMMOPHRASE1"
        }
        group A01 = {
            string A00 = "ANNEAMMONUMERAL1A"
            string A01 = "ANNEAMMONUMERAL1B"
            string A02 = "ANNEAMMONUMERAL1C"
        }
        group A02 = {
            string A00 = "ANNEAMMONUMERAL2A"
            string A01 = "ANNEAMMONUMERAL2B"
        }
        group A03 = {
            string A00 = "ANNEAMMONUMERAL3A"
            string A01 = "ANNEAMMONUMERAL3B"
            string A02 = "ANNEAMMONUMERAL3C"
        }
        group A04 = {
            string A00 = "ANNEAMMONUMERAL4A"
            string A01 = "ANNEAMMONUMERAL4B"
        }
        group A05 = {
            string A00 = "ANNEAMMONUMERAL5A"
            string A01 = "ANNEAMMONUMERAL5B"
        }
        group A06 = {
            string A00 = "ANNEAMMONUMERAL6A"
            string A01 = "ANNEAMMONUMERAL6C"
        }
        group A07 = {
            string A00 = "ANNEAMMONUMERAL7A"
            string A01 = "ANNEAMMONUMERAL7B"
            string A02 = "ANNEAMMONUMERAL7C"
        }
        group A08 = {
            string A00 = "ANNEAMMONUMERAL8A"
            string A01 = "ANNEAMMONUMERAL8B"
        }
        group A09 = {
            string A00 = "ANNEAMMONUMERAL9B"
            string A01 = "ANNEAMMONUMERAL9C"
        }
        group A10 = {
            string A00 = "ANNEAMMONUMERAL10A"
            string A01 = "ANNEAMMONUMERAL10B"
        }
        group A12 = {
            string A00 = "ANNEAMMONUMERAL12A"
            string A01 = "ANNEAMMONUMERAL12B"
        }
        group A13 = {
            string A00 = "ANNEAMMONUMERAL13A"
            string A01 = "ANNEAMMONUMERAL13B"
            string A02 = "ANNEAMMONUMERAL13C"
        }
        group A15 = {
            string A00 = "ANNEAMMONUMERAL15A"
            string A01 = "ANNEAMMONUMERAL15B"
            string A02 = "ANNEAMMONUMERAL15C"
        }
        group A17 = {
            string A00 = "ANNEAMMONUMERAL17A"
            string A01 = "ANNEAMMONUMERAL17B"
            string A02 = "ANNEAMMONUMERAL17C"
        }
        group A20 = {
            string A00 = "ANNEAMMONUMERAL20B"
            string A01 = "ANNEAMMONUMERAL20C"
        }
        group A30 = {
            string A00 = "ANNEAMMONUMERAL30A"
            string A01 = "ANNEAMMONUMERAL30B"
            string A02 = "ANNEAMMONUMERAL30C"
        }
        group AmmoAlmostEmpty = {
            string A00 = "ANNEAMMOAUTO1"
            string A01 = "ANNEAMMOAUTO2"
            string A02 = "ANNEAMMOAUTO3"
        }
        group AmmoHalfFull = {
            string A00 = "ANNEAMMOAUTO4"
            string A01 = "ANNEAMMOAUTO5"
            string A02 = "ANNEAMMOAUTO6"
        }
    }
}

group VocalAnneOuch = {
    string Class = "Player Settings"
    group Ouch = {
        group A00 = {
            float Damage = 0.500000
            string A00 = "ANNELIGHTHIT02"
            string A01 = "ANNELIGHTHIT06"
            string A02 = "ANNELIGHTHIT07"
            string A03 = "ANNELIGHTHIT09"
            string A04 = "ANNEEFFORT3"
        }
        group A01 = {
            string A00 = "ANNELIGHTHIT03"
            string A01 = "ANNEEFFORT8"
            string A02 = "ANNELIGHTHIT08"
            string A03 = "ANNEEFFORT1"
            string A04 = "ANNEEFFORT7"
        }
        group A02 = {
            float Damage = 0.000000
            string A00 = "ANNELIGHTHIT05"
            string A01 = "ANNEEFFORT2"
        }
    }
}


Settings

Define the settings for the 16 available AlphaChannels (0-15). You need one Settings object for each channel you want to redefine.

Type Name Default Description
float Alpha unknown Degree of Alpha blending, 0.0-1.0
int AlphaChannel unknown # of channel being redefined, 0-15
int R unknown Level of Red, 0-255
int G unknown Level of Green, 0-255
int B unknown Level of Blue, 0-255


Teleport

Teleport objects are the destinations for the "tnext" cheat. I'm not sure what the order of the teleports is, but most likely the order they're listed in the GRF regiontable. Teleports often contain other CInstance values, but I think Trespasser ignores them.

Example:

group TeleportA = {
    string Class = "Teleport"
}


Marker

Is not implemented in executable. Maybe similar to Teleport?


TerrainPlacement

Specifies the terrain file for the level. (The texture on this object sometimes looks like a render of the terrain objects of the whole level.)

Type Name Default Description
string File must specify Name of terrain .WTD file, no extension.
bool MipMap must be "false" Always false in the original levels.

Example:

group TrnPlacement-00 = {
  string Class = "TerrainPlacement"
  string File = "be"
  bool MipMap = false
}


<no Class specified>

If no "Class" value is specified, Trespasser seems to assume it's a CInstance. However, there is one special object which defines a color look up table. The name of the object follows a standard format for all the levels, but I don't know if that format is important. The object contains two groups:

Example:

group Trig_BEGlobalClut-00 = {
  group DefaultClutStartColor = {
    int B = 223
    int G = 237
    int R = 251
  }
  group DefaultClutStopColor = {
    int B = 17
    int G = 20
    int R = 24
  }
}

Apparently, the CLUT defines the range of colors that are rendered in a level.

Other possible values: DefaultClutReflectionColor, ClutStartColor, ClutStopColor, ClutReflectionColor


IGNORE

Recognized by executable, but is then treated as its name implies.



Trigger Classes

Triggers perform one or more actions when certain conditions are met. The base class CBooleanTrigger evaluates a FireExpression monitoring the state of trigger instances. All other trigger classes inherit CBooleanTrigger's values, and have additional contitions to determine when the trigger fires.

Class What makes the trigger fire:

CBooleanTrigger
CCollisionTrigger
CCreatureTrigger
CLocationTrigger
CMoreMassTrigger
CObjectTrigger
CSequenceTrigger
CStartTrigger
CTimerTrigger
CVariableTrigger

When boolean expression of other triggers' states is true
When objects collide
When Anne or a dino dies
When (Anne/object/dino) (enters/is in/exits) a location
Usage unknown (not used in original levels)
When an object is picked up, used, or dropped
When a sequence of events occurs
When the level starts
At certain intervals
Not really a trigger, just stores a boolean variable

Example:

group InsideHouseTigger = {
  string Class = "CLocationTrigger"
  bool PlayerEnterTrigger = true
  int ActionType = 34
  string OverlayText = "You have entered the house"
}

CBooleanTrigger

Trigger fires when FireExpression evaluates to true. These values can be used by all other triggers.

Type Name Default Description
int ActionType none Type of action(s) to perform when trigger fires. See the Trigger Actions section.
int BoundVol 0 Which bounding volume to use for trigger. Only used by CLocationTrigger and CCollisionTrigger.
0 = Sphere
1 = Cube
int FireCount -1 Maximum number of times trigger should fire. -1 means any number of times. (See also ResetFire)
float FireDelay 0.0 When trigger is activated, wait this long before processing the actions.
string FireExpression true Trigger only fires if this boolean expression is true. The expression evaluates the state of other triggers. Operators in the expression can be: "!" for NOT, "&" for AND, and "|" for OR. I think by default the expression checks if a trigger has ever fired, and putting "@" before the trigger name means check the current state. Not sure if there is any operator precedence or if brackets can be used. eg. If Place1 etc. are all CLoactionTriggers: "Place1 & Place2" to check if player has been in both places, or "@InRoom | InShed" to check if player is currently in the room, OR was in the shed at some time in the past.
int Probability 100 Probability (0-100) that trigger will actually fire (ie. process the actions) when activated. (Not used in original levels)
int ProcessStyle 3 Used when there is more than one action to perform (see the Actions section). eg. For three actions the trigger contains sub-groups called Action00, Action01, Action02, and the ProcessStyle says when and in what order to execute the actions.
0 = Processes the actions in order immediately (ie. without waiting for an action to finish before moving on to the next).
The remaining ProcessStyles all wait for the current action to finish before starting the next action.
1 = Process actions in order, one action every time the trigger fires
2 = Like 1 but process in random order
3 = Process actions now, in order, once each
4 = Process actions now, in random order, once each
5 = Process actions now, in order, looping continuously
6 = Process actions now, in random order, looping continuously
float RepeatPeriod 0.0 Time to wait before trigger can fire again.
bool ResetFire false Reset fire count. ie. Make it as if this trigger hasn't fired yet, and allow the trigger to fire FireCount times all over again.
bool FireAtZero false Use with ResetFire.
float SequenceDelayMin unknown ? Min/Max for a random delay between actions?
float SequenceDelayMax unknown  
int AlphaChannel unknown Not used by Trespasser. See CInstance.AlphaChannel.


CCollisionTrigger

Trigger fires when two objects collide.

Type Name Default Description
string Element1 unknown If trigger has only one of Element1,2 set, then fire when that object hits anything else. If trigger has both of Element1,2 set, then fire only when those two collide.
string Element2 unknown  
float MaxVelocity unknown ? MaxVelocity=1.0 whenever it is set in the original levels.
float MinVelocity unknown ? (Not used in original levels)
bool SoundMaterial1 false If true, Element1 is a SoundMaterial string and not an object. See CInstance.SoundMaterial.
bool SoundMaterial2 false If true, Element2 is a SoundMaterial string and not an object. See CInstance.SoundMaterial.


CCreatureTrigger

Trigger fires when a Anne or a CAnimal dies, wakes, or sleeps.

Type Name Default Description
string A00, A01, ... must specify Name of creature(s) to monitor. (Named object must exist.)
bool CreatureDie false If true, trigger fires when creature dies.
bool CreatureCriticalDamage false If true, trigger fires when creature gets a single damage hit that decreases its HitPoints by an amount greater than or equal to its CriticalHit value.
float CreatureDamagePoints must specify If set, trigger fires when creature gets a single damage hit that decreases its HitPoints by an amount greater than or equal to this value but less than its CriticalHit value.
bool CreatureSleep false If true, trigger fires when creature (physics) falls asleep.
bool CreatureWake false If true, trigger fires when creature physics is awoken.
bool EvaluateAll false ? Only used once in original levels. I think false means "when any creature listed", and true means "when all creatures listed".

Example:

group CreatureDie-00 = {
  string Class = "CCreatureTrigger"
  string A00 = "RaptorB-300"
  bool CreatureDie = true
  int ActionType = 34
  string OverlayText = "Raptor died"
}

Probable additional values (but not used in original levels): CreatureWake, CreatureSleep, CreatureCriticalDamage, CreatureDamagePoints.


CLocationTrigger

Trigger fires when Anne or an object enters/is in/leaves a certain area.

Type Name Default Description
bool PlayerEnterTrigger false If true, fire trigger when player enters.
bool PlayerInTrigger false If true, fire trigger (constantly?) while player is in the bounding volume. Perhaps use RepeatPeriod to limit frequency.
bool PlayerLeaveTrigger false If true, fire trigger when player exits.
bool ObjectEnterTrigger false See PlayerEnter etc., but might use the TriggerActivate object.
bool ObjectInTrigger false  
bool ObjectLeaveTrigger false  
string TriggerActivate none ? Object that activates trigger. If not set, will any object fire the trigger? If set, do Player* flags still work? (Named object must exist.)
bool PointTrigger true ? Use (center) point for bounding volume of trigger? Or use point for bounding volume of object?

Probable additional values (but not used in original levels): CreatureEnterTrigger, CreatureInTrigger, CreatureLeaveTrigger, CreatureEnterCount, CreatureLeaveCount.


CMoreMassTrigger

Unknown, not used in any original levels.

Type Name Default Description
string Target unknown  
float Mass unknown  
string A00, A01, ... A15 unknown  

CObjectTrigger

Fires when an object is picked up, put down, or "used" (eg. by pressing spacebar).

Type Name Default Description
string A%d must specify Name of object(s) to monitor. (Named object must exist.)
bool PickUpObject false If true, fire trigger when an object is picked up.
bool PutDownObject false If true, fire trigger when an object is put down.
bool UseObject false If true, fire trigger when an object is used.


CSequenceTrigger

Fires when a sequence of things happen. See 'lab' level for some examples.

(@todo check this) Eg. If there are 5 SequenceOrderNames, the trigger waits until 5 triggers from the SequenceListenNames list have fired. Then, if the order they fired matches the order listed in SequenceOrderNames, the trigger fires. If the order does not match, SequenceFalseTriggerName fires.

Type Name Default Description
group SequenceEvalNowNames unknown ? Force evaluation of sequence if one of these triggers fires?
string SequenceFalseTriggerName unknown Trigger name to fire if there's a bad sequence.
group SequenceListenNames must specify List of triggers to monitor.
group SequenceOrderNames must specify Order the monitored triggers must fire in.


CStartTrigger

Trigger fires once when level starts.


CTimerTrigger

I think FireExpression is used to determine when this trigger fires. (Does the trigger fire continuously during the High time, or just on a transition?)

Type Name Default Description
bool InitialState unknown ? (Not used in original levels)
float MaxHighTime unknown (@test) Once trigger fires, it is 'on' for a random amount of time between MinHighTime and MaxHighTime, then it turns off.
float MinHighTime unknown  
float MaxLowTime unknown (@test) Trigger is 'off' for a random amount of time between MinHighTime and MaxHighTime, before turning on again. (Unless FireCount has been exceeded, then trigger stays off.)
float MinLowTime unknown  


CVariableTrigger

I don't think this trigger ever fires, it's just a "boolean variable" that can be controlled by the script (using CSetVariableTriggerAction), and can be used in other triggers' FireExpression.

Type Name Default Description
bool Value must specify Initial state of trigger. Use CSetVariableTriggerAction to change.

Example:

group MyBooleanVariable-00 = {
  string Class = "CVariableTrigger"
  bool Value = true // Initial state
}



Trigger Actions

Actions that can happen when a trigger fires.

0 = "CVoiceOverAction"
1 = "CAmbientAction"
2 = "CMusicAction"
3 = "CFadeMusicAction"
4 = "CShowOverlayAction"
5 = "CSetFogAction"
6 = "CSetRendererAction"
7 = "CSetTerrainAction"
8 = "CSetImageCacheAction"
9 = "CSetAIAction"
10 = "CSetPhysicsAction"
11 = "CSubstituteMeshAction"
12 = "CSetSortAction"
13 = "CSetSkyAction"
14 = "CSetAlphaWaterAction"
15 = "CWaterOnOffAction"
16 = "CLoadLevelAction"
17 = "CSetAnimatePropertiesAction"
18 = "CTeleportAction"
19 = "CSaveLevelAction"
20 = "CMagnetAction"
21 = "CAnimateTextureAction"
22 = "CHideShowAction"
23 = "CSoundEffectAction"
24 = "CWakeAIAction"
25 = "CDelayAction"
26 = "CScriptedAnimationAction"
27 = "CSetVariableTriggerAction"
28 = "CSetHintAction"
29 = "CAudioEnvironmentAction"
30 = "CSubstituteAIAction"
31 = "CEndGameAction"
32 = "CControlPlayerAction"
33 = "CAISystemAction"
34 = "CTextAction"
35 = "CWaterDisturbanceAction"

The type of action is specified in the ActionType value of a trigger. If there is only one action for a trigger, the ActionType and the action's values can simply be added into the trigger group:

group SimpleActionTrigger = {
  string Class = "CStartTrigger"
  int ActionType = 34
  string OverlayText = "This trigger just displays some text."
}

If there is more than one action, the actions are specified as ActionXX groups, each containing one ActionType, and that action's values. The trigger may also contain a ProcessStyle value to specify how the multiple actions are to be executed:

group MultipleActionTrigger = {
  string Class = "CStartTrigger"
  int ProcessStyle = 3
  group Action00 = {
    int ActionType = 0
    string Sample = "VA01"
  }
  group Action01 = {
    int ActionType = 25
    float Delay = 4.0
  }
  group Action02 = {
    int ActionType = 34
    string OverlayText = "This trigger plays a sound, waits 4 seconds,
                          then displays this text."
  }
}

Some action types were not used in the original levels and their usage is unknown: 3, 4, 8, 12, 14, 15, 26, 30, 32, 33.


ActionType 0 = "CVoiceOverAction"

Play voiceover (from "Stream.tpa"). I think volumes are specified in Decibels (dB), in which case -3 = half volume.
There is a difference between ActionType 0 and 2. 0 is known as "CVoiceOverAction" and 2 is known as "CMusicAction". All voiceovers and music are located in the Stream.tpa file (or your ATX additive file). Only 1 sound out of any called to play using AT 0 will play at one time, and only 1 sound out of any called to play using AT 2 will play at one time. However, a sound from AT 0 and AT 2 may play at the same time. If a sound from Stream.tpa is playing via AT 2 while one from AT 0 is playing, the sound from AT 0 is dominant - the volume of the AT 2 sound is automatically lowered and the AT 0 sound plays over it. This is how you get voiceovers to play while music is going. As far as I know, any sounds from Effects.tpa will play on top of each other, since in some cases many collisions and dinosaur sounds must be played immediately once they are called on.

Type Name Default Description
string Sample must specify Name of sample to play from "Stream.tpa" file.
float Attenuation unknown (0 or 1 in original levels)
float Volume unknown (If set in original levels, it's always to -5)

Possible additional values (but not used in original levels): Attach, BoundaryVolume, LoopCount, MaximumDistance, OutsideVolume, Mute, Frustum, Emitter, StopAfterFade, VolumeFader.


ActionType 1 = "CAmbientAction"

Play ambient sound (from "Ambient.tpa").

Type Name Default Description
string Sample must specify Name of sample to play from "Ambient.tpa" file.
float Attenuation unknown (0 or 1 in original levels)
float Volume unknown (If set in original levels, it's always to -5)
bool Looped false  
int SpatialType unknown ? (If the original levels have this value, it's always 0)
float MasterVolumeMin unknown A random volume between min and max is used. In original levels Min ranges from -25 to -3.
float MaxVolumeDistance unknown (0.4 to 1.0 in original levels)
string A00, A01, ... unknown ? Used sometimes when ProcessStyle = 6. In which case the trigger has no Sample, and no list of Action00s.

Possible additional values (but not used in original levels): Attach, BoundaryVolume, LoopCount, MaximumDistance, OutsideVolume, Mute, Frustum, Emitter, StopAfterFade, VolumeFader.


ActionType 2 = "CMusicAction"

Play music (from "Stream.tpa").

Type Name Default Description
string Sample must specify Name of sample to play (from "Stream.tpa" file).
float Attenuation unknown (0 or 1 in original levels)
float Volume unknown (If set in original levels, it's always to -5)
int SpatialType unknown ? (If the original levels have this value, it's always 0)

Possible additional values (but not used in original levels): Attach, BoundaryVolume, LoopCount, MaximumDistance, OutsideVolume, Mute, Frustum, Emitter, StopAfterFade, VolumeFader.


ActionType 3 = "CFadeMusicAction"

Fade music (from "Stream.tpa").

Type Name Default Description
float VolumeFader unknown  
bool StopAfterFade unknown  


ActionType 4 = "CShowOverlayAction"

Overlay bitmap on screen.

Type Name Default Description
string Bitmap required Image has to be 16-bit BMP, in RGB565 format (not RGB555), and located inside the Trespasser root folder. Filename doesn't include any path. Black (0, 0, 0) is used to indicate transparency.
bool Center true Set to false to manually set the X and Y positions.
int XPos 0 Horizontal position in pixels from the left margin of the screen.
int YPos 0 Vertical position in pixels from the top margin of the screen.
bool Discard false If set to true, image won't be displayed. (How can this be used to remove a previous overlay? Still need to check.)


ActionType 5 = "CSetFogAction"

Set fog parameters. See also the trigger action "CSetSkyAction".

Type Name Default Description
float FogHalf 0.28 Z-Half value for linear fog. Original levels have 0.12, 0.22
float FogPower 1.2 Exponent for exponential fog. Original levels have 0.8
int FogType 0 Select between linear (0) and exp (1) fog types. (Not used in original levels.)
int R unknown Fog color component 0-255.
int G unknown Fog color component 0-255.
int B unknown Fog color component 0-255.


ActionType 6 = "CSetRendererAction"

Set renderer parameters.

Type Name Default Description
float AmbientLight 0.2 Ambient light intensity. Original levels have 0.17, 0.2
float CameraFOV 75.0 Camera. Field of view in degrees. (Not used in original levels.)
float FarClipPlane 1000.0 Camera. An object's polygons and vertices further than this distance aren't rendered. Value only used once in original levels (set to 500 in testscene).
float NearClipPlane 0.025 Camera. An object's polygons and vertices closer than this distance aren't rendered. (Not used in original levels.)
float PixelError 1.0 Perspective correction. Pixel error.
int SubdivisionLen 16 Perspective correction. # pixels to subdivide over.
float AltPixelError 1.0 Perspective correction. Alternate pixel error.
int AltSubdivisionLen 32 Perspective correction. Alternate # pixels to subdivide over.
float CullMaxDist 800.0 Culling. Distance at which an object of maximum radius disappears.
float CullMaxRadius 8.0 Culling. Maximum (cylindrical) radius of an object.
float CullMaxDistShadow 120.0 Culling. Distance at which an object's shadow of maximum radius disappears.
float CullMaxRadiusShadow 1.0 Culling. Maximum (cylindrical) radius of an object's shadow.
int Priority 4 Culling. Priority for both object and shadow culling.

Possible additional values (not used in original levels): AltSubdivisionLen, AltPixelError, SubdivisionLen, PixelError, NoLowRes, SoftwareOnly, HardwareOnly, Priority, CullMaxRadiusShadow, CullMaxDistShadow, CullMaxRadius, CullMaxDist, ShadowCulling, Culling.


ActionType 7 = "CSetTerrainAction"

Set terrain renderer parameters.

Type Name Default Description
float TrrPixelTol 8.0 Maximum error (in pixels) while rendering terrain. Original levels have 7-10, which is high, hence the abrupt changes in terrain geometry as you get closer. A value of 2-4 produces much better results. However, low values may cause a level to crash when the player approaches certain places.
float TrrPixelTolFar 20.0 Pixel tolerance at 500m distance. Original levels have 50
float TrrNoDynTextureDist 230.0 ? Original levels have 230
float TrrNoShadowDist 32.0 No shadows drawn on terrain past this distance (not used in original levels). Default value must be very low.
float TrrNoTextureDist 230.0 ? Original levels have 230


ActionType 8 = "CSetImageCacheAction"

Set image cache parameters.

Type Name Default Description
bool CacheActive unknown  
bool CacheIntersect unknown  
float PixelRatio unknown  
int MinPixels unknown Possibly smallest size of images in the cache.
int CacheAge unknown  


ActionType 9 = "CSetAIAction"

Modify dinosaur behaviour.

Type Name Default Description
string Target must specify Target dino (Named object must exist.)
bool ActStayAway false If true use StayAwayMin|OK|Target
float StayAwayMin unknown  
float StayAwayOK unknown  
string StayAwayTarget none   (Named object must exist.)
bool ActStayNear false If true use StayNearMax|OK|Target
float StayNearMax unknown  
float StayNearOK unknown  
string StayNearTarget none   (Named object must exist.)

Various other AI values from CAnimal can also be set. Eg. Anger, Hunger etc.


ActionType 10 = "CSetPhysicsAction"

Freeze, set velocity, or apply push to an object.

Type Name Default Description
string Target must specify Name of instance to apply physics action to. (Named object must exist.)
bool Frozen none Set Frozen state of target if specified.
bool Impulse false If true then apply Push (otherwise use XYZ velocity, or always use XYZ too?). Requires Push and Emitter values.
float Push unknown Force (or velocity?) to apply to target.
string Emitter none Must be specified if Impulse=true. Push is applied in the direction of the Y axis of this instance. (Named object must exist.)
float X 0.0 Set X velocity of target if specified.
float Y 0.0 Set Y velocity of target if specified.
float Z 0.0 Set Z velocity of target if specified.


ActionType 11 = "CSubstituteMeshAction"

Change mesh used by object.

Type Name Default Description
string Target must specify Name of instance to perform substitution on. (Named object must exist.)
int Substitute must specify For target instance use mesh in value "A%d" of target instance, where %d is the this Substitute number.


ActionType 12 = "CSetSortAction"

Depth sort settings.

Type Name Default Description
float NearTolerance 0.0000025  
float FarTolerance 0.0078  
float NearZ 0.000644  
float FarZ 0.4  
float FarZNo 0.5  
float SortPixelTol 0.65  
int MaxNumToSort 1000  
int Sort2PartAt 1000  
int Sort4PartAt 1500  
float TerrNearTolerance 0.0001  
float TerrFarTolerance 0.02  
float TerrNearZ 0.000644  
float TerrFarZ 0.3  
bool UseSeperateTol false  


ActionType 13 = "CSetSkyAction"

Set parameters of the sky. See also the trigger action "CSetFogAction".

Type Name Default Description
float FogFar unknown Full fog after this value, what is it measured relative to? The clip planes? Around 0.85 in original levels.
float FogNear unknown No fog before this value. Around 0.7 in original levels.
float Height unknown Height of sky in m. Around 1000 in original levels.
float Scale 0.055 Pixel scale in pix/m. Usually 0.075 in original levels.
int SubDivision 32 32 pixels in original levels.
float WindspeedX 0.8 Usually 0.8 m/s in original levels.
float WindspeedY 1.8 Usually 1.8 m/s in original levels.

Values that were never used in the original levels: probably ScaleLimit, MinScale, MaxScale, FillScreen.


ActionType 14 = "CSetAlphaWaterAction"

Define water properties.

Type Name Default Description
group AlphaWaterProperties none This is one of the main groups.
group NonAlphaWaterProperties none This is the other main group.
The following are sub-groups to the main AlphaWaterProperties and NonAlphaWaterProperties groups.
group A00 to A15 none Secondary groups, for different levels of disturbance, apparently.
The following values are each used once for every one of the GROUP type entries above (1 for each of the 16 groups, multiplied by 2 for each of the larger groups further above).
int R unknown Amount of red color.
int G unknown Amount of green color.
int B unknown Amount of blue color.
float Alpha unknown Level of transparency.

Example:

group SomeTrigger { ; (trigger class start)

string Class = "SomeTriggerType"
...
int ActionType = 14
...
group AlphaWaterProperties {
group A00 {
int R = ?
int G = ?
int B = ?
float Alpha = ?
}
group A01 {
int R = ?
int G = ?
int B = ?
float Alpha = ?
}
(same for group A02, A03, etc.)
}
...
group NonAlphaWaterProperties {
group A00 {
int R = ?
int G = ?
int B = ?
float Alpha = ?
}
group A01 {
int R = ?
int G = ?
int B = ?
float Alpha = ?
}
(same for group A02, A03, etc.)
}
...
} ;(trigger class end)


ActionType 15 = "CWaterOnOffAction"

Type Name Default Description
string ObjectName unknown  
bool Enable unknown  


ActionType 16 = "CLoadLevelAction"

Load a level.

Type Name Default Description
string LevelName must specify Name of level scene file to load (eg. "jr.scn").


ActionType 17 = "CSetAnimatePropertiesAction"

Modify health and other values of Anne and dinosaurs.

Type Name Default Description
string ObjectName must specify Name of a CAnimal, or "Player" for Anne. (Named object must exist.)
float Damage 0.0 Amount to substract from instance HitPoints.
float CriticalHit none Decrease in HitPoints due to a single damage hit that is considered critical.
float HitPoints none If specified, set current health of object.
float MaxHitPoints none If specified, set maximum health of object.
float Regeneration none Rate at which the HitPoints are increased per second after receiving damage until reaching MaxHitPoints again.
float DieRate none Rate at which the HitPoints decrease per second automatically after reaching a value equal or less than 0.0 until reaching ReallyDie.
float ReallyDie none Value at which the HitPoints don't decrease anymore.


ActionType 18 = "CTeleportAction"

Move object.

Type Name Default Description
string ObjectName must specify Instance to teleport (Named object must exist.)
string TeleportDestObjectName must specify Teleport destination (Named object must exist.)
bool HeightRelative true  
bool SetPosition true  
bool SetOrientation true  
bool OnTerrain true  

Values that were never used in the original levels: possibly OnTerrain.


ActionType 19 = "CSaveLevelAction"

Creates a new savegame (eg. "Savegame.000") in the Trespasser directory. Doesn't include a thumbnail though, so it's more like a .scn file than a savegame.

Type Name Default Description
string LevelName Autosave.scn Not actually the level name, but rather the name that appears in the savegame list in the Load Level menu. Doesn't matter if name has occurred before, always creates another save game file.

(This action was not used in the original levels.)


ActionType 20 = "CMagnetAction"

Change the parameters of a magnet attached to an object. Probably can use any values from CMagnet (@test). Original levels set the following CMagnet values: Drive, Enable, Friction, MasterObject, Target, ZFree. MasterObject is required. A couple of triggers also set a "string Target" value, probably a typo.

Type Name Default Description
bool Enable unknown set to true to activate the magnet, set to false to disable the magnet (freeing the object it's attached to).


ActionType 21 = "CAnimateTextureAction"

Set animated texture parameters.

Type Name Default Description
string Target must specify Target object. Textures on all instances of the object's mesh are changed. (Named object must exist.)
int Frame unknown Set animated texture frame number for target. See CInstance.Anim00
int FreezeFrame none If specified, set freeze frame for target (-1 for no freeze frame).
float Interval none If specified, set animation interval for target (-1.0 to freeze).
int TrackTwo none If specified, set start of second animation track for target. (Set to zero if want only one track?)

Values that were never used in the original levels: possibly Toggle.


ActionType 22 = "CHideShowAction"

Set visible/hidden state of object.

Type Name Default Description
string ObjectName must specify Object to set Visible state of. (Named object must exist.)
bool Visible must specify Object visibility state is set to this.
bool Volume unknown ? Unknown. Only set in one trigger, might be a typo. Perhaps affect all objects in bounding volume instead of just ObjectName? Or use bounding volume of objectName?

If an object is initially set to bool Visible = false in its t-script, ActionType 22 can't make it visible. The way around this is to make it bool Visible = true and se a start trigger with ActionType 22 to make it invisible as soon as the level loads, and later use another trigger with ActionType 22 to make it visible again when you need to.


ActionType 23 = "CSoundEffectAction"

Play effect sound (from "Effects.tpa"). Similar to action "CAmbientAction" but can attach to (move with) an object.

Type Name Default Description
string Sample must specify Name of sample to play from "Effects.tpa" file.
float Attenuation unknown 0,1,2 in original levels
bool Attach false If true, sound is attached to (moves with) Emitter.
string Emitter none See Attach. (Named object must exist.)


ActionType 24 = "CWakeAIAction"

Wake up dinos? It's only used once in original levels, in a trigger with name "TrigWakeupA-00".


ActionType 25 = "CDelayAction"

Delay before moving to next action.

Type Name Default Description
float Delay must specify Time to delay before moving to next action.


ActionType = 26 "CScriptedAnimationAction"

Not used in original levels. This action animates objects and/or the camera. See the Animation Scripts section for details of the script format.

Type Name Default Description
string AnimationName must specify Name of animation script, without file extension. If a .asb file exists in the data directory, it is used. If not, a .asa file is loaded from the data/anim/ directory, and a .asb file is saved in the data directory. Action is ignored if no animation file is found.


eg. To play animation script "D:\data\anim\test.asa" where D:\ is the Trespaser "Data Drive"
group Trig_Start2-00 = {
  string Class = "CStartTrigger"
  int FireCount = 1
  int ActionType = 26
  string AnimationName = "test" 
}

ActionType 27 = "CSetVariableTriggerAction"

Set (boolean) variable trigger state.

Type Name Default Description
string TriggerName must specify Name of a CVariableTrigger (Named trigger must exist.)
bool Value must specify Value to set trigger to.
bool Toggle false Set to "true" to toggle trigger's current value.


ActionType 28 = "CSetHintAction"

Type Name Default Description
int HintID must specify Used without any other parameters to access predefined texts, encoded inside the executable, same as ResourceIDs.
Values used are of the form x for the TestScene, 10x for the Beach, 20x for Jungle Road, 30x for Industrial Jungle, 40x for Ingen Town, 60x for the lab, 70x for Ascent, 80x for Ascent 2, 90x for Summit, where x is a number between 0-9 (not all are valid for all levels). The demo doesn't use a trigger to set Hints, so it's using the "default" HintID of 0, in all likelihood (which also appears in the TestScene until a trigger replaces it with HintID 1). Maybe 50x Hints were used for Pine Valley? Currently, selecting a 50x HintID displays only a blank message.


ActionType 29 = "CAudioEnvironmentAction"

Set EAX environmental audio parameters. Eg. Set default parameters in a CStartTrigger, and then in CLocationTriggers to give different areas special effects. Remember to set the defaults again when player leaves the area.

Type Name Default Description
int AudioEnvironment unknown EAX environment preset (see table below).
float ReverbDamping depends on preset Ranges from 0 - 0.79 in original levels.
float ReverbDecay depends on preset Ranges from 0.4 - 4.32 in original levels.
float ReverbVolume depends on preset Ranges from 0.15 - 1.0 in original levels.

The following table lists Creative EAX 1.0's 26 environment presets as used by Trespasser and their default values:

# Preset Base Environment Reverb Mix Volume Reverb Decay Time Damping
0 Generic 0.5 1.49 0.5
1 Padded Cell 0.25 0.17 0.4
2 Room 0.42 0.4 0.66
3 Bathroom 0.65 1.49 0.16
4 Living Room 0.21 0.5 0.1
5 Stone Room 0.5 2.31 0.89
6 Auditorium 0.4 4.32 0.5
7 Concert Hall 0.5 3.92 0.5
8 Cave 0.5 2.91 1.3
9 Arena 0.36 7.24 0.33
10 Hangar 0.5 10.05 0.3
11 Carpeted Hallway 0.15 0.3 0.55
12 Hallway 0.36 1.49 0.5
13 Stone Corridor 0.44 2.7 0.64
14 Alley 0.25 1.49 0.5
15 Forest 0.11 1.49 0.5
16 City 0.11 1.49 0.5
17 Mountains 0.19 1.49 0.5
18 Quarry 1.0 1.49 0.5
19 Plain 0.1 1.49 0.17
20 Parking Lot 0.21 1.65 1.5
21 Sewer Pipe 0.65 2.81 0.25
22 Underwater 1.0 1.49 0.81
23 Drugged 0.88 8.39 1.39
24 Dizzy 0.14 17.23 0.66
25 Psychotic 0.49 7.56 0.81


ActionType 30 = "CSubstituteAIAction"

Change AI used by object.

Type Name Default Description
string Target must specify Name of instance to perform substitution on. (Named object must exist.)
string Substitute must specify Name of instance to get AI from for substitution.


ActionType 31 = "CEndGameAction"

End game and play 'win' movie. No other values for this action.


ActionType 32 = "CControlPlayerAction"

Make player perform an action.

Type Name Default Description
bool PutDownObject false? Forces player to drop item currently in hand?


ActionType 33 = "CAISystemAction"

Can be used to enable/disable AI options. Affects all AIs.

Type Name Default Description
bool WakeUp true? Set to false to prevent dinos from waking up (similar to "dinos" cheat), set to true to reactivate WakeUp parameters of every AI.


ActionType 34 = "CTextAction"

Display text at top of screen.

Type Name Default Description
string OverlayText must specify Text to display
bool TextAtTop true True to display text at top
float TextDisplayTime 3.0 Period to display text for (in seconds)
int TextPosition unknown Horizontal position of text:
0 = Left
1 = Center
2 = Right
int ResourceID unknown Used without any other parameters to access predefined texts, encoded inside the executable, same as HintIDs.
Tutorials on Beach use 1010, 1020, 1030, 1040, 1050, 1060, 1070, 1080, 1090, 1100, 1110, 1120, 1130, 1140, 1150, 1160, 1170, 1180, 1190, 1200, 1210, 1220, 1230, 1240, 1250, 1260, 1270, 1280, 1290

Values that were never used in the original levels: TextDisplayTime, TextPosition (and possibly ResourceID, TextAtTop).


ActionType 35 = "CWaterDisturbanceAction"

Modify CWaterDisturbance object parameters.

Type Name Default Description
string Target unknown  
float Strength unknown  
float Interval unknown  
float Radius unknown  



Animation Scripts

Animation scripts were not used in any of the original levels - I've had to determine the format myself.

An animation script is used to animate object and camera movements, and is used by trigger action CScriptedAnimationAction. File extensions are ".asb" for binary format, or ".asa" for ASCII format.

ASCII Animation Script (.asa)
Binary Animation Script (.asb)

ASCII Animation Script (.asa)

I'll continue the example from the CScriptedAnimationAction section, then describe the script keywords.

Eg. For our earlier example, this is the file "C:\Tres CD\data\anim\test.asa" where "C:\Tres CD\" is the Trespaser "Data Drive". The level must contain a CInstance called "Box-00"
version 1

object Box-00

frame 0
pos 0 5 3
rot 0 0 0 1
scale 1

frame 3.5
pos 5.5 3 3
rot 0 0 1 0
scale 1

end_object

If there's a syntax error in the file, anything from that point on is ignored. If the file is not found, the trigger does nothing.

Keyword Description
version <number>
This line is required, but the number seems to be ignored.
forced_rate <number>
Can specify after version, and I think before any "object" section. I'm not sure exactly what this means. "0" doesn't seem to do much, "1" makes the animation play very fast (perhaps it ignores the frame time, playing frames as fast as possible).
object <name>
Define animation for instance "<name>". If the instance is not found, script continues running, ignoring this object section.
frame <time>
Time (in seconds) for this keyframe
pos <X> <Y> <Z>	
Position for this keyframe. Absolute (world) coordinates, as Trespasser has no hierarchy.
rot <X> <Y> <Z> <W>
Rotation quaternion for this keyframe. Will be normalized during loading.
scale <S>
Scale for this keyframe. (I think it might be multiplied by original object scale, so it would normally be set to 1.0)
object Camera
Define animation for "Camera". ie. give Anne an out-of-body experience. Just like the object block described above, but specifies animation of the viewport. With zero rotation, view direction is along the positive Y-axis, positive Z is up. (I think, perhaps it depends on Anne's orientation?)
Note: If Anne is moving (eg. a movement key is pressed) when the first Camera frame is reached, she will continue moving while the animation plays, even though the key may be released.

Binary Animation Script (.asb)

Trespasser loads these (from the data directory) in preference to a .asa file, and they should be used when a level is released. An .asb file is created automatically in the data directory the first time a .asa file is loaded.


Page researched and created by Andres, with additional research by Rebel, BigRed, Draconisaurus, chronzerg and machf.