Shannon V. OKeets
From: Honolulu, Hawaii
Is it possible to add text to the map? Let's say I want to add Vyazma to the map a few hexes west of Moscow. Is that possible? Note, I realize I cannot add it as an actual city.
Yes. You can add the actual city too if you want. The former has no effect on game play but the latter obviously does.
Patrice added hundreds of names to the map and has written up how to do so in the Players Manual:
126.96.36.199 Labels data
This file lists all the labels that are displayed on the map. These include the names for the countries, cities, and ports. It is also used to position the icons within each hex: resources, factories, cities, and ports. There are 12 data fields in each record, starting with the label ID #, followed by the hex’s column and row numbers. The next two fields are offsets for the label’s positioning from the upper left corner of the rectangle within which the hex is inscribed. Fields 6 through 9 are for the positions of the icons for: city, port, factory, and resource. The last 3 fields are the color code, size, and text for the label.
The label ID # is crucial because it is used by the terrain file (see section 188.8.131.52) to determine where the icons (city, port, factory, and resource) should be positioned within a hex.
The row and column numbers are exclusively for the placement of the label. Note that labels usually start in one hex and continue across one or more additional hexes, depending on their length and font size. Each hex is positioned within a rectangle that is 136 pixels wide by 152 pixels high. The hexagon (a.k.a., hex) has its left and right edges flat against the left and right sides of the rectangle. The top vertex is in the middle of the top edge of the rectangle, and comparably for the bottom vertex.
This design allows great flexibility in where labels are placed, through the use of the two offsets. The offsets are measured from the upper left corner of the rectangle (0,0). The scale is 0 to 67 wide and 0 to 75 high; or to put it another way, each number in the offset counts as two pixels. An offset of (10, 38) would position the upper left corner of the label at the pixel 22 across and 78 down. The pixel 78 down from the top would be half way down within the hexagon. The pixel 22 across would be about 1/6 of the way across.
Icon positions range from 0 to 25. 0 is the center of the hex. Positions 1 through 12 are at the clock positions 1 through 12, 2/3 of the distance from the center towards the edge. Positions 13 through 24 are similar but halfway between the center and the edge. Note that the higher numbers are closer to the center. Position 25 is used exclusively for routing rail lines through the center of the hex.
It is quite possible for a NAM data record to have all blanks in the 4 icon fields. Or, they could use all 4 fields. The size (width by height) of the different icons are:
• City = 22 by 22 pixels
• Capital city = 34 by 34 pixels
• Factory, 1 stack = 14 by 32 pixels
• Factory, 2 stacks = 24 by 32 pixels
• Factory, 3 stacks = 34 by 32 pixels
• Resource = 30 by 30 pixels
• Oil = 30 by 30 pixels
• Ports, all types = 30 by 30 pixels
• Rail line = 6 pixels wide
The color codes are:
2. Dark red
5. Navy blue
11. Bright green
15. Aqua blue
The text sizes are doubled to get the pixel height of the font. A text size of 10 would be 20 pixels high. There are standard usages for sizes and colors of labels, as shown in the following table.
Multiple names in the same hex are fine, though each has to have its own record entry, of course. In order to position a resource on the map without a label, use 0 as the size of the label and enter ‘none’ for the label’s text.
The maximum number of labels in this file is 8100. There are 8191 positions but those last 91 are reserved for the sea area names, which are not part of the NAM file. New names can be inserted into any ‘holes’ created by removing names, but don’t move the old names around since it has unpredictable results. You cannot completely remove any entries from this file. Leave a vacuous entry behind: “xxx, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,None”.
There are many reserved names in the game (e.g., Sian, all the objective cities). If you change the names of places willy-nilly, there is a good chance that the program stop working completely. Should that occur, restore the original data files.
Perfection is an elusive goal.