=====================
COLONIZATION AMER2.MP
MAP FILE
=====================
FENRISULV, 31/07/2001
=====================

The <amer2.mp> file consists of a header and three submaps. The
header is six bytes long. The submaps are of size map_width *
* map_height. Map dimensions are given in the header. Colonization
default is 58 * 72 squares. The edge squares are hidden from the
player, so playarea is 56 * 70 squares. Of the three submaps, the first
seems to be the only one of any importance - it stores all the terrain
data. The second submap is filled with zeroes and the third one 
stores all lakes and islands on the map. Special resource squares
are placed randomly. The Indian tribes appear in the same area in
every game, but their camps/cities are placed randomly inside this
area.

Here is the table for terrain values (might prove to be 
very inaccurate). One nibble = 4 bits (half byte). One
byte represents one map square.

------------------------------
First  Second Description
nibble nibble
------------------------------
0      x      ORIGINAL TERRAIN
       0      Tundra
       1      Desert
       2      Plains
       3      Prairie
       4      Grassland
       5      Savannah
       6      Marsh
       7      Swamp
       8      Boreal Forest    (same as 10h)
       9      Scrub Forest     (same as 11h)
       A      Mixed Forest     (same as 12h)
       B      Broadleaf Forest (same as 13h)
       C      Conifer Forest   (same as 14h)
       D      Tropical Forest  (same as 15h)
       E      Wetland Forest   (same as 16h)
       F      Rain Forest      (same as 17h)

1      x      FOREST, if used with
              0 - 7 of Original Terrain
       9      Water
       A      Sea Lane
              
              (e.g. 11h is forest + desert,
              i.e. scrub forest, but 19h is
              water)

2      x      HILLS, if used with 0 - 7 of
              Original Terrain (e.g. 24h is
              Hills landscape on Grassland
              texture)

