The Let's Play Archive

Master of Magic

by nweismuller

Part 75: Map Generation and Neutral Towns

nweismuller posted:

Neutral cities get to 'cheat' a bit on food support for their troops. Although they don't actually have tax mechanics, I am reasonably sure, I can at least estimate the sort of taxes the town would 'really' need to support an army of that size and the unrest that it would cause. The garrison in place would be sufficient to quash the unrest with the taxes this town would need, which would be three times the taxes we are running.

Neutral cities essentially don't follow the same rules that are followed either by human or AI players' cities, in a nutshell. Below, in spoiler tags, I'll dump the mechanical details for map generation (of which neutral city parameters are a part); those who aren't interested or don't want to be spoiled on the inner game mechanics can safely ignore it.

Both planes have a map that is 60 squares wide and 40 squares high. The amount of this area that is walkable land is determined by the landmass size setting at game start; it is 15% for Small, 20% for Medium and 30% for Large. The map generator places a maximum of 10 rivers, 8 major deserts, and 8 major swamps on each plane; tundra can only be placed within 7 squares of either the top or bottom of the map.

Once the base map is generated, terrain features are then placed. Each square of the map containing some terrain other than grassland or tundra has a given chance of having a special feature; this chance is 1/17 for Arcanus, and 1/10 for Myrror. When a resource is placed, in Arcanian desert, it has a 2/3 chance of being gems and a 1/3 chance of being quark crystals; in Myrran desert, it has a 1/5 chance of being gems, a 3/5 chance of being quark crystals, and a 1/5 chance of being crysx crystals; in Arcanian hills, it has a 6/18 chance of being iron, a 3/18 chance of being coal, a 4/18 chance of being either silver or gold (each), and a 1/18 chance of being mithril; in Myrran hills, it has a 1/10 chance of being either iron, coal, silver, or adamantium, a 4/10 chance of being gold, and a 2/10 chance of being mithril; in Arcanian mountains, it has a 4/18 chance of being iron, a 5/18 chance of being coal, or a 3/18 chance of being either silver, gold, or mythril; and in Myrran mountains, it has a 1/10 chance of being either iron, coal, or silver, a 2/10 chance of being either gold or adamantium, and a 3/10 chance of being mithril. Resources placed in forests are always deer, and resources placed in swamps are always nightshade. Apparently the game can also try to place a resource on grassland; when it does this, it's always coal on Arcanus, and always gold on Myrror. (This can be observed next to Goldwash.)

The game then places exactly 6 Towers of Wizardry on each plane, which will share identical X/Y coordinates on each plane. If this places a tower on water (it often does), the square will be converted to grass - this is why you often see towers on 1x1 islands. It tries to place them at least 10 squares apart from each other whenever possible, and always places them at least 4 squares away from any node.

Next, the game places 16 nodes on Arcanus and 14 on Myrror, the type of which is determined by the surrounding terrain. (Because of this, Sorcery nodes are more common than the other two types.) The game tries to limit this by capping the number of Sorcery nodes at 9 on Arcanus and, I believe, 8 on Myrror (the official guide claims 4, but this is demonstrably wrong). Each node on Arcanus has 5-10 aura squares; on Myrror, they have 10-20 aura squares. Each aura square grants Power to the controlling wizard; the amount granted is either 0.5, 1 or 1.5 based on the setting for magic strength at game start (weak/normal/powerful).

Next, the game places each player's starting city. Starting cities are always placed at least 2 squares away from the top or bottom edge of the map. The game attempts to place them at least 16 squares apart from each other when possible, but will settle for as little as 10 squares apart (they cannot be closer than 10 squares). It also tries to place them at least 8 squares away from any node and 4 squares away from any Tower of Wizardry, but neither of these are enforced strictly.

Neutral cities are placed by the game next. The game generates a number of neutral cities (I don't know the precise amount, and different sources claim different numbers; at least one source claims it varies based on landmass size, which makes sense.) It also assigns a random race to each contiguous land mass on the map - every neutral city placed within a given land mass has a 75% chance to be a city of the land mass' race. Finally, the starting population of the city is determined by a die roll based on the game's difficulty setting: 1d4 for Intro or Easy, 1d4+1 for Normal. On Hard or Impossible, the starting population has a 4/5 chance of being 1d4+1 and a 1/5 chance of being 1d10+1. Each neutral city's initial buildings are cumulatively determined by the city's starting population as follows: 1 = no buildings, 2 = barracks, 3 = smithy, 4 = builder's hall, 5 = armory, 7 = granary, 8 = stables, 10 = city walls. Neutral city population grows at half the standard rate, and the population of any neutral city is capped at an amount based on the game difficulty and its initial population; for intro/easy/normal/hard/impossible difficulty, the cap is the initial population plus 2/4/6/8/10, respectively. (They also still obey the standard population caps based on resources and terrain, although the initial placement does not obey these caps.) I believe that neutral cities only ever produce units, except when they grow enough to add a new building listed above. A neutral city may never possess more military units than it has 1000s of population; if the limit is exceeded, the oldest unit is automatically disbanded. (Cities that originally belonged to an AI player but have become neutral will not destroy buildings, but they will obey this garrison cap, disbanding 1 unit per turn until the cap is obeyed.)

Finally, the game places exactly 25 "normal" and 32 "weak" lairs, scattered across both planes.