Introduction
Variants are games based on Diplomacy with different maps or slightly modified rules or both. Realpolitik has the capability of running variants. Many variants are already included with the package, but Realpolitik also has a "plug-in" scheme that allows anyone to add new variants. If you know of a variant that you want to run on Realpolitik, you can probably do it. It's not that hard.
Thanks to Don Hessong for
his extensive help with this manual. Questions, comments, plaudits, and
complaints can be sent to jvsquare@mindspring.com.
Variant Creation
You make your own variant by creating the necessary files and placing them in the correct sub-folder. Most of these files are text files or common graphic file formats. One file is created by the Region Tool which is an application that's included with the Realpolitik package. If your variant is based on a map that already exists for another variant or the standard game, it is a real snap to make it. This manual describes the individual elements you need to create a variant. However, you don't necessarily need to create these elements from scratch. In many cases you will only need to copy the folder (including its contents) of a variant that already exist, then change the name of the folder to the new variant and make minor changes to some of the support files within that folder.
Inside the Realpolitik folder
there is a folder called "Variant Files", inside of which there is a folder
for each Realpolitik variant. In each of the variant folders there is a
group of files that Realpolitik needs to run that variant even the standard
Diplomacy game has a set of these files inside the "Standard" folder. Some
variants make use of the files in another variant's folder. So it is very
important that you do not change the names of the "Variant Files" folder,
any of the variant folders inside it or any of the names of the files inside
the variant folders. It is also important that you not move these files
or sub-folders to different locations. If you do these things some of the
variants may stop working, including the standard game.
The Variant Folder
As mentioned, the folder for a particular variant resides inside the "Variant Files" folder. For clarity the variant folder should have the same name as the variant itself we'll just use "Variant" as the example throughout this manual.
The following is a description of each type of file in the variant folder and the files' contents. With one exception, each of these files needs to be edited by you the variant creator, unless the exact file needed already exists (from another variant already made). Use the previously existing Standard files as an example to help you figure things out. And be sure to use the correct naming conventions as shown in the following list.
Note that for all the text files, any line starting with # is a comment and is ignored. The comments in the release variants are there for clarity, but you can put any notes you want after a #. Also, tabs and extra spaces are ignored.
Variant.cnt
This should be a text file. This file is used to define the names of the countries in the variant and other information specific to each country.
Line by line, the .cnt file consists of:
Version: For now, this should be 1. If the file format changes in a future version of Realpolitik, this will be used to distinguish between the old and new formats.Note that the initial is used to pick the appropriate icon, so if an icon with that initial does not exist, you'll have to create one in either the Icons file (MacOS) or the Icons folder (Win32).Number of Countries: This is the number of countries in the variant.
Country Info: There should be one line for each country. Each line should consist of:
<name> <adjective> <capital initial> <pattern> <color>where:name = The name of the country (e.g. France)adjective = The country adjective (e.g. French)
capital initial = The single capital initial character for that country (e.g. F)
pattern = The name of the pattern to be used for filling supply center regions. Available patterns are: Random, ThinDiag, Hash, Gray, Quilt, Sparse, Diag, ThinHoriz, Horiz, Vert and Stripe
color = The color to be used for units, orders and supply centers. Available colors are: Black, Blue, Brown, Cyan, Forest, Green, Magenta, Purple, Red, White and Yellow
Variant.gam
This should be a text file. This file defines the home supply centers for each country and the starting positions and types of units, as well as the year and season of the game's first move. It is also used to affect the name of the variant as it appears in Realpolitik in the variant menu and the map window title bar.
Line by line, the .gam file consists of:
Version: For now this should be 1. If the file format changes in a future version of Realpolitik, this will be used to distinguish between the old and new formats.Variant.mapGame Name: What you type here is what will appear in the title bar for the map.
Variant: This is the variant's name as listed in the .var file.
Season and Year: This gives the season and year for the game's first turn.
Number Adjust: The number of adjustments expected. In general this should only be 0 except in a Winter phase. It equals the total number of builds and removals expected for all countries. This can be used in variants where the first action of the game is to build units.
Number of Countries: Number of countries in the game.
Country Info: There should be one group of these per country. The groups need to be listed in the same order as the countries in the Variant.cnt file. The group consists of three lines:
Adjustment: This gives the number of builds/removals. It should be positive for builds and negative for removals. This is used in save games and in variants where the first action of the game is to build or remove units.Number of Dislodges: The total number of dislodged units. For a new variant, this should be 0.Supply Centers: This is a series of 3-character space abbreviations, separated by spaces and representing the supply centers owned by this country at the beginning of the game.
Units: This is a series of unit types and space abbreviations, separated by spaces. It represents the units owned by this country and the supply centers they start in at the beginning of the game.
Dislodges: In a new variant, there are generally no dislodges. In a saved game file, there should be a string of the following format per dislodge.
<country name> <unitID> <spaceID> [<coast>] <retreatspaces>where UnitID is 'A' or 'F'. The retreat spaces are just a string of 3-character spaceIDs for those spaces the unit can retreat to.History: Lines following this store history information for saved games. For a new variant, this should be -1.
This should be a text file. This file defines the layout of the map. It tells Realpolitik which spaces touch which and where armies and fleets can move. This is the hardest file for the variant creator to make - actually it's not hard - it's tedious. But if your variant is based on a map that's already used by another variant, then you're home free. This file follows a very structured syntax. It is the same format used by the Diplomacy judges (servers used to run games over the internet automatically). So if you download a judge .map file, you should be able to plug it right into Realpolitik. Besides being used by Realpolitik, the Region Tool uses this file to create the Variant.rgn file.
Tip: When working with this file, you may find it useful to use a mono-spaced font so that everything lines up nice and straight.
This file consists of three sections separated by -1 on a line by itself.
The first section defines the spaces on the map. For each region there should be one line consisting of
<name>, <letter> <abbreviations>where
name = The full name of the region (e.g. Norway)Note there can be any number of spaces between the comma and the initial, but only one space between the initial and the abbreviations.letter = The single letter that's used to define what type of region it is - where:
w = waterabbreviations = The accepted abbreviations for the region, separated by single spaces if there is more than one (e.g. nor nwy norw)l = land
<capital initial> = home supply center for a given power (assumed to be land) using the capital initial defined for that power in the Variant.cnt file.
x = supply center that starts the game neutral (assumed to be land)
v = ice (used in some rule variants, for example Loeb9)
The second section defines space adjacencies. Each line consists of either a set of adjacencies for a fleet in a space or a set of adjacencies for an army in a space in the following format:
<abbreviation>-<type of adjacency>: <adjacencies>where:
abbreviation = The accepted abbreviation, as defined in the first section of this file, for the region whose adjacencies are being defined.Note that the "-" between the abbreviation and the type of adjacency must be there, and that there is a space between the colon and the first adjacency.type of adjacency = determines which type of unit is involved in defining the adjacency where:
mv = adjacencies only for armies in that spaceadjacencies = The accepted abbreviations, as defined in the first section of this file, separated by single spaces, for all the regions adjacent to the region whose adjacencies are being defined (only considering the type of unit involved). For bi-coastal spaces, /nc, /sc, /ec, /wc is added to the abbreviation to define specifically which coast a fleet can move to.xc = adjacencies only for fleets in that space
nc, sc, ec, wc = adjacencies for specific coasts in bi-coastal spaces (it's assumed that the unit involved is a fleet)
mx = adjacencies for armies moving with one less support (used in some rule variants, for example Loeb9)
The last section is the supply center order for summary report. This is not used by Realpolitik.
Variant.rgn
This should be a text file. This file tells Realpolitik where all the spaces are on the map, so that when you click in Berlin, Realpolitik knows that that was Berlin. The file consists of a list of the spaces and a series of numbers that defines the spaces' physical locations on the map. They are stored in scanline format - think of drawing a set of lines that fill a polygon. This file is not made by the variant creator. The Region Tool creates this file for you. Do not edit the contents of this file.
Just for your information, line by line, the Variant.rgn file consists of:
Variant <name.rgn> (skipped over - only there for human consumption)If the space has two coasts, then there are additional location and region data sections for coast1 and coast2.For each space on the map, in order of the Variant.map file:
# <spacename> (skipped over - only there for human consumption)Unit location <x, y> location of unit in this space
Name location <x, y> location of name label in this space
Region Data - description of region in the following format:
<# scanlines> number of horizontal scanlines in region<x1> <y1> <length1> scanline 1
<x2> <y2> <length2> scanline 2
.
.
.
<xn> <yn> <lengthn> scanline n
Variant.txt
This is the text displayed in the Info window for the variant. The info window will do line wrapping for you, so you can just end paragraphs with two carriage returns. There is, however, a 2048 character limit for a given paragraph. If you wish to do your own line-wrapping, the window is 78 characters wide, so don't exceed that in your lines or you will get some very odd formatting.
About the Graphics Files
Care must be taken to make sure the graphics files all represent the identical map. The borders of the spaces on the various maps have to line up perfectly. All three images need to be the same size at the outer edges to ensure this alignment. The best approach is to start with a base map, then copy the file to use to create the other two maps, modifying them accordingly, but taking care not to change the boundaries between the spaces or the coast lines or the outer dimensions of the map.
Variant.pct (MacOS) or Variant.bmp (Windows)
This is a graphics file in the PICT format for the Mac, and in uncompressed 8-bit bitmap format for Windows. You can use any graphics editing software to create this file, as long as it can save it in the correct format. This is the physical map that you see when you are using Realpolitik. Besides being used by Realpolitik, the Region Tool uses this file to help you create the Variant.rgn file.
The colors you use should be in the standard Macintosh 256-color system palette on the Mac side and the Windows standard 256-color palette on the Windows side. The easiest way to guarantee this is to save the file as an 8-bit indexed image most graphics programs will allow you to select the appropriate system palette. It will be very clear if you havent done this correctly the map will still display in Realpolitik, but the colors will be wrong in 256-color mode.
VariantBW.pct (MacOS) or VariantBW.bmp (Windows)
This is a graphics file in the PICT format for the Mac, and in uncompressed 8-bit bitmap format for Windows. You can use any graphics editing software to create this file, as long as it can save it in the correct format. This is the physical map that you see when you are using Realpolitik if you have no color. This file is used as the map when printing.
This file should be monochrome (black and white).
Variant-Borders.pct (MacOS) or Variant-Borders.bmp (Windows)
This is a graphics file in the PICT format for the Mac, and in uncompressed 8-bit bitmap format for Windows. You can use any graphics editing software to create this file, as long as it can save it in the correct format. The Region Tool uses this file to help you create the Variant.rgn file. Once this has been accomplished, this file may be discarded; Realpolitik doesn't actually use this file.
For best results, this file should be monochrome.
Variant.var
This should be a text file. This file is the head honcho of all the variant support files. It defines what the other files are and in some cases where they are located (if not in the variant's own folder). This file pulls everything together for a given variant. This is the one file that will always be unique to a given variant. And it's the one file that must be located in the variant folder.
Line by line, the Variant.var file consists of:
Version: For now this should be 1. If the file format changes, this will be used to distinguish between the old and new formats.Name: The name of the variant. This is also the string that will appear in the Variants menu.
MapData: This tells Realpolitik which Variant.map file is the one to use for this variant.
Countries: This tells Realpolitik which Variant.cnt file is the one to use for this variant.
Game: This tells Realpolitik which Variant.gam file is the one to use for this variant.
BWMap: This tells Realpolitik which VariantBW.{pct,bmp} file is the one to use for this variant. Do not include the file extension (.pct, .pic, or .bmp) in this file name. Realpolitik will append the appropriate one for the operating system.
ColorMap: This tells Realpolitik which Variant.{pct,bmp} file is the one to use for this variant. Do not include the file extension (.pct, .pic, or .bmp) in this file name. Realpolitik will append the appropriate one for the operating system.
Regions: This tells Realpolitik which Variant.rgn file is the one to use for this variant.
Info: This is a text file containing information to be displayed in the Info window for this variant.
Build: This tells Realpolitik which build rule to use for this variant. It can be one of three options:
Standard a player may only build on her vacant home centersCenters: This is an integer that tells Realpolitik how many supply centers are needed to win the game for the variant. If this is 0, then the number of supply centers needed to win is assumed to be a simple majority. This is calculated by taking the total number of supply centers, divided by two, rounded down, plus one. So for a variant with 35 supply centers: 35 divided by 2 is 17.5, rounded down is 17, plus one is 18.Aberration a player may build on any supply center he owns which is vacant as long as he still owns at least one of his original home centers
Chaos a player may build on any supply center that she owns that is vacant
Flags: This should be 0. It will be used for future variant extensions.
Making the Variant.var File Work With Shared Files
As you can see, the information on most of the lines of the Variant.var file is generally the name of another file which Realpolitik uses to run the variant. Assuming that the referenced file is in the same variant folder as the Variant.var file nothing more is needed. But the Variant.var file can also reference files that are in other folders and are used by different variants (and therefore have different names).
For example, the variant "1898" uses the same map as the standard game, but each country starts with only one unit. The only files that are different than the standard game are the 1898.var, the 1898.txt and the 1898.gam files. The 1898.var file must be located in the 1898 folder. All the other files could be located in any other folder. But in the case of the 1898.gam and 1898.txt files, it doesn't really make sense to place it anywhere other than the 1898 folder.
So if you were creating 1898 from scratch, the first approach you could use is to make copies of all the files from the Standard folder, place them in the 1898 folder, and change all their names from "Standard.xxx" to "1898.xxx". Then you would open the 1898.var file (which used to be the Standard.var file) and replace every occurrence of "Standard" with "1898". You would then open the 1898.gam file (which used to be the Standard.gam file) and edit it appropriately, and the same for the 1898.txt file.
Or you could use another approach. Rather than copying all those "Standard" files to the 1898 folder, you could use the 1898.var file to refer to the needed files in their locations in the Standard folder. For example, the MapData line in the 1898.var file would read:
MapData: Standard/Standard.mapThe "Standard" before the slash is telling Realpolitik to look in the Standard folder. The "Standard.map" after the slash is telling Realpolitik what file to use. But even using this approach, the 1898.var file still needs to be in the 1898 folder, and 1898.gam and 1898.txt files might as well be in the 1898 folder.
Sharing files is generally
a good idea. First of all, if there is an error in a file, such as a .map
file which is used by many variants, it can be fixed in one place. Secondly,
it saves space. This is particularly good for the graphics and .rgn files,
which can get quite large.
The Region Tool
The Region Tool is a program included with Realpolitik that you use to create the Variant.rgn file, which is used by Realpolitik to know where you are when you click on the map. To use this, you need a Variant.map file, a Variant.pct/Variant.bmp file and a Variant-Borders.pct/Variant-Borders.bmp file and they all need to be located in the same folder.
The Variant-Borders.pct/bmp file will be used in the background to show the Region Tool where the borders are for each space, and the Variant.pct/bmp file will be used to show you what the map will look like in Realpolitik as you work. The Variant-Borders.pct/bmp file has to be an exact replica of the Variant.pct/bmp file but with all the color and extra stuff removed. In other words, the Variant-Borders.pct/bmp file should show nothing but the borders and these borders have to line up exactly with the borders of the Variant.pct/bmp file. You also need to make sure there are no gaps in your borders or the Region Tool will treat two spaces connected by a gap, as one space. Be sure that the spaces in the Variant-Borders.pct/bmp file have a white background or fill. If you use "no fill" as opposed to a white fill, The Region Tool will not be able to scan the spaces. If you have bi-coastal spaces, you will need to draw a line down the middle of the space in the Variant-Borders.pct/bmp file to represent the split between the two coastal areas for fleet placement. The Region Tool will automatically join the two coastal areas to create the entire space. Note that the line between the two coastal areas must be only one pixel wide for this to work properly.
When you open the Region Tool, you will get the "open file" dialog box. Find and open the Variant.map file. The two graphic files will be opened by the Region Tool automatically.
In the lower left-hand corner of the map, where it would normally display the season information, it will ask you to click on a space. Click anywhere within the correct space on the map to identify it. The space will highlight briefly and then the left-hand corner will ask you to click on the location where you want the space's name to be. A label with the name will appear showing the permanent location of the name. Then the left-hand corner will ask you to click on the location where you want the unit in that space to be. A unit will appear showing the permanent location for the unit in that space. It will then ask you to click on the next space. Take advantage of the undo feature if you don't like your initial placement of units and names.
When you are done with all
the spaces, the text box will clear, and you will be able to save the Variant.rgn
file. Remember to place it in the same variant folder with the rest of
the variant files.
Icons
I have had some requests to change the icons in Realpolitik, both to make them bigger and smaller, brighter, less bright, etc. Obviously I can't please everybody, so instead I have made it possible to modify them to nearly your heart's content. The icons are stored in a resource file called Icons on the Mac side, and as individual icon files in a folder called Icons on the PC side. To make changes you will need a resource editor like ResEdit or Resourcer for the Mac, and an icon editor like Microangelo or AxIcons for the PC. There are four separate classes of icons:
Base icons - there are two base icons, a fleet and an army icon. The default Realpolitik icons are set so that these base icons make up the bottom of the final, displayed icon, however, you don't need to do it that way. The base icons are drawn first, and the other classes are drawn on top, so you could create a base icon that provides an outline that the other classes "fill in." In the MacOS version, the names of these icon resources need to be Army and Fleet, respectively, and in the PC version, the icon files need to be named Army.ico and Fleet.ico.Color - There needs to be one icon for each color listed above in the Variant.cnt file section. This will be drawn over the base icon when displaying on a color or grayscale screen. The default icon in Realpolitik has a flag in the upper right-hand corner, but again, this doesn't need to be this way. The names of these icons, either in the resource or the file name, have to match the name of the colors.
Pattern - There needs to be one icon for each pattern listed above in the Variant.cnt file section. This will be drawn over the base icon when printing or when in monochrome mode (primarily in the Macintosh version). The default icon in Realpolitik has a flag in the upper right-hand corner, but again, this doesn't need to be this way. The names of these icons, either in the resource or the file name, have to match the name of the patterns.
Abbreviation - There needs to be one icon for each possible country abbreviation (see the Variant.cnt file section). This is every letter from A to Z, not including M (Master) and O (Observer), as well as 0 through 9. This will be drawn over the combined base and color icons (or base and pattern icons). In the default Realpolitik icons, these are in the upper left-hand corner, but again, they don't have to be. The names of these icons, either in the resource or the filename, have to match the letter or number they represent.