OCB and Setup Instructions

Updated on 1 March 2024

Lara #

Changes to Lara #

TombEngine has introduced several tweaks and changes to Lara to improve how responsive she is and extend her move set. Whilst the same controls apply: some adjustments do not compare directly to the classic games.

Crouch Roll and Turn #

TombEngine has restored the ability to roll whilst crouched down. This was cut from Tomb Raider III.

To perform this: simply press the SPRINT key.

To perform the crouch roll: simply press the ROLL key and Lara will turn around 180 degrees.

Enabled by amending the settings.lua file, located in the project SCRIPT folder so that anims.crouchRoll = true

Extra Animations #

For TombEngine: there is an additional object “LARA_EXTRA_ANIMS” that contains special animations for unique situations across the classic games. To use these in-game: you can call on them easily using the steps outlined below:

Open your main game WAD2 in Wadtool as the destination WAD2. Then locate the LARA object and double-click it to open up the Animation Editor.

Scroll down to the bottom of the Animation List and find the last animation number. In this example: as this is the default TombEngine WAD2: it is 568.

The LARA_EXTRA_ANIMs will continue from this number. For example, if I wanted to trigger the TNT_ACTIVATION animation: it would be Lara animation 568 + 9 = 577.

Extended Crawling #

Lara can crawl up and down from a 1, 2 or 3-click height.

Camera improvements have been made when Lara is in her crouch state to allow the player to have a smoother experience than in the classic games.

Enabled by amending the settings.lua file, located in the project SCRIPT folder so that anims.crawlExtended = true

Ledge Jump #

Lara can jump up a 4-click height from hanging down and also perform acrobatics to turn around and jump to a ledge behind her from hanging.

To perform the jump up from hanging: make sure Lara is hanging off an edge and press the JUMP button.

To perform the jump back: press JUMP+DOWN whilst hanging.

Enabled by amending the settings.lua file, located in the project SCRIPT folder so that anims.ledgeJumps = true

Monkey-Swing Changes #

Lara will now automatically jump down at the and of a monkey-swing section if there is ground for her to land on within range.

Enabled by amending the settings.lua file, located in the project SCRIPT folder so that anims.monkeyAutoJump = true

AFK Pose #

In the classic games: if the player left Lara unattended: she would just stand on the spot. Now she will pose with her arms crossed as though she is waiting for the player.

Enabled by amending the settings.lua file, located in the project SCRIPT folder so that anims.pose = true

Sprint Jump #

Lara can jump whilst sprinting for a short time which allows her to cover a large gap. Whilst this is fairly unrealistic: it has been included as it was requested. 

Enabled by amending the settings.lua file, located in the project SCRIPT folder so that anims.sprintJump = true

Enemies #

Cobra #

To correct the death animation: please change the STATE ID of ANIMATION 5: “COBRA_ANIM_DEATH” from 0 to 4

Dog #

OCB 0: Attacks player when triggered.

OCB 1: Starts frozen (laying down like statues). Trigger to wake them up.

Guardx, SWAT and SWAT Plus #

OCB 0: Default.

OCB 1: Reload

OCB 2: Door Kick

OCB 3: Rappel Down Rope

OCB 4: Sleeping

OCB 5: Rappel Down Rope (Fast)

OCB 6: Wait On Wall

OCB 7: Use Computer

OCB 8: Start Hunt Stop

OCB 9: Use ID_COMPUTER_SCIENTIST

OCB 10: Idle

OCB 11: Run

Hitman #

Use the room flag “No Lens Flare” and he will suffocate. The behaviour for this is that he will first try to escape, then suffocate if he cannot. Use the “Set Box Sector” flags on all doors to prevent escape.

Set the room type to “Water” and he will electrocute himself.

IMP #

OCB 1: Climbs up when triggered.

OCB 2: Rolls on the floor when triggered.

OCB 3: Attacks player with rocks when triggered.

If the player is holding a lit torch or throws the lit torch towards the imp: they will run away scared.

Roman God 1 / Roman God 2 #

OCB 0: Hammer God mode. Uses a powerful hammer attack.

OCB 1: Sword God mode. Fires a bolt of homing energy at Lara.

Sphinx #

OCB 0: Waits until the player approaches before charging.

OCB 1: Charges towards the player when triggered.

Sophia Leigh #

OCB 0: Normal mode. Sophia behaves like a regular enemy.

OCB 1: Tower Mode. Her behaviour matches Tomb Raider III. Invincible unless triggered to be killed.

OCB 2: Tower Mode with Volumes. Same as Tower Mode but Sophia’s ascent can be controlled using volumes in Tomb Editor.

Please note that you need to use AIX1 null-meshes.

Wasp #

