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 .d
files have to be listed in .src
files first.
Parsers
The engine itself has multiple parser instances used for parsing different .src
files.
- Game Parser - parses
Scripts\Content\Gothic.src
and createsGothic.dat
- SFX Parser - parses
Scripts\System\SFX.src
and createsSFX.dat
- PFX Parser - parses
Scripts\System\ParticleFX.src
and createsParticleFX.dat
- VFX Parser - parses
Scripts\System\VisualFX.src
and createsVisualFX.dat
- Camera Parser - parses
Scripts\System\Camera.src
and createsCamera.dat
- Menu Parser - parses
Scripts\System\Menu.src
and createsMenu.dat
- Music Parser - parses
Scripts\System\Music.src
and createsMusic.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:
<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.