I've been working on a procedural map generator that draws cities and towns on continents and islands and I've gotten to the point where I'd like to add lists of structures to the settlements.
I know my simulation isn't accurate to how these systems naturally develop but I have to find a balance between a realistic simulation and keeping things moving along both in development and performance. Here's how the logic progresses:
- Draw the world. Continents, islands, oceans, lakes. Add rivers. Add biomes (forests, mountains, grassland, tundras).
- Add cities on confluences and coasts a reasonable distance from each other. Draw roads between the cities.
- Sprinkle in towns. Market towns on road crossings, mining towns, salt towns, and stone quarries in mountains, logging towns in forests, and fishing towns in secluded havens.
- Determine regions by filling in the land around a city. If the number of towns in a region doesn't make sense (big region = more towns) add a single additional logging or fishing town.
Each Region ends up containing one city and several towns, usually of different town types. In the game I'd like to make with this, AI and human players conquer regions usually by capturing the city. This grants them control over the whole region, so a region will always only have one ruler. A region receives effects from the structures within their contained cities and towns. Variables like food, happiness, growth, and wealth are calculated across the entire region.
Setting is High/Late Middle Ages
Now I'd like to add a "possible structures" list (building chains) to each city and town type. My planned building chains look like this (with simplified effects):
City or Town: Both cities and towns can contain these structures
- Mill: food multiplier
- Farm: +food
- Brewery: +happiness +growth
- Castle: +defense
- Church: +happiness +culture
- Industry: +growth +wealth
- Well: +sanitation +happiness
City: Only cities can contain these structures
- Large Castle (upgraded from Castle): +defense
- Fortifications: +defense
- Theatre: +happiness +culture
- Library: +happiness +culture +research
- Market: +growth +wealth
- Barracks
- Range
- Stable
- Siege Workshop
Infrastructure: Region upgrades
- Roads: +movement
Town: Any town
- Guardhouse: +defense
Salt Town
- Salt Works: +salt
- Salt Trade: +wealth +growth
Mining Town
- Iron Mine: +iron
- Iron Trade: +wealth +growth
Quarry Town
- Quarry: +iron
- Stone Trade: +wealth +growth
Market Town
- Market: +wealth +growth
- Inn: +happiness
Harbor Town
- Fishery: +growth +food
- Military Harbor
- Trade Port: +growth +wealth
Logging Town
- Hunting Lodge: +food +wealth
- Woodcutter: +wood
Are any of these buildings unnecessary or redundant? Are any crucial buildings missing? Feel free to suggest additional town types, too.
Try the demo for yourself: http://olinkirk.land/realms/