EverambleGAME API / 1

CONTENT CONTRACT · VERSION 1

Read

Snapshot reads never access live simulation state.

Signature

{ actor: (ActorRef) -> ActorView?, anchor: (AnchorRef) -> Position?, clock: () -> ClockView, count_item: (ActorRef, ItemId) -> Count, faction_members: (ActorRef) -> NearbyPage, map_of: (ActorRef) -> MapId?, nearby: (SnapshotRadius) -> NearbyPage, quest: ((PlayerRef)?, QuestId) -> QuestView?, signs: (SignName) -> SignPage, structures: (AnchorRef, SnapshotRadius) -> StructurePage, task: (NpcId) -> TaskView?, variable: (VariableId, VariableOwner) -> StateValue, work: (Name) -> WorkState? }

Fields

NameTypeMeaning
actor(ActorRef) -> ActorView?Read a visible actor.
anchor(AnchorRef) -> Position?Where an anchor of any map of the session lies (map data, readable by every handler): outdoors in world coordinates, which depend on the save's slot table — positions on another map come only from here.
clock() -> ClockViewRead the simulation clock.
count_item(ActorRef, ItemId) -> CountCount an item in the inventory of the event actor or the invocation owner.
faction_members(ActorRef) -> NearbyPageLiving visible members of the named actor's own faction, in reference order; respects the snapshot scope and truncation.
map_of(ActorRef) -> MapId?The outdoor map a visible actor is on (or whose ground holds the building it is in); nil when it is not in view.
nearby(SnapshotRadius) -> NearbyPageVisible actors within this distance of the snapshot centre, at most the declared snapshot radius.
quest((PlayerRef)?, QuestId) -> QuestView?Read a quest stage and revision; nil player reads together quests without a player context.
signs(SignName) -> SignPageThe world's signs of a name (letter case aside), wherever they stand: the place a player named, for errands to it.
structures(AnchorRef, SnapshotRadius) -> StructurePageStructures within this distance (at most the declared snapshot radius) of a declared snapshot anchor: their health, what stands in their rooms and what their storage holds.
task(NpcId) -> TaskView?The task a resident (NPC definition) has from the players: task, place and state; nil without one.
variable(VariableId, VariableOwner) -> StateValueRead a declared variable, using its virtual initial value when absent.
work(Name) -> WorkState?A story work of this package by name: standing, or nil (never placed, ended, or being taken back).