AI_MODIFY object won’t allow it to land, the wasp will always fly.

Winged Mummy #

OCB 1: Start off flying when triggered.

OCB 2: Start as a mummy when triggered.

OCB 4: Start posed.

OCB 8: No Wings.

OCB 16: Disable Bomb Attack.

OCB 32: Disable Shard Attack.

Keys #

Updated for Tomb Engine 1.3 – 17th December 2023

To enable multiple usages, simply set the trigger type of the keyhole object as “Switch“.

OCB 0 – play default animation and lose key.

Positive OCB: play animation number and keep key.

Negative OCB: play animation number and lose key.

Pickups #

OCB 0: The pickup is on the floor.

OCB 1: The pickup is in a hole in the wall.

OCB 2: The pickup is attached to the wall (crowbar needed).

OCB 3: The pickup is on a high pedestal.

OCB 4: The pickup is on a low pedestal.

  • Please note that if you place a pickup on top of a pedestal static object: the object being picked must be in the same X and Z position as the pedestal:
     
     

Add 64 to the OCB for it to trigger a pickup trigger on that square.

Puzzles #

To enable multiple usages, simply set the trigger type of the puzzle-hole or puzzle-done object as “Switch”. Can be mixed with puzzle done and puzzle holes of the same or different type.

Switches #

OCB 0: Wall Lever

OCB 1: Small lever

OCB 2: Small button

OCB 3: Big Button

OCB 4: Giant Button

OCB 5: Valve

OCB 6: Reach In Hole

OCB 7: Lua Switch (see here for more details).

OCB 9: Pry out of the wall with the crowbar.

Users can assign custom animations to a switch:

OCB = Animation number for “on” animation

OCB + 1 = Animation “off” number.

Cog Switch #

Use OCB 0 to have the traditional behaviour.

Use any other OCB to can use the Cog Switch without need of any door linked.

Shoot Switch 1 #

Set all code bits ON (click the object and press the o key ) to activate a heavy trigger placed underneath the switch.

Alternately use a SWITCH trigger below to activate triggers when shot.

Shoot Switch 2 #

OCB 444 – Shatters when shot.

Shoot Switch 3 or 4 #

Same as SHOOT_SWITCH1 but has no shatter effect.

Interactives #

Bridges #

This object can be positioned freely without requiring any specific trigger beneath it. It also can be rotated and adjusted in real-time through Lua. Additionally, any items placed on a moving platform will be transported along with it.

The surface that the player can stand on is taken from the bridge object’s collision.

The only condition is that pickup must be activated (1-5 bits set in the edit object window or manually activated).

Corpse #

OCB 0 for a carcass that is eaten by the Compsognathus dinosaur.

OCB 1: Hangs in the air as if used as bait and will fall if shot.

Please note you must use the patched version found here.

Color/Pulse/Strobe Light #

The light colour is chosen in Tomb Editor by changing the object tint.

Electrical Light #

The light colour is chosen in Tomb Editor by changing the object tint.

OCB + (mesh number) allows light to behave like a neon light.

OCB – (mesh number) makes the light flicker.

Pushable Objects & Blocks #

Pushable objects can now be pushed over the edge with new custom animations to make the transition smoother (credit: GeckoKid)

OCB 0: Standard behaviour.

OCB +1: Can Fall, If added, Lara can push the pushable through border edges.

OCB +2: Don’t Align Center, If added, Lara’ll be able to grab the pushable without the need to position Lara in the middle of the sector to interact.

OCB +4: Is Buoyant. If added, the pushable will float to the surface when it is in a water room.

OCB +8: Animation System, If added, Lara will use the classic TR1-TR3 push/pull animations. (Need WAD update).

Change the OCB to a negative number to prevent the pushable from being moved.

For example: if you require a pushable object that you could push over an edge and float in water you will do OCB 1 + 4 = 5. If you then wanted to use the classic TR1-TR3 animations: you would add 8 bringing your total OCB to 13.

Ropes #

OCB 0: Straight when triggered.

OCB -1: Coiled and folds out when triggered.

Waterfall Mist #

OCB xx yy where xxin width, and yyis sprite size.

Traps #

Bomb #

Add 0-99 to OCB for delay (quarter seconds)

Add 10000 to OCB for green explosion ( 0 or 1)

Add 100-900 to OCB for size (1-9)

Add 1000 to OCB for blast wave ( 0 or 1)

Crumbling Platform #

OCB = 0: Default behaviour. The platform will start to shake when Lara steps on and will crumble for 1.2 seconds (35 frames) and then fall.

OCB = crumble length (in frames):  The platform will start to shake when Lara steps and will crumble during the number of frames indicated in the OCB.

