Wiki
- Designer Workshop - w/ Tutorials
The designer allows you to download and upload XML versions of your boards. This feature can be very helpful when designing boards with complex game mechanics that require hundreds (or thousands) of continents, borders, or border modifiers, as you can use scripts to automate much of the process.
Even if you are not automating via script, it can still be quicker to make edits directly in an XML (using a text editor) rather than in the board designer (using the GUI). To give an example, it is far quicker to adjust all your continent bonuses by +1 in the XML.
You can look up XML on Wikipedia, but the entry is not necessarily that helpful, apart from the section on Key Terminology. For our purposes as WarGear board designers, an XML file is a textual representation of all the board mechanics that you add and edit through the graphical user interface on the board designer. In other words, the XML represents what's going on in the background as you create and modify your board design in the designer. The only things the XML doesn't capture are the image files: board, fill, and fog images.
What you most need to know is how territories, continents, and borders are represented in XML format. The easiest way to do this is to export the XML file for an existing board and simply browse through it.
Most browsers will display an XML file, but to edit an XML you will generally want to use a specialized application. One good free option is Notepad++.
It is recommended that you also install the XML Tools plugin, which gives you access to some helpful bells and whistles such as Pretty print (XML only - with line breaks). WarGear exports the XML files in a difficult-to-read format, and using the pretty print tool will quickly separate the code associated with each individual territory, continent, and border into separate lines.
The three types of major board features – territories, continents, and borders – are all grouped together in separate wrappers, called child elements, marked like this <territories> (list of all the individual territory sub-child elements) </territories>.
An individual territory element will have the following format:
<territory id=“1234567” tid=“0” boardid=“1234” name=“Territory A” xpos=“1” ypos=“1” max_units=“0” scenario_type=“Neutral” scenario_seat=“0” scenario_units=“2” unit_placement=“Enabled” />
You can see that a territory element comprises a list of attributes:
An individual continent element will have the following format:
<continent continentid=“12345678” boardid=“1234” name=“Continent A” bonus=“1” members=“0,1,2” factory=“-1” factory_type=“Standard” factory_cap=“0” />
You can see that a continent element also comprises a list of attributes:
An individual border element will have the following format:
<border borderid=“12345678” boardid=“1234” fromid=“1” toid=“2” direction=“Two-way” type=“Default” ftattackmod=“0” ftdefendmod=“0” tfattackmod=“0” tfdefendmod=“0” />
You can see that a border element also comprises a list of attributes: