I've found out somemore about byte # 5 (the "fertility" byte) stored in the second map block.
It seems to be divided into two nibbles (four bit values). The higher order bits seem to control owner ship of land. If a civilization has a city, unit, or has a city actively working a square, this nibble is set to that civ (0 = barbarian, 1=white civ, etc). F
is used to represent no owner ship.
If you change the value of this nibble underneath a unit, you can convince units from the same Civ to attack it. For example, if you put a German warrior on a square with a 00 (barbarian) value for the fifth byte, next to a German howizter, the German howitzer will toast the warrior.
The second nibble seems to control how desirable a square is for city building. Higher values are more desireable with 0 preventing the AI from building a city. 1-7 are used when a square is within a city's radius(or when a city is on the square). 8-F are used otherwise. I haven't figured out exactly how this value is calculated, but I presume it has to do with the food/shield/trade production of the surrounding terrain.
Examples:
F0 = Unowned, AI won't build a city
F8 = Unowned, not very desireable spot.
01 = Barbarian owned, not very desireable spot near a city (presumably near a barbarian city).
I've spent a few days testing this out, and it seems to work, but I haven't exhaustively tested it. If anybody finds out that I'm wrong about the above I'd appreciate hearing about it. I hope this is helpful to someone.
It seems to be divided into two nibbles (four bit values). The higher order bits seem to control owner ship of land. If a civilization has a city, unit, or has a city actively working a square, this nibble is set to that civ (0 = barbarian, 1=white civ, etc). F
is used to represent no owner ship.
If you change the value of this nibble underneath a unit, you can convince units from the same Civ to attack it. For example, if you put a German warrior on a square with a 00 (barbarian) value for the fifth byte, next to a German howizter, the German howitzer will toast the warrior.
The second nibble seems to control how desirable a square is for city building. Higher values are more desireable with 0 preventing the AI from building a city. 1-7 are used when a square is within a city's radius(or when a city is on the square). 8-F are used otherwise. I haven't figured out exactly how this value is calculated, but I presume it has to do with the food/shield/trade production of the surrounding terrain.
Examples:
F0 = Unowned, AI won't build a city
F8 = Unowned, not very desireable spot.
01 = Barbarian owned, not very desireable spot near a city (presumably near a barbarian city).
I've spent a few days testing this out, and it seems to work, but I haven't exhaustively tested it. If anybody finds out that I'm wrong about the above I'd appreciate hearing about it. I hope this is helpful to someone.
Comment