The science
Population. Growth is logistic, dP/dt = r g P (1 − P/K) + m (1 − P/K), with K the housing capacity (6 per house, 24 in the town hall), r = 0.012 per hour, g a happiness/sanitation factor and m = 0.25 settlers per hour; over capacity people leave, with no food the town shrinks. The closed form is P(t) = K / (1 + ((K − P0)/P0) e−rt).
Harvest. Farm output follows the year: f(d) = 0.8 + 0.35 cos(2π(d − 200)/360), peaking mid-July and lowest in January; spring is below average, which is why the food surplus is modest at the start. Unmilled grain loses 20 % to spoilage; windmills mill it.
Wind. A windmill converts P = ½ ρ A v3 Cp with ρ = 1.225 kg/m³, blade radius 9 m, Cp = 0.30 (a real sail mill is below the Betz limit 16/27 = 0.593). Milling capacity is scaled to the power at the 6 m/s design wind.
Food and heat. Each citizen eats 0.125 units/h (1 unit ≈ 100 kg grain), guards a little more; in cold months households burn wood, 0.05 × population × cold(d).
Labour. Workers are 62 % of the population minus guards; every production building has job slots, and output scales with staffing = min(1, workers/jobs). Lumber output also scales with trees nearby (forest factor), stone needs a rock outcrop.
Money. Gold = tax (per citizen, scaled by the tax slider and a happiness efficiency) + market trade − upkeep. Market prices follow stock with elasticity 0.5: price = base (ref/stock)0.5. Happiness is a sum of simple terms (food, market, church, wells, walls, guards, taxes, research) smoothed over time.
Honest limits. All gold prices, costs, yields and the raid model are illustrative game constants, not medieval statistics; real towns of 1250 had very different economies. The raid event compares a defence rating with a rising threat; no fighting is shown. Buildings, towers, ships and the two guards were modelled in Blender; population, economy and seasons run in the page.