This page describes fixed files retrieved and loaded by the game, used internally for mechanics and data sources that end up as the basic data tables and resources that are consumed at runtime.
Keep in mind that while these hashcodes, loading order and format are all set in stone, the files themselves (as well as their names and contents) are not, other than their general structure.
The files are listed in chronological order since game startup, unless otherwise indicated.
Game boot[]
Hidden loading bar and nothing else gets rendered.
HT_File_F01_Bootup
|
./_bin_PC/F01_Boot.edb
|
Sphinx\Grafix\Maps\Misc\FE_Bootup.elf
|
One bootup file for all languages, even if there are multiple ELFs they decided to use the English version.
After this, we also need to load the language-dependent pickups file; which includes the main font and the memcard dialog. Because every language has its own font, with a different set of Unicode glyphs, we need it now.
HT_File_O01_PickUps
|
./_bin_PC/O01_Pick.edb
|
Grafix\Maps\Misc\FE_Misc.ELF
|
At this time we also start loading the text file, at least the section zero for the memcard text. Keep in mind that this file is pretty big, and only the basic header and the needed sections are actually relocated on RAM. Everything else persists on disc.
HT_File_Text
|
./_bin_PC/Text.edb
|
Section 0 | Sphinx\Grafix\Maps\Misc\Text.ELF
|
Black until now. After all these files are synchronously loaded HT_Script_Bootup_MainScript
is retrieved and starts showing. This script has a special HudScript_Button
scripted event of type HT_HudScriptButton_Memcard_StartupCheck
that will wait for the memcard to be ready before proceeding. The button sets the next chained script to HT_Script_Bootup_LegalScreen
, that will become active when reaching the HudScript_Jump
event at the end of the timeline. So the only hardcoded part is that this main script is loaded, most of the other events are configurable.
The initial legal screen script (HT_Script_Bootup_LegalScreen
) should start after the HudScript jump, the game waits for the legal script to start before proceeding any further and starting the hidden loading screen, all the previous synchronous files should be loaded at this point.
One-off static data initialisation[]
All these spreadsheets and resources are asynchronously loaded, their data imported and their EDB files unloaded, all this is only done once while the legal screen is showing. It won't fade out until all these files are processed.
HT_File_ContextActions
|
OO_Actio.edb
|
Maps\Misc\OO_Actions.elf
| |
HT_File_InventoryItems
|
OO_Inven.edb
|
Maps\Misc\oo_InventoryItems.elf
| |
HT_File_LoadScreensGC
|
OO_LSGC.edb
|
HT_SpreadSheet_LoadScreensGC
|
Maps\Misc\OO_LoadScreenGC.elf
|
HT_File_LevelData
|
oo_ldata.edb
|
Maps\Misc\OO_LevelData.elf
| |
HT_File_ShopPrices
|
oo_shopp.edb
|
Maps\Misc\oo_ShopPrices.elf
| |
HT_File_CharacterSounds
|
oo_chars.edb
|
Maps\Misc\OO_CharSnd.elf
| |
HT_File_Hud
|
oo_Hud.edb
|
Animations\Scripts\oo_Hud.elf
| |
HT_File_BOS_Obj
|
oo_BosOb.edb
|
Animations\Scripts\oo_BosObj.elf
| |
HT_File_MonsterTweaks
|
MonsterT.edb
|
Animations\MonsterTweaks.elf
| |
HT_File_SurfaceTypes
|
Surfaces.edb
|
Maps\Misc\Surfaces.elf
| |
HT_File_Icons1
|
OO_Icons.edb
|
Animations\Scripts\OO_Icons1.ELF
|
Front-end[]
These are normal, technically playable Mummy maps, at least at surface level. Due to the way each of these files are loaded, they receive a somewhat special treatment from the game. Each language has its own clone of the main menu map, Eurocom calls it the FrontEnd. Depending on the current language these and their PickUps counterparts are conditionally loaded, falling back to the English version if the format isn't supported.
HT_File_F00_FrontEnd
|
F00_Fron.edb
|
Sphinx\Grafix\Maps\Misc\FE_Main.elf
|
The front end level can also be loaded from the pause menu. Each of these files contain the Uruk map itself, a simple script that works as a cutscene and has the choreographed camera movement loop, another HudScript that lays out the main menu buttons and submenus, which is also extensively configurable. With the limitation of using special HT_HudScriptButton_
types for hardcoded behavior, like triggering the memcard dialogs, loading or creating a new game, launching the video player or for the inner working of the dynamic settings and their labels.
Incidentally, the other major HudScript is the pause menu. Counter intuitively, neither the HUD itself nor the item rotator nor the Book of Sphinx use HudScripts, choosing to use hardcoded entities and scripts whose behavior is directly controlled by the game's code, instead of being laid out in EuroLand via a simple event timeline.
- EngineX script → not to be confused with a map gamescript (which is a piece of code used in a map trigger instance), scripts are Adobe Flash-like scenes; visual timelines used to lay out timed events in 2D or 3D. They are mainly used for cutscenes, as well as working as the final container for character animations when configuring their AI, attack patterns, collisions, weak points and behavior. They are extremely flexible.
- They can contain animated characters, particle effects, loop points, animated cameras, timeline-animated entity instances and much more. For example: a breakable vase might be made out of a few static entities (a normal version plus a version broken into several pieces) and particle effects, the script is where all those ingredients are turned into the final object; maybe the first frame shows the unbroken vase, and the timeline is tagged to be frozen there with a special event tag that will play the rest whenever a hit happens. The other frames will animate the instances of the flying pieces and the object slowly fading away frame-per-frame until reaching a stop point.
- HudScript → a special type of EngineX script with clickable buttons and conditional jump points that can be configured directly via EuroLand using a few specific event primitives. It can call and contain animated movement, as well as other sub-scripts; for example, reusable button templates. Again, it's made out of normal 2D and 2.5D entities. For example: the game over screen and its swirling background.
- Hardcoded screen elements → special game windows that are overlaid over the in-game camera and can use fixed entities, texture regions, text and scripts and affect them programmatically. The assets are usually referenced by hashcode, so they can be skinned, but we can't add or alter buttons without changing the game's source code. For example: the health bar with the Gold Ankhs or the Bronze Scarab counter.
Level initialisation[]
This article is under construction. You can help the Sphinx and the Cursed Mummy Wiki by editing it. |
Each time we switch to a playable level, several things happen.
HT_File_BOS_Obj
|
OO_BosOb.edb
|
Animations\Scripts\oo_BosObj.elf
|
HT_Script_BOS_Notes
... |
HT_File_Icons1
|
HT_SubFile_File02
|
HT_Texture_HUD_ButtonTexturesGC
| |
HT_File_Fonts1
|
HT_SubFile_File01
|
HT_Font_Default_US
| |
HT_File_Hud
|
HT_SubFile_File01
|
GC
XB PS2 | |
Reload localised pickups file | |||
Start loading the current map | |||
HT_File_PickUps
|
|||
HT_File_IN02_tru
|
If Sphinx is active. | ||
HT_File_IN18_ony
|
If the Mummy/Tut is active. | ||
HT_File_FX_MummyGeneral
|
If the Mummy/Tut is active. | ||
HT_File_FX_Sword
|
If Sphinx is active. | ||
HT_File_FX_Shield
|
If Sphinx is active and the Character Anim Files field in LevelData sets the AnimDataFlag_Shield flag.
| ||
HT_File_FX_Blowpipe
|
If Sphinx is active and the Character Anim Files field in LevelData sets the AnimDataFlag_Blowpipe flag.
| ||
HT_File_FX_General
|
If Sphinx is active. | ||
HT_File_FX_Generic
|
|||
Deactivate players, move them to {0,0,0} and reset camera if this is the FrontEnd. | |||
Deload previous soundbanks. Grab the combat music from LevelData or fall back to MFX_Danger1 , MFX_Danger2 and MFX_Danger3 . Either load the alternate level soundbank (as specified in the load level trigger) or the one specified in LevelData.
|
|||
Count the active cutscenes for the loaded map file and add them to the right-click menu, only while in -dev mode. If cutscenes aren't disabled in the Watcher it tries to trigger a cutscene previously selected from the Presentation section of the right-click menu.
|
|||
Load the player animations asynchronously, conditionally loading the sections depending on the animation flags set in LevelData. Follows below. | (See the Player EDB subfiles section below) | ||
HT_File_Sphinx
|
If Sphinx is active. | ||
HT_File_Tut /
|
If the Mummy/Tut is active. Depends on the player spawn Tut flag. | ||
Load IO file from LevelData, if any.
|
(This allows loading time to be put into the level load and stops the panic loads) | External file for trigger objects, common. | |
Load CS file from LevelData, if any.
|
(This allows a cutscene file to be loaded before going into a level to speed things up) | External file for cutscenes. Less common. |
More unsorted tidbits, TBD[]
HT_File_Text
|
./_bin_PC/Text.edb
|
Section assigned in LevelData
|
Sphinx\Grafix\Maps\Misc\Text.ELF
|
A map can only contain at most 128 submaps.
Forced GeoFile
when loading a HudScript
[]
When trying to create a HudScript window, the game has a fixed set of rules to override which EDB/GeoFile is used to load certain script.
At the time of Sphinx, this was only used to ensure that the following scripts are loaded from the language-dependent pickups file, instead of the English one. Even when directed to load the English one by other parts of the game. A bit hacky, but the list is fairly small.
HT_Script_HudScript_PauseMenuConfirmation
|
Replaced HT_File_O01_PickUps by the current one, see the table in the Game boot section.
|
|
(disabled; probably done for Buffy, as the HudScripts were originally made for that project and references multiplayer) |
This functionality isn't used for anything else.
Player EDB subfiles[]
During level initialisation and just before loading any IO files, the game loads the EDB files for the current player: HT_File_Sphinx
, HT_File_Tut
or HT_File_Mummy
. Depending on the flags set in LevelData portions of the player EDB (i.e. subfiles) can be preloaded while on level initialisation to save time.
Internal name | GeoFile section | Matching AnimDataFlag
|
AnimDataFlag bit value
| |
---|---|---|---|---|
ExtIdles | HT_SubFile_File01
|
|
| |
HitDie | HT_SubFile_File02
|
|
| |
Ledge | HT_SubFile_File03
|
|
| |
Climb | HT_SubFile_File04
|
|
| |
PushPull | HT_SubFile_File05
|
|
| |
Context | HT_SubFile_File06
|
|
| |
(Free, usable) | HT_SubFile_File07
|
|
| |
HT_SubFile_File08
|
|
| ||
HT_SubFile_File09
|
|
| ||
HT_SubFile_File10
|
|
| ||
HT_SubFile_File11
|
|
| ||
HT_SubFile_File12
|
|
| ||
HT_SubFile_File13
|
|
| ||
HT_SubFile_File14
|
|
| ||
HT_SubFile_File15
|
|
| ||
HT_SubFile_File16
|
|
| ||
Sword | HT_SubFile_File17
|
|
| |
Shield | HT_SubFile_File18
|
|
| |
Blowpipe | HT_SubFile_File19
|
|
| |
Rope | HT_SubFile_File20
|
|
| |
Carry | HT_SubFile_File21
|
|
| |
Ceiling | HT_SubFile_File22
|
|
| |
Water | HT_SubFile_File23
|
|
| |
Electric | HT_SubFile_File24
|
|
| |
Fire | HT_SubFile_File25
|
|
| |
(Free, usable) | HT_SubFile_File26
|
|
| |
HT_SubFile_File27
|
|
| ||
HT_SubFile_File28
|
|
| ||
HT_SubFile_File29
|
|
| ||
HT_SubFile_File30
|
|
| ||
HT_SubFile_File31
|
|
| ||
HT_SubFile_File32
|
|
|
Keep in mind that the per-level player animation flags also control which FX files get loaded, not only which player chunks. The level initialisation table has more information about that.
This reference sheet originally made for jmarti856 may be of interest, too: https://gist.github.com/Swyter/dc660d27204a14323256e2ca8dc42fe2
Hardcoded Pickupable
and PathTrigger
sounds[]
When a Pickupable
falls, it always plays SFX_GEN_DROP_OBJECT
. And additionally, when the current map is HT_File_Map_lu_pyra
/ HT_File_Map_hl_ws1
/ HT_File_Map_hl_ws2
also plays SFX_OBJ_CAGE_LAND
. This was probably hastily hardcoded because there is only a visual script change when smashing the pickupable (see the optional Smash Script drop-down list in Values), not when it lands safely on the ground. So a sound probably could not get played easily or adding a new option wasn't worth it. I can probably add a new trigger value/combobox in the future if there is enough interest. Ask me about it.
Similarly, for PathTrigger
: If the current level is HT_File_Map_lu_pyra
/ HT_File_Map_mu_eye
/ HT_File_Map_mu_sewr
and the moving sound flag is set, then it plays SFX_SPEC_MECH_GEARS2
when moving and (if not) SFX_SPEC_STONE_SCRAPE
for every other map.
Hardcoded hashcode files for in-game look-up[]
The PC versions of the game try to load most of the hashcode files on startup for internal use, this will let you use normally-missing tools like the inventory-item or objective editor from the Watcher, and things like SFXs also show up labeled in 3D space.
Errors and debug prints also show the correct label instead of an unhelpful HashCode Not Found
fallback.
Because the game uses relative paths to retrieve these files (once) they need to be copied or symlinked into the game's root.
Put an Albert
and a Sonix
folder next to _bin_PC
. Here is the full listing of accessed files. Replay
is a folder that previously stored recorded button presses.
./Albert/hashcodes.h
./Albert/Objectiv.ini
./Albert/GameSave.txt
./Albert/Replay
./Albert/HashCode_SubFile.h
./Albert/HashCode_Function.h
./Albert/HashCode_AnimBone.h
./Sonix/SFX_Defines.h
./Sonix/MFX_Defines.h
The original console versions also tried to load them from the virtual Filelist filesystem, and, in fact, that is why these hashcode files were included with some retail game versions and why we could see them before the Authoring Tools DLC were released much later. The game uses them.
Hardcoded teleport to the credits[]
When a load level trigger points to HT_File_F00_FrontEnd
(that one is the English one, it gets later swapped by the current per-language frontend EDB hashcode) and HT_Objective_Urk_SetDead
is set to 1
, it will jump to play HT_Script_Menu_Credits
. Usually when this happens (from the pause menu via HT_HudScriptButton_StartFrontEnd
) it goes to HT_Script_Menu_MainTitle
.