BOD syntax
From X-Wiki
BOD syntax are syntactic rules used in BOD files, T files and several other files.
- This article is based on findings gathered during development of X2BC.
- It is not clear whether X2 or X3 is processing BOD files and T files using the same parser. Nevertheless X2BC, DBOX2 and X3 Editor do share the same parser.
Comments
Comments are allowed and are introduced by single / (slash) character. You can often find two subsequent slashes (//) because it resembles C comments. Everything after the leading slash until end of line will be ignored.
Multiline comments are not possible.
Tokens
Following characters are recognized as tokens:
All other characters are seen as separate tokens.
Note that colon is probably not seen as a token by X2 nor X3. It must always be attached to preceding literal.
Example of tokenization of BOD scene file:
VER: 6; / hello world! P 0; B ds\weapons\gatling\gatling_body;
The above is seen by the parser as:
| token type | value |
|---|---|
| literal | VER: |
| semicolon | ; |
| literal | P |
| literal | 0 |
| semicolon | ; |
| literal | B |
| literal | ds\weapons\gatling\gatling_body |
| semicolon | ; |
You can see that spaces and newlines are ignored and not seen by the parser. Also note that the comment is ignored.
Here is the above example but formatted differently:
VER: 6; P 0; B ds\weapons\gatling\gatling_body ; N ds\weapons\gatling\gatling_body;
The above is still valid scene definition (except missing frames). This formatting freedom is similar to C programming language.

