.bin files)
In TRX, an injection is a binary patch file (.bin) that the engine applies
to level data at load time. Injections are used to fix or extend base game data
in a way that stays compatible with custom levels (unless you intentionally
replace the same data in your own WAD).
Most builders only need injections for the "default TRX assets" (extra Lara animations, extended fonts, PDA model, etc).
Gameflow JSON supports injections in two places:
By default, injections defined in the global gameflow are applied to every level. If a level defines its own injections, those are merged with the global set when the level loads.
Individual levels can set inherit_injections to false. In that case, global
injection files are not used. If such a level defines its own injections,
only those are applied; if it defines none, nothing is injected.
Relevant keys (names may differ slightly per gameflow version):
{
// global
"injections": [
"data/injections/lara_extra.bin",
"data/injections/font.bin"
],
"levels": [
{
"path": "data/levels/MY_LEVEL.TR2",
"inherit_injections": true,
"injections": [
"data/injections/pda_model.bin"
]
}
]
}
If you import the assets into your level WAD (see below), you should then
remove the corresponding .bin from gameflow to avoid
double-applying/replacing data!
If a level should not receive the global injections, set
"inherit_injections": false (or omit inheritance, depending on the
schema/version you're targeting).
The gameflow ignores referenced injection files that do not exist, but it's best practice to remove references to keep gameflow clean.
.bin, or bake into your WAD
You can handle TRX default assets in two ways:
.bin files and reference them in gameflow..bin references from gameflow..wad2 file for the applicable game as the source level in WadTool..bin file.TRX provides asset packs intended for WadTool import:
https://lostartefacts.dev/pub/tr1-assets.ziphttps://lostartefacts.dev/pub/tr2-assets.zipThe zips also include Tomb Editor catalogs (Moveables.xml /
SpriteSequences.xml) so TRX object names show up (and to enable cross-game
placements like TR2 guns in TR1 levels). See the README inside the zip for
details.
Custom levels should generally not rely on injections for correctness; instead, provide data that is already correct and consistent.
Note however that the injections that relate to Lara can work in custom levels that do not modify Lara's default mesh structure or animations. These injection files are based on the original Lara model.
The rule of thumb for custom levels is that if an injection file name starts with a level name, it is meant for specific original levels and should generally be removed from your custom gameflow unless you know what you're doing.
| Injection file | Usage | Purpose |
|---|---|---|
lara_animations.bin |
TR1, TR2 | Lara animations/state/commands (jump-twist, somersault, underwater roll, wading, etc). If Lara's appearance is customised, move the source object to another slot and replace meshes manually. TR1 only: add wet-feet.xml to the sound catalogue (adds sound IDs 15 & 17) and provide the referenced wet-feet .wav samples (or your own). |
lara_guns.bin / lara_gym_guns.bin |
TR1, TR2 | In TR1, replaces Lara's fixed shotgun-torso mesh with the TR2+ approach of an independent resting gun mesh. These files also contain Lara's guns from the other games, including flares. The gym file injects all of Lara's weapons and weapon animations in the gym level (for cheats only). |
lara_extra.bin |
TR1, TR2 | Combined object containing extra animations shared between TR1 and TR2 and several mesh swaps for special animations like the Midas Hand. Meshes are not used for meshswaps. |
pda_model.bin |
TR1, TR2 | The original PDA model with an opening animation. Used by the Gameplay options UI. |
font.bin |
TR1, TR2 | Replacement font sprites to support more characters than OG. |
secret_models_*.bin |
TR2 | 3D models for secret pickups in OG and Golden Mask. |
braid.bin |
TR1 | Braid option: injects braid plus mesh swaps for Lara's head/backpack (incl. Midas variant). |
bubbles.bin |
TR1 | Replacement sprites for Lara's underwater bubbles (OG sprites are cut off). |
pickup_aid.bin |
TR1, TR2 | Sprite sequence for pickup aids option; custom levels should define a suitable sprite sequence in slot 185. |
photo.bin |
TR1, TR2 | Camera shutter SFX for photo mode (needed only for cutscene levels). |
purple_crystal.bin |
TR1 | Replacement savegame crystal model (PS1 style). |
scion_collision.bin |
TR1 | Increases collision radius on the targetable Scion so it can be shot with the shotgun. |
guardian_death_commands.bin |
TR2 | Bird guardian death anim command to end the level on the final frame (TRX removes the hard-coded behavior). |
mines_pushblocks.bin |
TR1 | Restores missing scraping SFX for pushblock types 2/3/4 by injecting anim command data. |
boat_bits.bin |
TR2 | Model for O_BOAT_BITS (221) used to show the boat exploding when it crosses mines. |
explosion.bin |
TR1 | Explosion sprites for certain console commands. |
misc_sprites.bin |
TR1, TR2 | Various special effects such as snowflake or shadow sprites. |
barefoot_sfx.bin |
TR2 | Replaces Lara's step sounds with a barefoot variant (used for the water levels in the OG TR2). |
| Injection file | Usage | Purpose |
|---|---|---|
*_cameras.bin |
TR1, TR2 | Positional adjustments for cameras that can otherwise cause visual issues. |
*_fd.bin |
TR1, TR2 | Fixes for floor data issues in original levels. |
*_itemrots.bin |
TR1, TR2 | Pickup item rotations for better visuals with 3D pickups. |
*_meshfixes.bin |
TR1 | Miscellaneous mesh adjustments for objects (e.g., to avoid z-fighting). |
*_music_tracks.bin |
TR2 | Trigger adjustments to convert music track numbers to match file names (OG levels only). |
*_pickup_meshes.bin |
TR1, TR2 | Pickup mesh edits (e.g., rescaling keys / specific pickups). |
*_sfx.bin |
TR1, TR2 | Various SFX fixes/additions. |
*_skybox.bin |
TR1 | Predefined skybox model injected into specific levels. |
*_textures.bin |
TR1, TR2 | Texture fixes in original levels (e.g., gaps, wrong colors). |
cistern_plants.bin |
TR1 | Disables animation on sprite ID 193 in The Cistern and Tomb of Tihocan. |
khamoon_mummy.bin |
TR1 | Mummy in City of Khamoon room 25 (present on PS1, missing on PC). |
seaweed_collision.bin |
TR2 | Fixes seaweed in Living Quarters blocking Lara from exiting the water. |
breakable_tile_sfx.bin |
TR2 | Adds missing breakable tiles (collapsing floor) sounds that are otherwise silent in the OG. |
loose_boards_sfx.bin |
TR2 | Adds missing breakable tiles (collapsing floor) sounds that are otherwise silent in the OG. |
dagger_sprite.bin |
TR2 | Adds a UI sprite for the Dagger of Xian when 3D pickups are disabled. |