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

SettlementMapTürPure policies for a location map and paid arrivals; the host owns UI and saved orders.

SettlementMap · Ticaret ve harita

İmza

public interface SettlementMap

Pure policies for a location map and paid arrivals; the host owns UI and saved orders.

SettlementMap.FactionTürAn independent map faction with seasonal goods, recruitment and its own trade terms.

SettlementMap.Faction · Ticaret ve harita

İmza

public static record SettlementMap.Faction(String id, String nameKey, String descriptionKey, String biome, double x, double y, int travelDays, Map<String,Integer> exports, List<SettlementMap.Recruit> recruits, Set<String> refusedResources, int buyFromPlayerPercent, int initialGold, int seasonalGold) extends Record

An independent map faction with seasonal goods, recruitment and its own trade terms. Faction visibility is controlled by the policy; native campaign recruitment restrictions still apply.

Record Components
id - stable identity in the registering mod's namespace
Record Components
nameKey - owned localized faction name
Record Components
descriptionKey - owned localized summary, including any purchasing exclusions
Record Components
biome - native uppercase biome used for presentation
Record Components
x - normalized map coordinate within zero and one
Record Components
y - normalized map coordinate within zero and one
Record Components
travelDays - delivery days for both goods and people, within 1..48
Record Components
exports - up to 64 seasonal goods with quantities within 0..100000
Record Components
recruits - up to 32 independently limited seasonal offers
Record Components
refusedResources - goods the faction will not buy from the player
Record Components
buyFromPlayerPercent - percentage of registry value paid to the player, within 0..1000; rounded per unit to whole gold, with zero prohibiting that sale
Record Components
initialGold - one-time opening purse within 0..100000
Record Components
seasonalGold - purse replenishment per shared season within 0..100000
new SettlementMap.FactionOluşturucuDetaches authored collections; the host validates references and scalar bounds.

SettlementMap.Faction · Ticaret ve harita

İmza

public Faction(String id, String nameKey, String descriptionKey, String biome, double x, double y, int travelDays, Map<String,Integer> exports, List<SettlementMap.Recruit> recruits, Set<String> refusedResources, int buyFromPlayerPercent, int initialGold, int seasonalGold)

Detaches authored collections; the host validates references and scalar bounds.

Örnek çağrı

new SettlementMap.Faction(id, nameKey, descriptionKey, biome, x, y, travelDays, exports, recruits, refusedResources, buyFromPlayerPercent, initialGold, seasonalGold);

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

Parameters
id - stable namespaced identity
Parameters
nameKey - owned name key
Parameters
descriptionKey - owned summary key
Parameters
biome - native biome
Parameters
x - normalized horizontal coordinate
Parameters
y - normalized vertical coordinate
Parameters
travelDays - delivery duration
Parameters
exports - seasonal stock
Parameters
recruits - seasonal people offers
Parameters
refusedResources - purchase exclusions
Parameters
buyFromPlayerPercent - player-sale valuation percentage
Parameters
initialGold - opening purse
Parameters
seasonalGold - seasonal purse grant
Throws
NullPointerException - if a collection or any collection element is null
faction.biome()YöntemReturns native uppercase biome used for presentation.

SettlementMap.Faction · Ticaret ve harita

İmza

public String biome()

Returns native uppercase biome used for presentation.

Örnek çağrı

faction.biome();

SettlementMap.Faction faction is an instance of this supported API type.

Returns
native uppercase biome used for presentation
faction.buyFromPlayerPercent()YöntemReturns percentage of registry value paid to the player, within 0..1000; rounded per unit to whole gold, with zero prohibiting that sale.

SettlementMap.Faction · Ticaret ve harita

İmza

public int buyFromPlayerPercent()

Returns percentage of registry value paid to the player, within 0..1000; rounded per unit to whole gold, with zero prohibiting that sale.

Örnek çağrı

faction.buyFromPlayerPercent();

