It is possible to include external grammars from your grammar file.
This way you can share common grammar parts for different gametypes.
Usage
To do this you will have to use the <RULEREF />
tag.
The <RULEREF />
has an optional argument src
.
The value of the src
argument can be:
- relative file
- for example "2ndruleset.xml" will include the file from the Speech directory
- absolute file
- prefixing with file:// you can include a file from anywhere on the system. For example: "file:///C|/windows/test.xml" will include the file
c:\windows\test.xml
- Web file
- prefixing with http:// allows you to specify a file on a webserver.
Quirks
base filename
The base filename of each file includes has to be unique. That means if the main file is called test
(extention doesn't matter) you can't include another file called test
even if it's located on a completely different location.
UT webserver
You can't use grammar files located on a UT webserver from the same process. Because during the LoadSRGrammar()
call the whole process locks up until the grammar file is load. Thus the UT webserver stalls that whole time.
The result is that the whole process will just lock up.
Because of this issue it's impossible to create dynamic grammars based on ingame developments.
Notes
If FileLog was able to create .xml
files. You would be able to create a dynamic grammar. Using as src value "../UserLogs/myGrammar.xml"
will include that file. →El Muerte