Sides are described by text files. The filenames usually end in .gb.
A file is structured by tags, which begin with a
#. Tags mark the beginnings of sections and the end of the file, and also supply particular interesting bits of information.
Semicolons start comments, which continue to the end of the line. Comments are allowed anywhere, even after tags. Text that is not in a hardware or code section is also a comment; semicolons are not required.
Typical structure of a side file:
#side name ;information about the side #seed 1 2 3 ;seeding order for the different types #type name of a type ;information about the type #hardware ;hardware definition #code ;code #type another type ;definition of this type ;and so on... #end
See the hardware and code pages for information of the content of those sections. Also look at some sides.
Tags must be the first non-whitespace on a line.
|Specifies the name of the side. Must be the first tag in the file.|
|A convenient machine-recognizable way to identify a side or type's author. Optional.|
|Was supposed to tell when a side was written. Deprecated because no one can remember to update it.|
|Optional. The numbers are the IDs of the types to seed, in order. The list implicitly repeats if there are not enough types listed. Energy not used for robots goes as a fetus inside the first robot seeded. If this tag is omitted, the seeding order is simply all the types, in order, excluding types with bombs.|
|Specifies the color of the side or type as a hexadecimal RGB or RRGGBB color string.|
|Starts a type and specifies its name.|
|Sets a type's decoration, which is one of |
|Starts a type's hardware section. Multiple hardware sections in a type are allowed.|
|Starts a type's code section. If there is no code section, robots will be passive. There can be multiple code sections in a type.|
|Declares a constant. Valid only in code sections.|
|Declares a variable. Initial value defaults to 0 if omitted. Valid only in code sections.|
|Declares a vector variable. Initial value defaults to (0, 0) if omitted. Valid only in code sections.|
|Specifies where execution starts. If a label name is supplied, execution starts at that label; otherwise it starts after the |
|Starts a comment section, where text is ignored. Useful for commenting out blocks of code. |
|Must be the last tag in a file.|