query · world.actor

Actor routine

Returns one Actor's retained expected activity, actual choice, and reason.

world.actor.routine(filters?, cursor?, page_size?) -> query-page
Stable ID
world.actor.routine
Owner
game.actor-runtime
Authority
read_only
Timing
immediate
Availability
active-session
Side effects
none
Determinism
stable owner order at the current committed tick
Introduced
1.6.0

Usage

Query one actor_id to read that resident's expected daily activity, current choice, and retained reason without requiring an embodied position. The result is detached and does not start, pause, or claim work.

Parameters

Returns

One detached routine record with the profile and routine revisions, expected and actual activities, decision reason, calendar position, completed day boundaries, deviation count, and whether the resident currently accepts new work.

Cost

One indexed Actor lookup within the package query budget; no population scan or simulation mutation.

Fields

IDTypeUnitsRequiredDescription
accepts_new_workbooleannoneyesWhether the current routine choice permits a new autonomous work claim.
actor_idstable-idnoneyesActor identity.
actual_activityenumerationnoneyesActivity currently chosen by the Actor.
calendar_dayunsigned-integerdaysyesDay evaluated by the Actor.
completed_day_boundariesunsigned-integernoneyesDay boundaries crossed through hot or compressed visits.
deviationsunsigned-integernoneyesRetained count of off-schedule choices.
evaluated_at_tickunsigned-integerticksyesLast bounded routine visit.
minute_of_dayunsigned-integerminutesyesClock minute evaluated by the Actor.
planned_activityenumerationnoneyesActivity expected by the daily schedule.
profile_versionunsigned-integernoneyesRoutine profile generator version.
reasonenumerationnoneyesReason for the current choice.
routine_revisionrevisionnoneyesActor-owned routine revision.
schedule_offset_minutessigned-integerminutesyesActor's stable personal timing offset from the authored routine.

Errors

Examples

local result = world.query("world.actor.routine", {page_size = 1, filters = {actor_id = actor_id}})
if result.status == "completed" then
    local routine = result.records[1]
    ui.row("Routine", routine.actual_activity)
    ui.row("Expected", routine.planned_activity)
end

API history

Related symbols

Project references