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

Java reference

Search the types, functions and callbacks available to a Java mod. This reference is generated from the SDK Javadocs; each entry links to its full Java documentation.

Find a type or member

60 genel türler · 468 üyeler · Content API 15

Sıfırla

528 eşleşen girişler

location.hashCode()YöntemReturns a hash code value for this object.

SettlementMap.Location · Ticaret ve harita

İmza

public final int hashCode()

Returns a hash code value for this object. The value is derived from the hash code of each of the record components.

Örnek çağrı

location.hashCode();

SettlementMap.Location location is an instance of this supported API type.

Specified by
hashCode in class Record
Returns
a hash code value for this object
location.nameKey()YöntemReturns localized city name when no saved player name is available.

SettlementMap.Location · Ticaret ve harita

İmza

public String nameKey()

Returns localized city name when no saved player name is available.

Örnek çağrı

location.nameKey();

SettlementMap.Location location is an instance of this supported API type.

Returns
localized city name when no saved player name is available
location.recruits()YöntemReturns authored arrival offers.

SettlementMap.Location · Ticaret ve harita

İmza

public List<SettlementMap.Recruit> recruits()

Returns authored arrival offers.

Örnek çağrı

location.recruits();

SettlementMap.Location location is an instance of this supported API type.

Returns
authored arrival offers
location.stageId()YöntemReturns canonical stage used for coordinates and completion.

SettlementMap.Location · Ticaret ve harita

İmza

public String stageId()

Returns canonical stage used for coordinates and completion.

Örnek çağrı

location.stageId();

SettlementMap.Location location is an instance of this supported API type.

Returns
canonical stage used for coordinates and completion
location.toString()YöntemReturns a string representation of this record class.

SettlementMap.Location · Ticaret ve harita

İmza

public final String toString()

Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.

Örnek çağrı

location.toString();

SettlementMap.Location location is an instance of this supported API type.

Specified by
toString in class Record
Returns
a string representation of this object
location.useSettlementName()YöntemReturns whether saved player names override the authored name.

SettlementMap.Location · Ticaret ve harita

İmza

public boolean useSettlementName()

Returns whether saved player names override the authored name.

Örnek çağrı

location.useSettlementName();

SettlementMap.Location location is an instance of this supported API type.

Returns
whether saved player names override the authored name
SettlementMap.RecruitTürA paid unit arrival offered by a completed city.

SettlementMap.Recruit · Ticaret ve harita

İmza

public static record SettlementMap.Recruit(String id, String archetypeId, int gold, int perSeason, String requiredStage) extends Record

A paid unit arrival offered by a completed city.

Record Components
id - stable offer identity within the location
Record Components
archetypeId - native civilian or soldier archetype
Record Components
gold - price per person, within 1..100000
Record Components
perSeason - city-wide supply per season, within 0..1000
Record Components
requiredStage - additional completed-stage requirement, or empty
new SettlementMap.RecruitOluşturucuCreates an instance of a Recruit record class.

SettlementMap.Recruit · Ticaret ve harita

İmza

public Recruit(String id, String archetypeId, int gold, int perSeason, String requiredStage)

Creates an instance of a Recruit record class.

Örnek çağrı

new SettlementMap.Recruit(id, archetypeId, gold, perSeason, requiredStage);

Use the public API type shown; import forgottentowns.mod.api.*.

Parameters
id - stable offer identity within the location
Parameters
archetypeId - native civilian or soldier archetype
Parameters
gold - price per person, within 1..100000
Parameters
perSeason - city-wide supply per season, within 0..1000
Parameters
requiredStage - additional completed-stage requirement, or empty
recruit.archetypeId()YöntemReturns native civilian or soldier archetype.

SettlementMap.Recruit · Ticaret ve harita

İmza

public String archetypeId()

Returns native civilian or soldier archetype.

Örnek çağrı

recruit.archetypeId();

SettlementMap.Recruit recruit is an instance of this supported API type.

Returns
native civilian or soldier archetype
recruit.equals(o)YöntemIndicates whether some other object is "equal to" this one.

SettlementMap.Recruit · Ticaret ve harita

İmza

public final boolean equals(Object o)

Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.

Örnek çağrı

recruit.equals(o);

SettlementMap.Recruit recruit is an instance of this supported API type.

Specified by
equals in class Record
Parameters
o - the object with which to compare
Returns
true if this object is the same as the o argument; false otherwise.
recruit.gold()YöntemReturns price per person, within 1..100000.

SettlementMap.Recruit · Ticaret ve harita

İmza

public int gold()

Returns price per person, within 1..100000.

Örnek çağrı

recruit.gold();

SettlementMap.Recruit recruit is an instance of this supported API type.

Returns
price per person, within 1..100000
recruit.hashCode()YöntemReturns a hash code value for this object.

SettlementMap.Recruit · Ticaret ve harita

İmza

public final int hashCode()

Returns a hash code value for this object. The value is derived from the hash code of each of the record components.

Örnek çağrı

recruit.hashCode();

SettlementMap.Recruit recruit is an instance of this supported API type.

Specified by
hashCode in class Record
Returns
a hash code value for this object
recruit.id()YöntemReturns stable offer identity within the location.

SettlementMap.Recruit · Ticaret ve harita

İmza

public String id()

Returns stable offer identity within the location.

Örnek çağrı

recruit.id();

SettlementMap.Recruit recruit is an instance of this supported API type.

Returns
stable offer identity within the location
recruit.perSeason()YöntemReturns city-wide supply per season, within 0..1000.

SettlementMap.Recruit · Ticaret ve harita

İmza

public int perSeason()

Returns city-wide supply per season, within 0..1000.

Örnek çağrı

recruit.perSeason();

SettlementMap.Recruit recruit is an instance of this supported API type.

