MODDING INSTRUCTIONSCreate your first pack →

Forgotten Towns Mod SDK 15

Open wiki/index.html for the offline modding instructions.

The SDK, its sample packs, and this authoring wiki are separate downloads. They are not bundled with the player game or automatically installed into its mod library. Install an example deliberately in a test profile when developing a mod.

Choose what to make

Task Start with Needs a JDK?
Change an existing value examples/mod-samples/balance_patch No
Add a weapon, furniture, or creature examples/mod-samples/content_starter No
Change difficulty or wildlife migration examples/mod-samples/difficulty_tuning No
Add a complete scenario examples/scenario-mod/pack No
Extend another pack examples/mod-samples/crystal_addon; requires Practice Workshop No; its dependency contains Java
Register a supported Java hook examples/mod-template JDK 21 or newer

Follow the JSON-only instructions. Use the field index for accepted keys, the field explanations for meaning, and examples/mod-sdk/reference/base-ids.json for existing IDs.

Install a JSON-only pack

  1. Copy a runtime pack so its manifest is at mods/pack_id/mod.json.
  2. Open Mods → Refresh, enable the pack, and choose Apply & reload.
  3. Test the intended effect in a test world.

The normal Windows mods directory is %LOCALAPPDATA%\ForgottenTowns\mods. Use the Mods screen's folder button to locate it. JSON-only packs need no compilation. Do not enable every sample together; choose the profile you intend to test.

Build a Java pack

With JDK 21 or newer on PATH or selected by JAVA_HOME, run from the extracted SDK root:

.\examples\mod-sdk\build-mod.ps1 -Project .\examples\mod-template -ApiJar .\build\mod-sdk\forgotten-towns-mod-api-15.jar -OutputDirectory .\my-first-mod-build

Install only the resulting my-first-mod-build/my_mod folder. The helper also accepts -JavaHome. See Java extensions for lifecycle and supported hooks, or advanced guides for the simulation examples.

Validate and publish

Use Apply & reload or the installed game's --validate-mods entry point. The SDK contains no standalone game validator. In a source checkout, use gradlew validateMods.

Windows game packages include Workshop Publisher.exe. It validates a pack with its dependencies and supports isolated test profiles. Follow the publishing guide.

All supplied samples target the current SDK and declare "contentApi": 14. Keep released IDs stable and read save compatibility before updating a pack.

Maintainers: run ./gradlew.bat --no-daemon modSdkZip to rebuild the distributable.

Forgotten Towns · Modding reference