Playbill
Based on game build 714014 | Last updated: 2026-03-03
Overview
Playbill is a simple state-holding component used to track the current act of a theatrical performance, such as for the Beefalo Zoo minigame. It is attached to an entity (typically a playbill prefab) and supports saving and loading its state via the OnSave and OnLoad methods. It does not manage logic, timing, or演出 flow — only persists the selected act.
Usage example
local inst = CreateEntity()
inst:AddComponent("playbill")
inst.components.playbill:SetCurrentAct("act2")
-- State will be automatically saved/loaded during game save/load
Dependencies & tags
Components used: None identified
Tags: None identified
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
scripts | table | {} | Reserved for script references (not used in current implementation). |
costumes | table | {} | Reserved for costume references (not used in current implementation). |
starting_act | any | nil | Reserved for initial act value (not used in current implementation). |
current_act | any | nil | The currently active act in the playbill. |
book_build | any | nil | Reserved for build metadata (not used in current implementation). |
Main functions
SetCurrentAct(act)
- Description: Sets the
current_actfield to the specified act identifier. - Parameters:
act(any) — the act to set as current (e.g., a string like"act1"ornil). - Returns: Nothing.
OnSave()
- Description: Returns a serializable table containing the component’s state for savegames.
- Parameters: None.
- Returns: Table —
{ current_act = self.current_act }, or{ current_act = nil }ifself.current_actisnil.
OnLoad(data)
- Description: Restores the component’s state from a savegame data table.
- Parameters:
data(table ornil) — the data table returned byOnSave(). - Returns: Nothing.
- Error states: Silently ignores malformed or missing
data— only updatesself.current_actifdata.current_actis present.
Events & listeners
None identified