Daedalus Compilation
Before loading the data by game the Daedalus scripts have to be parsed and compiled into a .dat
file. This is done by the engine itself, but the files that are parsed have to be listed in the .src
files.
Parsers
The engine itself has multiple parser instances used for parsing different .src
files.
Parser | Source file | Output file |
---|---|---|
Game Parser | Scripts\Content\Gothic.src | Gothic.dat |
SFX Parser | Scripts\System\SFX.src | SFX.dat |
PFX Parser | Scripts\System\ParticleFX.src | ParticleFX.dat |
VFX Parser | Scripts\System\VisualFX.src | VisualFX.dat |
Camera Parser | Scripts\System\Camera.src | Camera.dat |
Menu Parser | Scripts\System\Menu.src | Menu.dat |
Music Parser | Scripts\System\Music.src | Music.dat |
SRC syntax
The .src
files are simple text files that contain the paths to the .d
files that have to be parsed. The paths are relative to the folder where the .src
file is located.
Warning
Booth \
and /
can be used as path separators, but in the wildcards only \
is supported.
Example file structure:
That is how the Gothic.src
file can look like:
Gothic.src | |
---|---|
Multiple .d
in one folder can be parsed by using wildcards.
In addition, .src
file can contain paths to other src files.
Code order
The order of the code and therefore files in .src
is crucial, as Daedalus parser is lineal. If you refer to the symbol that wasn't parsed it would throw an error.
Something like this wouldn't work as the bar()
doesn't exist at the moment of parsing foo()
.src
if in one file refers to the symbol form other it has to be listed later.