The settlers are finally in the game! So the population no longer moves from province to province by itself.
Here are more updates from this week:
AI Improvements, Performance, Balancing Tool and Bugfixes
There have been massive improvements under the hood for this update.
Saving doesn't stall the game that long anymore and placing buildings would always slightly slow down the game due to navigation mesh updates. Those hitches are either gone on faster computers or feel a lot less annoying on slower machines.
The AI now plays better as it has better access to wood. The placement algorithm now knows which places are full of wood and which are not to ensure a good placement of the forester hut.
For the balancing of the game I finally have a small tool which helps me make better decisions. Hamlets now give a lot more gold, gold mining is not as effective as it has been and troops are slightly more expensive.
Added: New AI personalities for testing.
Added: A new economy balancing tool in the editor.
It has pages for mining, market and income, army, buildings, research and the map.
A player overview that projects resources over several cycles.
It can read the deposits of any level and use them for its calculations.
Improved: The AI places buildings more reliably. It now always knows whether a building actually fits in a province, and it no longer fails to find a spot because of the height limit.
Improved: The AI only builds the crop fields and hamlets it needs, and it now notices when its population is starving.
Improved: The AI places foresters in the most wooded areas. It builds more foresters only where there is still enough uncovered wood, and only one on provinces that have a hamlet or will get the next one.
Improved: Mills and crop fields are no longer pulled to the province border to avoid forests. The AI only avoids real forest patches now, not forest that is spread evenly.
Improved: The AI mines missing ore. Resources with small reserves now compete fairly with gold, stone and wood.
Improved: The AI judges its income more accurately, reacts to urgent mana shortages and stops buying a resource once its storage is almost full.
Improved: The AI no longer sends or recruits workers into provinces that are under attack or being conquered.
Improved: The distance to the water source changes how fast a fire is put out gradually, instead of deciding between all or nothing.
Improved: Saving the game is much faster. The hitch dropped from 91 ms to 35 ms and uses far less memory.
Improved: Navmesh baking runs in parallel when a level loads.
Improved: Navmesh updates during play are much cheaper:
Buildings and resources now block the navmesh through baked blockers instead of carving, so only the changed tiles are rebuilt.
Growing trees only enter the navmesh once they are fully grown.
Navmesh sources are cached.
Improved: Defense:
The AI defends attacked provinces more reliably and frees its defenders again once the province is safe.
Burning provinces without water get a water source first.
The AI upgrades defenses in all its provinces, builds wizard towers on borders with strong enemies and builds recruiting buildings for defense.
Balancing: Unit gold upkeep doubled.
Balancing: Food now sells for 1 gold.
Balancing: Worker bags carry less gold.
Balancing: Workers mine at a different speed.
Balancing: Wells no longer cost ore.
Fixed a memory allocation issue in the terrain grid caused massive slowdowns.
Fixed slowdowns when searching plant positions and when placing buildings.
Fixed: AI conquest plans weren't fully reset, and a spy walking home could keep a conquest going.
Fixed: Big buildings like the town hall can be extinguished with water sources that have a greater distance to the burning building.
Fixed: Population could drop slightly below zero during starvation, which broke all resource checks.
Fixed the population in houses and the player's population count could drift out of sync.
Fixed: Workers could very rarely get stuck next to a storage because of wrong drop-off positions. Workers who stop close to the drop-off point now count as arrived, both when delivering and when fighting fires.
Fixed: Units moving diagonally could count as standing still.
Fixed: Exploring formations idled when they lost their start province. They now walk back to the closest own province.
Fixed several issues after a province changes owner via a debug command:
Workers were never given jobs again.
Units of squads in a tent became visible.
Building counts went wrong.
Squads of previously switched provinces switched owners too.
Even More AI Improvements
Added: The AI attacks temples with harmful auras, gathers its troops in a neighbouring province outside the aura, destroys the temple and then moves in. If the attack fails, it gathers a new army and tries again.
Improved: The AI picks its research focus based on its current situation. It builds research buildings only when research is too slow or a research type is missing, and it no longer starts a second building of a type that's already under construction.
Improved: AI research reacts to the AIs attacks. If its conquests are held up because it can't recruit the troops it needs, it puts more weight on military research and on unlocking those unit types.
Improved: The AI manages food rations and hamlet taxes with one shared target. Rations drop when food runs out and only go above Full when the people are unhappy. Taxes aim at a band that depends on how happy the people are and how much gold the AI needs, so the AI stops raising and lowering them in turn.
Improved: The AI counts crop fields that are still under construction and covers at most about a third of a province with fields, so other buildings still fit. Its estimate of crop output is now based on the food it actually earns.
Improved: Before the AI builds, recruits or summons, it checks that it can pay the upkeep after the purchase costs. If it has a market, it can cover a shortfall with gold.
Improved: AI wizards were reworked.
A wizard keeps its task until it has actually cast a spell. Before, it switched tasks and sometimes ended its incarnation for no reason.
Wizards support the AI's own attacking formations and keep 40% of their power in reserve while the AI is planning or running an attack.
Wizards pick better targets for defense, research and economy spells, and they don't cast a buff again on squads that already have it.
Wizards no longer flicker between preparing and cancelling a spell when a cast fails.
Improved: AI conquests were reworked.
The AI uses one strength formula everywhere when it plans an attack. Some units used to be counted twice, and health was overrated.
An attack lasts as long as the AIs formations are marching on the province or fighting there. It ends when they're gone or the province can no longer be conquered.
In every battle the AI compares its troops with all current defenders (formations, reserve squads and defense buildings) and retreats when it's outmatched.
The AI no longer waits forever for an army it can't complete. It launches the attack when it's close enough to the required strength.
Its estimate of the troops a monster spawner will send is based on the spawner's actual waves, and it gives the same result every time.
Squads left over from earlier conquest plans are freed. Before, they blocked part of the AI's army until a save game was loaded.
Misc
Improved: Incarnation upkeep rises the longer the incarnation lasts and the further the wizard is from their tower.
Improved: The upkeep increase doesn't reset as soon as an incarnation ends. It resets only after a delay, so incarnating again right away continues at the higher cost. Save games keep track of the delay.
Balancing pass for unit upkeep gold costs, population food costs and crop fields.
Fixed: Formations could get stuck forever when the navmesh was rebuilt during their path search, for example right after loading a save game.
Fixed: Formations taken from the pool kept the movement costs of their first unit type.
Fixed: A formation could start a new path with waypoints left over from its previous path.
Fixed: After loading a save game, the AI cut all food rations to None because its food income still read as zero.
Fixed: A neutral temple's summoned defenders no longer stop a province from being conquered.
Fixed: Placing or moving buildings in the map editor no longer causes a long navmesh rebuild every time.
Logistics and Bug Fixes
The logistics added are not perfect yet, but it's a good start and makes it necessary for the player to watch his population / troop ratio.
I have tested the AI a bit more. It's not perfect, but it's getting closer to a decent challenger.
Added: A logistics entry in the top bar. Its tooltip shows your capacity, the current troop cost and the strain bands, and the resource tooltip has a new logistics row.
Added: Logistics. How many troops you can field without extra cost now depends on how many people live in your hamlets.
Every empire gets a base capacity of 30 gold of troop upkeep. On top of that, each person living in a hamlet supports 1 gold of troop upkeep.
Strain is your troop upkeep divided by that capacity. Up to 100% strain, troops cost their normal upkeep.
Between 100% and 200% strain, the gold upkeep of all your troops rises slowly (x1.25 at 200%). Above 200% it rises steeply, up to at most twice the normal upkeep.
Hamlets in revolt add no capacity. Summoned units and workers don't count toward logistics.
Improved: The AI takes logistics into account when it recruits. It counts the extra upkeep a new squad adds to all of its troops and won't recruit past 200% strain, except in emergencies.
Improved: When the AI estimates what a monster spawner will send, it no longer adds up all remaining waves into one army. Waves that arrive close together are counted as one group, and the AI plans against the strongest group. AI attacks on spawner provinces now need less strength before they start.
Balancing: Unhappy hamlets pay only part of their taxes: You can no longer tax your capital without paying for it. The tax tooltip shows how much is held back.
Balancing: Population fire wood upkeep raised.
Balancing: Province attributes adjusted on the demo map.
Fixed: Exploring formations offered the wizard incarnation button once exploration reached 75%.
Fixed: The crop field preview sometimes blocked a 6x6 area instead of 5x5 because of a broken collider.
Fixed: A crash when building a message about a building that no longer exists.
Fixed: Missing text in the crash report dialog and the main menu.
Fixed: The player object list showed an empty field in the province display.
Fixed: Graphics settings data that had been broken on Windows.
The Settlers Arrive!
If you want people somewhere else, you have to recruit settlers at the townhall, send them to the new hamlet and let them settle there.
Added: New unit: Human Settlers, with their own model, animations and icons.
Added: New unit category "Support" for units that don't fight, like the settlers.
Added recruiting settlers takes the people from the houses of the recruiting province. Cancelling the recruitment gives them back.
Players can only recruit them if that province has enough population.
Settlers don't count for logistics, don't get the logistics multiplier.
The resource tooltip shows them in their own "Support" row.
Settlers cannot be healed or recovered.
Settlers behave similar workers when a fight breaks out.
Added: AI opponents use settlers.
They recruit them at their biggest hamlets and send them to the hamlet they plan to found.
The planned hamlet gets its houses first.
A town hall from an earlier plan is picked up again instead of being left unfinished.
Idle settlers move to the plan, or to a hamlet that has room.
Added settle button in the squad UI turns the settlers into population of the province they are in.
They can settle in your own and in allied provinces.
Only finished houses that aren't burning count as free space.
Settling doesn't refund the recruitment costs.
Improved: The error button UI shows missing population, and its icons keep their aspect ratio.
Improved: Population no longer moves to other provinces on its own. People who don't fit into their province anymore are lost, so settlers are the only way to move people around.
Improved: Provinces with less than one person get no immigration. An empty province has to be settled first.
Improved: Militia no longer strains the logistics either. The logistics tooltip names both.
Improved: Large units like settlers and siege engines get more room in a formation. Each rank uses the spacing of its biggest unit, so big units no longer bump into the rank ahead.
Improved: following squads now match the leader's speed. Faster squads no longer run into the squads ahead, and slower ones no longer fall behind.
Improved: Bigger units now align better to the ground which looks awesome!
Improved: A squad is only punished for the upkeep it actually pays into (troops, summons or workers).
Summons in formations are no longer punished twice.
Summons in reserves are punished when their upkeep is missing.
Improved: The penalty of each squad depends on its own upkeep. Paid mana troops no longer soften the penalty of unpaid gold troops.
Improved: Summons follow the same rule as troops: morale first, then health.
Improved: A squad that doesn't use a missing resource is skipped. Before, it ended the penalties for everyone after it.
Improved: Buildings are punished by the missing share of their own upkeep, the same way as squads. Only players own buildings are affected.
Improved: The tax compliance of unhappy hamlets has been rebalanced: Furious 1%, Angry 25%, Unhappy 65%. Taxing your capital too hard really hurts now.
Improved: Population wood upkeep went up from 0.05 to 0.125.
Improved: AI Workers go where they're needed:
Idle workers are sent out before new ones are recruited.
Workers move to the province with the largest worker shortage, including hamlets. Workers already on their way count.
A move only evens out the two provinces, so workers no longer walk back and forth.
New workers are recruited for every province that has a shortage of them.
While a province is below the minimum number of workers, the AI recruits them without budget limitations.
The AI no longer recruits more squads than it asked for.
Fixed units sometimes sliding in their idle pose when they came out of a tent or the fog of war while walking.
Fixed an error when the map editor rebakes the navmesh.
Fixed worker animations listening to job changes after the worker died.
Fixed several unit descriptions.
Big units now adjust on steep climbs.
Thank you again and joining me on this journey <3
-Matthias
