Hierarchy

Properties

Methods

addDelay? addMilestone? addReferenceId? addTag? addTamedCreature? animateAttack? animateBumpTowards? applyTravelingEffects? burn? calculateDamageAmount? calculateEquipmentStats? canCombatTides? canInspect? canSailAway? canSailTo? canSeeObject? canSeePosition? canSeeTile? canSwapWith? cancelResting? capReputation? causeStatus? checkForGather? checkForGatherFire? checkForStill? checkForTargetInRange? checkForWell? checkUnder? clearTileCache? createItemInInventory? createMessageManager? createNoteManager? createQuestManager? createSkillManager? damage? damageByInteractingWith? damageRandomEquipment? discoverRecipe? discoverVulnOrResist? equip? extinguishTorches? findPathToPort? getActiveStatuses? getAsHuman? getAttack? getBarteringBonus? getBurnDamage? getCombatStrength? getConsumeBonus? getCraftingDifficulty? getDamage? getDamageModifier? getData? getDiscoveredVulnsAndResists? getEquipEffect? getEquipSlotForItem? getEquippedItem? getEquippedItems? getGameOptions? getGameOptionsBeforeModifiers? getInspectionId? getInsulation? getJumpTile? getMaxHealth? getMaxWeight? getMoveType? getMovementDelay? getMovementIntent? getMovementPoint? getMovementProgress? getName? getProducedTemperature? getQualityBonus? getReputation? getReputationMultiplier? getScaledWeight? getSimplifiedCumulativeAttack? getSkillBonus? getStaminaDelay? getStatus? getStatuses? getWeightOrStaminaMovementPenalty? getWeightStatus? hasData? hasDelay? hasDiscoveredVulnOrResist? hasStatus? hasTag? hasWalkPath? healthSyncCheck? humansVisible? hurtHands? incrementIslandTickCount? isDead? isDualWielding? isGhost? isHost? isLocalPlayer? isNearby? isOffHandDisabled? isOnFire? isResting? isRestingCancelled? isServer? isSwimming? isValid? isWithinHumanBounds? kill? loadOnIsland? loadUi? moveTo? moveToIslandId? moveToIslandPosition? moveTowardsIsland? notifyItem? notifyStat? overrideNextMovement? passTurn? processInput? queueSoundEffect? queueSoundEffectInFront? rangeAction? refreshStatusEffects? removeData? removeTag? removeTamedCreature? resetMovementIntent? resetStatTimers? setData? setHumansWithinBound? setMoveType? setName? setOptions? setPosition? setStatChangeTimerIgnoreDifficultyOptions? setStatus? setTamedCreatureEnemy? setVehicle? setWalkPath? setZ? skipNextMovement? skipNextUpdate? staminaReduction? startResting? tick? tickStatuses? toString? trampleFire? unequip? unequipAll? updateDirection? updateMovementIntent? updateRender? updateReputation? updateReputationForAttackingWithTamedCreature? updateStatsAndAttributes? updateStrength? updateSwimming? updateTablesAndWeight? updateVehicle? updateView? updateWeight?

Properties

allowSmartMovementClientside?: boolean
anim?: number = 0
asCorpse: undefined
asCreature: undefined
asDoodad: undefined
asEntity: undefined | default<unknown, number, unknown, unknown>
asEntityMovable: undefined | default<unknown, number, unknown, unknown>
asEntityWithStats: undefined | default<unknown, number, unknown>
asHuman: undefined | default<number>
asItem: undefined
asLocalPlayer: undefined | default
asNPC: undefined | default
asPlayer: undefined | default
asTileEvent: undefined
attackAnimationTime?: IMovementTime
attackAnimationType?: DamageType
crafted?: Record<number, ICrafted> = {}
customization?: ICustomizations
deathBy?: ISerializedTranslation = ...
defense?: default = ...
defenses?: number[] = []
description: unknown
direction?: default = Vector2.ZERO
entityType?: EntityType
equipEffects?: Map<EquipEffect, EquipEffects> = ...
equippedOffHandDisabled?: default
equippedReferences?: Map<EquipType, default> = ...
facingDirection?: East | North | West | South = Direction.South
facingTile: undefined | default
flyingDelay?: number
fromX?: number = 0

