On this page, you will find the OCB (Object Code Bits) for use in TombEngine. If there is a download available then a button will appear next to the entry. Be sure to check back because as the project is developed: more will be added.

Table of Contents

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: Normal behaviour
  • OCB 1: Starts frozen (laying down like statues). Trigger to wake them up.

GUARDx, SWAT, 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 Gods

  • OCB 0: Hammer God mode. Uses a powerful hammer attack.
  • OCB 1: Sword God mode. Fires a bolt of homing energy at Lara.

SOPHIALEIGH

  • 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.

WINGED_MUMMY

  • OCB 1: Start off flying when triggered.
  • OCB 2: Start off as a mummy when triggered.
  • OCB 4: Start posed.
  • OCB 8: No Wings.
  • OCB 16: Disable Bomb Attack.
  • OCB 32: Disable Shard Attack.

Keys

Usage Notes

  • To enable multiple usages, simply set the trigger type of the key hole object as “Switch”.
  • You can use a custom key hole animation by setting the OCB number. The default OCB 0 will show Lara using the key animation. If you use a positive OCB number, the animation will play according to that number.

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

GENERIC

  • 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.

SHOOT_SWITCH1

  • 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_SWITCH2

  • OCB 444 – Shatters when shot.

SHOOT_SWITCH3 & SHOOT_SWITCH4

  • Same as SHOOT_SWITCH1 but has no shatter effect.

Misc

Bridges

  • This object can be positioned freely without requiring any specific trigger beneath it. It also has the ability to be rotated and adjusted in real-time through Lua. Additionally, any items placed on a moving platform will be transported along with it.
    • The only condition: that pickup must be activated (1-5 bits set in the edit object window or manually activated).

COLOR_LIGHT, PULSE_LIGHT, 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_OBJECTX / PUSHABLE_OBJECT_CLIMBABLEX (1.1.1)

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 will 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).

Rope

  • OCB 0: Straight when triggered.
  • OCB -1: Coiled and folds out when triggered.

WATERFALLMIST

  • OCB xxyy where xxis 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 (1.1.1)

  • 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.
  • Fires towards the pointed end of the nullmesh.
  • OCB 0: Does damage only.
  • OCB -1: Does damage and poisons Lara.

FLAME_EMITTER1

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

OCB

Direction

Time On (seconds)Time Off (seconds)
-2HorizontalContinuousContinuous
-14Horizontal51
-21Horizontal52
-6Horizontal53
-37Horizontal54
-32Horizontal55
-4Horizontal61
-3Horizontal62
-28Horizontal63
-53Horizontal65
-52Horizontal66
-59Horizontal67
-68Horizontal68
-64Horizontal69
-84Horizontal611
-97Horizontal613
-107Horizontal614
-108Horizontal615
-12Horizontal71
-20Horizontal72
-38Horizontal74
-44Horizontal75
-48Horizontal76
-60Horizontal78
-72Horizontal79
-80Horizontal710
-85Horizontal711
-102Horizontal712
-100Horizontal713
-115Horizontal714
-112Horizontal715
-128Horizontal716
-70Horizontal88
-1Vertical52
-41Vertical55
-9Vertical61
-25Vertical63
-33Vertical64
-57Vertical67
-73Vertical69
-113Vertical614
-129Vertical617
-49Vertical77
-81Vertical710
-121Vertical714
-65Vertical88

FLAME_EMITTER2

  • 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 centre of tile

FLAME_EMITTER3

  • OCB 1: small blue electric arc.
  • OCB 2: blue electric arc from point of 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_CELING

  • Can be any size or shape.
  • OCB = speed.
    • Negative OCB: travels up.
    • Positive OCB: travels down.
  • Speed is also adjustable via ItemFlags[0] using Moveable:SetItemFlags()

Spiky_Wall:

  • OCB number = speed
    • positive OCB : travels along the positive X axis.
    • Negative OCB – travels along the negative X axis.
    • These properties can also be changed via Lua using the Moveable::SetItemFlags[0] code.

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.

WRAITHTRAP

  • 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.