Axis & Allies Wiki

I have received many requests on this matter, so I will discuss it in full. I will add a Russian Cavalry unit to the MiniMap scenario.

Associate xml with Wordpad[]

It is difficult to work on scenarios if xml files are associated with Internet Explorer. This results in your computer treating them as if they were invalid webpages.

In Windows XP open the Control Panel. Choose folder options. Click on the File Types tab. Scroll down to xml, can click on change. Choose Wordpad from the list. Any text-oriented word processor or program editor can be used. Notepad is OK, but Wordpad works better.

In Vista, go to Default Programs in the Control Panel. Then choose Associate a File Type or Protocol with a specific program and choose WordPad.

Make a copy of the file your are modifying[]

The file can be found in the minimap/games folder

Open the file[]

Just double click the file

Change the Info Name[]

I will change it from "Minimap" to "Cavalry"

Add to Unit List[]

In the unit list section add:

<unit name="cavalry"/>

Note that TripleA is case-sensitive. You must use the same capitalization throughout. Conventionally, unit types are uncapitalized.

In most circumstances, the order within list is unimportant.

Add a Production Rule[]

In the production rules section add:

<productionRule name="buyCavalry">

<cost resource="IPCs" quantity="4" />

<result resourceOrUnit="cavalry" quantity="1"/>


Note that conventionally, internal capitalization is used. If the unit you are creating is not buildable, you do not need to define a production rule.

Add to Production Frontiers[]

In the production frontier section add:

<frontierRules name="buyCavalry"/>

Define unit Characteristics[]

In the attachment list add:

<attatchment name="unitAttatchment" attatchTo="cavalry"

javaClass="games.strategy.triplea.attatchments.UnitAttachment" type="unitType">

<option name="movement" value="2"/>

<option name="transportCost" value="3"/>

<option name="attack" value="2"/>

<option name="defense" value="1"/>

<option name="canBlitz" value="true"/>


Note the misspelling of attachment. I have defined cavalry as moving 2, attacking at 2, defending at 1 and blitzing. Read the description of unit attachments for units in the documentation.

Add to unit placements[]

In the unit placement section add:

<unitPlacement unitType="cavalry" territory="red capitol" quantity="1" owner="Russians"/>

Add image to image folder[]

Find an image of cavalry, in the folder maps/great_war/units/Russians. Copy it to images/units/Russians. (You could also create a new folder just for the minimap map by copying it to maps/minimap/units/Russians). You can create your images, but make sure that they are png files of correct size.

Run the Program[]

You should see a Green Cossack cavalry unit mixed in with the Red Russians.

Help! I am Getting Error Message[]

Look for specific things like the word "unit" in the message. The most common sources of error are:

  • Misspellings
  • Incorrect case
  • Missing angle brackets
  • Missing quotes
  • Missing backslash before the angle bracket

A single missing angle bracket can prevent the running of any scenario. If you have trouble with precise typing, there are programs specifically designed for editting xml code. These will color the data elements consistently, making it easier to find errors. Try the Crimson Editor.