Returns
city-wide supply per season, within 0..1000
recruit.requiredStage()YöntemReturns additional completed-stage requirement, or empty.

SettlementMap.Recruit · Ticaret ve harita

İmza

public String requiredStage()

Returns additional completed-stage requirement, or empty.

Örnek çağrı

recruit.requiredStage();

SettlementMap.Recruit recruit is an instance of this supported API type.

Returns
additional completed-stage requirement, or empty
recruit.toString()YöntemReturns a string representation of this record class.

SettlementMap.Recruit · Ticaret ve harita

İmza

public final String toString()

Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.

Örnek çağrı

recruit.toString();

SettlementMap.Recruit recruit is an instance of this supported API type.

Specified by
toString in class Record
Returns
a string representation of this object
SettlementMap.factions(SettlementTrading.World)KancaSupplies independent faction outposts, alongside campaign cities.

SettlementMap · Ticaret ve harita

İmza

default List<SettlementMap.Faction> factions(SettlementTrading.World world)

Supplies independent faction outposts, alongside campaign cities. Factions use their own namespaced identity and coordinates, never a fake campaign stage. The host exposes their finite trade stock even without a separate trading mod.

Bu kancayı uygula

public List<SettlementMap.Faction> factions(SettlementTrading.World world);

The engine calls your implementation; implement this signature in the registered hook.

Parameters
world - current world and campaign context
Returns
immutable faction entries; at most 32 for the active map policy
SettlementMap.locations(SettlementTrading.World)KancaSupplies settlement-bearing locations; the host shows founded current towns and completed settlements.

SettlementMap · Ticaret ve harita

İmza

List<SettlementMap.Location> locations(SettlementTrading.World world)

Supplies settlement-bearing locations; the host shows founded current towns and completed settlements.

Bu kancayı uygula

public List<SettlementMap.Location> locations(SettlementTrading.World world);

The engine calls your implementation; implement this signature in the registered hook.

Parameters
world - current campaign context
Returns
immutable authored locations, using native campaign stage coordinates
SettlementMap.supports(SettlementTrading.World)KancaSelects worlds that expose this map.

SettlementMap · Ticaret ve harita

İmza

boolean supports(SettlementTrading.World world)

Selects worlds that expose this map.

Bu kancayı uygula

public boolean supports(SettlementTrading.World world);

The engine calls your implementation; implement this signature in the registered hook.

Parameters
world - detached settlement context
Returns
whether this policy applies; the last applicable registration wins
SettlementMap.travelDays(String)KancaDetermines an ordered unit's journey from its source location.

SettlementMap · Ticaret ve harita

İmza

int travelDays(String biome)

Determines an ordered unit's journey from its source location.

Bu kancayı uygula

public int travelDays(String biome);

The engine calls your implementation; implement this signature in the registered hook.

Parameters
biome - native uppercase biome identifier
Returns
travel days, bounded by the host to 1..48
SettlementTradeCoreTürImmutable shared configuration published by a trading core mod.

SettlementTradeCore · Ticaret ve harita

İmza

public record SettlementTradeCore(TradeEconomy economy, TradeProductionRules productionRules) extends Record

Immutable shared configuration published by a trading core mod. Consumers keep the same economy and production rules as the provider instead of copying settings. Individual markets may still declare explicit prices, supply and delivery terms.

Record Components
economy - validated pricing, travel, income and export settings
Record Components
productionRules - legacy production assumptions retained for compiled-pack compatibility; recorded packing output does not use these assumptions
new SettlementTradeCoreOluşturucuRequires both shared rule sets.

SettlementTradeCore · Ticaret ve harita

İmza

public SettlementTradeCore(TradeEconomy economy, TradeProductionRules productionRules)

Requires both shared rule sets.

Örnek çağrı

new SettlementTradeCore(economy, productionRules);

Use the public API type shown; import forgottentowns.mod.api.*.

Parameters
economy - validated economy settings
Parameters
productionRules - retained legacy production configuration
Throws
NullPointerException - if either rule set is null
settlementTradeCore.economy()YöntemReturns validated pricing, travel, income and export settings.

SettlementTradeCore · Ticaret ve harita

İmza

public TradeEconomy economy()

Returns validated pricing, travel, income and export settings.

Örnek çağrı

settlementTradeCore.economy();

SettlementTradeCore settlementTradeCore is an instance of this supported API type.

Returns
validated pricing, travel, income and export settings
settlementTradeCore.equals(o)YöntemIndicates whether some other object is "equal to" this one.

SettlementTradeCore · Ticaret ve harita

İmza

public final boolean equals(Object o)

Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).

Örnek çağrı

settlementTradeCore.equals(o);

SettlementTradeCore settlementTradeCore is an instance of this supported API type.

Specified by
equals in class Record
Parameters
o - the object with which to compare
Returns
true if this object is the same as the o argument; false otherwise.
settlementTradeCore.hashCode()YöntemReturns a hash code value for this object.

SettlementTradeCore · Ticaret ve harita

İmza

public final int hashCode()

Returns a hash code value for this object. The value is derived from the hash code of each of the record components.

Örnek çağrı

settlementTradeCore.hashCode();

SettlementTradeCore settlementTradeCore is an instance of this supported API type.

Specified by
hashCode in class Record
Returns
a hash code value for this object

Read an entry

  • Method: a function your mod calls on the supplied service or value.
  • Hook: a callback the game calls on your registered implementation.
  • Constructor: creates an API value.
  • Constant: a fixed value, such as a facing or work queue.

Expand an entry for its signature, parameters, return value, exceptions and call shape. Call shapes show the real parameter names as placeholders; supply values of the declared types. Read the lifetime and ownership rules before retaining an object or issuing a command.

Java setup · Registration and lifecycle · Task guides · Full generated Javadocs