SettlementMap.Faction faction is an instance of this supported API type.

Returns
percentage of registry value paid to the player, within 0..1000; rounded per unit to whole gold, with zero prohibiting that sale
faction.descriptionKey()YöntemReturns owned localized summary, including any purchasing exclusions.

SettlementMap.Faction · Ticaret ve harita

İmza

public String descriptionKey()

Returns owned localized summary, including any purchasing exclusions.

Örnek çağrı

faction.descriptionKey();

SettlementMap.Faction faction is an instance of this supported API type.

Returns
owned localized summary, including any purchasing exclusions
faction.equals(o)YöntemIndicates whether some other object is "equal to" this one.

SettlementMap.Faction · 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ı

faction.equals(o);

SettlementMap.Faction faction 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.
faction.exports()YöntemReturns up to 64 seasonal goods with quantities within 0..100000.

SettlementMap.Faction · Ticaret ve harita

İmza

public Map<String,Integer> exports()

Returns up to 64 seasonal goods with quantities within 0..100000.

Örnek çağrı

faction.exports();

SettlementMap.Faction faction is an instance of this supported API type.

Returns
up to 64 seasonal goods with quantities within 0..100000
faction.hashCode()YöntemReturns a hash code value for this object.

SettlementMap.Faction · 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ı

faction.hashCode();

SettlementMap.Faction faction is an instance of this supported API type.

Specified by
hashCode in class Record
Returns
a hash code value for this object
faction.id()YöntemReturns stable identity in the registering mod's namespace.

SettlementMap.Faction · Ticaret ve harita

İmza

public String id()

Returns stable identity in the registering mod's namespace.

Örnek çağrı

faction.id();

SettlementMap.Faction faction is an instance of this supported API type.

Returns
stable identity in the registering mod's namespace
faction.initialGold()YöntemReturns one-time opening purse within 0..100000.

SettlementMap.Faction · Ticaret ve harita

İmza

public int initialGold()

Returns one-time opening purse within 0..100000.

Örnek çağrı

faction.initialGold();

SettlementMap.Faction faction is an instance of this supported API type.

Returns
one-time opening purse within 0..100000
faction.nameKey()YöntemReturns owned localized faction name.

SettlementMap.Faction · Ticaret ve harita

İmza

public String nameKey()

Returns owned localized faction name.

Örnek çağrı

faction.nameKey();

SettlementMap.Faction faction is an instance of this supported API type.

Returns
owned localized faction name
faction.recruits()YöntemReturns up to 32 independently limited seasonal offers.

SettlementMap.Faction · Ticaret ve harita

İmza

public List<SettlementMap.Recruit> recruits()

Returns up to 32 independently limited seasonal offers.

Örnek çağrı

faction.recruits();

SettlementMap.Faction faction is an instance of this supported API type.

Returns
up to 32 independently limited seasonal offers
faction.refusedResources()YöntemReturns goods the faction will not buy from the player.

SettlementMap.Faction · Ticaret ve harita

İmza

public Set<String> refusedResources()

Returns goods the faction will not buy from the player.

Örnek çağrı

faction.refusedResources();

SettlementMap.Faction faction is an instance of this supported API type.

Returns
goods the faction will not buy from the player
faction.seasonalGold()YöntemReturns purse replenishment per shared season within 0..100000.

SettlementMap.Faction · Ticaret ve harita

İmza

public int seasonalGold()

Returns purse replenishment per shared season within 0..100000.

Örnek çağrı

faction.seasonalGold();

SettlementMap.Faction faction is an instance of this supported API type.

Returns
purse replenishment per shared season within 0..100000
faction.toString()YöntemReturns a string representation of this record class.

SettlementMap.Faction · 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ı

faction.toString();

SettlementMap.Faction faction is an instance of this supported API type.

Specified by
toString in class Record
Returns
a string representation of this object
faction.travelDays()YöntemReturns delivery days for both goods and people, within 1..48.

