Changes between Version 1 and Version 2 of Development/FileFormats

04/11/09 16:46:15 (10 years ago)



  • Development/FileFormats

    v1 v2  
    2222Game 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.
     24The Game System file itself defines the name of the System, the categories that unit types can be in (overridable by the Race) and the format for the different stat lines in the game. It can also optionally define whether the game system support "allies" (taking units from other races) and whether the system owners allow you to warn people if they are building invalid armies.
    2426=== Race Files ===
    3436Each of the XML files has its own XML Schema to validate against. The latest versions of the schema should always be [browser:IBBoard.WarFoundry.API/trunk/dtds 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.
    36 '''More detail to follow'''
     38=== Game System Definition ===
     40A Game System is the simplest of the files and only needs to contain a few tags and attributes. A Game System file must have "WarFoundry_System" at the start of the Zip file's comment and contain a file called data.systemx. The .systemx file should use the [browser:IBBoard.WarFoundry.API/trunk/dtds/system.xsd system.xsd schema].
     42A simple Warhammer-esque game system can be defined as:
     45<?xml version="1.0" encoding="UTF-8"?>
     46<system xmlns="" xmlns:cats="" id="sampleSys" name="Sample Game System" warn="false">
     47        <categories>
     48                <cats:cat id="cat1" name="Characters" minPercentage="0" maxPercentage="50" />
     49                <cats:cat id="cat2" name="Regiments" minPercentage="25" maxPercentage="100" />
     50                <cats:cat id="cat3" name="War Machines" minPercentage="0" maxPercentage="25" />
     51                <cats:cat id="cat4" name="Monsters" minPercentage="0" maxPercentage="25" />
     52                <cats:cat id="cat5" name="Allies" minPercentage="0" maxPercentage="25" />
     53        </categories>
     54        <sysStatsList defaultStats="default">
     55                <sysStats id="default">
     56                        <sysStat name="M"/>
     57                        <sysStat name="WS"/>
     58                        <sysStat name="BS"/>
     59                        <sysStat name="S"/>
     60                        <sysStat name="T"/>
     61                        <sysStat name="W"/>
     62                        <sysStat name="I"/>
     63                        <sysStat name="A"/>
     64                        <sysStat name="Ld"/>
     65                </sysStats>
     66        </sysStatsList>
     70This file defines a game system called "Sample Game System" with an ID of "sampleSys" (which all races of the system will use as their Game System ID). The game system has five categories with various percentage limits on the units in the category. It also has one stat line with nine columns, which is defined as the default (the default has to be defined in case there are multiple stat lines).
     72=== Race File Definition ===
     74=== Army File Definition ===