Skip to content

How to create custom maps

Dan Van Atta edited this page Aug 22, 2019 · 3 revisions

The initial settings for each game are stored in a file that you can edit to create a new game.  You can modify unit placement, territory ownership, number of players, alliance of players, turn order, strengths of units, and other factors.

Editing the file

Before you start make a copy of classic_a&a.xml and rename it mygame.xml.  You can modify this file without changing the way the game works normally.

You can open the file in any text editor.  On windows you can use Notepad.  Simple start notepad, and then use the file-> open menu.  When you save the game, make sure that you save the game with the correct extension (.xml).  When saving use file->save as, and before you save change the "Save as Type" to be "All Files".

Sanity check

Many of the values you can modify make no sense, and may cause the game to become unstable while playing.  It is possiible for instance to specify an attack value of 10 for an infantry unit, or to say that a nation has two capitals, or none.  Needless to say this may cause the game to act in weird ways.  This may be what you want, but be warned.

Modifying unit placement

Look in the file for the line,
<unitInitialize>
After that line you will see a series of lines that look something like,
<unitPlacement unitType="infantry" territory="Alaska" quantity ="1" owner="Americans" />
This line simply says to place 1 infantry in Alaska owned by the americans.  You can add, modify or delete lines to change where units are placed.  Be sure to get the spelling of the players and the territories right.

Modifying territory ownership

Look in the file for the line,
<ownerInitialize>
After this line you will see a series of lines like
<territoryOwner territory="Alaska" owner = "Americans" />

You can modify these lines to change the starting ownership of each country.  If you want a country to be neutral then remove the line for that territory.  If a country is neutral, add a new line to set it's ownership/

Changing player alliances

Look in the file for the line,
<playerList>
You will see a  series of lines like,
<alliance player="Germans" alliance="Axis" />
To switch the german player to be allied, you would simply change this line to be
<alliance player="Germans" alliance="Allies" />

Changing unit strengths

To change the attack, defense or movement points of a unit look for a line that looks like
<attachmentList>

Beneath that you will see a series of lines like
<attachment name="unitAttachment" attatchTo="infantry" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
  <option name="movement" value="1" />
  <option name="transportCost" value="1" />
  <option name="attack" value="1" />
  <option name="defense" value="2" />
</attachment>
You can modify these lines to change the attack, defence and movement of an infantry.  You can make similiar adjustments for the other unit types.

Changing territory production

To change the production value of the Caucus, look for a line that looks like
<attachment name="territoryAttachment" attatchTo="Caucasus" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory">
  <option name="production" value="3" />
</attachment>
By changing the line
<option name="production" value="3"/>
to
<option name="production" value="10" />
You will change the production of the caucus to 10.

Changing capital placement

You can change the location of the capitals for each player by moving a line.  The capital for the us is specified in the capital setting below
<attachment name="territoryAttachment" attatchTo="East US" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory">
  <option name="production" value="12" />
  <option name="originalFactory" value="true" />
  <option name="capital" value="Americans" />
</attachment>
By moving this line to another territory, you will change the capital of the US to a different state.

Changing turn sequence

You can change the sequence of who moves when.
If you look for the line
<sequence>
Below that are a series of lines like
<step name="russianTech" delegate="tech" player="Russians" />
The game will run the steps in the order listed.  To make the Russians move after the japanese, simply move all the russian step lines after the japanese step lines.

And much more

You can write code to change the behaviour of the game in ways that the author never intended.  The source code is released under the gpl, and you are free to download it and modify it as long as you follow the terms of the gpl.
Clone this wiki locally