Skip to main content

Pig Token

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

Overview

pig_token is a prefab for a collectible item used as a consumable or craftable resource in the game. It functions as an inventory item with stackable, tradable, burnable, and inspectable properties. The entity is purely client-side on non-master simulators and adds core gameplay components only on the master sim (server).

Usage example

local inst = TheWorld:SpawnPrefab("pig_token")
inst.components.stackable:SetStackSize(10)
inst.components.tradable:SetTrader(some_trader_entity)
inst.components.inventoryitem:OnDrop()

Dependencies & tags

Components used: stackable, tradable, inspectable, inventoryitem, smallburnable, smallpropagator Tags: Adds physics (via MakeInventoryPhysics), pushable (via MakeInventoryPhysics), floatable (via MakeInventoryFloatable), burnable, smolderer, smallprop, hauntable_launch, tradable, inspectable, inventoryitem, object, item, pig_token.

Properties

PropertyTypeDefault ValueDescription
stackable.maxsizenumberTUNING.STACK_SIZE_SMALLITEMMaximum number of pig tokens that can be stacked in one inventory slot.

Main functions

Not applicable — no public instance methods are defined in the constructor. Interaction occurs through attached component APIs (stackable, tradable, etc.).

Events & listeners

Not applicable — no event listeners or event pushes are defined directly in the pig_token prefab logic. Events are handled by the attached components (e.g., tradable, inventoryitem).