Gathering
constGathering:object
Defined in: server/api.d.ts:5684
Finds and removes authored herbs and controls regrowth. Defaults are five times faster than the game’s authored species timings. Changes are held in server memory.
Type Declaration
Section titled “Type Declaration”respawnTime
Section titled “respawnTime”
readonlyrespawnTime:GatheringRespawnTime|null
Current frozen override, or null for the species defaults at one fifth of their authored duration.
getHerbs()
Section titled “getHerbs()”getHerbs(
position,radius,virtualWorld?):GatheringHerb[]
Lists available authored herbs in a sphere, without requiring nearby players. Excludes picked or removed herbs and custom map assets. Invalid arguments throw.
Parameters
Section titled “Parameters”position
Section titled “position”Centre in world metres; finite coordinates within +/-100000.
radius
Section titled “radius”number
Inclusive 3D radius in metres, from 0 to 100000.
virtualWorld?
Section titled “virtualWorld?”number
One virtual-world bucket, default 0. Pass player.virtualWorld for a player’s bucket. 0xffffffff selects only the global bucket. Invalid IDs throw.
Returns
Section titled “Returns”removeHerbs()
Section titled “removeHerbs()”removeHerbs(
position,radius,virtualWorld?):number
Removes authored herbs in a sphere, including already-picked plants. Gives no rewards or harvest events. Removal lasts until an explicit respawn or server restart, regardless of regrowth timing changes.
Parameters
Section titled “Parameters”position
Section titled “position”Centre in world metres; finite coordinates within +/-100000.
radius
Section titled “radius”number
Inclusive 3D radius in metres, from 0 to 100000.
virtualWorld?
Section titled “virtualWorld?”number
One virtual-world bucket, default 0. Pass player.virtualWorld for a player’s bucket. 0xffffffff selects only the global bucket. Invalid IDs throw.
Returns
Section titled “Returns”number
Number newly marked for removal; repeated removal returns 0. Invalid arguments throw before mutation.
resetRespawnTime()
Section titled “resetRespawnTime()”resetRespawnTime():
void
Restores five-times-faster species defaults and restarts active picked-herb timers from now. Script-removed herbs stay removed.
Returns
Section titled “Returns”void
respawn()
Section titled “respawn()”respawn(
position,radius,virtualWorld?):number
Respawns picked and script-removed plants in a sphere, including plants with timed regrowth disabled. Restores client vegetation as well as server availability. Does not create new plants.
Parameters
Section titled “Parameters”position
Section titled “position”Centre of the sphere in world metres; finite coordinates within +/-100000.
radius
Section titled “radius”number
Inclusive 3D radius in metres, from 0 to 100000.
virtualWorld?
Section titled “virtualWorld?”number
Only this virtual world; defaults to 0.
Returns
Section titled “Returns”number
Number of active picked or script-removed sources restored. Invalid arguments throw.
respawnAll()
Section titled “respawnAll()”respawnAll(
virtualWorld?):number
Respawns every picked or script-removed plant in one virtual world, including plants with timed regrowth disabled.
Parameters
Section titled “Parameters”virtualWorld?
Section titled “virtualWorld?”number
Only this virtual world; defaults to 0.
Returns
Section titled “Returns”number
Number of active picked or script-removed sources restored. Invalid arguments throw.
setRespawnTime()
Section titled “setRespawnTime()”setRespawnTime(
minHours,maxHours):boolean
Restarts active picked-herb deadlines from now and sets the policy for future picks. Script-removed herbs stay removed. Samples uniformly per plant. Equal bounds fix the duration; (0, 0) disables timed regrowth while manual respawn remains available. Applies to every virtual world.
Parameters
Section titled “Parameters”minHours
Section titled “minHours”number
Minimum game hours, from 0 to maxHours.
maxHours
Section titled “maxHours”number
Maximum game hours, up to 87600. Positive durations must reach at least one game millisecond.
Returns
Section titled “Returns”boolean
True on success; false for non-finite, reversed or out-of-range bounds.