Brodgar client

Data Types: The Snapshot Shapes

The plain Lua tables :info() copies out of a live object, field by field, grouped by the subsystem each comes from. A snapshot is a point-in-time copy for logging, serialising or diffing. It never updates. A field marked optional is absent (nil) when the data is not available or still resolving. Guard for it (snapshots vs handles).

local gob = hafen.session():current():player():gob()
local snapshot = gob:info()                                   -- a plain table, frozen now
hafen.log():write(hafen.json():encode(snapshot))              -- what a live Gob cannot do

Rule Detail
A catalogue, not a census Every object answers :info(). A shape one page reads (a timer, a keybinding, an option row) is stated in that page’s verb row. A shape lands here when more than one page names it, or when a table beats a sentence.
A snapshot keeps the client’s own spelling The verbs are camelCase (:modified(), :qualityInputs(), :questsDone()). A snapshot is the shape the client holds (isplayer, mtime, qmod). Each table names the verb beside the field where the two differ.

The pages

Page Holds
The client An addon the client discovered.
The session and the world One login and an object in it. The people beside you, and the ones a voice link relates you to. The ground, a place, your own things standing there.
The item and what holds it One item, and what a container states about its inside.
The character sheet Attributes, food with its FEP and hunger halves, learning, movement speed, quests, wounds, buffs.
The fight A manoeuvre, a card in the deck, the action-point budget, a saved school, an opponent, an opening, a combat action.
The map A pin on the recorded map, a minimap icon category.
The widget layer A widget in the tree. A HUD meter and one band of its bar. The open recipe. A hotbar slot. An action-menu entry. A chat channel and its lines.

Every shape

Shape Page
ActionbarSlot The widget layer
Addon The client
Attr The character sheet
Buff The character sheet
Channel The widget layer
CombatAction The fight
Condition The character sheet
Contents The item and what holds it
Craft The widget layer
CraftSpec The widget layer
Credo The character sheet
DeckCard The fight
Experience The character sheet
Fep The character sheet
FepEntry The character sheet
FightSummary The fight
Food The character sheet
GobInfo The session and the world
Hunger The character sheet
IconCategory The map
Item The item and what holds it
KinEntry The session and the world
Maneuver The fight
Marker The map
Message The widget layer
Meter The widget layer
MeterSegment The widget layer
Opening The fight
Opponent The fight
Pagina The widget layer
PartyMember The session and the world
Peer The session and the world
Petal The widget layer
Position The session and the world
Quest The character sheet
ResRef The widget layer
School The fight
Session The session and the world
Skill The character sheet
Speed The character sheet
StudySlot The character sheet
StudySummary The character sheet
Tile The session and the world
Widget The widget layer
Wound The character sheet
WorldEntity The session and the world

See Also