Global properties

The following properties are in the root of the game flow document and control various pieces of global behaviour. Currently, the majority of this section remains distinct for each game.

TR1

Example structure

Show snippet
{
    "main_menu_picture": "data/titleh.png",
    "savegame_fmt_legacy": "saveati.%d",
    "savegame_fmt_bson": "save_tr1_%02d.dat",
    "water_color": [0.45, 1.0, 1.0],
    "fog_transparency": false,
    "fog_color": [0.0, 0.0, 0.0],
    "fog_start": 22.0,
    "fog_end": 30.0,
    "injections": [
        "data/global_injection1.bin",
        "data/global_injection2.bin",
        // etc
    ],
    "convert_dropped_guns": false,
    "enforced_config": {
        "enable_save_crystals": false,
    },
    "hidden_config": [
        "enable_legal",
    ],
    // Optional global Lua script file
    "main_script": "data/scripts/global.lua",
    "levels": [
        {
            "path": "data/gym.phd",
            // etc
        },
    ],
    "cutscenes": [
        {
            "path": "data/cut1.phd",
            // etc
        },
    ],
    "demos": [
        {
            "path": "data/gym.phd",
            // etc
        },
    ],
    "fmvs": [
        {"path": "data/snow.rpl"},
        // etc
    },
}

Reference

Property Type Description
cold_water Boolean Enables an exposure meter for Lara when she is in cold water.
convert_dropped_guns Boolean Forces guns dropped by enemies to be converted to the equivalent ammo if Lara already has the gun. See Item drops for full details.
fog_transparency Boolean Enables blending distant geometry into skybox rather than a solid color.
fog_color Float array or hex string Fog color (R, G, B) or `#RRGGBB`. OG uses `#000000`. Will have no effect if `fog_transparency` is set to true.
fog_start Double The distance (in tiles) at which objects and the world start to fade into blackness.
  • The default value in OG TR1 is hardcoded to 12.
  • The default (disabled) value in TombATI is 72.
fog_end Double The distance (in tiles) at which objects and the world are clipped away.
  • The default value in OG TR1 is hardcoded to 20.
  • The default (disabled) value in TombATI is 80.
enable_tr2_item_drops Boolean Forces enemies who are placed in the same position as pickup items to carry those items and drop them when killed (OG TR2+ behavior). See Item drops for full details.
enforced_config String-to-object map This allows any regular game config setting to be overriden. See User configuration for full details.
hidden_config String array This allows any regular game config setting to be hidden from the ingame settings dialogs. See User configuration for full details.
injections String array Global data injection file paths. Individual levels will inherit these unless inherit_injections is set to false on those levels. See Injections for full details.
levels Object array* This is where the individual level details are defined - see Level properties for full details.
main_script String Path to a global Lua script to execute after game initialization, before the first level loads.
main_menu_picture String* Path to the main menu background image.
savegame_fmt_bson String* Path pattern to look for the savegame files.
savegame_fmt_legacy String* Path pattern to look for the old TombATI savegame files.
water_color Float array or hex string Water color (R, G, B) or `#RRGGBB`. 1.0 or `FF` means pass-through, 0.0 or `00` means completely black color. See this table for reference values.
ambient_tracks Integer array A list of music track IDs, which will be treated as ambient music. If Lara crosses a trigger for any of these, it will become the current looped track, and will persist on save/load.

* Required property.

TR2

Example structure

Show snippet
{
    // NOTE: bad changes to this file may result in crashes.
    // Lines starting with double slashes are comments and are ignored.

    "main_menu_picture": "data/images/title_eu.webp",
    "savegame_fmt_legacy": "savegame.%d",
    "savegame_fmt_bson": "save_tr2_%02d.dat",

    "demo_version": false,

    "title": {
        "path": "data/title.tr2",
        "music_track": 60,
        "sequence": [
            {"type": "display_picture", "path": "data/images/legal_eu.webp", "legal": true},
            {"type": "play_fmv", "fmv_id": 0},
            {"type": "play_fmv", "fmv_id": 1},
            {"type": "exit_to_title"},
        ],
    },

    "sfx_path": "data/main.sfx",
    "injections": [
        "data/injections/pda_model.bin",
        "data/injections/winston_model.bin",
        "data/injections/font.bin",
    ],

    "levels": [
        {
            "path": "data/gym.phd",
            // etc
        },
    ],

    "cutscenes": [
        {
            "path": "data/cut1.phd",
            // etc
        },
    ],

    "demos": [
        {
            "path": "data/gym.phd",
            // etc
        },
    ],

    "fmvs": [
        {"path": "data/snow.rpl"},
        // etc
    ],

    "enforced_config": {
        enable_3d_pickups": false,
    },
    "hidden_config": [
        "enable_save_crystals",
    ],
}

Reference

Property Type Description
demo_version Boolean Legacy setting scheduled for removal at a later time.
main_menu_picture String* Path to the main menu background image.
savegame_fmt_legacy String* Path pattern to look for the original savegame files.
sfx_path String The path to the sound effects (.sfx) file to use in the game.
fog_transparency Boolean Enables blending distant geometry into skybox rather than a solid color.
fog_color Float array or hex string Fog color (R, G, B) or `#RRGGBB`. OG uses `#000000`. Will have no effect if `fog_transparency` is set to true.
fog_start Double The distance (in tiles) at which objects and the world start to fade into blackness. The default value in OG TR2 is hardcoded to 12.
fog_end Double The distance (in tiles) at which objects and the world are clipped away. The default value in OG TR2 is hardcoded to 20.
water_color Float array or hex string Water color (R, G, B) or `#RRGGBB`. 1.0 or `FF` means pass-through, 0.0 or `00` means completely black color. See this table for reference values.
ambient_tracks Integer array A list of music track IDs, which will be treated as ambient music. If Lara crosses a trigger for any of these, it will become the current looped track, and will persist on save/load.