FORGOTTEN TOWNS

FORGOTTEN TOWNS / 改造ドキュメント

改造ウィキ ↗

Java API リファレンス (Javadoc)

MOD API 15

ウィキを閲覧する

現在の Mod API ドキュメント。

技術文書は英語で入手できます。コード名とフィールド名は現在の Mod API に従います。

改造ドキュメント

Settlement Trading: Campaign

Historical source example: this feature now ships in the base game. Do not install this original pack on the integrated game. Its instructions below describe the preserved mod design. See the source study and the Bread Crates extension for current authoring.

Java extension, version 1.3.1; requires Settlement Trading 1.5.0, loaded first. It activates for a named campaign profile and uses completed-stage markets from captured JSON. Sundering and the housing/social mods are not required.

Build

With JDK 21, from the SDK root:

.\examples\mod-sdk\build-mod.ps1 -Project .\examples\settlement-trading-campaign-mod -ApiJar .\build\mod-sdk\forgotten-towns-mod-api-15.jar -OutputDirectory .\settlement-trading-campaign-build

Install the resulting settlement_trading_campaign folder alongside settlement_trading. Enable the core and this extension; the Mods screen resolves the required load order. In a source checkout, gradlew settlement_trading_campaignModZip produces build/mods/settlement_trading_campaign-1.3.1.zip.

Completing C5 opens Ezau's Camp, the shared trading base for the C4-C5 jungle journey. C4 creates no separate market. The camp exports 15 jungle goods: bananas, coconuts, kapok fruit, both berries, limestone, wood, thatch, rubber, clay, copper ore, milky mushrooms, dahlias, irises and poppies. Seasonal quantities come from pack/data/markets.json; the Campaign Map add-on supplies the camp's one Ranger and two Archers per season.

Common prices, travel, export limits, seasonal income and production rules come from context.requireSettlementTradeCore("settlement_trading"). Edit the core pack's settings/table. This extension owns only its campaign markets and presentation. An older provider without a core is rejected during registration instead of silently substituting defaults.

The initial market in pack/data/markets.json is C2's food settlement. Add future markets through this file and all thirteen translation catalogs, using canonical campaign stage IDs. Exports are predetermined mission goods. A saved town from the corresponding stage supplies its name, purse and reservations; otherwise the market has a finite opening purse. Campaign profiles remain separate.

The settlement guide explains table fields, unlocking, travel and recovery. This pack does not implement campaign-map travel.

Customization

The pack includes a cover and about/ui.json for presentation overrides. See UI and gameplay customization for the complete theme slots, settings files, typed hooks and engine limits. Keep a copy of an older pack before updating. New versions are validated against the API, content and saved state.

Player controls: open Mods → Settings. Shared economy controls belong to Settlement Trading; the extensions provide a link to that form. Choose Apply & reload after changes. Player preferences are stored separately from pack defaults. The about/ folder includes extended descriptions and two screenshots.

Saved campaign towns supply their recorded, selected crate production. Authored NPC fallback markets use explicit crate quantities. See the settlement guide for preservation, individual equipment and legacy-save behavior.