TOAW IV version 188.8.131.52 map files in XML format - description
1. Blended terrain (terrain that "spills" over the hex border). The appearance of the terrain tile is controlled with an integer. The value of the integer is determined by which sides of the hexagon blend into the next hexagon. Consider the top side of the hexagon as "north", and the values are N = 1, NE = 2, SE = 4, S = 8, SW = 16, and NW = 32. These values are added as necessary. So, if one wanted the terrain in question to blend over the NW and SW sides of the hex, the integer value would be 48.
2. File format. The file header looks like the following. Note that "maxx" and "maxy" cannot be less than 19 (smallest TOAW map is 20 x 20 hexes).
<MAP version="100" offsetx="0" offsety="0" minx="0" miny="0" maxx="19" maxy="19">
The final record of the file has this appearance:
Depending on the editor one is using, these tokens may all appear on a single line. In between the file header and the final record are the records for the terrain data. Each hexagon has a record that starts with the hex coordinates (<CELL loc) followed "b=". The hexagon terrain record is terminated with ">". Within the record, fields are separated with the "/" character. There are 48 fields (this document numbers them 1 to 48) that describe the terrain. I have not been able to determine what fields 41, 43, and 45 do, although I suspect these fields may be used when a scenario is being played.
3. Record format for each hexagon. Following is a hexagon record as an example. Note that the hex location is 0,0. 48 fields follow, each set to a value of zero.
<CELL loc="0,0" b="/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0"/>
Following is the key to the fields. Fields 01 through 35 correspond to the 35 terrain tiles in the map editor, starting with clear terrain (01), arid (02), sand (03), and ending with broken rail line (35). The integer value in each field controls the appearance of the terrain type as described above in paragraph 1. For example, if one wants a hill terrain tile that blends only over the north hex edge, the integer value in field 06 would be 1. Note the value 63 means the terrain should blend into all adjoining hex tiles. The use of fields 36 through 48 is:
Field 36 Shallow water edging
Field 37 Deep water edging
Field 38 Entrenchment level
Field 39 1=anchorage, 2=airfield, 4=peak, 8=contaminated, 16=non playable, 32=muddy, 64=snowy, 128=destroyed bridges (additive for multiple effects)
Field 40 0,1=ownership by first and second force, 8=very cold (additive)
Field 41 UNKNOWN use
Field 42 8=exclusion zone 1, 16=exclusion zone 2
Field 43 UNKNOWN use
Field 44 Red Border hexsides (1=N, 2=NE, etc.)
Field 45 UNKNOWN use
Field 46 Distance from adjacent hexes
Field 47 UNKNOWN use, but some integer values cause display of the vertical bar used to indicate a unit's movement path
Field 48 UNKNOWN use, but some integer values cause the hex to be tagged with "round 1"
Note that shallow and deep water hexes are often coded with value 63, indicating the entire hex is filled. Values other than 63 change the shape of the water tile. Edging (fields 36 and 37) are applied to surrounding hexes and the hexside values are subtracted from 63 to place the edging on the desired hexsides; thus value "59" places edging on the SE hexside.
4. Odd bits.
Field 01 corresponds to clear terrain, but the clear terrain tile always fills the hex; it does not seem alterable in terms of shape unless one places something like edging for a body of water along a hexside. This characteristic may simply be so because clear terrain is the default terrain in the map editor.
Disallowed terrain types (like airfields on shallow water) can be created by manually editing the XML file. I have not tried to use such terrain in a TOAW scenario. The game might allow it, might ignore it, or might crash. My advice would be to experiment with small scenarios and see what happens.
TOAW-nonfunctional terrain can be created. For example, water edging can be used to create what looks like "hexside rivers" on a map -- but TOAW will see only the other terrain and ignore the edging. This aspect, though, is interesting. With edits to the XML file, a map that looks like it has hexside rivers can be made and exported as a *.bmp file. This graphic file could then be used with other platforms (like, get ready ... Microsoft Excel ) to serve as the base image on which to push around graphic objects representing army corps, orcs, and so on. At that point, it is a different game system using a TOAW-generated map. One suspects the only limit here is imagination, especially when one considers the potential of using this with alternate terrain tile sets produced by enthusiasts.
If anyone knows or figures out the "UNKNOWN" fields noted above, please advise.
< Message edited by cathar1244 -- 1/7/2019 12:39:27 PM >