Note: This might not be a whole number.

fromY?: number = 0

Note: This might not be a whole number.

handEquippedToLast?: MainHand | OffHand = EquipType.OffHand
id?: number
identifier?: string
inventory?: IContainer = ...
isConnecting?: boolean = false
isFlying: undefined | boolean
isMoving?: boolean

Not guaranteed to be synced between the server and client for Human entities

isMovingSuppressVehicleClientside?: boolean = false

Flag that will prevent a humans vehicle from showing up until the movement finishews

island: undefined | default
islandId?: `${number},${number}`
lastAttackedByReference?: Reference
manualTickActionDelay?: number
messages?: IMessageManager
moveType?: MoveType
movementCompleteZ?: number

Only used for Human entities

movementIntent?: IMovementIntent = {}
movingClientside?: MovingClientSide = MovingClientSide.NoInput

The state of what the client thinks is happening to this entity (regarding movement)

movingOptions?: IMoveToOptions
nextMoveDirection?: None | East | North | West | South
nextMoveTime?: number = 0
notes?: INoteManager
options?: Readonly<IOptions> = ...
point: undefined | IVector3
preventRendering?: boolean
quests?: IQuestManager
realTimeTickActionDelay?: number = 0
reference: undefined | Reference
referenceId?: number
renamed?: string | ISerializedTranslation
respawnPoint?: IVector4
restData?: IRestData
score?: number = 0
shouldSkipNextMovement?: true
skill?: default
skills?: Record<SkillType, {
    bonus: number;
    core: number;
}>
stat?: default<default<number>> = ...
state?: PlayerState = PlayerState.None
stats?: IStats
status?: IStatus
swimming?: boolean = false
tamedCreatures?: Map<`${number},${number}`, Set<number>> = ...
ticksSpent?: Map<`${number},${number}`, number> = ...
tile: undefined | default
tileUpdateType?: TileUpdateType
tilesAround: undefined | default[]
turns?: number = 1
type?: number
vehicleItemReference?: default
walkPath?: IWalkPath
walkSoundCounter?: number = 4
x?: number
y?: number
z?: WorldZ

