Hierarchy

Constructors

  • Parameters

    Returns default

Properties

event: IEventEmitter<default, ICreatureZoneManagerEvents>
initialized: boolean = false
isLoaded: boolean = false
island: default
offset: IVector2
scaling: number
tier: number

Islands have a higher chance of starting at a higher tier the further out you get.

This should be displayed in island tooltips and such

zoneSize: number
zones: PartialRecord<WorldZ, (undefined | CreatureZone)[]> = {}

Accessors

  • get axisCount(): number
  • Gets the number of zones on each axis

    Returns number

Methods

  • Returns an array of all CreatureZones for valid Z layers.
    (Loading a save that previously had Troposphere doesn't return any zones from the troposphere layer)

    Returns CreatureZone[]

  • Returns void

  • Note: Active zones are cached on call, and reset whenever spawns are attempted.

    Parameters

    • playingHumans: default<unknown, number, NPC | Player>[] = ...
    • recalculate: boolean = false

    Returns CreatureZone[]

  • Gets the estimated maximum tier on this island

    Note: Does not work correctly on initial island, requires the centre of the island to be the centre zone

    Returns number

  • Gets the minimum tier on this island (biome starting tier + randomly generated additional tier)

    Returns number

  • Returns all spawnable creatures for this island

    Returns CreatureType[]

  • Returns spawnable creatures from the given tier

    Parameters

    • tier: number

    Returns CreatureType[]

  • Returns spawnable creatures from minTier to maxTier (inclusive)

    Parameters

    • minTier: number
    • maxTier: number

    Returns CreatureType[]

  • Returns

    The total civilization score of all zones

    Returns number

  • Parameters

    • zonePoint: IVector3

      The zone's internal position (not a tile position)

    Returns CreatureZone

  • Parameters

    • point: IVector3

      A tile position as an IVector3. Most objects can be passed in as the IVector3

    Returns CreatureZone

  • Parameters

    • id: number

      The zone's internal id

    • z: WorldZ

    Returns CreatureZone

  • Calculates the distance tier modifier for a zone. Uses euclidean currently

    Parameters

    • point: IVector2
    • reverse: boolean = !this.island.isDefaultIsland

    Returns number

    • Set up the zones using the island's default spawn point (initial island) or the centre (travelled islands)
    • Save the zone size & distance scaling multiplier permanently as well so us rebalancing doesn't shift existing islands

    Parameters

    • force: boolean = false

      Re-initialize even if already initialized

    Returns void

  • Re-initialise CreatureZones (so this data doesn't have to be saved on them)

    Returns void

  • Returns void

  • Parameters

    Returns void

  • Resets & recalculates the civilization score for all zones

    Returns void

  • Ensures all zones spawned default creatures one time

    Returns void

Generated using TypeDoc