FORGOTTEN TOWNS

FORGOTTEN TOWNS / MODDING DOCUMENTATION

Modding wiki ↗

Java API reference (Javadoc)

MOD API 15

Browse the wiki

Current Mod API documentation.

MODDING DOCUMENTATION

Practice Workshop - independent player mod project

This runnable teaching project uses six JSON registries and two Java hooks. It supplies a workshop costing two Stone and two Wood, a crystal recipe, a +2 damage weapon/shield imbuement, a small equipment-conversion rule and diamond particles. All player-facing text has thirteen language catalogs. Its placeholder art references the base game's Mason Bench, Stone and Quartz. It has no Sundering content or dependency.

pack/ contains runtime data. src/ contains the optional hook class that the build helper compiles into pack/hooks.jar in the output. The six patch files are already listed in the manifest.

From the repository or extracted SDK root, with JDK 21 available:

.\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

For a source checkout, first run ./gradlew.bat --no-daemon modApiJar. Copy the resulting my-first-mod-build/my_mod to your user-data mods/ folder and add my_mod to mods/enabled.json. Restart and use a new test world. At the Practice Workshop, the ordinary recipe consumes one Quartz and produces a crystal in 150 work ticks. Its separate conversion action requires an Essence Smithy-qualified worker and destroys stored Fire-imbued weapons or shields for a 75% success roll. Crystals can be imbued at the Essence Smithy. This is a teaching example, not an endgame balance mod.

To author your own mod, copy the project and rename my_mod throughout manifest IDs, translation keys, JSON references and Java registrations. Keep folder name and manifest ID identical. Build into a fresh output directory each time.

See the complete guide, field reference, asset templates, JSON-only sample and dependent add-on.