Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Global objectServer APIGenerated

Gathering

const Gathering: object

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

Controls herb regrowth. Defaults are five times faster than the game’s authored species timings. Changes are held in server memory.

readonly respawnTime: GatheringRespawnTime | null

Current frozen override, or null for the species defaults at one fifth of their authored duration.

resetRespawnTime(): void

Restores five-times-faster species defaults and restarts all active herb timers from now.

void

respawn(position, radius, virtualWorld?): number

Respawns recorded harvested plants in a sphere, including plants with timed regrowth disabled. Restores client vegetation as well as server availability. Does not create new plants.

Vector3

Centre of the sphere in world metres; finite coordinates within +/-100000.

number

Inclusive 3D radius in metres, from 0 to 100000.

number

Only this virtual world; defaults to 0.

number

Number of active harvested sources restored. Invalid arguments throw.

respawnAll(virtualWorld?): number

Respawns every recorded harvested plant in one virtual world, including plants with timed regrowth disabled.

number

Only this virtual world; defaults to 0.

number

Number of active harvested sources restored. Invalid arguments throw.

setRespawnTime(minHours, maxHours): boolean

Restarts all active herb deadlines from now and sets the policy for future picks. Samples uniformly per plant. Equal bounds fix the duration; (0, 0) disables timed regrowth while manual respawn remains available. Applies to every virtual world.

number

Minimum game hours, from 0 to maxHours.

number

Maximum game hours, up to 87600. Positive durations must reach at least one game millisecond.

boolean

True on success; false for non-finite, reversed or out-of-range bounds.