Version 4 (modified by ibboard, 10 years ago) (diff)

--

File Formats Explained

The following page will contain details of the WarFoundry XML file structure in plain English. If you just want to view the schemas then please look at the source code viewer. Details of the rest of the file format (e.g. the Zip file that contains the XML) are in the main file format page.

Game Systems

The Game System schema defines the basics for a game system.

Game System Basics

Each game system must have an ID that race definitions for a system reference, as well as a name. Game systems may or may not support allies (a future feature) and may or may not warn users about validation errors (a Games Workshop imposed requirement for army builder).

Categories

Each game system defines a set of categories that units must be in, with each category having a limit on either the maximum and minimum number of points or the maximum and minimum percentage of an army's total that must be taken in that category. Armies may optionally override the categories in their own definition, for example where an army has a non-standard organisation compared to the rest of the game system.

Stats

The game system defines one or more stat lines in terms of the columns the stat line contains. One stat line must be declared as the default, although multiple stat line formats can be declared.

Races

Race files define the units and equipment that can be taken in an army of a given race. Each race must be part of a game system and each army must be of a race.

<race>

A race defines an id and a subid. These are used to differentiate between races definitions. The subid can be used to define sub-races, either official sub-'races' like Black Templar Space Marines (who are still Space Marines, but have their own units) or unofficial sub-races such as campaign-specific versions with additional restrictions.

Each race also defines its name, which is shown to the user, and the ID of the game system that it is part of.

<units> and <unit>

The <units> tag is a container for <unit> tags. Unit tags define everything about a unit, including equipment, statistics, limits on the number of troops in the unit (min/maxSize), limits on the number of times the unit can be taken (min/maxNum), and other additional data.

<stats> and <stat>

<unitEquipment> and <unitEquipmentItem>

The <unitEquipment> tag is a container for <unitEquipmentItem> tags. unitEquipmentItem tags define the equipment that a unit can take by referencing an equipment item in the main list.

  • id - the ID of the equipment item in the main list
  • required - whether the item must be taken by the unit (e.g. swords for swordsmen)
  • exclusivityGroup - currently a single string, but will be multi-valued. Defines a "group" where only one item from the group can be taken at once
  • minNum/{{{maxNum}} - the minimum and maximum number of times an item can be taken by each instance of the unit
  • minPercentage/{{{maxPercentage}} - the minimum and maximum percentage of the unit who can be equiped with the item
  • More detail soon...

Rest…

More detail to come...

Armies

Army files should generally be created by saving an army from the applications, but can be viewed in the same way as other data files. Armies basically define the size and name of the army that was saved, which units were in it (with name, size and reference to their unit type) as well as what equipment they had. Further details will be added later.