A positive number will crumble automatically

A negative number will require a trigger.

Dart #

Can be freely rotated and positioned in Tomb Editor. Now uses a 3D mesh for the dart instead of a sprite and fires towards the pointed end of the nullmesh.

OCB 0: Does damage only.

OCB -1: Does damage and poisons Lara.

Fish Emitter (Coming in update 1.4) #

You can add multiple versions of fish by adding a mesh in the skeleton editor inside Wadtool. 

You can set the amount of fish by using a volume in Tomb Editor to change the Hit Points of the FISH_EMITTER.

You must change the OCB as it cannot be 0.

Postive OCB + mesh number: friendly fish

Negative OCB + mesh number: deadly fish

If a CORPSE object is in the water, then the fish will be distracted and feast on that , rather than the player.

Fish attacking corpse

Flame Emitter 1 #

Whilst this is now more flexible to code via Lua: these OCBs are also useful for quick effects. Information taken from this post

Flame Emitter 2 #

OCB 1: Small flame (does not burn Lara)

OCB 2: Small flame moving slowly along the floor in the direction of the cone and will go up and down slopes. On contact with water, the flame will produce a bright flash and extinguish.

OCB 4: tiny flame (perfect for candles)

OCB 123: small flame in the centre of the tile

Flame Emitter 3 #

OCB 1: small blue electric arc.

OCB 2: blue electric arc from point of the cone.

OCB 3: large electric arc projecting holograph

OCB 888: Big ball of lightning that follows Lara

Hammer #

OCB 0: It does not animate but will cause Lara damage if collided.

OCB 2: Hardcoded Obelisk set up.

OCB 3: Triggers once, then raises up and stays there.

OCB 4: Works like OCB 3 but will not stop. So once triggered will continuously raise, smackdown, raise up and then loop every two seconds.

Laser Barrier #

The colour of the laser is chosen in Tomb Editor by changing the object tint. The room height decides laser height.

OCB value indicates how wide the laser will be. Ie: OCB 7 will mean it will be 7 sectors across.

Negative OCB: triggers heavy trigger and can be crossed without causing damage to the player

Positive OCB: Fatal to the player if crossed.

Rollingball #

OCB 1: Rollingball silent mode: No camera shake or sound.

Spiky Ceiling #

Can be any size or shape.

OCB = speed.

Negative OCB: travels up.

Positive OCB: travels down.

The speed can also be changed via Lua:
Moveable::SetItemFlags[0]

Spiky Wall #

OCB number = speed

positive OCB : travels along the positive X axis.

Negative OCB – travels along the negative X axis.

Teeth Spikes #

Can be freely rotated inside Tomb Editor.

OCB 0: Ordinary TR4 teeth spikes behaviour

OCB 1: Spikes stuck out constantly

OCB 2: Stick out once and retract forever

OCB 3: OCB specifies spikes retraction delay in frames, i.e. OCB 30 = spikes will delay for 1 second, OCB 60 = 2 seconds, etc

Damage from teeth spikes is now dependent on the object’s collision.

Wolf #

OCB 0: Attacks player when triggered.

OCB 1: Starts sleeping. Trigger to wake them up.

Wraith Trap #

New object in place of the hardcoded Animating from TR4. Used to trap the Wraith entity.

OCB 0: Original TR4 effect

OCB 1: Enhanced effect where the wraith is pulled into the trap.

Vehicles #

Jeep #

The vehicle no longer requires a key to operate and can be used like any other vehicle.

Improved handling and collision handling.

It can be driven into 2-click deep water. Previously was 1 click.

New graphic elements were added for water wakes and ripples if driven in shallow water.

Kayak #

If you wish to create a drowning effect as seen in Tomb Raider III, you need to assign a “water” footstep sound to the texture and attach a death flag to the specific sectors where you want Lara to drown. To gain more insight on this process, refer to this tutorial available HERE.

New graphic elements were added for water wakes and ripples.

Minecart #

The animating object used as the switch has been replaced with a dedicated Minecart_Switch object. To use this: place a HEAVY trigger underneath the switch and it will trigger this when it is hit with the wrench if Lara is riding in the minecart.

New graphic elements were added for water wakes and ripples if rode through shallow water.

New spark effects are added when braking harshly.

Motorbike #

Improved dynamic light on the front of the bike.

Improved handling and collision handling.

Does not currently support the nitrogen dioxide boost.

Speedboat & Rubberboat #

New graphic elements were added for water wakes and ripple on the top of the water’s surface.

Underwater Propulsion Vehicle (UPV) #

Restored dynamic light.

Bubble effects when in use.

Can fire harpoons as shown in Tomb Raider III.

Improved handling and unified controls.