Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Expand
titleClick here to show Table of Contents
Table of Contents

Ruleset Data Files

Rulesets are composed of a base.xml file, as well as any additional XML files, Lua script files, graphic files (PNG, JPG), font files (TTF, FGF), and token files (PNG, JPG).

base.xml

Every valid ruleset must have a base.xml file in the root of the ruleset folder or zip file (.pak). The name of the ruleset is always the folder or zip file name, where the base.xml is stored.

...

Root Element

<root>

The main root node contains all the meta-data for module definition files.

Root Attributes

version

The string matching the version number of the FG client version that uses this ruleset format (Ex: "3.3") This can also affect the behavior of certain interface elements for backward compatiblity. See the Ruleset API Reference for more information.

release

The string matching the release number of the ruleset that is used for saving data.

logo

The path of the logo graphic to use for this ruleset, usually logo.png. The logo is always displayed at 70x70 pixels.

Root Sub-Elements

See the Assets and Settings section of the Ruleset API Reference for all valid child tags.

Additional XML Files Format

Additional XML files can be defined in the ruleset using the "includefile" child tag with a "source" attribute equal to the file path of the XML file within the ruleset folder/file. Any additional XML files share the same file format as the base.xml file.

Lua Script Files Format

Lua script files can be defined using the "script" child tag. The Lua script code can be included between the script tags (i.e. script block), or a script file can be specified using a "file" attribute. If the "file" attribute is specified, then the full path of the script file within the ruleset folder/file needs to be specified. If the script tag is defined as a child of the root element of an XML format, then it is considered a "global" script, and requires a "name" attribute. Script tags can also be defined for a window class asset, a template asset, or a window control definition within a window class asset.

Graphic Asset and Font Files

FG supports most common graphic image file formats, but PNG is primarily used for ruleset graphics, due to the need for transparency to be supported by the graphic asset.

The following tags will define graphic assets: font, framedef, and icon. For more information on defining these assets, see the Assets and Settings section of the Ruleset API Reference. Any file name referenced by the tags must include the full path of the graphic asset file within the ruleset folder/file.

Token Files

Any graphic files that are included in the "tokens" subfolder of a ruleset folder/file are automatically added to the GM token bag as token assets with the same folder structure as they are included in the tokens subfolder..

File Location Conventions

In the CoreRPG ruleset (and many others), the following folder and file conventions are followed.

...