FORGOTTEN TOWNS

FORGOTTEN TOWNS / MOD DOKÜMANTASYONU

Wiki'yi değiştirme ↗

Java API referansı (Javadoc)

MOD API 15

Wiki'ye göz atın

Güncel Mod API belgeleri.

Teknik dokümantasyon İngilizce olarak mevcuttur. Kod ve alan adları mevcut Mod API'sine uygundur.

MOD DOKÜMANTASYONU

Settlement Trading: Campaign Map

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.3.0, loaded first. No social or Sundering dependency is required. The stable mod ID remains settlement_map. Its source imports only the public mod API. The host provides city presentation, quota accounting, payment receipts and saved arrivals; this pack supplies the locations and recruitment data.

With JDK 21, from the extracted SDK root:

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

Install the resulting settlement_map folder alongside settlement_trading and enable both in Mods. In a source checkout, gradlew settlement_mapModZip creates build/mods/settlement_map-1.3.1.zip.

The location table contains settlement-bearing campaigns only. An unfounded current town and uncompleted destinations stay off the trading map. C4's caravan creates no separate city: C5's Ezau's Camp is the shared base for that journey, unlocked for remote trade after C5 completion. It supplies one Ranger and two Archers per season, plus jungle fruits, berries, flowers, limestone and other local materials through the campaign trading add-on. Future missions need an authored settlement entry before appearing. useSettlementName: false keeps an authored camp name even when the visited world's player settlement has a different name.

The Kingdom sits on the tutorial continent at the harbor, with a five-day sea voyage.

Use M or the ornament's compass. Select a city to see its overview or recruitment offers. The Kingdom trades and recruits with this extension and its required core. Settlement Trading: Campaign optionally adds completed-city trading. City travel uses the core's shared settings; there is no separate map settings file. Factions may override travel in their own data. Orders from completed cities cost gold, consume a shared seasonal allowance and arrive after travel.

Edit pack/data/locations.json to change prices, unit types, supply limits, exports and progression requirements. C1 has no recruitment, C2 supplies two citizens per season, and C3 supplies three recruits and two rogues. Later values are provisional authoring data. Localize names and descriptions in every file under pack/translations.

Read the city-map guide for the full schema, shared twelve-day refill clock, save recovery and extension boundaries. Data changes require rebuilding and validation; existing saves retain recorded mod IDs and relative order. Content and restoration checks determine compatibility after an update.

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.

The Kingdom

The Kingdom is an independent faction at the harbor on the campaign map, available in named campaign profiles. It is not a playable stage. It is included with the map extension and uses the required core. Its editable definition is pack/data/factions.json. Existing campaign-city entries remain unchanged.

  • Delivery: five game days for goods and people. The map overview, recruitment screen, selected market and order confirmation show the duration; pending shipments and arrivals show days remaining.
  • Seasonal recruitment: three citizens (250 gold each), two militia (900 each), one town guard (1,200). Town Guard uses the native reinforced_militia archetype. Normal campaign restrictions apply.
  • Buying from you: 30% of the ordinary resource value, rounded per item to whole gold. A zero quote cannot be sold. The faction can buy its own export products at this lower price.
  • Exclusions: terrain materials, timber/planks and ores (including mod resources using those primary stockpile categories), plus the explicit water, ingot and raw-input IDs in refusedResources.
  • Purse: 10,000 gold initially, plus 2,500 each shared season; trade payments change this finite purse.

The assortment is capped at 15 distinct goods:

Goods Units per season
Cloth 50
Padded tunic, stone spear 10 each
Leather helmet, leather armor, copper sword 6 each
Reinforced leather helmet, reinforced leather armor, bronze sword 3 each
Apple pie, meatloaf 24 each
Royal Kingdom's Banner 3
Cooking recipe book, military recipe book 2 each
Rice wine 20

Pies have an 18-day ordinary shelf life and meatloaf 12 days. Delivery uses the existing native cargo pipeline. Buying a banner does not bypass its ordinary construction unlock. Trade stock and recruitment quotas refill on their existing shared 12-day clocks; switching towns or reloading does not refill them.

The faction's purchases, recruitment quotas and paid journeys use the host's durable ledgers and saves. Keep the mod ID and faction/offer IDs stable when editing. Choose Apply & reload after updating the installed pack.

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.