SettlementMap.Faction · Ticaret ve harita

İmza

public int travelDays()

Returns delivery days for both goods and people, within 1..48.

Örnek çağrı

faction.travelDays();

SettlementMap.Faction faction is an instance of this supported API type.

Returns
delivery days for both goods and people, within 1..48
faction.x()YöntemReturns normalized map coordinate within zero and one.

SettlementMap.Faction · Ticaret ve harita

İmza

public double x()

Returns normalized map coordinate within zero and one.

Örnek çağrı

faction.x();

SettlementMap.Faction faction is an instance of this supported API type.

Returns
normalized map coordinate within zero and one
faction.y()YöntemReturns normalized map coordinate within zero and one.

SettlementMap.Faction · Ticaret ve harita

İmza

public double y()

Returns normalized map coordinate within zero and one.

Örnek çağrı

faction.y();

SettlementMap.Faction faction is an instance of this supported API type.

Returns
normalized map coordinate within zero and one
SettlementMap.LocationTürA city entry, separate from the campaign mission presentation.

SettlementMap.Location · Ticaret ve harita

İmza

public static record SettlementMap.Location(String stageId, String nameKey, String descriptionKey, Map<String,Integer> exports, List<SettlementMap.Recruit> recruits, boolean useSettlementName) extends Record

A city entry, separate from the campaign mission presentation.

Record Components
stageId - canonical stage used for coordinates and completion
Record Components
nameKey - localized city name when no saved player name is available
Record Components
descriptionKey - localized city description
Record Components
exports - authored seasonal exports for informational display without a trade mod
Record Components
recruits - authored arrival offers
Record Components
useSettlementName - whether saved player names override the authored name
new SettlementMap.LocationOluşturucuCreates a location that uses the saved settlement name.

SettlementMap.Location · Ticaret ve harita

İmza

public Location(String stageId, String nameKey, String descriptionKey, Map<String,Integer> exports, List<SettlementMap.Recruit> recruits)

Creates a location that uses the saved settlement name.

Örnek çağrı

new SettlementMap.Location(stageId, nameKey, descriptionKey, exports, recruits);

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

Parameters
stageId - canonical stage identity
Parameters
nameKey - localized fallback name
Parameters
descriptionKey - localized description
Parameters
exports - informational seasonal products
Parameters
recruits - unit offers
Throws
NullPointerException - if a collection or collection element is null
new SettlementMap.LocationOluşturucuDetaches collections.

SettlementMap.Location · Ticaret ve harita

İmza

public Location(String stageId, String nameKey, String descriptionKey, Map<String,Integer> exports, List<SettlementMap.Recruit> recruits, boolean useSettlementName)

Detaches collections.

Örnek çağrı

new SettlementMap.Location(stageId, nameKey, descriptionKey, exports, recruits, useSettlementName);

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

Parameters
stageId - canonical stage identity
Parameters
nameKey - localized name
Parameters
descriptionKey - localized description
Parameters
exports - informational seasonal products
Parameters
recruits - unit offers
Parameters
useSettlementName - use the saved settlement name
Throws
NullPointerException - if a collection or collection element is null
location.descriptionKey()YöntemReturns localized city description.

SettlementMap.Location · Ticaret ve harita

İmza

public String descriptionKey()

Returns localized city description.

Örnek çağrı

location.descriptionKey();

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

Returns
localized city description
location.equals(o)YöntemIndicates whether some other object is "equal to" this one.

SettlementMap.Location · 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ı

location.equals(o);

SettlementMap.Location location 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.
location.exports()YöntemReturns authored seasonal exports for informational display without a trade mod.

SettlementMap.Location · Ticaret ve harita

İmza

public Map<String,Integer> exports()

Returns authored seasonal exports for informational display without a trade mod.

Örnek çağrı

location.exports();

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

Returns
authored seasonal exports for informational display without a trade mod

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