Hierarchy

  • default

Properties

amount: SupplierOr<number, []>
anyMilestoneProgressHandler?: ((milestones: MilestoneManager, milestone: Milestone, newData?: string | number) => any)

Type declaration

disabledByMods: boolean = true
fullDiscoveryList?: readonly (string | number)[]
gameModeLock?: GameMode[] = ...
progressHandler?: ((milestones: MilestoneManager, newData: undefined | string | number, tellPlayer: ((message?: default, args?: TranslationArg[], type?: MessageType, sfxType?: SfxType) => void)) => any)

Type declaration

unlockedHandler?: ((milestones: MilestoneManager, tellPlayer: ((message?: default, args?: TranslationArg[], type?: MessageType, sfxType?: SfxType) => void)) => any)

Type declaration

visibility: MilestoneVisibility = MilestoneVisibility.Visible
visibleThreshold: number = 0.5

Methods

  • Inherits the metadata (visibility, applicable game modes, whether it's disabled by mods, any unlock handler) of another MilestoneDefinition.

    Parameters

    Returns default

  • Replaces the type and desired amount of this MilestoneDefinition with the type and desired amount of another's.

    Parameters

    Returns default

  • Sets this milestone to be unlockable in all game modes, and not disabled by mods.

    Returns default

  • Parameters

    • list: readonly (string | number)[]

    Returns default

  • Parameters

    • Rest ...gameModes: GameMode[]

      What game modes this milestone can be unlocked in. Defaults to [Hardcore]

    Returns default

  • Sets this milestone to be unlockable in all game modes.

    Parameters

    • all: "all"

    Returns default

  • Returns default

  • Parameters

    • visibility: MilestoneVisibility

      Whether the milestone is completely visible, has its name hidden, or has its required amount hidden. Defaults to Visible

    • until: number = ...

      Sets the time when the milestone will become Visible. This can be either:

      • A completion threshold (in a fractional value between 0 and 1)
      • A different milestone to complete first

    Returns default

  • This milestone will be granted when an amount of conditions happen simultaneously.
    For example, this could be used to check for a skill level.

    Parameters

    • amount: SupplierOr<number, []>

    Returns default

  • This milestone type requires a number of entries, each of which must be distinct.
    For example, this could be used to check if the player has tamed every single creature type.

    Parameters

    • amount: SupplierOr<number, []>

    Returns default

  • Parameters

    • discoveryList: readonly (string | number)[]

      All things that can be discovered via this milestone

    • requiredToUnlock: number = 1

      The amount that the player must discover for this milestone to complete. 1 = 100%, 0.5 = 50%

    Returns default

  • This milestone is a milestone that will be granted the first time it's updated. Can be used for keeping track of metagame progress.

    Returns default

  • A helper to create a function that will produce a MilestoneDefinition

    Type Parameters

    • T = {}

    Parameters

    Returns (() => default) & T

  • This milestone will be granted after being incremented amount times. It does not require each increment to have a different ID, like counter does.
    For example, this type could be used for "number of turns played".

    Parameters

    • amount: SupplierOr<number, []>

    Returns default

  • This milestone type requires a number of entries, each of which must be distinct, and which must be discovered in order, from 1 to amount.
    0 is never required for discovery. For example, this could be used to handle staged discovery.

    Parameters

    • obj: EnumObject<Record<string, string | number>>

    Returns default

Generated using TypeDoc