query · world.actor

Actor relationships

Returns one Actor's retained social relationships in stable owner order.

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

Usage

Query one actor_id to inspect the villager's retained social connections, current relationship stage, affinity, trust, strain, and latest change reason without changing either Actor.

Parameters

Returns

Detached relationship rows in stable owner order with the other villager's authored display name.

Cost

One Actor validation, one indexed Relationship lookup, and one bounded authored-name lookup per returned row.

Fields

IDTypeUnitsRequiredDescription
actor_idstable-idnoneyesRequested Actor identity.
affinitysigned-integerbasis-pointsyesRetained affinity.
last_reasonenumerationnoneyesReason for the latest relationship change.
peer_actor_idstable-idnoneyesOther Actor in the relationship.
peer_display_namestringnoneyesAuthored peer name or stable fallback label.
relationship_idstable-idnoneyesRelationship identity.
stageenumerationnoneyesCurrent evaluated relationship stage.
strainsigned-integerbasis-pointsyesRetained relationship strain.
trustsigned-integerbasis-pointsyesRetained trust.
updated_at_tickunsigned-integerticksyesLatest relationship update.

Errors

Examples

local relationships = world.query("world.actor.relationships", {page_size = 4, filters = {actor_id = selected_id}})

API history

Related symbols

Project references