Cities are the backbone of every Great Mage's empire. They allow them to create buildings that generate resources, or Guilds that can recruit military units from the population, or buildings that provide upgrades to their military. A city that has a local resource within its limits can make buildings that are otherwise not available to them.
Capital & Castles
At the center of every city stands a Castle, a vital defensive structure. The Castle at your Capital is the most important building that you have. If an enemy takes it, you lose. To defend your Capital, your mage is able to attack with a fireball that does Elemental damage to the target and surrounding hexes, with a range of 3. Castles in other cities have a missile attack with a range of 2. The power of these attacks depends on how much hit points the Castle has.
Castles also generate a small amount of resources. Your Capital will generate 5 each of Gold, Food, Mana and Research. Castles in other cities will generate 2 each of Gold, Food and Mana.
Each city has its own values for generating Gold , Food , Mana , and Research . Buildings can either generate a discrete value of a resource, like a Rogues Guild, Pub or Mana Farm, or they can multiply your existing output by a certain factor, like a Tax Office, Granary or Mill of Souls. Because many of these buildings come in a chain of requirements, it can be very profitable to specialize your cities in generating a specific resource. To illustrate: A city holding a Market and five Craftsmens Districts produces 21 gold, whereas having one of every gold-generating building (Market, Craftsmen District, Guild, Tax Offices, Mint and Bank) produces almost 36 gold.
Resource output is calculated in the order which it is listed in the city's infobox. It first adds all the discrete sources of income (in the previous example, 2+4+2+3, also counting the Castle), then multiplies this by a cumulative percentage (so +50%, +75%, +100% becomes +225% total), and then subtracts any upkeep costs of other buildings in the city (Without upkeep costs the total gold production equals 35.75). This figure is rounded to the nearest whole number.
Note: in the recent patches, the Landscape type can affect the amount of resources provided by buildings.
The population of a city determines its size and the number of buildings it can support. A newly founded city begins with a population of 1000 - Capital cities 5000 - and this can increase over time to nearly 15000. A city's population will increase steadily, and its growth rate depends on the number of buildings in the city. A small city with only a few buildings has a natural growth exceeding 150, whereas a capital with a building on every hex only has a natural growth of one.
The growth rate of a population is affected by your Food production. To sustain itself, a city's population uses 1 Food for every 1000 people in it for the Monster and Human races, while The Undead require Mana. If a city does not receive these resources, it will not be able to grow.
It is also worth noting that any city not of your race will carry a penalty of -50 to its growth rate.
Spells can influence growth rate as well, and greatly affect the level of development a city is likely to reach in a game. The below table shows the turns needed to reach a city size under several conditions:
Own race, no buffs
|Prosperity||Blessing||Both||Other race, no buffs||Prosperity||Blessing||Both|
Thanks to pu239 
A city's boundaries are determined by the size of its population and can grow up to 3 hex rings around the Castle. Any hex that falls inside a city's boundaries can be built on (except mountains and water). If the boundaries of two cities you own overlap on some hexes, then only the city that originally expanded into that hex can build there. Other cities are still able to grow expand into unpopulated hexes if their boundaries adjoin.
Cities expand their borders at size 5, and again at 10.
Friendly units that are within the boundaries of your city regenerate 10% of their maximum health each turn, except when they are Dead.
To found a new city, the location needs to fit two requirements:
- The hex to build on cannot be mountains, water, or a special resource.
- Be at least four hexes from another city.
Buildings in a city that you control act as roads, and can aid the movement of your Units. In your cities, units can move through hexes with buildings on them much more easily; they only spend 0.5 movement points per hex, regardless of the underlying terrain. Units not belonging to your faction do not receive this benefit. This is also unaffected by diplomatic status.
When an enemy takes a city's Castle, a number of buildings inside that city's boundaries are destroyed. This will also cause the population to decrease drastically. However, this decrease does not cause the city's boundaries to shrink. The destroyed buildings are randomly selected, so among the destroyed may be some prerequisite buildings that cause other buildings to stop working. For example, if a Rogues Guild is destroyed in the sacking, then any Tax Offices, Mint or Bank will stop generating gold. A new Rogues Guild will have to be constructed before these buildings are able to function again. Once this is done, you will have to go back to the city and click on the darkened building icons in order to reactivate them.
If you choose to destroy a city that you own when it is at least level 2, then you will will receive a settler of that city's race.
Notes and References
The raw population growth, not taking into starvation, is:
RawGrowth = 215 - Population * 0.015 (minus 50 if the city is not of your own race)
I am working on how to account for Starvation. Starvation Penalties appear to be applied to all applicable cities. In my game where I was negative 10.7 food, my non undead population cities were penalized 30 population growth.