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.
Engine compilation
The engine has to be started with the -zreparse
command line argument to force the re-parsing of the scripts. If this argument is not present, the engine will use the existing .dat
files.
zParserExtender
Additionally, the zParserExtender plugin adds more options for parsing and compiling the scripts.
Tip
Using the -zReparse_Game -zReparse_OU
is the most common way to recompile the game scripts and dialogs.
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
Both \
and /
can be used as path separators, but in the wildcards only \
is supported.
Example file structure:
<gothic-root>/_work/Data/ | |
---|---|
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.