Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Data shapeServer APIGenerated

BuffState

Defined in: server/api.d.ts:8303

One status effect currently on a body: everything BuffInfo says about it, plus how long it has been there and who put it there.

aiTag: string | null

Defined in: server/api.d.ts:8317

The family player.clearBuffs would take it off with, or null for the majority that belong to none.


class: string

Defined in: server/api.d.ts:8312

The kind of effect it is – poison, alcohol, injury, potion. Buffs.classes lists the ones a server can take over.


custom: boolean

Defined in: server/api.d.ts:8327

Whether this definition was registered with Buffs.register.


description: string | null

Defined in: server/api.d.ts:8337

Registered description for a custom effect; null for a native effect.


displayName: string | null

Defined in: server/api.d.ts:8332

Registered display text for a custom effect; null for a native effect.


duration: number

Defined in: server/api.d.ts:8322

How long the effect runs from start to finish, in real seconds, and negative for one with no end.


name: string

Defined in: server/api.d.ts:8307

The name the game’s own buff tables give the effect, and the spelling every buff verb takes.


since: number

Defined in: server/api.d.ts:8342

How long it has been on the body, in real seconds. duration - since is roughly what is left, and roughly is the best anyone can do: the game advances buff time from each client’s own frame delta. 0 for an effect that was already there when the player connected.


source: "server" | "native"

Defined in: server/api.d.ts:8347

Whether this server put it there, or the game did – a potion they drank, an injury they took.