Both sides previous revisionPrevious revisionNext revision | Previous revision |
trs:scripting_tr2_tr3 [2024/12/30 01:22] – zdimension | trs:scripting_tr2_tr3 [2024/12/30 01:23] (current) – remove remnant from original TRosettaStone zdimension |
---|
===== Overview ===== | ===== Overview ===== |
| |
The internal gameflow, which levels come in what order, what item(s) Lara has at the beginning of each level, the filenames of the level and cut-scene files, all the visible text (e.g. “Save Game,” “Rusty Key,” etc.), and various other options are controlled by a script file called ''<nowiki>TOMBPC.DAT</nowiki>'' /''<nowiki>TOMBPSX.DAT</nowiki>''. The scripts were compiled using a utility known as ''<nowiki>GAMEFLOW.EXE</nowiki>'' which was distributed by Eidos in the German release of Tomb Raider II Gold. Both TR2 and TR3 use these script files. From both games the format remained unchanged. TR1’s gameflow is hardcoded thus there is no external file controlling this resulting in loss of flexibility. | The internal gameflow, which levels come in what order, what item(s) Lara has at the beginning of each level, the filenames of the level and cut-scene files, all the visible text (e.g. “Save Game,” “Rusty Key,” etc.), and various other options are controlled by a script file called ''%%TOMBPC.DAT%%''/''%%TOMBPSX.DAT%%''. The scripts were compiled using a utility known as ''%%GAMEFLOW.EXE%%'' which was distributed by Eidos in the German release of Tomb Raider II Gold. Both TR2 and TR3 use these script files. From both games the format remained unchanged. TR1’s gameflow is hardcoded thus there is no external file controlling this resulting in loss of flexibility. |
<code cpp> | <code cpp> |
uint32_t Version; // The Script Version (Always 3 for TR2/3) | uint32_t Version; // The Script Version (Always 3 for TR2/3) |
TPCStringArray[NumLevels] PickupStrings[2]; | TPCStringArray[NumLevels] PickupStrings[2]; |
TPCStringArray[NumLevels] KeyStrings[4]; | TPCStringArray[NumLevels] KeyStrings[4]; |
| |
</code> | </code> |
| |
==== String arrays ==== | ==== String arrays ==== |
| |
uint8_t Data[TotalSize]; // Strings block, usually encrypted (XOR-ed with XORKey, see above) | uint8_t Data[TotalSize]; // Strings block, usually encrypted (XOR-ed with XORKey, see above) |
} | } |
| |
</code> | </code> |
| {{anchor:accents}} |
| <note tip> |
| In non-English versions of TR2-3, accented characters are written using "escape" characters so that everything can be written in standard ASCII, here are the 4 escape characters: |
| |
{{anchor:accents}} <note tip> In non-English versions of TR2-3, accented characters are written using "escape" characters so that everything can be written in standard ASCII, here are the 4 escape characters: | ^ Accent ^ Code ^ becomes ^ |
| | Acute | '')e'' | ''é'' | |
^ Accent ^ Code ^ becomes | | | Circumflex | ''(e'' | ''ê'' | |
|Acute|'')e'' |''é'' | | | Grave | ''$e'' | ''è'' | |
|Circumflex|''(e'' |''ê'' | | | Diaeresis | ''~e'' | ''ë'' | |
|Grave|''$e'' |''è'' | | |
|Diaeresis|''~e'' |''ë'' | | |
| |
The following non-ASCII characters are also replaced: | The following non-ASCII characters are also replaced: |
| |
^ Character ^^ becomes | | ^ Character ^^ becomes ^ |
|Eszett (German)|''ß'' |''='' | | | Eszett (German) | ''ß'' | ''='' | |
| |
There are also some exceptions (strings that were badly encoded by Core): | There are also some exceptions (strings that were badly encoded by Core): |
| |
^ String ^ becomes | | ^ String ^ becomes ^ |
| Red)marrer un niveau \\ ("e" missing after parenthesis, '')e'' implied) |Redémarrer un niveau| | | Red)marrer un niveau \\ ("e" missing after parenthesis, '')e'' implied) | Redémarrer un niveau | |
</note> | </note> |
| |
===== PSX FMV Info ===== | ===== PSX FMV Info ===== |
| |
uint32_t End; // End frame | uint32_t End; // End frame |
}; | }; |
| |
</code> | </code> |
| This specific info is exclusive to ''%%TOMBPSX.DAT%%''. |
| |
This specific info is exclusive to ''<nowiki>TOMBPSX.DAT</nowiki>''. | |
===== Script Flags ===== | ===== Script Flags ===== |
| |
^ Bit ^ Hex ^ Name ^ Description | | ^ Bit ^ Hex ^ Name ^ Description ^ |
| 0 | ''<nowiki>0x01</nowiki>'' |DemoVersion | Indicates that the game is a demo distribution. | | | 0 | ''%%0x01%%'' | DemoVersion | Indicates that the game is a demo distribution. | |
| 1 | ''<nowiki>0x02</nowiki>'' |TitleDisabled | Indicates that the game has no Title Screen. | | | 1 | ''%%0x02%%'' | TitleDisabled | Indicates that the game has no Title Screen. | |
| 2 | ''<nowiki>0x04</nowiki>'' |CheatModeCheckDisabled | Indicates that the game does not look for the cheat sequence keystrokes and events. | | | 2 | ''%%0x04%%'' | CheatModeCheckDisabled | Indicates that the game does not look for the cheat sequence keystrokes and events. | |
| 3 | ''<nowiki>0x08</nowiki>'' |NoInputTimeout | Indicates that the game waits forever if there is no input (won’t enter demo mode). | | | 3 | ''%%0x08%%'' | NoInputTimeout | Indicates that the game waits forever if there is no input (won’t enter demo mode). | |
| 4 | ''<nowiki>0x10</nowiki>'' |LoadSaveDisabled | Indicates that the game does not allow save games. | | | 4 | ''%%0x10%%'' | LoadSaveDisabled | Indicates that the game does not allow save games. | |
| 5 | ''<nowiki>0x20</nowiki>'' |ScreenSizingDisabled | Indicates that the game does not allow screen resizing (with the function keys). | | | 5 | ''%%0x20%%'' | ScreenSizingDisabled | Indicates that the game does not allow screen resizing (with the function keys). | |
| 6 | ''<nowiki>0x40</nowiki>'' |LockoutOptionRing | Indicates that the user has no access to the Option Ring while playing the game. | | | 6 | ''%%0x40%%'' | LockoutOptionRing | Indicates that the user has no access to the Option Ring while playing the game. | |
| 7 | ''<nowiki>0x80</nowiki>'' |DozyCheatEnabled | Indicates that the game has the DOZY cheat enabled (flag only set in the final build of TR2 on PSX, but has no effect in-game). | | | 7 | ''%%0x80%%'' | DozyCheatEnabled | Indicates that the game has the DOZY cheat enabled (flag only set in the final build of TR2 on PSX, but has no effect in-game). | |
| 8 | ''<nowiki>0x100</nowiki>'' |UseXor | Indicates that a cypher byte was used to encrypt the strings in the script file, and is stored in the XorKey field. | | | 8 | ''%%0x100%%'' | UseXor | Indicates that a cypher byte was used to encrypt the strings in the script file, and is stored in the XorKey field. | |
| 9 | ''<nowiki>0x200</nowiki>'' |GymEnabled | Is Gym available on title screen. | | | 9 | ''%%0x200%%'' | GymEnabled | Is Gym available on title screen. | |
| 10 | ''<nowiki>0x400</nowiki>'' |SelectAnyLevel | Enables level select when New Game is selected. | | | 10 | ''%%0x400%%'' | SelectAnyLevel | Enables level select when New Game is selected. | |
| 11 | ''<nowiki>0x800</nowiki>'' |EnableCheatCode | It apparently has no effect on the PC game. | | | 11 | ''%%0x800%%'' | EnableCheatCode | It apparently has no effect on the PC game. | |
===== Script Language ===== | ===== Script Language ===== |
| |
* **3** — American | * **3** — American |
* **4** — Japanese | * **4** — Japanese |
{{:icons:tr3.png?nolink&}}TR3 only: | |
| |
* **5** — Italian | {{:icons:tr3.png?nolink&}} TR3 only: |
* **6** — Spanish | |
| * **5** — Italian |
| * **6** — Spanish |
===== Script Sequencing & Opcodes/Operands ===== | ===== Script Sequencing & Opcodes/Operands ===== |
| |
Each script has “sequence information”, Opcodes and Operands are all stored as ''<nowiki>uint16_t</nowiki>''. Sequences contain a set of commands to execute where an additional value (operand) is usually passed as a parameter to the function the command needs to call. <note>If a level is a demo level, its level ID will be 1024 higher than a //normal// level ID.</note> | Each script has “sequence information”, Opcodes and Operands are all stored as ''%%uint16_t%%''. Sequences contain a set of commands to execute where an additional value (operand) is usually passed as a parameter to the function the command needs to call. |
| <note>If a level is a demo level, its level ID will be 1024 higher than a //normal// level ID.</note> |
| |
==== Script Opcodes ==== | ==== Script Opcodes ==== |
| 9 | ''<nowiki>End</nowiki>'' | Close script sequence. | | | | 9 | ''<nowiki>End</nowiki>'' | Close script sequence. | | |
| 10 | ''<nowiki>Track</nowiki>'' | Play Soundtrack (it precedes opcodes of associated levels). | [[#tr2_ids|Track ID]] | | | 10 | ''<nowiki>Track</nowiki>'' | Play Soundtrack (it precedes opcodes of associated levels). | [[#tr2_ids|Track ID]] | |
| 11 | ''<nowiki>Sunset</nowiki>'' | Gradually dim all lights in rooms with ''LightMode'' set to ''sunset'' (3). Used in Bartoli's Hideout. | | | | 11 | ''<nowiki>Sunset</nowiki>'' | Gradually dim all lights in rooms with ''LightMode'' set to ''sunset'' (3). Used in Bartoli's Hideout. | | |
| 12 | ''<nowiki>LoadPic</nowiki>'' | {{:icons:tr2.png?nolink&|TR2 only}}{{:icons:tr3.png?nolink&|TR3 only}}Show chapter screen on TR2 (**PSX only** ) and TR3. On TR2 PC, it's hardcoded to do nothing. | Picture ID | | | 12 | ''<nowiki>LoadPic</nowiki>'' | {{:icons:tr2.png?nolink&|TR2 only}}{{:icons:tr3.png?nolink&|TR3 only}}Show chapter screen on TR2 (**PSX only** ) and TR3. On TR2 PC, it's hardcoded to do nothing. | Picture ID | |
| 13 | ''<nowiki>DeadlyWater</nowiki>'' | Not used anywhere in the game code. Used in Temple of Xian. Maybe not-implemented ancestor of TR3 ''<nowiki>Death_by_Drowning</nowiki>'' ? | | | | 13 | ''<nowiki>DeadlyWater</nowiki>'' | Not used anywhere in the game code. Used in Temple of Xian. Maybe not-implemented ancestor of TR3 ''<nowiki>Death_by_Drowning</nowiki>'' ? | | |
| 14 | ''<nowiki>RemoveWeapons</nowiki>'' | Lara starts the level with no weapons. | | | | 14 | ''<nowiki>RemoveWeapons</nowiki>'' | Lara starts the level with no weapons. | | |
| 15 | ''<nowiki>GameComplete</nowiki>'' | End of game, show the final statistics and start the credits sequence. | | | | 15 | ''<nowiki>GameComplete</nowiki>'' | End of game, show the final statistics and start the credits sequence. | | |
| 16 | ''<nowiki>CutAngle</nowiki>'' | Match the North-South orientation of the Room Editor and the North-South orientation of the 3D animated characters from a CAD application. | Horizontal rotation ($\text{angle in degrees} \cdot 65536 / 360$) | | | 16 | ''<nowiki>CutAngle</nowiki>'' | Match the North-South orientation of the Room Editor and the North-South orientation of the 3D animated characters from a CAD application. | Horizontal rotation ($\text{angle in degrees} \cdot 65536 / 360$) | |
| 17 | ''<nowiki>NoFloor</nowiki>'' | Lara dies when her feet reach the given depth. If falling, 4 to 5 extra blocks are added to Depth. | Depth ($\text{blocks} \times 1024$), relative to where Lara starts the level | | | 17 | ''<nowiki>NoFloor</nowiki>'' | Lara dies when her feet reach the given depth. If falling, 4 to 5 extra blocks are added to Depth. | Depth ($\text{blocks} \times 1024$), relative to where Lara starts the level | |
| 18 | ''<nowiki>StartInv</nowiki>'' / ''<nowiki>Bonus</nowiki>'' | Give item to lara at level-start (''<nowiki>StartInv</nowiki>'' ) or at all-secrets-found (''<nowiki>Bonus</nowiki>''). | [[#item_ids|Item ID]] | | | 18 | ''<nowiki>StartInv</nowiki>'' / ''<nowiki>Bonus</nowiki>'' | Give item to lara at level-start (''<nowiki>StartInv</nowiki>'' ) or at all-secrets-found (''<nowiki>Bonus</nowiki>''). | [[#item_ids|Item ID]] | |
| 19 | ''<nowiki>StartAnim</nowiki>'' | Lara starts the level with the given animation. | Animation ID | | | 19 | ''<nowiki>StartAnim</nowiki>'' | Lara starts the level with the given animation. | Animation ID | |
| 20 | ''<nowiki>Secrets</nowiki>'' | If zero, the level does not account for secrets. Non-zero value means the level must be accounted for secrets. || | | 20 | ''<nowiki>Secrets</nowiki>'' | If zero, the level does not account for secrets. Non-zero value means the level must be accounted for secrets. || |
| 22 | ''<nowiki>RemoveAmmo</nowiki>'' | Lara starts the level without ammunition or medi packs. | | | | 22 | ''<nowiki>RemoveAmmo</nowiki>'' | Lara starts the level without ammunition or medi packs. | | |
| |
The correct way to parse a sequence is to first read a ''<nowiki>uint16_t</nowiki>'' opcode specifying what this command within the sequence does. In reference to the list above, certain commands MUST have an additional ''<nowiki>uint16_t</nowiki>'' read from the sequence data directly after the opcode that’s the pairing operand to this opcode. Not all opcodes have an operand so this must be done correctly. The original games execute each sequence command 1 by 1 until it reaches ''<nowiki>End</nowiki>'' (9), where it then runs the next sequence. | The correct way to parse a sequence is to first read a ''<nowiki>uint16_t</nowiki>'' opcode specifying what this command within the sequence does. In reference to the list above, certain commands MUST have an additional ''<nowiki>uint16_t</nowiki>'' read from the sequence data directly after the opcode that’s the pairing operand to this opcode. Not all opcodes have an operand so this must be done correctly. The original games execute each sequence command 1 by 1 until it reaches ''<nowiki>End</nowiki>'' (9), where it then runs the next sequence. |
| |
| {{anchor:item_ids}} |
| |
{{anchor:item_ids}} | |
| |
==== Opcode-18 StartInv and Bonus ==== | ==== Opcode-18 StartInv and Bonus ==== |
(repeat means give another) | (repeat means give another) |
| |
By default, the item is given at level start (''<nowiki>StartInv</nowiki>''). Adding 1000 to the item ID means it will be given when all secrets are found (''<nowiki>Bonus</nowiki>''). | By default, the item is given at level start (''%%StartInv%%''). Adding 1000 to the item ID means it will be given when all secrets are found (''%%Bonus%%''). |
| |
^ ID ^ Tomb Raider 2 ^ Tomb Raider 3 | | ^ ID ^ Tomb Raider 2 ^ Tomb Raider 3 ^ |
| 0 | Pistols || | | 0 | Pistols || |
| 1 | Shotgun || | | 1 | Shotgun || |
| 2 | Automatic pistols | Desert Eagle | | | 2 | Automatic pistols | Desert Eagle | |
| 3 | Uzis || | | 3 | Uzis || |
| 4 | Harpoon gun || | | 4 | Harpoon gun || |
| 5 | M-16 | MP5 | | | 5 | M-16 | MP5 | |
| 6 | Grenade launcher | Rocket launcher | | | 6 | Grenade launcher | Rocket launcher | |
| 7 | Pistol clip (no effect, infinite by default) | Grenade launcher | | | 7 | Pistol clip (no effect, infinite by default) | Grenade launcher | |
| 8 | Shotgun-shell box (adds 2 shells) | Pistol clip (no effect, infinite by default) | | | 8 | Shotgun-shell box (adds 2 shells) | Pistol clip (no effect, infinite by default) | |
| 9 | Automatic-pistol clip (adds 2 shells) | Shotgun-shell box (adds 2 shells) | | | 9 | Automatic-pistol clip (adds 2 shells) | Shotgun-shell box (adds 2 shells) | |
| 10 | Uzi clip (adds 2 shells) | Desert eagle clip (adds 5 shells) | | | 10 | Uzi clip (adds 2 shells) | Desert eagle clip (adds 5 shells) | |
| 11 | Harpoon bundle (adds 2 harpoons) | Uzi clip (adds 2 shells) | | | 11 | Harpoon bundle (adds 2 harpoons) | Uzi clip (adds 2 shells) | |
| 28 | / | Key 4 | | | 28 | / | Key 4 | |
| 29 | / | Save crystal | | | 29 | / | Save crystal | |
| |
{{anchor:tr2_ids}} | {{anchor:tr2_ids}} |
| |
==== Tomb Raider 2 Identifications ==== | ==== Tomb Raider 2 Identifications ==== |
| |
<note> <color blue>TR2 only information here. These lists are virtually colored blue.</color> </note> | |
| |
=== FMV IDs === | === FMV IDs === |
| |
* 0 — LOGO (everybody’s corporate logos) | * 0 — LOGO (everybody’s corporate logos) |
* 1 — ANCIENT (monks vs. dragon) | * 1 — ANCIENT (monks vs. dragon) |
* 6 — JEEP (Lara steals it and outruns Bartoli’s goons) | * 6 — JEEP (Lara steals it and outruns Bartoli’s goons) |
* 7 — END (Lara escaping the collapsing lair) | * 7 — END (Lara escaping the collapsing lair) |
| |
=== Cutscene IDs === | === Cutscene IDs === |
| |
* 0 — CUT1 (At the end of the Great Wall) | * 0 — CUT1 (At the end of the Great Wall) |
* 1 — CUT2 (Lara the stowaway) | * 1 — CUT2 (Lara the stowaway) |
* 2 — CUT3 (Bartoli vs. goon) | * 2 — CUT3 (Bartoli vs. goon) |
* 3 — CUT4 (Bartoli stabs himself) | * 3 — CUT4 (Bartoli stabs himself) |
| |
=== Soundtrack IDs === | === Soundtrack IDs === |
| * 002 -- Cutscene Gates |
* 002 – Cutscene Gates | * 003 -- Cutscene Gates |
* 003 – Cutscene Gates | * 004 -- Cutscene Plane |
* 004 – Cutscene Plane | * 005 -- Cutscene Monk |
* 005 – Cutscene Monk | * 006 -- Home block begin |
* 006 – Home block begin | |
* 007 | * 007 |
* 008 | * 008 |
* 009 | * 009 |
* 010 | * 010 |
* 011 | * 011 |
* 024 | * 024 |
* 025 | * 025 |
* 026 – Lara shower (Endgame) | * 026 -- Lara shower (Endgame) |
* 027 – Lara shower (Endgame) | * 027 -- Lara shower (Endgame) |
* 028 – Dragon death | * 028 -- Dragon death |
* 029 – Home - addon | * 029 -- Home - addon |
* 030 – Cutscene Bartoli stab | * 030 -- Cutscene Bartoli stab |
* 031 – Caves ambience | * 031 -- Caves ambience |
* 032 – Water ambience | * 032 -- Water ambience |
* 033 – Wind ambience | * 033 -- Wind ambience |
* 034 – Pulse ambience | * 034 -- Pulse ambience |
* 035 – Danger 1 | * 035 -- Danger 1 |
* 036 – Danger 2 | * 036 -- Danger 2 |
* 037 – Danger 3 | * 037 -- Danger 3 |
* 038 – Sacred | * 038 -- Sacred |
* 039 – Awe | * 039 -- Awe |
* 040 – Venice Violins | * 040 -- Venice Violins |
* 041 – End level | * 041 -- End level |
* 042 – Mystical | * 042 -- Mystical |
* 043 – Revelation | * 043 -- Revelation |
* 044 – Careful | * 044 -- Careful |
* 045 – Guitar TR | * 045 -- Guitar TR |
* 046 – Drama | * 046 -- Drama |
* 047 – Secret theme | * 047 -- Secret theme |
* 048 – It's coming! | * 048 -- It's coming! |
* 049 – It's coming 2! | * 049 -- It's coming 2! |
* 050 – Warning! | * 050 -- Warning! |
* 051 – Warning 2! | * 051 -- Warning 2! |
* 052 – Techno TR | * 052 -- Techno TR |
* 053 – Percussion | * 053 -- Percussion |
* 054 – Pads | * 054 -- Pads |
* 055 – Super-revelation | * 055 -- Super-revelation |
* 056 – Hmm… | * 056 -- Hmm... |
* 057 – Long way up | * 057 -- Long way up |
* 058 – Industrial ambience | * 058 -- Industrial ambience |
* 059 – Spooky ambience | * 059 -- Spooky ambience |
* 060 – Barkhang theme | * 060 -- Barkhang theme |
* 061 – Super-revelation short | * 061 -- Super-revelation short |
* 062 – Monk beaten | * 062 -- Monk beaten |
* 063 – Home sweet home | * 063 -- Home sweet home |
* 064 – Main theme | * 064 -- Main theme |
* 065 – Dummy track | * 065 -- Dummy track |
| |
==== Tomb Raider 3 Identifications ==== | ==== Tomb Raider 3 Identifications ==== |
| |
=== Level IDs === | === Level IDs === |
| |
* 0 – Lara's House (''house.TR2'') | * 0 – Lara's House (''house.TR2'') |
* 1 — Jungle (''jungle.TR2'') | * 1 — Jungle (''jungle.TR2'') |
* 19 — Meteorite Cavern (''chamber.TR2'') | * 19 — Meteorite Cavern (''chamber.TR2'') |
* 20 — All Hallows (''stpaul.TR2'') | * 20 — All Hallows (''stpaul.TR2'') |
| |
=== FMV IDs === | === FMV IDs === |
| |
* 0 — LOGO (everybody’s corporate logos) | * 0 — LOGO (everybody’s corporate logos) |
* 1 — INTR (“The Meteorite”) | * 1 — INTR (“The Meteorite”) |
* 3 — CRSH (Plane crash, before the Antartica levels) | * 3 — CRSH (Plane crash, before the Antartica levels) |
* 4 — ENDGAME | * 4 — ENDGAME |
| |
=== Cutscene IDs === | === Cutscene IDs === |
| |
* 0 — CUT6 (Lara at Tony's camp) | * 0 — CUT6 (Lara at Tony's camp) |
* 1 — CUT9 (Lara meets Tony again) | * 1 — CUT9 (Lara meets Tony again) |
===== Other Script Commands ===== | ===== Other Script Commands ===== |
| |
''<nowiki>FirstOption</nowiki>'', ''<nowiki>TitleReplace</nowiki>'', ''<nowiki>OnDeathDemoMode</nowiki>'', ''<nowiki>OnDeathInGame</nowiki>'', ''<nowiki>OnDemoInterrupt</nowiki>'' and ''<nowiki>OnDemoEnd</nowiki>'' can also be setup to perform specific actions. For example, ''<nowiki>OnDeathInGame</nowiki>'' will be set to "0x500" which loads the title screen when Lara dies in-game. | ''<nowiki>FirstOption</nowiki>'', ''<nowiki>TitleReplace</nowiki>'', ''<nowiki>OnDeathDemoMode</nowiki>'', ''<nowiki>OnDeathInGame</nowiki>'', ''<nowiki>OnDemoInterrupt</nowiki>'' and ''<nowiki>OnDemoEnd</nowiki>'' can also be setup to perform specific actions. For example, ''<nowiki>OnDeathInGame</nowiki>'' will be set to "0x500" which loads the title screen when Lara dies in-game. |
| |
^Name^Code^Operand^Description| | ^Name^Code^Operand^Description| |
|**Level** |''0x00000000'' |Level|Load specified level (0 means Lara's Home (or do nothing, if in a demo), 1 means first level (//Great Wall// or //Jungle//), 2 means second level)| | |**Level** |''0x00000000'' |Level|Load specified level (0 means Lara's Home (or do nothing, if in a demo), 1 means first level (//Great Wall// or //Jungle//), 2 means second level)| |
|**SavedGame** |''0x00000100'' |Number between in [0, 15]|Load specified savegame file (load file ''savegame.N'' where N is the operand)| | |**SavedGame**|''0x00000100'' |Number between in [0, 15]|Load specified savegame file (load file ''savegame.N'' where N is the operand)| |
|**Cutscene** |''0x00000200'' |Cutscene ID|Play specified cutscene| | |**Cutscene**|''0x00000200'' |Cutscene ID|Play specified cutscene| |
|**FMV** |''0x00000300'' |FMV ID|Play specified FMV| | |**FMV**|''0x00000300'' |FMV ID|Play specified FMV| |
|**Demo** |''0x00000400'' |None|Load a **random** demo level| | |**Demo** |''0x00000400'' |None|Load a **random** demo level| |
|**ExitToTitle** |''0x00000500'' | ::: |Exit to Title Screen (or do action specified in ''TitleReplace'' if ''TitleDisabled'' flag is set)| | |**ExitToTitle** |''0x00000500'' |:::|Exit to Title Screen (or do action specified in ''TitleReplace'' if ''TitleDisabled'' flag is set)| |
|**ExitGame** |''0x00000700'' | ::: |Exit the game| | |**ExitGame** |''0x00000700'' |:::|Exit the game| |
| (anything else) |||Exit the game| | | (anything else) |||Exit the game| |
| |
Commands with operand are used like this: if you want to load the 2nd level, then you are going to do ''0x000'' (//Level//) + 2 which gives ''0x003''. | Commands with operand are used like this: if you want to load the 2nd level, then you are going to do ''0x000'' (//Level//) + 2 which gives ''0x003''. |
| |
<note tip>In the original TOMBPC.DAT/TOMBPSX.DAT files, the value ''0xFFFFFFFF'' is often used by Core in fields to denotate that //it should not happen//. For example, in the //standard// (not demo) games' scripts, the ''TitleReplace'' field contains the value ''0xFFFFFFFF'' (which, as mentioned before, will crash-exit the game quietly) because this field should never be used, as the ''TitleDisabled'' flag should never be set in standard games.</note> | |
| |
| <note tip>In the original TOMBPC.DAT/TOMBPSX.DAT files, the value ''0xFFFFFFFF'' is often used by Core in fields to denotate that //it should not happen//. For example, in the //standard// (not demo) |
| games' scripts, the ''TitleReplace'' field contains the value ''0xFFFFFFFF'' (which, as mentioned before, will crash-exit the game quietly) because this field should never be used, as the ''TitleDisabled'' flag should never be set in standard games.</note> |