Changes between Version 3 and Version 4 of Development/FileFormats


Ignore:
Timestamp:
04/11/09 20:22:46 (10 years ago)
Author:
ibboard
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Development/FileFormats

    v3 v4  
    3535
    3636Each 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.
     37
     38All of the following information is correct as of r96 of the files, but all future updates should be backwards compatible as much as possible.
    3739
    3840=== Game System Definition ===
     
    129131=== Army File Definition ===
    130132
    131 ''Detail to follow''
     133An Army is the collection of units and their equipment that a user has created. The Army file stores this so that the user can come back to the army in the future. A Army file must have "WarFoundry_Army" at the start of the Zip file's comment and contain a file called data.armyx. The .armyx file should use the [browser:IBBoard.WarFoundry.API/trunk/dtds/army.xsd army.xsd schema].
     134
     135Army files are not currently created (as of r104, 11th April 2009) but when they are then a file should look something like the following:
     136
     137{{{
     138<army id="12345" name="Sample Army" system="sampleSystem" race="Empire" maxPoints="500">
     139        <units>
     140                <unit id="unit1" unitType="Empire1" unitName="General Eustace" size="1">
     141                        <equipment>
     142                                <equipItem id="equip1" amount="1"/>
     143                        </equipment>
     144                </unit>
     145                <unit id="unit2" unitType="Empire2" unitName="First Swordsmen" size="20">
     146                        <equipment>
     147                                <equipItem id="equip1" amount="1"/>
     148                                <equipItem id="equip2" amount="1"/>
     149                        </equipment>
     150                </unit>
     151                <unit id="unit3" unitType="Empire2" unitName="First Greatswords" size="15">
     152                        <equipment>
     153                                <equipItem id="equip3" amount="1"/>
     154                        </equipment>
     155                </unit>
     156        </units>
     157</army>
     158}}}
     159
     160This file would define a small Empire army in the Sample Game System with a limit of 500 points. The army contains a General with a sword, a unit of Swordsmen with sword and shield, and a unit of Swordsmen with Broadswords.