4,5    x      MINOR RIVER, if used with 0-F
              of Original Terrain (e.g. 4Dh is
              a minor river flowing through
              a Tropical Forest.

A      x      MOUNTAINS, if used with 0 - 7 of
              Original Terrain (e.g. 5Ah is 
              Mountains landscape on Savannah
              texture)

C,D    x      MAJOR RIVER, if used with 0-F
              of Original Terrain (e.g. CFh is
              a major river flowing through
              a Rain Forest. Note: D seems to be
              used with 9 - C9h would be river +
              + scrub forest, but D9h is river + ocean,
              i.e. where the river flows into
              the ocean.

[fenrisulv@hot.ee]
[eof]



***
***
***


=========================
SETTLERS 2 (GOLD EDITION)
MAP FILES, V1.1
=========================
FENRISULV,   21/07/2001
=========================
fenrisulv@hot.ee
=========================

[FORMAT DESCRIPTION]

----------------------------------------
OFFSET            LEN DT DESC
----------------------------------------
0                  10 $  ID "WORLD_V1.0"
10                 18 $  Map name
28                  2 ?  ???             
30                  2 W  Map width
32                  2 W  Map height
34                  1 B  Always zero ?
35                  1 B  GFX set
36                 20 $  Creator name
56               2296 ?  ???             

2352             1040 B  Altitudemap   
3392             1040 B  Terrainmap 1
4432             1040 B  Terrainmap 2
5472             1040 B  Roadmap  
6512             1040 B  Landscapemap
7552             1040 B  Typemap
8592             1040 B  Animalmap
9632             1040 ?  ??? (00)     
10672            1040 B  Buildingmap
11712            1040 ?  ??? (07)     
12752            1040 B  ??? (00)     
13792            1040 B  Resourcemap
14832            1040 B  Shadowmap
15872            1040 B  Lakemap

All offsets given for 32*32 maps, in decimal.
All submaps consist of a 16-byte header chunk and map_width * map_height size
data chunk. The editor doesn't use some sub-maps. They might be used by the
game during playing (e.g. storing locations of buildings). This document is 
entirely based on my own research and the some of the data here may prove 
inaccurate or worse, totally wrong. You've been warned.

[APPENDIX A - SUBMAPS]

Appendix A gives descriptions of the purpose
of different submaps and supplies tables for 
used values and their interpretation by the game.
All values here are hexadecimal.

<A1 - Altitudemap>

This map stores the altitude of every square.
A0 is sea level. If x < A0, ground is below sea level,
if x > A0, ground is above sea level.

<A2 - Terrainmaps>

Terrainmaps store values, which show the gfx to use for
every triangle. Triangle is half of a map square (see
appendix B). The first terrainmap contains data for
every triangle-1, the second for every triangle-2. The
table lists terraingfx values for greenland.

-----------------
Value Description
-----------------
00    Savannah
01    Mountain
02    Snow
03    Swamp
04    Desert
05    Water
08    Meadow
09    Meadow
0A    Meadow
0B    Mountain
0C    Mountain
0D    Mountain
0E    Steppe
0F    Meadow (Flowers)
10    Lava
12    Meadow (Mountain)

<A3 - Roadmap>

Roadmap seems to hold the locations of roads. Although, 
it's never used by the editor. The following table lists
values for roads of different types and directions.
You can add these to get mixed road types and directions.

---------------------
Dir Road Donkey Water 
---------------------
-   01   02     0C
\   04   08     30
/   10   20     B0

Example:

You want a regular west-east road and a NE-SW waterway
to begin at the same point. So you take 01 (road)
and B0 (waterway) and get B1.

<A4 - Landscapemap>

This map stores all trees and landscape objects (granite,
dead trees, mushrooms, etc.) Corresponding typemap value
is C8, unless noted otherwise. Pay attention to 16h - this
is the Gateway and it gives a cool effect when added to
some special place on the map.

------------------------
Value        Description
------------------------
00-01, 22    Fungi
00-06      Player startpos, only if typemap value is 80
01-06        Granite, only if typemap value is CC or CD
02-04        Stones
05-06        Dead Tree
07-08        Skeletons
0A, 10-12    Bushes
0C-0D        Cactus
0E-0F, 13-14 Shrubs
16           Gateway
26-27        Pebbles

<A5 - Typemap>

Typemap stores the type of the landscape object
at its location (if any).

------------------------
Value Description
------------------------
80    Player startpos
C4    Trees (1-4)
C5    Trees (5-8)
C6    Tree 9       
C8    Regular landscape object
CC    Granite
CD    Granite

<A6 - Animalmap>

Animalmap stores all the animals in the
map. The given table is probably not 
final, there are some animals that cannot
be added with the original editor.

------------------------
Value Description
------------------------
01    Duck
02    Fox
03    Stag
04    Deer
05    Duck
06    Sheep
??    Polar bear

<A7 - Buildingmap>

The buildingmap stores all possible 
construction locations and their quality.

------------------------
Value Description
------------------------
01    Flag
02    Hut
03    House
04    Castle
04    Port (I don't know how the game differentiates a castle and 
           a port.)
05    Mine
09    Landing flag
0D    Mine
68    Construction possible, but something is in the way (e.g. a tree)
78    No construction    

<A8 - Resourcemap>

This map stores all underground resource
locations, except water, which is generated
randomly.

------------------------
Value Description
------------------------
20    Land
21    Land
40-47 Coal (41 = smallest quantity, 47=biggest quantity)
48-4F Iron
50-57 Gold
58-5F Granite
87    Land - water line

<A9 - Shadowmap>

The shadowmap is used to store shadowed and highlighted
areas on map; 40 = normal.

<A10 - Lakemap>

This map seems to be used for numbering inland lakes.
Every lake has its number and the lake's water squares are
all marked with this number. 01 is used for land.
Although, if you look at some in-game maps, this submap
does not look like that at all and it may be used for
other purposes.

[APPENDIX B - SETTLERS 2 TERRAIN SYSTEM]
        
           (0,0)       (1,0)
           +------------+         <--------+  
            \           /\                 |
TRIANGLE 1   \         /  \                |
              \       /    \               | A SQUARE
               \     /      \              | 
                \   /        \ TRIANGLE 2  |
                 \ /          \            |
                  +------------+   <-------+
                  (0,1)       (1,1)       

[fenrisulv@hot.ee]
[eof]

   -Fenrisulv

[EOF]
