The levels
section of the document defines how the game plays out. This is an
array of objects and can be defined in any order. The flow is controlled using
the correct sequencing within each level itself.
Following are each of the properties available within a level.
{
"path": "data/example.phd",
"music_track": 57,
"lara_type": 0,
"water_color": [0.7, 0.5, 0.85],
"fog_start": 34.0,
"fog_end": 50.0,
"unobtainable_pickups": 1,
"unobtainable_kills": 1,
"inherit_injections": false,
"injections": [
"data/level_injection1.bin",
"data/level_injection2.bin",
],
"ambient_tracks": [30, 31, 32, 33],
"item_drops": [
{"enemy_num": 17, "object_ids": [86]},
{"enemy_num": 50, "object_ids": [87]},
// etc
],
"sequence": [
{"type": "play_fmv", "fmv_id": 0},
// etc
],
},
Property | Type | Description | |
---|---|---|---|
path |
String* | The path to the level's data file. | |
type
|
String | The level type, which must be one of the following values. Defaults to normal level. | |
Type | Description | ||
normal |
A standard level. | ||
gym |
At most one of these can be defined. Accessed from the photo option (object ID 73) on the title screen. If omitted, the photo option is not displayed. | ||
bonus |
Only playable when all secrets are collected. See Bonus levels for full details. | ||
current |
One level of this type is necessary to read TombATI's save files. OG has a
special level called LV_CURRENT to handle save/load logic.
TR1X does away with this hack. However, the existing save games expect the
level count to match, otherwise the game will crash.
|
||
dummy |
A placeholder level necessary to read TombATI's save files. | ||
sequence |
Object array* | Instructions to define how a level plays out. See Sequences for full details. | |
music_track |
Integer* | The ambient music track ID. | |
fog_start |
Double | Can be customized per level. See the global property for details. | |
fog_end |
Double | Can be customized per level. See the global property for details. | |
injections |
String array | Injection file paths. See Injections for full details. | |
inherit_injections |
Boolean | A flag to indicate whether or not the level should use the globally defined injections. See Injections for full details. | |
item_drops ¹ |
Object array | Instructions to allocate items to enemies who will drop those items when killed. See Item drops for full details. | |
lara_type ¹ |
Integer / string | Used only in cutscene levels to link the braid (if enabled) to the relevant cutscene actor object ID. | |
sfx_path ² |
String | The path to the sound effects (.sfx) file to use in this level. If this property is not defined, the default global file will be used. | |
unobtainable_kills ¹ |
Integer | A count of enemies that will be excluded from kill statistics. | |
unobtainable_pickups ¹ |
Integer | A count of items that will be excluded from pickup statistics. | |
unobtainable_secrets ¹ |
Integer | A count of secrets that will be excluded from secret statistics. Useful for level demos. | |
water_color ¹ |
Float array | Can be customized per level. See the global property for details. | |
ambient_tracks |
Integer array | Can be customized per level. See the global property for details. |
* Required property.
¹ Tomb Raider 1 only.
² Tomb Raider 2 only.