Skip to content

Definition File

Robert Jordan edited this page Mar 22, 2020 · 2 revisions

Definition File Format

Definition files (extension .dfn) are used for the bootmenu.exe, install.exe, and uninst.exe CatSystem2-specific programs. Their behavior most closely follows that of an .ini (properties) file, however the definition for install.exe has extra commands for copying data to the installation directory.

Syntax Rules

As with all of the script formats, CatSystem2 defines them as loosely based off C++ syntax. As such, C++ will be the format of choice when displayed in code blocks.

Whitespace

Whitespace:  regular spaces and \t tabs. Whitespace is generally required to separate arguments, but CatSystem2 scripts are very loose with word boundaries, and may not always require it.

Newlines: \n LF, \r CR, and \r\n CRLF.

Comments: // single-line comments and /* */ block comments.

Headers (Sections)

Lines starting with #NAME specify a header (or section) for all text that follows until the next header. Where NAME is the name of the header. Below are the names of known headers in Definition Files.

Type Description
#INIT Initialization, all settings are placed below here

Key Values

Key values are roughly treated the same as commands in other script formats such as CST Scenes, FES Screens, and ANM Animations. Where each key name is hardcoded, along with the format in which they take arguments.

/* foo  [string] */
foo   "string value"

/* bar  [string] */
//bar   "commented out, ignored"

/* baz  [int] [int] [int] */
baz   9 0 3

Type Descriptions

Below are the types of arguments that keys may look for. Some listed types are aliases (such as bool and path, etc.).

Type Description
int Decimal or Hexadecimal 32-bit integer
bool Boolean integer values 0 or 1 (any non-zero)
float Real number 32-bit float, must contain . and/or f postfix
char Single character defined in ' quotes, treated as 16-bit integer
string Text value, optionally enclosed in " quotes
path Same as string, but denotes a filepath
registry Same as string, but denotes a Windows registry path/key/value
enum Set of valid text values
type[n] n number of type values, separated by whitespace

Boot.dfn

Read by bootmenu.exe

Searched for as boot.dfn or boot\boot.dfn. This definition file contains information required to install, uninstall, or run the game.

All keys in boot.dfn are searched for under the #INST header (section).

Boot.dfn Keys

Type Key Description
path bg Background image of bootmenu (HG-2/HG-3)
path boot Path to game executable/launcher
path inst Path to game installer
path uninst Path to game uninstaller
path config Path to cs2conf.dll
path configpath Directory of cs2conf.dll
path manual Path to game manual file (HTM/HTML)
string title Title of game, (same as startup.xml)
string brand Developer of game, (same as startup.xml)
path save Path to game save folder, (same as startup.xml)
string mutex Name of first mutex, (same as startup.xml)
string mutex_b Name of second mutex, (same as startup.xml)
registry regpath Registry path to game (from SOFTWARE)
registry pathkey Name of field in regpath With Install path
path directx Path to DirectX installer
int[3] dxversion Major Minor Revision numbers of DirectX
int d3dx9_ver Integer version number of DirectX9
bool checkd3dx Boolean (0/1) check for right DirectX version
string instkey String ID, such as wm_happiness2
enum instmode unknown, Enum: (single, ???...)