item_spawn
Module: item_spawn — player_item.lua
What it does
Adds one or more items directly to the local player's inventory. The item can be specified as a full item type string (e.g. Base.Katana), or as a predefined category key ("good" or "bad") which selects a random item from that pool. For each successfully added item, the player announces it with a thank-you message referencing the viewer name.
Trigger type
item_spawn
Parameters
| Parameter | Type | Default | Valid Values | Description |
|---|---|---|---|---|
type |
string | required | "item_spawn" |
Module trigger identifier. |
item |
string | nil |
"good", "bad", or any full item type string |
Item to give. Use "good" or "bad" for a random item from those pools, or supply a full type like "Base.Axe". If nil or invalid, nothing is spawned. |
itemNumber |
number | 1 |
Any positive integer | How many copies of the item to add to the inventory. |
viewer |
string | "chat" |
Any string | Name used in the player's thank-you speech. Typically the triggering viewer's username. |
Predefined item pools:
good
- Base.BaseballBat
- Base.BaseballBat_Metal
- Base.Hat_GasMask
- Base.Axe
- Base.Katana
- Base.Crowbar
- Base.HandAxe
- Base.PetrolPopBottle
- Base.PillsBeta
- Base.PickAxe
- Base.BeerBottle
- Base.SpearMachete
- Base.WaterBottleFull
- Base.Hat_BuildersRespirator
- Base.TinnedBeans
bad
- Base.Generator
- Base.Mov_ArcadeMachine2
- Base.Mov_WaterDispenser
Examples
Random good item from a viewer
{ type="item_spawn", item="good", viewer="HelpfulViewer" }
Give 3 specific items (katana)
{ type="item_spawn", item="Base.Katana", itemNumber=3, viewer="GenerousViewer" }
Curse with a random bad item
{ type="item_spawn", item="bad", viewer="ChaosViewer" }