Outfits

In TR1 and TR2 originally, Lara's meshes were taken from the O_LARA object, with mesh swaps being performed as required at runtime using additional objects, such as O_LARA_PISTOL, O_LARA_SHOTGUN, O_LARA_EXTRA etc. TR3 moved to a dedicated O_LARA_SKIN object, but still depended on the additional gun and extra mesh swaps, and these remained tightly coupled with the level's outfit. For example, when putting a shotgun in Lara's hand, the relevant mesh would include an entire copy of her hand, when in reality only the shotgun was required. This meant if customizing Lara's gloves, the builder would need to do so on several different objects.

TRX uses a different skin system, both to allow outfit swaps in-game for players and to remove unnecessary mesh faces where applicable for a more streamlined data setup. Custom level builders can define up to 32 outfits; following is a guide to the data and JSON configuration, and some scenario/workflow examples.

Data setup

The skin system uses the following objects. These are provided in the lara_outfits.bin injection, and are available to download as a separate WAD (see injections).

O_LARA_SKIN_SWAP_1...O_LARA_SKIN_SWAP_32

Each of these should contain a distinct Lara model, with the mesh count and bone order conforming to the standard for Lara. Bone offsets are used (e.g. consider Bacon Lara's different structure); animations are not used.

O_LARA_SKIN_JOINTS_1...O_LARA_SKIN_JOINTS_32

Each of these should contain a distinct Lara joints model. The data setup is identical to TR4/5, so joint vertices should map to the corresponding meshes that they stitch together.

O_LARA_SKIN_SWAP_EXTRA

This object contains various additional meshes for Lara, such as altered torsos when the TR1 braid is in use, Lara's combat face, and meshes used in extra animations, such as pulling the dagger in Dragon's Lair. It also contains both the TR1 and TR2/3 braid.

O_LARA_SKIN_SWAP_GUNS

This object contains holsters - both empty and equipped with the various guns - as well as the guns themselves when they are in Lara's hands or on her back.

O_LARA_SKIN_SWAP_LEGS

This object contains copies of Lara's legs for each outfit, with holster strap textures removed. This allows levels such as Home Sweet Home to swap out Lara's legs when she has no holsters. It is not an essential object to include.

Which slot holds which outfit

Each game gives these objects a different slot number. Import into the slot listed for the game you are building for.

Outfit Object TR1 TR2 TR3 TR4
tr1_gym lara_skin_swap_1 258 302 393 465
tr1_classic lara_skin_swap_2 259 303 394 466
tr1_mauled lara_skin_swap_3 260 304 395 467
tr1_combo lara_skin_swap_4 261 305 396 468
tr1_bacon_lara lara_skin_swap_5 262 306 397 469
tr2_gym lara_skin_swap_6 263 307 398 470
tr2_classic lara_skin_swap_7 264 308 399 471
tr2_diving_suit lara_skin_swap_8 265 309 400 472
tr2_bomber_jacket lara_skin_swap_9 266 310 401 473
tr2_robe lara_skin_swap_10 267 311 402 474
tr2_vegas lara_skin_swap_11 268 312 403 475
tr3_gym lara_skin_swap_12 269 313 404 476
tr3_classic lara_skin_swap_13 270 314 405 477
tr3_south_pacific lara_skin_swap_14 271 315 406 478
tr3_catsuit lara_skin_swap_15 272 316 407 479
tr3_nevada lara_skin_swap_16 273 317 408 480
tr3_antarctica lara_skin_swap_17 274 318 409 481
sophia lara_skin_swap_18 275 319 410 482
tr2_diving_suit_alpha lara_skin_swap_19 276 320 411 483
tr1_ngage lara_skin_swap_20 277 321 412 484
tr3_antarctica_beta lara_skin_swap_21 278 322 413 485
tr2_bomber_jacket_alpha lara_skin_swap_22 279 323 414 486
tr4_young lara_skin_swap_23 280 324 415 487
tr4_classic lara_skin_swap_24 281 325 416 488
natla lara_skin_swap_25 282 326 417 489

Only the outfits below have a joints model. The rest need none.

Outfit Object TR1 TR2 TR3 TR4
tr4_young joints lara_skin_joints_1 296 340 433 502
tr4_classic joints lara_skin_joints_2 297 341 434 503

The objects below are used by all outfits.

Purpose Object TR1 TR2 TR3 TR4
Braids, combat faces and extra animation meshes lara_skin_swap_extra 290 334 425 497
Holsters and the guns themselves lara_skin_swap_guns 291 335 426 498
Legs without holster straps; optional lara_skin_swap_legs 292 336 427 499

JSON setup

The file cfg/outfits.json5 sets up the available outfits, and how they should behave. The structure of this file is described below.

Top-level overview

Property Type Description
outfits Object map The keys in this map define the available outfits, and these are the keys that should be used in the game-flow. The outfit object is described separately below.
extra_meshes Integer map This map defines mesh offsets in O_LARA_SKIN_SWAP_EXTRA, which are required for various events/paths in the engine.
gun_maps Object array These maps dictate which meshes to use in O_LARA_SKIN_SWAP_GUNS for a given outfit and gun combination.

Outfits

Show snippet
"tr1_classic": {
  "name_gs": "dynamic/enums/lara_outfit/tr1_classic",
  "mesh_object": "O_LARA_SKIN_SWAP_2",
  "is_barefoot": false,
  "gun_map": 0,
  "combat_face_offset": 1,
  "supports_sunglasses": true,
  "braid": [
    {
      "mode": "tr1_full",
      "mesh_offset": 10,
      "position": {
        "x": 0,
        "y": 20,
        "z": -45,
      },
    },
  ],
  "no_holster_offsets": {
    "thigh_r": 1,
    "thigh_l": 2,
  },
  "extra_outfits": {
    "trex_kill": "tr1_mauled",
  },
},
Property Type Description
name_gs String The game string key used for localized UI labels for this outfit (for example, dynamic/enums/lara_outfit/tr1_classic).
mesh_object String Indicates which object contains the outfit's meshes and bones.
joints_object String Optional; indicates which object contains the joints for this outfit.
extra_object
guns_object
legs_object
String Optional; indicate which objects hold this outfit's extra, gun and leg meshes. They default to O_LARA_SKIN_SWAP_EXTRA, O_LARA_SKIN_SWAP_GUNS and O_LARA_SKIN_SWAP_LEGS, which is what an outfit sharing the shipped data wants.
gold_color Color The color Lara is cast in when she turns to gold, whether by the Midas hand or by the golden Lara setting. It defaults to the gold the shipped models are textured in.
is_barefoot Boolean Indicates whether or not Lara is barefoot and is used to play different SFX for her footsteps. The following samples need to be defined in catalog_samples.csv.
SFX_LARA_FOOTSTEP Regular step sound when walking, running etc.
SFX_LARA_BAREFOOT Barefoot step sound when walking, running etc.
SFX_LARA_LAND Regular sound when landing e.g. after a jump.
SFX_LARA_BAREFOOT_LAND Barefoot sound when landing e.g. after a jump.
gun_map Integer The index into the gun_maps array to use for this outfit.
braid Object array The braid setup specific to this outfit. At most two braids can be defined. If omitted, no braid will be shown. See the braids section below.
combat_face_offset Integer The mesh offset in O_LARA_SKIN_SWAP_EXTRA for Lara's combat face. -1 implies no combat face swap. This mesh is used when Lara is firing a weapon (traditionally, the O_LARA_UZI head mesh was used).
supports_sunglasses Boolean Defines whether or not sunglasses can be used with this outfit.
no_holster_offsets Integer map The mesh offsets in O_LARA_SKIN_SWAP_LEGS to use when Lara's holsters aren't visible. Omitting this property infers no mesh swaps.
extra_outfits String map Pointers to alternative outfits to use for specific game events. One event is supported. If it is omitted, no swap will occur for it.
trex_kill When Lara is killed by the T-rex - instant full outfit swap.
extra_mesh_positions XYZ map Positional offsets for Lara's extra equipment meshes, allowing adjustments to be made per outfit. Used by default in the TR4 outfits to adjust Lara's sunglasses.

Braids

Property Type Description
mode String Indicates special handling when the braid is active.
none No special treatment (this mode is implied if mode is not specified).
tr1_head_only Replaces Lara's head with tr1_braid_default_head defined in the O_LARA_SKIN_SWAP_EXTRA object.
tr1_full As per tr1_head_only, plus Lara's torso will be replaced with tr1_braid_default_torso.
tr1_mauled As per tr1_full, but the torso swap mesh used here is tr1_braid_mauled_torso.
auto_enabled Boolean Whether or not the braid is enabled by default when the player chooses Auto for Lara's braid status. Defaults to true; typically set to false for TR1 outfits.
mesh_offset Integer The starting offset in O_LARA_SKIN_SWAP_EXTRA for the regular braid meshes and bones.
position XYZ The position relative to Lara's head where the braid will be drawn.
head_seam Array of [braid vertex, head vertex] pairs The vertex mapping used to stitch the braid to Lara's head. This is only applicable when the outfit itself is jointed.

Guns

Show snippet
{
  "desert_eagle": {
    "hand_r": 62,
    "thigh_r": 9,
  },
  "uzis": {
    "hand_r": 63,
    "hand_l": 64,
    "thigh_r": 10,
    "thigh_l": 11,
  },
  "shotgun": {
    "hand_r": 65,
    "torso": 72,
  },
}

The map keys must match known engine weapons. See weapons and cfg/weapons.json5 for reference. Any entry may omit hand, thigh or torso, and note that specific gun types will only look for particular entries. For example, defining a thigh_l property for shotgun is meaningless and will be ignored. Any missing fields imply that no mesh is drawn for that slot.

Property Type Description
hand_r
hand_l
Integer The mesh offset in O_LARA_SKIN_SWAP_GUNS for the gun to draw in Lara's hands.
thigh_r
thigh_l
Integer The mesh offset in O_LARA_SKIN_SWAP_GUNS for the gun to draw against Lara's thighs. This expects the holster to be part of the mesh.
torso Integer The mesh offset in O_LARA_SKIN_SWAP_GUNS for the gun to draw on Lara's back.

Custom level use cases

lara_outfit appears twice in a game flow, and the two are unrelated settings that happen to share a name.

Where What it does
On a level Names the outfit Lara wears in that level.
Under enforced_config Takes the choice of outfit away from the player. A value of null enforces no outfit of its own, which leaves each level free to name its own.

Deleting one is not the same as deleting the other.

I don't need to customize Lara's outfit, and I don't mind players freely switching outfits.

In this scenario, simply ship your level with lara_outfits.bin and the default cfg/outfits.json5.


I don't need to customize Lara's outfit, nor do I want the player to change it.

In this case, you can simply enforce the outfit option, and continue to ship the standard files as above. Provided your game-flow level has an accurate lara_outfit entry, you can enforce as follows.

"enforced_config": {
  "lara_outfit": null,
},

Using null here means that the enforcement names no outfit of its own, so each level's own lara_outfit is what Lara wears; a second level that names a different one is still honoured. Naming an outfit instead of null dresses her in that one everywhere, whatever the levels say.


I don't need to customize Lara's outfits, but I want to restrict the ones that can be selected by the player.

Ship the default injection file, but edit cfg/outfits.json5 by removing the entries from the outfits section that you do not need.


I want to customize Lara's outfits.

Download the provided TRX WAD to access the data included in the shipped injection. Move each of the relevant objects to your WAD. You can then proceed to edit the meshes as required. Ensure that you remove the lara_outfits.bin from your game-flow, otherwise these will override the data in your level.

I want to customize Lara's braid.

Braid meshes and bones are taken from the O_LARA_SKIN_SWAP_EXTRA object, so to customize it you will need to follow the same steps as for customizing outfits i.e. import the TRX WAD, edit the data and remove the injection.