Settlers scale with empty homes: fast catch-up, slowing near full

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-10-19 20:35:15 +01:00
parent 8fbab37a56
commit 632a12e8bc
3 changed files with 11 additions and 10 deletions

View file

@ -482,9 +482,9 @@ TIERS = [
{"name": "City", "pop": 150, "cap": 99, "houses": 8},
]
TIER_SLOTS = 2
# Growth: empty homes draw settlers (a share of all the homes, every day, while
# any stand empty), and families grow a little on their own.
SETTLERS_PER_HOME = 0.25
# Growth: empty homes draw settlers, fast while many stand empty and slower as
# they fill, and families grow a little on their own however full the city is.
SETTLERS_PER_EMPTY_HOME = 0.5
FAMILY_GROWTH = 0.05
RAID_GROUPS = ["the Red Hand", "the Hollow Crows", "the Blackwater gang", "the Ashen Wolves",
@ -1437,7 +1437,7 @@ def _start_next(world: dict, now: float) -> None:
def growth_per_day(world: dict) -> float:
"""New townsfolk a day while there's room: settlers for the homes, plus families."""
pop = world["city"]["population"]
growth = SETTLERS_PER_HOME * housing(world) + FAMILY_GROWTH * pop
growth = SETTLERS_PER_EMPTY_HOME * max(0.0, housing(world) - pop) + FAMILY_GROWTH * pop
return growth * city_rate(world, "growth") * (1.25 if fitted(world, "furniture") else 1)