Die technische Dokumentation ist in englischer Sprache verfügbar. Code- und Feldnamen folgen der aktuellen Mod-API.
MODDING-DOKUMENTATION
Shared Quarters
A standalone Java mod. No dependency on Love & Birth or Sundering.
Each residence can hold one person per bed. Sharing a residence applies −2 happiness per game minute to residents without a family member in that home. When Love & Birth is also enabled, partners and their children share a household and are exempt. An unrelated lodger still pays −2.
Residences, barracks and guard houses with fewer than six floor tiles per living occupant apply an additional flat −2. Exactly six is sufficient. This penalty does not multiply with the shortfall. The game's ordinary resting-room size effects remain separate. The optional “Soldiers in shared homes” setting works independently of any family mod; an unrestricted housing policy does not require household membership.
Migration counts vacant beds in shared residences, after reserving beds for existing homeless civilians. Assigned incoming migrants reserve their beds immediately. The normal happiness and reachable-entry requirements still apply, with at most three arrivals per day; those arrivals can all use one shared residence. Floor area is not a hard migration cap: below six tiles per living occupant, the crowding penalty can lower happiness enough to stop later migration.
The C1 housing lesson is patched through the generic questStages content hook: build one
shared room of at least 36 tiles with six beds, plus two private rooms of at least 12 tiles with
one bed each. Tailoring and grass harvesting precede this lesson. The normal game asks for eight
separate furnished homes. C0 still teaches one unfurnished 12-tile room. Unassigned people can
sleep temporarily on the floor, but permanent bed-dependent residents require available beds.
Build from the repository with gradlew assembleSharedQuartersMod shared_quartersModZip.
Install the complete build/mods/shared_quarters folder or distribute build/mods/shared_quarters-1.3.0.zip.
Enable it in Mods, then choose Apply & reload.
From the extracted SDK, build without game source:
.\examples\mod-sdk\build-mod.ps1 -Project .\examples\shared-quarters-mod `
-ApiJar .\build\mod-sdk\forgotten-towns-mod-api-15.jar -OutputDirectory .\shared-build
Install only shared-build/shared_quarters. The JAR, manifest and all translations travel together.
The registered housing policy is reusable engine behavior; the crowding and sharing rules are in
src/sharedquarters/SharedQuartersMod.java. Removing the mod is subject to normal saved-profile checks.
Customization
The pack includes a cover and about/ui.json for presentation overrides. See
UI and gameplay customization for the complete theme slots,
settings files, typed hooks and engine limits. Keep a copy of an older
pack before updating. New versions are validated against the API, content and saved state.
Open Mods → Settings for family exemption and soldier housing. Done keeps a draft; Apply validates it,
and Restart activates it. Pack defaults remain unchanged. Two screenshots and extended descriptions
are included in about/ for the in-menu gallery and future Workshop presentation.
