Optional
buildCalled before an npc attacks
False if the npc cannot attack, or undefined to use the default logic
The weapon used to attack
The attack type
Called when the walk path of the player is about to change.
False to prevent the walk path change or undefined to use the default logic
Called before consuming an item
True if the human can consume the item (default logic isn't called, should use your own code for consumption), false if the human cannot consume the item, or undefined to use the default logic
The item type
The action type
Called when the human is damaged
The amount of damage the player should take (the player will take this damage)
The damage info object
Optional
equipOptional
equipCalled when getting the players movement intent
The movement intent of the player or undefined to use the default logic
Called when getting the players weight status
The weight status of the player or undefined to use the default logic
Called when an item is added to the player's inventory
The container object the items were added to. This container might be inventory or a container within the inventory.
Called when an item is removed from the players inventory
The container object the items were moved to.
Called when an item is moved from one container to another, while still in the players inventory.
The items
The container object the items were moved to. This container might be inventory or a container within the inventory.
Optional
previousContainer: IContainerThe container object the items were moved from. This container might be inventory or a container within the inventory.
Called when checking if a human is swimming
True if the human should be swimming, false if they should not be swimming, or undefined to use the default logic
True if the human is swimming
Optional
killCalled when the human is loaded onto an island
Optional
options: Partial<ILoadOnIslandOptions>Load island options
Optional
openOptional
pickTrue if the skill check should pass, false if it shouldn't, undefined if it should be random
The skill that is being checked
The desired value that needs to pass
Optional
actionTier: numberOptional action tier
Called when a stat changes, for any reason
An IStat object, the stat that was affected
Optional
oldValue: numberThe value that the stat changed from
Optional
info: IStatChangeInfo<any>An IStatChangeInfo
object describing why the change occurred. It will always be passed with a reason
Called when a stat changes, for any reason
An IStat object, the stat that was affected
The value that the stat changed from
An IStatChangeInfo object describing why the change occurred. It will always be passed with a reason
Called when a stat's max value changes, for any reason
An IStat object, the stat that was affected
Optional
oldValue: numberThe value that the stat changed from
Optional
info: IStatChangeInfo<any>An IStatChangeInfo
object describing why the change occurred. It will always be passed with a reason
Called when a stat timer will change
false
to cancel the stat timer change, undefined
otherwise.
An IStat
object, the stat that will be affected
An object for manipulating how the new stat change timer will be set
Called when this entity gets or loses a status effect
The type of status effect that was gained or lost
Whether the entity now has the status effect
The reason for the change
Optional
unequipOptional
updateGenerated using TypeDoc
Called when something is built on a tile