FORGOTTEN TOWNS

FORGOTTEN TOWNS / DOCUMENTAZIONE DI MODIFICA

Wiki di modifica ↗

Java Riferimento API (Javadoc)

MOD API 15

Sfoglia la wiki

Documentazione corrente dell'API Mod.

La documentazione tecnica è disponibile in inglese. Code and field names follow the current Mod API.

DOCUMENTAZIONE DI MODIFICA

Settlement Trading source study

Learn how a parent mod and two dependent mods fit together using the original Settlement Trading, Campaign Trading and Settlement Map sources, preserved before their integration into the base game.

Browse the complete source study or download its source ZIP. The browser shows every Java file, JSON table, translation and image. The ZIP also contains the Content API 15 JAR, build helper and original-file SHA-256 checksums.

Read in this order

  1. The parent manifest lists its content patches, translations, settings and Java entry point.
  2. SettlementTradingMod.register validates settings, creates an immutable SettlementTradeCore, registers a packed-goods trade filter and a sandbox policy, and validates final registry references.
  3. packing.json connects the crafting discipline, packing profile, 63 products, packing table, storage group and pallet display. Pack/unpack recipes are generated by the shared engine.
  4. The campaign child's manifest declares its parent. requireSettlementTradeCore resolves the parent's economy instead of duplicating it. Its markets.json supplies authored campaign markets.
  5. The map child uses the same core and reads locations, factions and recruitment offers from data. Its keyboard shortcut uses the public command registration API.

What belongs to the engine

These packs select policy and content through the public API. The engine performs inventory transactions, records actual packing output, keeps finite purses, reconciles delivery receipts, renders pallets and presents trading and map panels. Mod code never reaches into mutable world managers. Recurring exports come from recorded production during the last 12 days, not estimates of farm growth or workstation capacity. The old production table remains a compatibility input.

Build a new extension

The Bread Crates sample is a small, installable JSON extension for the integrated game. It adds one product to native packing and trade.

Use your own manifest ID, content IDs and translation keys. Do not copy legacyIds: those entries preserve this feature's historical save identities. A new packed good can reference the native settlement_trading:crates packing profile; it does not need the old parent pack installed. Keep all 13 languages complete and validate both loading and actual behavior in a separate world. Start with JSON content, then use Java hooks when data alone is insufficient.

Historical source and current gameplay

The archive is a teaching snapshot dated 22 October 2026. Its three original mod IDs are now superseded by native gameplay. Do not enable these original packs alongside the integrated game. The base game retains their content, market, faction and shortcut identities for existing saves. The compatibility provider continues to resolve existing child dependencies on settlement_trading. The sources remain compilable examples; their original README installation steps describe the pre-integration version. Follow the current sample guide for new work.