La documentazione tecnica è disponibile in inglese. Code and field names follow the current Mod API.
DOCUMENTAZIONE DI MODIFICA
Setup
Choose the tools for the kind of mod you want to make. All public examples target Content API 15.
JSON content
- Install the game and open Mods → Open mods folder.
- Use a text editor that saves UTF-8 JSON.
- Follow Your first mod. This creates a pack with a manifest and one patch file.
- Choose Refresh, enable the pack, then choose Apply & reload.
- Open a new test world and check the change.
Use the JSON reference to find accepted keys. New names and descriptions need translations; the content starter includes working examples. Java and a source checkout are optional for JSON packs.
Java extensions
- Download and extract the Mod SDK from the modding website.
- Install JDK 21 or newer. The game's bundled runtime does not include a compiler.
- Copy
examples/mod-templateto your own project folder inside the extracted SDK. - From the SDK root, build the supplied project with:
.\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
Use a fresh output directory. If Java is not on PATH, pass -JavaHome 'C:\Path\To\JDK'.
Install only my-first-mod-build/my_mod in the mods folder. _build is compiler output.
Enable the pack and choose Apply & reload.
Compile against the API JAR. Attach its matching source JAR in your IDE for documentation. Follow Java extensions for registration and lifecycle rules, and use the generated Java reference for exact signatures.
Before sharing
Check the mod alone, with its declared dependencies, and after saving and loading a test world.
Distribute the pack folder with mod.json at its root. See validation and
Steam Workshop for the release steps.
