|
Starshatter "def" files are plain-text files that all use the same C-like syntax. Each def file begins with a file type identifier, usually appearing by itself on the first line, that indicates what type of data are contained in the file. For mod purposes, the most important file types are:
Following the file type ID is a list of name-value attribute pairs that encode the information contained in the file. Name-value pairs are written like this: name : value The name is a symbolic identifier that consists of letters, numbers, and underscores. Names must not start with a number. Each type of def file uses a different set of names to identify the attributes of the object being modeled. The value side of the declaration contains the value of the attribute identified by the name. Values may be of the following data types:
Note that string values may be written without double quotes IF the string contains only letters, numbers, and underscores. Strings, quoted or otherwise, may not contain newlines or carriage returns. Adjacent quoted strings are automatically concatenated. This allows you to create large strings without using long unreadable lines of text:
"This is all just "
"one big old string."
Complex data types are represented in def files by structures. A structure is a curly-brace delimited list of name:value pairs that is treated as a single value. Within a structure, the name:value pairs must be separated by commas. A single trailing comma is permitted after the last name:value pair in a structure, and is ignored. Since structures contain name:value pairs, they can be nested (although this is not used very often). Starshatter def files may include C++ style comments. Comments either begin with two slashes "//" and extend to the end of line, or they begin with "/*" and extend to the next occurrance of "*/". EXAMPLES:
|
