Colony Planner
A standalone Java example with no mod dependencies. It demonstrates physical storage
queries/transfers, native labor designation, placeable construction and saved terminal outcomes,
plus native information/action panels for crafting, zone planning and furniture hauling.
All Java imports are JDK or forgottentowns.mod.api; all player-facing metadata has 13 translations.
Build
From the repository:
.\gradlew.bat --no-daemon assembleColonyPlannerMod
Or from the SDK:
.\examples\mod-sdk\build-mod.ps1 -Project .\examples\colony-planner-mod -ApiJar .\build\mod-sdk\forgotten-towns-mod-api-15.jar -OutputDirectory .\colony-planner-build
The repository task creates build/mods/colony_planner. Copy that folder to the game's mods folder,
then select Apply & reload. The example ships with enabled: false so installing
it does not designate terrain at placeholder coordinates.
Configure the example
Edit the copied pack's settings.json before validating/restarting:
- Set
enabledto true and chooseaction(GATHERING,MINING,DIGGING,WOODCUTTING, orHARVESTING) plusworkX,workY,workZfor an explored, eligible target. - Optionally set
placeableId(defaultnone),buildX,buildY,buildZand logicalfacing. The normal construction rules must permit it; the mod cannot grant missing materials or unlocks. - Optionally set
transferAmountfrom 1 to 4096,resourceId, and two exactsourceStore/targetStorekeys obtained fromcontext.inventory().stores()in your own extension. This moves existing stock immediately; it does not create a hauling task. Zero disables this example step.
Coordinates are tile units, with z increasing downward. Storage keys and coordinates are world-specific, so use a disposable test settlement when configuring this authoring example.
The four-square HUD button opens the example panel even while enabled is false; its actions remain
disabled until configured. Set recipeId for the one-batch crafting button, zoneId for a one-tile
zone at buildX/Y/Z, and pickupPlaceableId plus targetStore for physical furniture hauling.
none / 0 disable each action independently. Accepted-request count and zone/hauling receipts are
saved. Craft clicks intentionally add another batch; zone/hauling actions are one-shot per world.
The panel disappears when the mod is disabled and the game restarts. See panels.
The mod attempts unresolved commands once per game day and saves accepted IDs. Rejected plans may
retry on the next day. A successful transfer, accepted labor order and accepted construction plan
each happen once per world; changing settings does not erase that history. Completed/cancelled outcomes
are saved under workOutcome and buildOutcome. It does not automatically replace cancelled work.
No global/static world state or external files are used.
See the inventory and construction contract for bounds, timing, supported targets, save semantics and the construction/work categories still awaiting submission hooks.