50 KiB
Game flow specification
In the original Tomb Raider 1, the game flow was completely hard-coded, including the levels, limiting the builders' flexibility. Tomb Raider 2 improved upon this by introducing a tombpc.dat binary file for game configuration, although it remained cryptic and required builders to use dedicated tooling. TR1X and TR2X have transitioned away from these earlier methods, choosing to manage game flow with a JSON file that provides a unified structure for both games. This document details the elements that can be modified using this updated format.
Jump to:
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
Show snippet
"main_menu_picture": "data/titleh.png",
"savegame_fmt_legacy": "saveati.%d",
"savegame_fmt_bson": "save_tr1_%02d.dat",
"demo_delay": 16,
"water_color": [0.45, 1.0, 1.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,
},
"levels": [
{
"path": "data/gym.phd",
// etc
},
],
"cutscenes": [
{
"path": "data/cut1.phd",
// etc
},
],
"demos": [
{
"path": "data/gym.phd",
// etc
},
],
"fmvs": [
{"path": "data/snow.rpl"},
// etc
},
Property | Type | Description |
---|---|---|
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. |
demo_delay |
Double* | The number of seconds to pass in the main menu before playing the demo. |
fog_start
|
Double |
The distance (in tiles) at which objects and the world start to fade into
blackness.
|
fog_end
|
Double |
The distance (in tiles) at which objects and the world are clipped away.
|
enable_killer_pushblocks
|
Boolean | If enabled, when a pushblock falls from the air and lands on Lara, it will kill her outright. Otherwise, Lara will clip on top of the block and survive. |
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, similar to TR2+. 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. |
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_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 | 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. |
* Required property.
TR2
Property | Type | Description |
---|---|---|
cmd_init |
Object | The command to run when the game is first launched. See Game flow commands for full details. |
cmd_title |
The command to run when the main menu is to be shown. | |
cmd_death_in_game |
The command to run when Lara dies. | |
cmd_death_in_demo |
The command to run when Lara dies during a demo (not used in the original game). | |
cmd_demo_interrupt |
The command to run when the player interrupts a demo. | |
cmd_demo_end |
The command to run when a demo finishes playback. | |
cheat_keys |
Boolean | Whether to enable original game cheats (the ones where Lara turns around three times). |
load_save_disabled |
Boolean | Whether to disable saving and loading the game. |
play_any_level |
Boolean | Whether to show a full list of all levels in place of the New Game passport page. |
lockout_option_ring |
Boolean | Whether to disallow the players to use control ring while ingame. |
gym_enabled |
Boolean | Whether to enable Lara's Home. |
demo_version |
Boolean | Legacy setting scheduled for removal at a later time. |
single_level |
Integer | Force the player to only play this one level. |
demo_delay |
Double | The number of seconds to pass in the main menu before playing the demo. |
main_menu_picture |
String* | Path to the main menu background image. |
savegame_fmt_legacy |
String* | Path pattern to look for the original savegame files. |
secret_track |
Integer | Music track to play when a secret is found. -1 to not play anything. |
sfx_path |
String | The path to the sound effects (.sfx) file to use in the game. |
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. |
Game flow commands
The command allows you to modify the original game flow, but please note that deviations from the original script may result in unexpected behavior. If you encounter any bugs, we encourage you to report your experience by opening an issue on GitHub. The overall structure is as follows:
{
"command": "play_level",
"param": 5,
}
Currently the following commands are available.
Command | Description | Parameter |
---|---|---|
noop |
Continue the flow as normal. | N/A |
play_level |
Play a specific level. | Level to play. |
load_saved_game |
Load a specific savegame. | Save slot number to use |
play_cutscene |
Play a specific cutscene. | Cutscene number to play |
play_demo |
Play a specific demo. | Demo number to play. |
play_fmv |
Play a specific movie. | Movie number to play. |
exit_to_title |
Return the game to the title screen. | N/A |
level_complete |
End the current sequence inside level sequences, do nothing otherwise. | N/A |
exit_game |
Exit the game to desktop. | N/A |
select_level |
Play a specific level (and reset inventory). | Level number to play. |
restart_level ¹ |
Restart the currently played level. | N/A |
story_so_far ¹ |
Play the movies and cutscenes up until the currently played level. | Save slot number to use |
¹ Tomb Raider 1 only.
Additional notes:
- All numbers (levels, cutscenes, ...) start with 0.
Level properties
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.
Show snippet
{
"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",
],
"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 above for details. | |
fog_end |
Double | Can be customized per level. See above 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 above for details. |
* Required property.
¹ Tomb Raider 1 only.
² Tomb Raider 2 only.
Sequences
The following describes each available game flow sequence type and the required parameters for each. Note that while this table is displayed in alphabetical order, care must be taken to define sequences in the correct order. Refer to the default game flow for examples.
Sequence | Parameter | Type | Description |
---|---|---|---|
loop_game |
N/A | Plays the main game loop. | |
level_complete |
N/A | Ends the current level and plays the next one, if available. | |
exit_to_title |
N/A | Returns to the title level. | |
level_stats |
N/A | Displays the end of level statistics for the current level. In a Gym level, this fades the screen to black. | |
total_stats |
path |
String | Displays the end of game statistics with the given picture file shown as a background. |
display_picture
|
path |
String |
Displays the specified picture for a fixed time.
Files that are needed to function only with a specific aspect ratio can
be placed in a directory adjacent to the main image, named according to
the aspect ratio – for example, 4x3/title.png or 16x10/title.png. The
game won't attempt to match these precisely; instead, it will select the
file with the aspect ratio closest to the game's viewport. The main image
designated by path is presumed to have a 16:9 aspect ratio
for this purpose, and as such there's no need for 16x9-specific
directory.This logic applies to all images. |
display_time |
Double | Number of seconds to display the picture for (default: 5). | |
fade_in_time |
Double | Number of seconds to do the fade-in animation, if enabled (default: 1). | |
fade_out_time |
Double | Number of seconds to do the fade-out animation, if enabled (default: 0.33). | |
loading_screen ¹ |
path |
String |
Shows a picture prior to loading a level. Functions identically to
display_picture , except these pictures can be
enabled/disabled by the user with the loading screen option in the config
tool.
|
display_time |
Double | ||
fade_in_time |
Double | ||
fade_out_time |
Double | ||
play_cutscene |
cutscene_id |
Integer |
Plays the specified cinematic level (from the cutscenes ).
|
play_fmv |
fmv_id |
String |
Plays the specified FMV. fmv_id must be a valid index into
the fmvs root key.
|
flip_map ¹ |
N/A | Triggers the flip map. | |
give_item
|
object_id |
Integer / String | Adds the specified item and quantity to Lara's inventory. |
quantity |
Integer | ||
add_secret_reward ² |
object_id |
Integer / String | Adds the specified item to the current level's list of rewards for collecting all secrets. |
quantity |
Integer | ||
mesh_swap ¹ |
object1_id |
Integer | Swaps the given mesh ID between the given objects. |
object2_id |
Integer | ||
mesh_id |
Integer | ||
play_music |
music_track |
Integer | Plays the given audio track. |
remove_ammo |
N/A |
Any combination of these sequences can be used to modify Lara's
inventory at the start of a level. There are a few simple points to note:
|
|
remove_weapons |
N/A | ||
remove_medipacks |
N/A | ||
remove_flares ² |
N/A | ||
remove_scions ¹ |
N/A | ||
set_cutscene_pos ¹ |
|
Integer | Sets the camera's position. |
|
Integer | ||
|
Integer | ||
set_cutscene_angle |
value |
Integer | Sets the camera's angle. |
setup_bacon_lara ¹ |
anchor_room |
Integer | Sets the room number in which Bacon Lara will be anchored to enable correct mirroring behaviour with Lara. |
enable_sunset ² |
N/A | Enables the sunset effect, like in Bartoli's Hideout. At present, this feature is hardcoded to gradually darken the game 40 minutes into playing a level. | |
set_lara_start_anim ² |
value |
Integer | Applies the selected animation to Lara when the level begins. This is used, for example, in the Offshore Rig of Tomb Raider II. |
disable_floor |
value |
Integer | Configures a specific height (with 256 representing 1 click and 1024 representing 1 sector) to define an abyss that will invariably lead to Lara's death if she falls into it. Additionally, it employs special rendering to ensure it isn't treated as solid ground. This is used, for example, in the Floating Islands of Tomb Raider II. |
¹ Tomb Raider 1 only.
² Tomb Raider 2 only.
Cutscenes
The cutscenes
section contains all the cinematic levels, used with the
play_cutscene
sequence. Its structure is identical to the levels
section.
Demos
The demos
section contains all the levels that can play a demo when the player
leaves the main inventory screen idle for a while or by using the /demo
command. For the demos to work, these levels need to have demo data built-in.
Aside from this requirement, this section works just like the levels
section.
Bonus levels
The game flow supports bonus levels, which are unlocked only when the player collects all secrets in the game's normal levels. These bonus levels behave just like normal levels, so you can include FMVs, cutscenes in-between and so on.
Statistics are maintained separately, so normal end-game statistics are shown once, and then separate bonus level statistics are shown on completion of those levels.
Following is a sample level configuration with three normal levels and two bonus levels. After the end-game credits are played following level 3, if the player has collected all secrets, they will then be taken to level 4. Otherwise, the game will exit to title.
Show example setup
{
"levels": [
{
// gym level definition
},
{
"path": "data/level1.phd",
"music_track": 57,
"sequence": [
{"type": "loop_game"},
{"type": "level_stats"},
{"type": "level_complete"},
],
},
{
"path": "data/level2.phd",
"music_track": 57,
"sequence": [
{"type": "loop_game"},
{"type": "level_stats"},
{"type": "level_complete"},
],
},
{
"path": "data/level3.phd",
"music_track": 57,
"sequence": [
{"type": "loop_game"},
{"type": "level_stats"},
{"type": "play_music", "music_track": 19},
{"type": "display_picture", "path": "data/end.pcx", "display_time": 7.5},
{"type": "display_picture", "path": "data/cred1.pcx", "display_time": 7.5},
{"type": "display_picture", "path": "data/cred2.pcx", "display_time": 7.5},
{"type": "display_picture", "path": "data/cred3.pcx", "display_time": 7.5},
{"type": "total_stats", "background_path": "data/install.pcx"},
{"type": "level_complete"},
],
},
{
"path": "data/bonus1.phd",
"type": "bonus",
"music_track": 57,
"sequence": [
{"type": "play_fmv", "fmv_path": "fmv/snow.avi"},
{"type": "loop_game"},
{"type": "play_cutscene", "cutscene_id": 0},
{"type": "level_stats"},
{"type": "level_complete"},
],
},
{
"path": "data/bonus2.phd",
"type": "bonus",
"music_track": 57,
"sequence": [
{"type": "loop_game"},
{"type": "level_stats"},
{"type": "play_music", "music_track": 14},
{"type": "total_stats", "background_path": "data/install.pcx"},
{"type": "exit_to_title"},
],
},
],
"cutscenes": [
{
"path": "data/bonuscut1.phd",
"music_track": 23,
"sequence": [
{"type": "set_cutscene_angle", "value": -23312},
{"type": "loop_game"},
],
},
],
}
Item drops
In the original Tomb Raider I, items dropped by enemies were hardcoded such that only specific enemies could drop, and the items and quantities that they dropped were immutable. This is no longer the case, with the game flow providing a mechanism to allow the majority of enemy types to carry and drop items. Note that this also means by default that the original enemies who did drop items will not do so unless the game flow has been configured as such.
Item drops can be defined in two ways. If enable_tr2_item_drops
is true
,
then custom level builders can add items directly to the level file, setting
their position to be the same as the enemies who should drop them.
For the original levels, enable_tr2_item_drops
is false
. Item drops are
instead defined in the item_drops
section of a level's definition by creating
objects with the following parameter structure. You can define at most one entry
per enemy, but that definition can have as many drop items as necessary (within
the engine's overall item limit).
Show example setup
{
"path": "data/example.phd",
"music_track": 57,
"item_drops": [
{"enemy_num": 17, "object_ids": [86]},
{"enemy_num": 50, "object_ids": [87]},
{"enemy_num": 12, "object_ids": [93, 93]},
{"enemy_num": 47, "object_ids": [111]},
],
"sequence": [
{"type": "loop_game"},
{"type": "level_stats"},
{"type": "level_complete"},
],
},
This translates as follows.
- Enemy #17 will drop the magnums
- Enemy #50 will drop the uzis
- Enemy #12 will drop two small medipacks
- Enemy #47 will drop puzzle 2
Parameter | Type | Description |
---|---|---|
enemy_num
|
Integer | The index of the enemy in the level's item list. |
object_ids
|
Integer / string array | A list of item types to drop. These items will spawn dynamically and do not need to be added to the level file. Duplicate IDs are permitted in the same array. |
You can also toggle convert_dropped_guns
in
global properties. When true
, if an enemy drops a gun
that Lara already has, it will be converted to the equivalent ammo. When
false
, the gun will always be dropped.
Enemy validity
All enemy types are permitted to carry and drop items. This includes regular enemies as well as TR1 Atlantean pods (objects 163, 181), TR1 centaur statues (object 161), and TR2 statues (objects 42, 44). For pods, the items will be allocated to the creature within (obviously empty pods are excluded).
Items dropped by flying or swimming creatures will fall to the ground (TR1 only).
For clarity, following is a list of all enemy type IDs which you can reference when building your game flow. The game flow will ignore drops for non-enemy type objects, and a suitable warning message will be produced in the log file.
TR1 | TR2 | ||
---|---|---|---|
Object ID | Name | Object ID | Name |
7 | Wolf | 15 | Dog |
8 | Bear | 16 | Masked Goon 1 |
9 | Bat | 17 | Masked Goon 2 |
10 | Crocodile | 18 | Masked Goon 3 |
11 | Alligator | 19 | Knife Thrower |
12 | Lion | 20 | Shotgun Goon |
13 | Lioness | 21 | Rat |
14 | Puma | 22 | Dragon Front |
15 | Ape | 25 | Shark |
16 | Rat | 26 | Eel |
17 | Vole | 27 | Big Eel |
18 | T-rex | 28 | Barracuda |
19 | Raptor | 29 | Scuba Diver |
20 | Flying mutant | 30 | Gunman Goon 1 |
21 | Grounded mutant (shooter) | 31 | Gunman Goon 2 |
22 | Grounded mutant (non-shooter) | 32 | Stick Wielding Goon 1 |
23 | Centaur | 33 | Stick Wielding Goon 2 |
24 | Mummy (Tomb of Qualopec) | 34 | Flamethrower Goon |
27 | Larson | 35 | Jellyfish |
28 | Pierre (not runaway) | 36 | Spider |
30 | Skate kid | 37 | Giant Spider |
31 | Cowboy | 38 | Crow |
32 | Kold | 39 | Tiger |
33 | Natla (items drop after second phase) | 40 | Marco Bartoli |
34 | Torso | 41 | Xian Spearman |
42 | Xian Spearman Statue | ||
43 | Xian Knight | ||
44 | Xian Knight | ||
45 | Yeti | ||
46 | Bird Monster | ||
47 | Eagle | ||
48 | Mercenary 1 | ||
49 | Mercenary 2 | ||
50 | Mercenary 3 | ||
52 | Black Snowmobile Driver | ||
214 | T-Rex |
Item validity
The following object types are capable of being carried and dropped. The game flow will ignore anything that is not in this list, and a suitable warning message will be produced in the log file.
TR1 | TR2 | ||
---|---|---|---|
Object ID | Name | Object ID | Name |
84 | Pistols | 135 | Pistols |
85 | Shotgun | 136 | Shotgun |
86 | Magnums | 137 | Automatic Pistols |
87 | Uzis | 138 | Uzis |
89 | Shotgun ammo | 139 | Harpoon Gun |
90 | Magnum ammo | 140 | M16 |
91 | Uzi ammo | 141 | Grenade Launcher |
93 | Small medipack | 142 | Pistol Clips |
94 | Large medipack | 143 | Shotgun Shells |
110 | Puzzle1 | 144 | Automatic Pistol Clips |
111 | Puzzle2 | 145 | Uzi Clips |
112 | Puzzle3 | 146 | Harpoons |
113 | Puzzle4 | 147 | M16 Clips |
126 | Lead bar | 148 | Grenades |
129 | Key1 | 149 | Small Medipack |
130 | Key2 | 150 | Large Medipack |
131 | Key3 | 152 | Flare |
132 | Key4 | 151 | Flares Box |
141 | Pickup1 | 174 | Puzzle Item 1 |
142 | Pickup2 | 175 | Puzzle Item 2 |
144 | Scion (à la Pierre) | 176 | Puzzle Item 3 |
177 | Puzzle Item 4 | ||
193 | Key 1 | ||
194 | Key 2 | ||
195 | Key 3 | ||
196 | Key 4 | ||
205 | Pickup Item 1 | ||
206 | Pickup Item 2 | ||
190 | Secret 1 | ||
191 | Secret 2 | ||
192 | Secret 3 |
Injections
Injections defined in the global game flow will by default be applied to each level. Individual levels can also specify their own specific injections to include. In that case, the global injections are merged with the level's when the level loads.
Individual levels can set inherit_injections
to false
and as a result they
will not use the global injection files. If those levels have their own
injections defined, only those will be used. And of course, if they have none
defined, nothing will be injected.
Disclaimer: Custom levels should not use the injections mechanism and instead should provide data that is already correct and consistent. Reports of bugs about injection files not working for custom levels will not be considered. 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 game flow will ignore referenced injection files that do not exist, but it is best practice to remove the references to maintain a clean game flow file.
Following is a summary of what each of the default injection files that are provided with the game achieves.
Injection file | Usage | Purpose |
---|---|---|
*_cameras.bin
|
TR1 | Injects positional adjustments for cameras that can otherwise cause visual issues, such as in Temple of the Cat. |
*_fd.bin
|
TR1, TR2 | Injects fixes for floor data issues in the original levels. Refer to the README for a full list of fixes. |
*_itemrots.bin
|
TR1, TR2 | Injects rotations on pickup items so they make more visual sense when using the 3D pickups option. |
*_meshfixes.bin
|
TR1 | Injects miscellaneous mesh adjustments for objects, such as in Obelisk of Khamoon to avoid z-fighting. |
*_pickup_meshes.bin
|
TR1, TR2 | Injects mesh edits to change the scale of various pickup models, such as the keys in St. Francis' Folly or the Prayer Wheel in Barkhang Monastry. |
*_sfx.bin
|
TR1, TR2 | Injects various SFX fixes or additions, such as the PSX Uzi SFX in TR1, or fixing the silent enemies in TR2's water levels. |
*_skybox.bin
|
TR1 | Injects a predefined skybox model into specific levels. |
*_textures.bin
|
TR1 | Injects fixes for texture issues in the original levels, such as gaps in the walls or wrongly colored models. Refer to the README for a full list of fixes. |
boat_bits.bin
|
TR2 | Injects a model in slot `O_BOAT_BITS` (221) which is used to show the boat exploding when it crosses mines. |
backpack.bin
|
TR1 | Injects mesh edits for Lara's backback, such that it becomes shallower. This is only applied when the braid is enabled, to avoid the braid merging with the backpack. The different files are needed to address mesh structure differences between cutscene and normal levels. |
backpack_cut.bin
|
||
braid.bin
|
TR1 | Injects a braid when the option for it is enabled. This also edits Lara's head meshes (object 0 and object 4) to make the braid fit better. A golden braid is also provided for the Midas Touch animation. Again, different files are needed to cater for mesh differences between cutscene and normal levels. The Lost Valley file comprises a head mesh edit for object 5 only. |
braid_cut1.bin
|
||
braid_cut2_cut4.bin
|
||
braid_valley.bin
|
||
bubbles.bin
|
TR1 | Injects replacement sprite textures for Lara's underwater bubble sprites, which are cut off in OG. |
cistern_plants.bin
|
TR1 | This disables the animation on sprite ID 193 in The Cistern and Tomb of Tihocan. |
khamoon_mummy.bin
|
TR1 | Injects the mummy in room 25 of City of Khamoon, which is present in the PS1 version but not the PC. |
lara_animations.bin
|
TR1 | Injects several animations, state changes and commands for Lara, such as responsive jumping, jump-twist, somersault, underwater roll, and wading. |
lara_gym_guns.bin
|
TR1 | Injects all of Lara's weapons and weapon animations in TR1's gym level. |
explosion.bin
|
TR1 | Injects explosion sprites for certain console commands. |
font.bin
|
TR1, TR2 | Injects replacement font sprites to support more characters than OG. |
guardian_death_commands.bin
|
TR2 | Injects an animation command for the bird guardian to end the level on the final frame of its death animation. The original hard-coded end-level behaviour is removed in TR2X. |
mines_pushblocks.bin
|
TR1 | Injects animation command data for pushblock types 2, 3 and 4 to restore the missing scraping SFX when pulling these blocks. |
pickup_aid.bin
|
TR1 | Injects a sprite sequence similar to the Midas twinkle effect, which is used when the option for pickup aids is enabled. Custom levels should define a suitable sprite sequence in slot 185. |
photo.bin
|
TR1, TR2 | Injects camera shutter sound effect for the photo mode, needed only for the cutscene levels. |
purple_crystal.bin
|
TR1 | Injects a replacement savegame crystal model to match the PS1 style. |
scion_collision.bin
|
TR1 | Increases the collision radius on the (targetable) Scion such that it can be shot with the shotgun. |
seaweed_collision.bin
|
TR2 | Fixes the seaweed in Living Quarters blocking Lara from exiting the water. |
FMVs
The FMVs section of the document defines how to play video content. 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 an FMV.
Show snippet
{
"path": "data/example.avi",
}
Property | Type | Description | |
---|---|---|---|
path
|
String* | The path to the FMV's video file. |
* Required property.
User Configuration
TRX ships with a configuration tool to allow users to adjust game settings to
their taste. This tool writes to cfg\TR1X.json5
and cfg\TR2X.json5
. As a
level builder, you may however wish to enforce some settings to match how your
level is designed.
As an example, let's say you do not wish to add save crystals to your level, and
as a result you wish to prevent the player from enabling that option in the
config tool. To achieve this, open cfg\TR1X_gameflow.json5
in a suitable text
editor and add the following.
"enforced_config" : {
"enable_save_crystals" : false,
}
This means that the game will enforce your chosen value for this particular config setting. If the player launches the config tool, the option to toggle save crystals will be greyed out.
You can add as many settings within the enforced_config
section as needed.
Refer to the key names within cfg\TR1X.json5
and cfg\TR2X.json5
for
reference.
Note that you do not need to ship a full configuration with your level, and indeed it is not recommended to do so if you have, for example, your own custom keyboard or controller layouts defined.
If you do not have any requirement to enforce settings, you can omit the
enforced_config
section from your game flow altogether.
Water colors
Game | Color (hex) | Color (array) | Usage |
---|---|---|---|
TR1 | ![]() #99B2FF |
[0.6, 0.7, 1.0] |
original DOS version color |
![]() #72FFFF |
[0.45, 1.0, 1.0] |
default TombATI color | |
TR2 | ![]() #80DFFF |
[0.5, 0.875, 1.0] |
default PC hardware renderer color |
![]() #AAAAFF |
[0.66, 0.66, 1.0] |
default PC software renderer color | |
![]() #CCFF80 |
[0.8, 1.0, 0.5] |
Venice, Bartoli's Hideout and Opera House (PS1) | |
![]() #CCFF99 |
[0.8, 1.0, 0.6] |
Temple of Xian (PS1) | |
![]() #CCFFCC |
[0.8, 1.0, 0.8] |
Floating Islands and Dragon's Lair (PS1) | |
![]() #B2E5E5 |
[0.7, 0.9, 0.9] |
The Great Wall and Tibetan Foothills (PS1) | |
![]() #80FFFF |
[0.5, 1.0, 1.0] |
All other PS1 levels |