Extension - Data Files

Overview

Extensions are composed of an extension.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).

Other than the differences in the extension.xml file definition and the exclusion of token assets, an extension is built exactly like a ruleset.

extension.xml

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

The extension.xml file consists of the following tags:

Root Element

 

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 extension 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.

Root Sub-Elements

 

<announcement>

Supports the following attributes: text, font and icon
When the FG desktop is initialized, displays the text in the font asset with the icon asset (if any).

<base>

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

<properties>

(See Below)

Properties Sub-Elements

 

<name>

String value. Display name of extension for launcher.

<description>

String value. Description of extension for launcher.

<author>

String value. Author of extension for launcher.

<version>

Number value. Version of extension.

<loadorder>

Number value. Load order of extension relative to other extensions. Default 0. Must be positive.

<ruleset>

Allows multiple. Requires "name" child tag with internal name of ruleset that this extension is designed for.
Optional "minrelease" and "maxrelease" number tags to limit the versions of the ruleset that this extension is valid for.

 

Example

<root version="3.0" release="3"> <announcement text="Wood Theme for Fantasy Grounds\rCopyright 2015 Smiteworks USA, LLC." font="emotefont" icon="rulesetlogo_CoreRPG" /> <properties> <name>Theme - Wood</name> <version>3</version> <author>SmiteWorks USA, LLC</author> <description>Theme extension for CoreRPG, 3.5E, 4E and PFRPG rulesets</description> <ruleset> <name>CoreRPG</name> </ruleset> <ruleset> <name>3.5E</name> </ruleset> <ruleset> <name>4E</name> </ruleset> <ruleset> <name>PFRPG</name> </ruleset> <ruleset> <name>Castles and Crusades</name> </ruleset> <ruleset> <name>CallOfCthulhu</name> </ruleset> </properties> <base> <includefile source="graphics/graphics_fonts.xml" /> <includefile source="graphics/graphics_frames.xml" /> <includefile source="graphics/graphics_misc.xml" /> </base> </root>