Skip to main content

Succulent Plant

Based on game build 714014 | Last updated: 2026-03-07

Overview

The succulent_plant prefab defines two related entities: the in-world succulent plant (a static flora item) and the succulent_picked item (a stackable inventory item derived from harvesting the plant). The picked variant supports multiple lifecycle behaviors: it is edible, perishable, dryable (via a meat rack), flammable, and lightweight. The plant variant provides pickable functionality with immediate removal upon harvesting.

Usage example

-- Creating a succulent plant instance in the world
local plant = SpawnPrefab("succulent_plant")
plant.Transform:SetPosition(x, y, z)
plant.plantid = 3 -- Optional: set variant (1–5)

-- Picking it yields succulent_picked, which is automatically added to inventory
plant.components.pickable:Picked()

Dependencies & tags

Components used: inspectable, pickable, stackable, tradable, fuel, inventoryitem, edible, perishable, dryable Tags: Adds succulent (to plant), cattoy, dryable (to picked item)

Properties

PropertyTypeDefault ValueDescription
plantidnumbernil (default: random 15)Visual variant identifier for the plant; controls which symbology (Symbol_1, Symbol_2, etc.) is used for animation. Stored in save data.
animstate.bankstring"succulent" or "succulent_picked"Animation bank used for the entity.
animstate.buildstring"succulent" or "succulent_picked"Base asset build used for animation.
animstate.playanimationstring"idle"Initial animation played on spawn.

Main functions

SetupPlant(inst, plantid)

  • Description: Configures visual variant of the plant based on plantid. Removes override symbol for variant 1; sets override for variants 2–5.
  • Parameters: inst (Entity), plantid (number, optional) — if omitted or nil, defaults to a random integer in 15.
  • Returns: Nothing.
  • Error states: No side effects if plantid == 1; no errors if inst.AnimState is missing (should not occur in normal usage).

Events & listeners

  • Listens to: None explicitly in this file (save/load callbacks assigned to inst.OnSave / inst.OnLoad).
  • Pushes: None — entities created here do not emit custom events; rely on standard pickable, perishable, etc., event systems via components.