Version 1 (modified by ibboard, 11 years ago) (diff)

--

File Formats

WarFoundry is designed such that it can load any data files from any other application as long as a plugin is written than maps the other application's format to the WarFoundry format. There is also a WarFoundry file format using XML and Zip files that is the "native" file format for the WarFoundry army builder. The following is a description of that format and how it works together.

XML and Zips

The main WarFoundry data files themselves are XML files contained within a Zip. The XML provides well structured and more easily human-readable data, while the Zip allows for future expansion (e.g. including race-specific icons for categories) and keeps other supporting data in the same place without cluttering up the data (e.g. readme files and credits). As an added side-effect, any WarFoundry files hosted on the Internet will always prompt the user to download a Zip, where as plain text files can sometimes be displayed in the browser.

Files

There are currently three main files in WarFoundry:

  • Game System
  • Race
  • Army

Each has a different file extension as standard, although that isn't enforced at loading time and any file that looks like a Game System file will be attempted to be loaded. The method used to identify a file format is a modification of the "magic number" that checks the comment section of the Zip file for a required string. Each file must then contain at least a specific file with data for the file type specified by the comment string for it to be loaded.

Game System Files

Game System files define the individual "game systems" that can be loaded. Each Race must belong to a System, such as Warhammer, Warhammer 40,000, Lord of the Rings, or WarMachine. This method of having "game systems" to swap between allows WarFoundry to easily handle different armies for different games without having to have separate data folders for each system, as Rollcall used to.

Race Files

Race files define everything that would be in an army list/army book/codex for a single race. They define the unit types, their size, what equipment they can take, limits on numbers, restrictions on combinations of units and abilities.

Army Files

Army files store the units that someone has selected for their army, complete with custom names, unit size, champions, equipment and any other information. While Game System and Race files are the definition of what comes from the game manufacturer, Army files are the definition of what the gamer has done with that.

File Definitions

Each of the XML files has its own XML Schema to validate against. The latest versions of the schema should always be in source control, and any updates should always be backwards compatible (i.e. new tags should always be optional and new attributes should provide a default or be optional). As well as a schema for each file type, there is also currently a "categories" schema that defines common data about categories of units (used by the Game System and Race files) and a "core" schema that defines custom values that can be used in all of the other schemas.

More detail to follow