Teknik dokümantasyon İngilizce olarak mevcuttur. Kod ve alan adları mevcut Mod API'sine uygundur.
MOD DOKÜMANTASYONU
Forgotten Towns player modding guide
Content API 15. This manual describes the current supported contract.
For JSON-only mods, start with the step-by-step instructions. Use the field index to look up accepted keys. The game now has Mods on the main menu for local packs, load order, validation, recovery and Steam Workshop subscriptions. See player instructions.
A mod is a folder containing its own manifest, JSON patches, translations, PNG artwork and, optionally, a Java hook JAR. The game loads explicitly enabled folders before initializing its content registries. You can distribute that folder without editing or rebuilding the game.
This guide teaches the general API. The Practice Workshop starter is an independent teaching
mod with a crystal resource, ordinary crafting, an imbuement, equipment conversion and particles.
It has no dependency on the Sundering Bench. Sundering has its own manual at
docs/modding/sundering-bench.md in the game repository and is built separately; its code and
gameplay assets are included in the SDK source example.
Placed workstations can attach passive and ritual particles to authored sprite pixels. See workstation particles and ceremonies for marker atlases, operation profiles, elemental sockets, and the mod-owned Sundering example.
Contents
- What you can change
- Choose a sample
- Build, install and validate
- Folder layout and manifest
- JSON operations and dependencies
- Walk through the complete starter
- Translations
- Java extension class
- Assets and particles
- Saves, updates and distribution
- Troubleshooting and current boundaries
- Reference and sample index
The field index lists every path declared by the loader contract. The field explanations describe authoring rules and nested objects. See coverage and remaining gaps before treating it as a full schema. The asset guide explains dimensions, coordinates and the supplied templates.
What you can change
These are the supported JSON entry points. Use the exact, case-sensitive registry names below
in patch operations. A file's name does not select a registry; the operation's registry does.
| Registry | What its data controls | Runnable starter file |
|---|---|---|
resources |
Inventory materials, icons, storage categories, stack size, discovery and value metadata | resources.json |
recipes |
Ingredients and alternatives, stations, work stages, output, bonus rolls, burn failures and discovery unlocks | recipes.json |
placeables |
Construction, sprites and facings, footprint, work positions, storage and existing placeable capabilities | placeables.json |
essences |
Imbuement materials, supported equipment slots, existing stat modifiers, glow and existing essence drop selectors | essences.json |
equipmentTransforms |
A station's destructive conversion rules, qualification, chance, duration, labels and particle profile | equipmentTransforms.json |
particleProfiles |
Registered polygon shape, particle size, travel, lifetime, brightness and bounded trails | particleProfiles.json |
difficulty |
Resource abundance, terrain features, starting settlement and wildlife difficulty presets | difficulty.json |
creatureRespawns |
Births, natural migration calendars, pack composition and population balance | difficulty.json |
families |
Resource groups and ingredient unit values | Meadow Life |
food |
Nutrition, happiness, spoilage and existing food effects | Meadow Life |
equipment |
Base equipment statistics and existing attack effects | Meadow Life |
features |
World objects, plants, interaction flags and drops | Meadow Life |
creatures |
Actor definitions using existing movement, combat and spawn behavior | Meadow Life |
creatureLoot |
Creature selectors and death loot | Meadow Life |
questStages |
Patch an existing lesson's localized title/body and objectives, retaining its identity, order and actions | Shared Quarters housing |
Java mods can register callbacks for definition queries, colony simulation, trade, work, events and native presentation. Start with Java extensions, then use the generated Java reference for complete callable contracts.
The game's other JSON files are not automatically mod APIs. Base biome generation, professions, zones, audio, UI layouts and global combat rules remain outside these registries. The Mod API provides separate owned scenario registries; it does not grant arbitrary edits to base campaigns. Adding a material does not, by itself, make it a weapon, food, ore deposit or creature drop. The connected registry guide explains which definitions to add together.
Choose a sample
| Start here | Contents | Requires Java compilation? | Enable these IDs |
|---|---|---|---|
| JSON Content Starter | Standalone weapon, furniture, and creature with all translations | No | content_starter |
| Practice Workshop | A complete project using the original six JSON registries and both Java hooks; modest +2 damage crystal imbuement | Yes | my_mod |
| Balance patch | Changes the existing stone stack size to 24, without new labels or assets | No | balance_patch |
| Crystal add-on | Depends on the starter; changes its balance and trails; adds multi-stage/alternative recipes, storage and a crafted decoration | No; its dependency has a JAR | my_mod, crystal_addon |
| Shared Quarters | Standalone bed-based housing and crowding moods | Yes | shared_quarters |
| Memorials | Native death notices, mourning moods and persistent outcomes | Yes | memorials |
| Love & Birth | Standalone conversation affinity, families, pregnancy and childhood | Yes | love_birth |
| Meadow Life | Connected food, families, features, creatures, loot, equipment and registry queries | Yes for its optional consistency callback | meadow_life |
Practice Workshop is an authoring project: build its pack/ directory plus Java sources.
Meadow Life is also an authoring project. Balance Patch and Crystal Add-on are runtime packs:
their mod.json is at the folder root, so copy them directly. Their README files stay with the
packs; Markdown is permitted there.
Use the indicated enabled lists for your first test. Other mods that require complete essence coverage may need compatibility rules before they can load alongside the starter's new essence.
Copy a sample before editing it. Rename my_mod consistently in the manifest, namespace IDs,
translation keys, Java registration strings and mod asset paths. Keep code.entrypoint equal to
the actual Java package and class name; it does not have to match your mod ID. Avoid double
underscores in essence-related IDs because generated imbued item IDs use __ as a separator.
Build, install and validate
With the downloadable SDK
Unzip ForgottenTowns-ModSDK-15.zip. Keep its directory structure so relative links and commands
continue to work. Install a JDK 21 or newer if compiling hooks; the build helper emits Java 21
bytecode. A Java runtime alone does not contain javac.
From the extracted SDK root, run:
.\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 `
-JavaHome 'C:\Path\To\Your\JDK'
Replace the JDK path with your installation. If JAVA_HOME or javac.exe on PATH already selects
the correct JDK, omit -JavaHome. Choose a new output directory on each build: the helper rejects
an existing destination to prevent stale files from entering your release.
The result is my-first-mod-build/my_mod/, including hooks.jar. Install only this folder.
The adjacent _build/ directory contains compiler output and does not belong in a runtime pack.
Compilation checks the Java class; it does not validate the JSON or launch the game.
For a JSON-only pack, copy its runtime folder directly. The current build helper itself expects an
API JAR and JDK even when a manifest has no code; direct copying avoids those build dependencies.
Install and enable
On a normal installed Windows game, the mods directory is:
%LOCALAPPDATA%\ForgottenTowns\mods
A development checkout uses its repository root as user data. An explicit
forgottentowns.userDataDir JVM property or FORGOTTENTOWNS_USER_DATA_DIR environment variable
overrides that root. Put the whole pack at mods/my_mod/mod.json, with its assets and JAR alongside
the manifest as declared. Do not put it inside the application's shipped assets/data directory.
Use Mods → Installed mods to enable the pack, then choose Apply & reload.
Installed dependencies are enabled automatically when enabling a pack. For manual setup, create
or edit mods/enabled.json:
{
"enabled": ["my_mod"]
}
For the add-on, use {"enabled":["my_mod","crystal_addon"]}. Preserve other entries if you intend
to keep those mods enabled. The loader ignores unlisted folders. A missing enabled file or an
empty list means vanilla content. Dependencies must be installed and enabled;
manual enabled lists must include them explicitly. The Mods screen enables installed dependencies automatically; it does not download missing packs. Choose Apply & reload after content changes.
Validate against the game
With a source checkout, first build the SDK using:
.\gradlew.bat --no-daemon modSdkZip
Then build the starter as above. For a clean validation profile, make this layout:
build/mod-guide-check/
mods/
enabled.json
my_mod/
mod.json
hooks.jar
data/...
translations/...
Validate the isolated directory:
.\gradlew.bat --no-daemon validateMods -PmodUserData=build/mod-guide-check
The application entry point also accepts --validate-mods, including an installed launcher that
forwards application arguments. From its installation directory, the equivalent Windows command is
& '.\Forgotten Towns.exe' --validate-mods. The SDK is an authoring kit and does not contain the game
or its validator. Use the installed game or source checkout to resolve real resource and station IDs.
Validation initializes content without opening a game window or initializing Steam. It checks the
enabled profile, manifests, references, translations, PNG bounds and runtime registries, and loads
declared Java hooks. Success prints the ordered IDs, versions and content hashes. Detailed failures
are logged under the selected user-data directory in logs/launcher.log and logs/errors.log.
After validation, use the same profile for a new test world. Confirm the recipe appears, workers can reach the station, the resource fits its stockpile and the effect works on eligible equipment. Validation cannot judge sprite appearance, practical access or balance. It does not remove save compatibility requirements.
Folder layout and manifest
The starter separates the files the game loads from authoring materials:
my-authoring-project/
README.md
src/example/StarterMod.java
pack/
mod.json
data/resources.json
data/placeables.json
data/recipes.json
data/essences.json
data/equipmentTransforms.json
data/particleProfiles.json
translations/en.json
translations/nl.json
...the other eleven language catalogs
assets/ optional PNGs owned by this pack
hooks.jar added by the build helper
The complete manifest example is usable as shipped. All paths in it are relative to the runtime pack root, with forward slashes. Comments and trailing commas are not JSON. The manifest accepts only these fields:
| Field | Required? | Meaning |
|---|---|---|
id |
Yes | Folder identity matching [a-z][a-z0-9_]{1,63}; 2-64 characters |
version |
Yes | Exact three-number version such as 1.0.0; no ranges or prerelease suffixes |
legacyIds |
No | API 15: exact retired unnamespaced IDs adopted by this pack to preserve saved content references. Existing base IDs cannot be replaced by add. New content uses the pack namespace. |
contentApi |
Yes | Positive integer. Current API is 15; use the minimum required by your features. Older packs remain supported; newer declarations undergo compatibility validation. See the registry list for JSON entry points. |
requiresNewWorld |
No | Boolean, default false. Set true only when this pack cannot join an existing world; its own saves remain loadable. |
dependencies |
No | Object mapping required dependency IDs to author-tested versions, for example {"my_mod":"1.0.0"} |
patches |
No | Ordered array of unique paths to JSON operation arrays |
translations |
No | Object mapping supported locale IDs to flat JSON string catalogs |
tables |
No | Map of up to 16 names to captured JSON files, each at most one MiB; deeply immutable |
settings |
No | Path to a JSON object of at most 128 scalar values and 64 KiB; immutable at runtime |
settingsSchema |
No | Path to the editable-settings schema; pairs with settings and localized labels; see customization |
code |
No | Object containing exactly jar and entrypoint; omit for a JSON-only pack |
code.jar must end in .jar. code.entrypoint is a fully qualified class implementing GameMod
with a public zero-argument constructor. Adding a JAR file without declaring code does not execute
it. Manifest fields such as name, author, description, workshopId and preview are not
supported; put author credits and release notes in a README outside assets/.
Paths must stay inside the pack: no absolute paths, drive letters, backslashes, . or .. segments,
empty segments, symlinks or junction-based escape routes. Only .json, .png, .md and .jar
files are accepted in a runtime pack; under assets/, only PNGs are accepted. Keep Java source,
Photoshop files, SVG guides, ZIPs and build directories outside it.
Current capture limits are 4,096 filesystem entries per pack, 64 MiB per file and 256 MiB total. JSON documents are limited to 8 MiB and nesting depth 64; a patch file permits 4,096 operations. These are validation limits, not recommended content sizes.
JSON operations and dependencies
A manifest-listed patch contains an array of operations, not the game's full registry wrapper:
[
{
"registry": "resources",
"op": "add",
"id": "my_mod:crystal",
"copyFrom": "quartz",
"values": {
"stockpileZoneId": "resource_stockpile",
"tradeValue": 12,
"stackSize": 20
}
}
]
This illustrates one operation from the full starter. Installing it also requires the matching manifest and translations. Copy complete sample packs first, then remove pieces deliberately.
| Operation field | Meaning |
|---|---|
registry |
One of the fourteen names in the entry-point table |
op |
add for a new ID, or patch for an existing ID |
id |
New IDs must be your_mod:local_id, with local ID matching [a-z][a-z0-9_]* |
copyFrom |
Optional for add only; clone an already available definition in the same registry |
values |
Object containing the fields to add or replace |
add rejects duplicate IDs. patch rejects missing IDs. There is no remove, rename, append,
arithmetic, condition, include or arbitrary file-replacement operation. Do not put id or essence
key inside values; the operation supplies identity. Do not author displayName, description
or fields ending in DisplayName, even in nested objects; names come from translations.
Merge rules: objects merge recursively; arrays replace the entire previous array; scalar values
replace the previous scalar; null remains an explicit null. An empty object does not clear an
inherited object. To clear optional inherited metadata, use a parser-supported null or explicitly
replace its nested arrays. Required fields cannot be cleared. For example, changing buildCost
replaces the complete recipe, and changing weaponGlow.colors replaces the complete palette.
copyFrom makes a snapshot at that point in composition. Later patches to the source do not flow
into the copy. Check inherited workstations, costs, surfaces, drop selectors, unlock requirements,
capabilities and crafted-resource IDs before considering a copied definition your own.
Patches run in manifest order. Packs run in dependency order; unrelated packs retain enabled-list
order, with deterministic dependency traversal. Referencing another pack's ID or asset requires a
declared dependency. If two packs write overlapping fields on the same definition, the later writer
must depend on the earlier writer, even if both write the same value. A dependency documents a
deliberate override; merely moving a pack lower in enabled.json does not authorize a conflict.
Writes to separate fields can coexist. A copied or added definition claims its complete entry.
The add-on manifest and
tuning patch demonstrate these rules. The
add-on depends on my_mod version 1.0.0, changes its existing damage modifier from 2 to 3 and
increases its trail count from 2 to 3. It inherits all other values and registers no Java class.
Walk through the complete starter
The sample uses existing game art as placeholders. Its new data, labels, balance and hooks live entirely in its own pack; it neither copies Sundering art nor changes the base game's JSON files.
- Material and icon:
resources.jsonaddsmy_mod:crystal, borrowing Quartz's existing icon, andmy_mod:workshop, borrowing Stone's icon for the workshop's UI. The latter is icon metadata, not an automatically manufactured workshop item. - Station:
placeables.jsoncopies the Mason Bench's geometry and explicit facings. It changes the cost to two Stone and two Wood, permits direct construction and clears the workshop-floor requirement. Its custom workstation tag can be selected by recipes. - Ordinary production:
recipes.jsonconsumes one Quartz at the new station and outputs one Practice Crystal after 150 work ticks. The game runs at 30 simulation ticks per second, so the authored work duration is five seconds, excluding travel, hauling and scheduling. - Imbuement:
essences.jsonmakes the crystal an imbuement material at the Essence Smithy for weapons and shields, with +2 damage. The existing engine creates eligible imbuing recipes and imbued item identities; the mod does not enumerate every weapon or implement equipment storage. - Conversion:
equipmentTransforms.jsonadds a separate station action for stored Fire-imbued weapons and shields. It aliases the existing Essence Smithy worker qualification and destroys one input for a 75% chance of one crystal. All unmapped essences are ineligible. Its deliberately small rule set usesrequireEssenceCoverage:false. - Particles:
StarterMod.javaregisters a diamond polygon.particleProfiles.jsonsets its appearance, and both the essence and the station's transform reference that profile.
The existing job system still owns selection, reservation, hauling, scheduling, destruction, output delivery and persistence. A JSON recipe and a transform are different operations: the recipe specifies ordinary ingredients; the transform selects an existing imbued equipment item.
The add-on recipes demonstrate two
alternative ingredient bundles, a two-station sequence, a random byproduct, a burn failure and a
separate distinct-resource-family recipe. These are intentionally separate examples because
ingredients, ingredientOptions and ingredientFamilySelection are alternative authoring forms.
Its placeables show a resource cabinet
and generated crafted decoration using placeholder base art. The cabinet inherits the Food Crate's
warehouse-floor requirement; the decoration borrows Ship Wheel art. Replace these visuals when
turning the sample into your own release.
Translations
Every player-facing string added by a mod must be available in all supported languages:
en, nl, de, fr, ru, zh_cn, es, pt_br, pl, ja, ko, it, tr.
The manifest selects the files; the loader does not discover catalogs by filename.
A catalog is a flat object of string keys and string values. The starter's English catalog includes:
{
"resources.my_mod:crystal": "Practice Crystal",
"placeables.my_mod:workshop": "Practice Workshop",
"recipes.my_mod:polish": "Polish a Practice Crystal",
"essences.my_mod:crystal": "Crystal Imbuement",
"mods.my_mod.convert": "Convert Equipment"
}
This is an excerpt; the runnable sample contains every key and all thirteen catalogs. Each added
resource, placeable, recipe and essence requires a name key of the form registry.full_id.
An object shared across registries needs a name in each registry, even if the displayed names
match. Transforms and particle profiles have no automatic name key; transforms use labelKey
and introKey explicitly.
Custom text keys must start with mods.your_mod. or a supported registry prefix followed by your
namespaced ID. Mods cannot override the base translation catalog or another mod's keys. A new
translation key must exist in every supported language with the same placeholder tokens. Match
the formatting used by the consumer, including {0} and {1} where applicable. The existing
event.crafting.failed recipe failure message receives the worker name and crafting location;
reuse it or supply a correctly translated two-argument key.
Keys used by optional discovery prompts and other existing text consumers need real translations
too. The loader checks supplied catalogs for parity but does not prove that every arbitrary
nested *Key field has a catalog entry. Verify those fields yourself. Developer-only instructions,
source comments and diagnostics do not need thirteen translations.
Colony simulation extensions
The Mod API provides per-world saved extensions, social conversation events, citizen/home snapshots, bed-based housing policies, validated spawning and citizen modifiers. See the colony guide, Shared Quarters and Love & Birth. Both mods compile against the public API alone and install independently.
Java extension class
Compile against forgotten-towns-mod-api-15.jar, not internal game classes. The complete
StarterMod.java implements GameMod:
package example;
import forgottentowns.mod.api.GameMod;
import forgottentowns.mod.api.ModContext;
import forgottentowns.mod.api.ParticleShape;
import forgottentowns.mod.api.ParticleShape.Point;
import java.util.List;
/** Registers the practice mod's conversion and particle shape. */
public final class StarterMod implements GameMod {
/** Constructs the entry point used by the mod loader. */
public StarterMod() {}
/**
* Registers hooks during startup.
* @param context registration context for this mod's namespace
*/
@Override
public void register(ModContext context) {
context.registerEquipmentTransform("my_mod:extract",
(input, percentile) -> percentile.getAsInt() < input.successPercent());
context.registerParticleShape("my_mod:diamond", new ParticleShape(List.of(
new Point(1, 0), new Point(0, 0.5),
new Point(-1, 0), new Point(0, -0.5))));
}
}
Lifecycle and ownership
The loader captures enabled pack files, composes their JSON and loads declared hook classes before
validating the completed registries. It invokes register once per loaded entry point during
startup. Register under your own namespace, with unique, non-null IDs and implementations.
The context closes when registration returns; keeping it and registering later is invalid.
The Mod API’s onRegistriesReady callback runs once after validation with immutable definitions;
see registry queries. It also runs during headless validation.
Colony extensions provide per-world restore/save, recurring update and conversation callbacks.
There are no per-frame, shutdown or hot-reload callbacks.
Each mod JAR has its own class loader with the API available from the game. A content dependency does not put the dependency's Java classes on your compiler or class-loader path. Depend on its registered hook IDs through JSON, not its implementation classes. Shade any necessary private library into your own JAR and avoid conflicting packages.
Java mods run with the game's process permissions; the API is not a security sandbox. Install code mods only from authors you trust. Validation also executes their startup registration. Pure, deterministic registrations are the supported contract; threads, filesystem effects and internal game reflection are not supported extensions.
Equipment conversion callback
registerEquipmentTransform(String id, EquipmentTransform transform) binds a handler ID used by
equipmentTransforms.handlerId. Its functional method is:
boolean producesOutput(EquipmentTransform.Input input, IntSupplier percentile);
| Input accessor | Meaning |
|---|---|
equipmentResourceId() |
Exact selected imbued item ID |
baseResourceId() |
Underlying unimbued equipment resource ID |
essenceKey() |
Current essence key on that equipment |
outputResourceId() |
Output resource selected by the matching JSON rule |
successPercent() |
Rule's configured integer percentage, 0-100 |
Return true to produce exactly one configured output, or false to produce none. The engine
destroys the selected input when the conversion completes in either case. The hook does not
cancel a job, choose a different output, change its quantity or refund the weapon. Use only the
provided percentile supplier (values 0-99) for randomness. Do not use wall time, global random
state or external state: the engine controls the job's deterministic resolution.
The built-in essence_extraction handler already performs the sample's < successPercent roll.
A JSON-only conversion mod can use that ID and omit its Java entry point, provided it also removes
any dependency on a custom particle shape. The sample retains the small callback to demonstrate
the extension class contract; a handler can inspect the supplied input to apply a different pure
decision without changing the game.
Particle shape registration
registerParticleShape(String id, ParticleShape shape) binds a polygon used by a particle profile.
new ParticleShape(List<Point>) accepts 3-16 vertices. Each Point(double x, double y) must be
finite and within [-1,1] on both axes. Vertices must form a convex polygon in counterclockwise
mathematical order, containing the origin strictly inside. Do not repeat the first vertex at the
end. The diamond in the complete source is a valid example.
The polygon defines the silhouette only. JSON controls motion, lifetime, scale, trails and brightness; essence glow supplies colors and particle count. The callback gets no renderer or GPU context, and cannot install an arbitrary emitter, shader or combat event handler.
Assets and particles
Use PNGs with transparency, crisp pixel edges and no painted guide lines. A resource atlas uses 64 × 64 pixel cells. Placeable region dimensions are explicit in JSON; the supplied placeable guide uses 128 × 128 pixel cells, four cells across for south, north, west, east. This is a recommended authoring layout, not a rule that every placeable must have a 128-pixel image.
The asset guide includes coordinate examples, standalone icon handling, anchors, work positions, single-facing art and alternate/variant frames. Editable SVG guides and existing PNG layout guides live in asset-templates, outside loaded packs. Their atlas patch example becomes usable once you supply the corresponding PNG exports; it is not silently loaded by the starter. The default starter uses base-game sprites and needs no custom PNG to validate.
A PNG at pack/assets/icons/materials.png is addressed in JSON as
assets/mods/my_mod/icons/materials.png. The manifest does not list each PNG. Base-game asset paths
can also be referenced. Changing a file under your mod namespace affects only definitions that
reference it; dropping a same-named base atlas into the pack does not replace a game file.
Profiles affect the existing equipment/imbuement particle surfaces, including held weapons, offhands and relevant item previews. They do not create particle pixels on arbitrary character art. Eligible equipment must already have the game's particle attachment pixels. Slots can be enabled for an essence without implying every slot has those pixels or visual behavior.
Saves, updates and distribution
The loader captures a stable copy of each enabled pack for the session. Editing the source folder while the game is running does not reload its content automatically. Choose Apply & reload after changing JSON, translations, JARs, assets or enabled order. The session reloads in the same game window.
Saves record the exact ordered profile: mod IDs, versions and content hashes. JSON, PNG and JAR
paths and bytes contribute to a pack hash, including files that are not named in patches.
Markdown and the reserved about/ presentation folder do not. API version also participates in hash identity. Even a formatting-only JSON
edit changes the diagnostic fingerprint, but a fingerprint difference no longer blocks a save. The game release number is not a mod compatibility requirement.
Ordinary additional mods can load into both vanilla and already-modded saves. For example, enabling Sundering adds its workstations, menu actions and content when an old world opens; a new world is not required. Existing save files do not need rewriting. The next normal save records the full active profile, including the additions.
The saved pack IDs must remain in the same relative order; additional packs may appear between them. Version and hash differences are allowed after startup validation. Before hydration, saved mod resource, recipe, placeable, creature and feature references are checked. Each colony extension restores its own state schema. Missing definitions or restoration errors reject the load without rewriting the save or substituting a backup. See compatibility.
Use "requiresNewWorld": true in a manifest only when adding the pack to an old world genuinely
requires unavailable creation-time state. It prevents adding that pack during load, while saves
already containing that pack may restore through the ordinary compatibility checks. Omission or false permits existing worlds.
This declaration does not introduce a world-generation API or regenerate terrain; the supported
registries are listed above. A missing dependency, content conflict or invalid pack still fails
normal startup validation. Keep the pack releases needed by existing worlds and test changes in a
separate user-data profile.
Distribute the finished runtime folder, not your project root. Include its manifest, declared JSON,
all translations, referenced PNGs and compiled JAR. Preserve its ID, relative paths and filename
case. Tell users the tested game/content API version and tested dependency versions in its README.
Never ship your enabled.json as an instruction to overwrite the player's full enabled list.
The main-menu Mods manager supports local packs and Steam Workshop subscriptions, download
progress, explicit local installation/update, and unsubscription. Workshop copies preserve previous
versions and never overwrite unrelated local packs. See Workshop.
Publishing tools, named profile libraries and changed-pack migrations remain future work.
For a cover and translated manager description, use the reserved about/ folder described in
mod presentation. Its contents are not gameplay inputs and do not
affect the save hash. Sundering's standalone assembly includes its cover and descriptions.
Troubleshooting and current boundaries
| Symptom | Check |
|---|---|
| Mod never loads | Exact folder/manifest ID match; correct user-data root; ID present in enabled.json; restart |
| Unsupported registry or field | Use the exact names in the reference and declare "contentApi": 15 |
| Missing dependency or conflicting write | Install and enable the dependency, then validate; add a deliberate dependency before overriding an overlapping write |
| Missing or untranslated label | Register all thirteen catalogs; use the correct registry.full_id key; match placeholders |
| JAR/class load failure | Build project before copying; public zero-argument GameMod entry point; correct case/package; Java 21-compatible output |
| Unknown handler or particle shape | Register that exact ID in an enabled declared JAR; keep IDs in your namespace; check dependency |
| PNG missing or crop outside image | Use assets/mods/id/...; export guide to PNG; verify complete 64-pixel resource cells or explicit atlas bounds |
| Recipe absent or cannot start | Discipline, discovery unlocks, ingredients, qualified worker, required zone/feature, station tags, work-slot access and preparation stations |
| New resource is not equippable or edible as expected | Resource metadata does not create an equipment stat definition or food profile |
| New essence never drops | No selector was authored, or its tag/mark is never emitted by existing game behavior; recipe-only essences are valid |
| Conversion rejects an item | Stored/unequipped imbued gear; correct slot; matching rule; no explicit exclusion |
| New placeable does not behave like a copied machine | Some machine consumers still select built-in IDs; a label or invented tag is not a new behavior hook |
| Old save fails after a mod change | Additional ordinary mods are allowed. Check for a missing/changed saved pack, changed relative order, or an added pack with requiresNewWorld: true |
The loader validates top-level patch fields against the explicit mod_registry_fields.json
contract. A field accepted by an internal Java parser is not automatically accepted by mod composition.
For example, root recipe workstationOptions and root placeable spritePath are not exposed by
the current base field set. Use the documented alternatives.
Placeable capabilities, storage and workstation-range objects reject unknown nested keys.
The families, food, equipment, features, creatures and creatureLoot registries reject unknown nested fields and incorrect JSON value types.
Some other nested legacy objects still tolerate unknown fields, and some numeric parsers normalize
out-of-range values. Passing validation does not prove a misspelled nested option took effect.
Use the reference spelling and sensible ranges. Food profiles can override resource foodValue
and tradeValue; use the food registry to control the complete eating profile.
Use only the supported operations and hooks. Engine managers, arbitrary UI windows, replacement AI and combat algorithms remain outside this contract. Native panels and authored scenarios have dedicated supported routes. See supported boundaries.
Reference and sample index
| Need | File |
|---|---|
| Every exposed JSON field and nested structure | JSON reference |
| Pixel dimensions, sprite coordinates and authoring templates | Asset reference |
| Complete manifest and six example registries | Practice Workshop project |
| Equipment transform and particle hook examples | StarterMod.java |
| A minimal JSON-only existing-item patch | Balance patch |
| Dependencies, nested recipes and generated placeable resources | Crystal add-on |
| Current accepted top-level values fields, machine-readable | registry-fields.json |
| Current base IDs for supported and referenced registries | base-ids.json |
| Standalone Java build helper | build-mod.ps1 |
The reference snapshots describe the game version shipped with this SDK. They are authoring aids, not patch files or a promise that every listed foreign registry is writable. Validate against the actual game version you intend to support.
Difficulty and wildlife tuning
The additional difficulty and creatureRespawns registries expose the world
setup presets and natural migration profiles. See difficulty authoring
for all fields and the difficulty tuning sample
for an installable pack. Difficulty IDs are fixed and patch-only; migration
profiles also support namespaced additions. Both use nested object merging and
the same dependency/conflict checks as other registries.
The Mod API provides inventory, work and construction, with a standalone Colony Planner example, scoped commands, terminal events and native save identity watermarks.
The Mod API provides native events and localized notifications, demonstrated by the standalone Memorials example.