Methods

  • Parameters

    • delay: number
    • Optional replace: boolean
    • Optional addStaminaDelay: boolean

    Returns void

  • Parameters

    • milestone: Milestone
    • Optional data: string | number
    • Optional update: boolean

    Returns void

  • Adds a referenceId to the entity if it doesn't already have one

    Returns void

  • Parameters

    • tag: unknown

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Faces the target and animates a bump into effect

    Parameters

    Returns void

  • Applies traveling effects to the player

    • Loses stamina, hunger, and thirst
    • Damages spyglass, golden sextant, and boat if it's being used
    • Decays items in the player's inventory

    Parameters

    Returns void

  • Burn the player

    Parameters

    • fireType: FireType
    • skipMessage: boolean = false
    • Optional skipParry: boolean
    • Optional equipType: EquipType
    • Optional fromCombat: boolean
    • level: number = 1

    Returns undefined | number

  • Parameters

    Returns number

  • Returns void

  • Parameters

    Returns boolean

  • Parameters

    • x: number
    • y: number

    Returns boolean

  • Parameters

    • type: CanASeeBType
    • islandId: `${number},${number}`
    • x: number
    • y: number
    • z: number
    • Optional fieldOfView: default
    • Optional customRadius: number

    Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    • entity: default<unknown, number, unknown, unknown>
    • source: undefined | string

    Returns boolean

  • Parameters

    Returns boolean

  • Returns void

  • Parameters

    Returns void

  • Returns undefined | default

  • Returns undefined | default

  • Check if there is a still in front of the player.

    Parameters

    • Optional withWater: boolean

      Check if the still has water in it?

    • Optional isLit: boolean

      Check if the still is lit?

    Returns boolean

  • Parameters

    • range: number
    • Optional includePlayers: boolean

    Returns IMobCheck

  • Returns boolean

  • Returns void

  • Returns IMessageManager

  • Returns INoteManager

  • Returns IQuestManager

  • Returns default

  • Parameters

    Returns undefined | number

  • Deprecated

    provide a full IDamageInfo object yourself you lazy fiend

    Parameters

    • damageInfoOrAmount: number | IDamageInfo
    • Optional damageMessage: default | default
    • Optional soundDelay: number
    • Optional causesBlood: boolean
    • Optional statusEffect: default

    Returns undefined | number

  • Returns void

  • Parameters

    • recipeType: ItemType
    • crafted: ICrafted = ...
    • Optional discoveredClientSide: boolean

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns boolean

  • Extinguishes all torches the player is holding.

    Returns void

  • Parameters

    • portId: number
    • Optional options: Partial<{
          requireBoat: boolean;
          startReversed: boolean;
      }>

    Returns undefined | default[]

  • Generator for status effects on the entity.

    Returns default[]

  • Returns default<number>

  • Returns the bartering bonus for a given credit value

    Parameters

    • baseCredits: number

    Returns number

  • Parameters

    Returns number

  • Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Returns number

  • Gets a data

    Returns

    Data value or undefined if it wasn't found

    Type Parameters

    • T

    Parameters

    • key: string

      Data key

    Returns undefined | T

  • Returns Map<CreatureType, Set<DamageType>>

  • Parameters

    Returns Set<DamageType>

  • Type Parameters

    Parameters

    • type: E

    Returns FirstIfOne<EquipEffectByType<E>>

  • Parameters

    • item: default
    • Optional includeDisabled: true

    Returns undefined | EquipType

  • Parameters

    • slot: EquipType
    • Optional includeDisabled: true

    Returns undefined | default

  • Parameters

    • Optional includeDisabled: true

    Returns default[]

  • Returns string

  • Parameters

    Returns number

  • Returns undefined | default

  • Gets the max health of the player.

    Returns the result of the "getMaxHealth" event, or the max in Stat.Health, if the result of the hook is undefined.

    Parameters

    • withBonus: boolean = true

    Returns number

  • Gets the strength of the player.

    Returns the result of Hook.GetPlayerStrength, or the max in Stat.Health, if the result of the hook is undefined.

    Used internally for Stat.Weight.max

    Returns number

  • Returns MoveType

  • Returns number

  • Parameters

    • timeStamp: number

    Returns IVector2

  • Gets movement progress and moves the state machine forward when the movement is completed

    Parameters

    • timeStamp: number

    Returns number

  • Returns default

  • Returns undefined | number

  • Parameters

    Returns number

  • Returns number

  • Multiply the reputation amount with whatever is set via milestone modifiers or custom game options for this player.

    Returns

    A number or undefined if a reputation number was not passed.

    Parameters

    • reputation: undefined | number

      A number or undefined to be mutiplied.

    Returns undefined | number

  • Gets this human's current carried weight, scaled down to what it would be without any weight bonuses applied

    Returns number

  • Returns number

  • Parameters

    Returns number

  • Gets a stamina penalty delay to be used for slowed actions and movement.

    Parameters

    • staminaToStartAddingDelayAt: number = STAMINA_LOW_PENALTY_START

      Stat value where delays start getting added from.

    Returns number

  • Returns the handler for this status effect, whether or not this entity currently has the effect.

    Type Parameters

    Parameters

    Returns undefined | S

  • Generator for status effects on the entity.

    Returns default[]

  • Returns number

  • Returns WeightStatus

  • Check if a data was set

    Returns

    True if the data exists, false if it doesn't

    Parameters

    • key: string

      Data key

    Returns boolean

  • Returns boolean

  • Parameters

    Returns boolean

  • Returns whether the entity has the given StatusType

    Parameters

    Returns number

  • Parameters

    • tag: unknown

    Returns boolean

  • Returns boolean

  • Parameters

    • reason: string

    Returns void

  • Returns default<number>[]

  • Parameters

    Returns boolean

  • Returns void

  • Returns boolean

  • Returns boolean

  • Returns boolean

  • Returns boolean

  • Returns boolean

  • Parameters

    • entity: default<unknown, number, unknown, unknown>

    Returns boolean

  • Returns boolean

  • Returns FireType

  • Returns boolean

  • Returns boolean

  • Returns true if this is the special dedicated server player

    Returns boolean

  • Gets if the human is swimming (and not on a boat)

    Returns boolean

  • Returns boolean

  • Checks if the entity is within the viewport bounds of one or more humans

    Returns boolean

  • Returns void

  • Loads the player onto an island Called when the game is initially loading and moving a player to another island

    Parameters

    Returns void

  • Loads ui. Should only be called if this player is local

    Returns void

  • Parameters

    Returns boolean

  • Moves this player to another island

    Parameters

    Returns Promise<void>

  • Parameters

    Returns Promise<void>

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • This is only ran on the server

    Parameters

    • timeStamp: number

    Returns undefined | IMovementIntent

  • Parameters

    • type: SfxType
    • Optional delay: number
    • Optional speed: number

    Returns void

  • Parameters

    • type: SfxType
    • Optional delay: number
    • Optional speed: number

    Returns void

  • Parameters

    Returns {
        actionRange: number;
        bonusRange: number;
        mobCheck: IMobCheck;
    }

    • actionRange: number
    • bonusRange: number
    • mobCheck: IMobCheck
  • Returns void

  • Removes a data

    Returns

    True when the data is removed. False if the key wasn't set

    Parameters

    • key: string

      Data key

    Returns boolean

  • Parameters

    • tag: unknown

    Returns void

  • Parameters

    Returns boolean

  • Returns void

  • Sets a data

    Rturns

    The value

    Type Parameters

    • T

    Parameters

    • key: string

      Data key

    • value: T

      Data value

    Returns T

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • stat: Stat | IStat
    • timer: number
    • Optional amt: number

    Returns void

  • Parameters

    Returns void

  • Parameters

    • item: undefined | default
    • Optional extinguishTorches: boolean

    Returns boolean

  • Parameters

    Returns void

  • Parameters

    • z: number
    • allowCancelation: boolean = true
    • effects: boolean = true

      If true, adds a delay to the player, clears any particles, and updates the view. (Default: true)

    • updateFlowField: boolean = true

    Returns boolean

  • Skips the next movement for this creature / npc

    Returns void

  • Skips the next update for this creature / npc

    Returns void

  • Parameters

    • Optional skill: SkillType
    • Optional level: number

    Returns void

  • Parameters

    Returns void

  • Ticks a player

    Returns

    True if the game should tick after this

    Parameters

    • Optional isPassTurn: boolean
    • Optional turnType: TurnTypeFlag

    Returns boolean

  • Updates caused by status effects such as bleeding, poison, and burns.

    Returns void

  • Returns string

  • Parameters

    Returns void

  • Unequips an item. Note: This is safe to call even if the item isn't equipped. it'll do nothing in that case.

    Parameters

    • item: default
    • internal: boolean = false
    • skipMessage: boolean = false
    • skipRevertItem: boolean = false

    Returns void

  • Returns void

  • Parameters

    • tile: default
    • Optional updateVehicleDirection: boolean

    Returns void

  • Parameters

    Returns boolean

  • Parameters

    • reputation: number

    Returns void

  • Parameters

    Returns void

  • Returns void

  • This needs to be called whenever the player's strength requires an update.

    Example usage includes:

    1. When max health changes. Max health is used in calculating the strength.
    2. If a mod is using the GetPlayerStrength hook and the calculation needs to be refreshed.

    Returns void

  • Returns void

  • Parameters

    • source: string

    Returns void

  • Returns void

  • Parameters

    • source: string

    Returns void

Generated using TypeDoc