query · world.settlement

Settlement capability

Returns current membership, infrastructure, defense, and revision facts for one settlement.

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

Usage

Call this query through world.query with the stable ID world.settlement.capability. Consume detached records during the current callback and use the returned cursor for bounded continuation.

Parameters

Returns

A detached query page with status, records, continuation metadata, and a stable diagnostic when the request cannot complete.

Cost

Bounded by page size, per-package query budget, and the owning snapshot builder; results are detached before Lua receives them.

Fields

IDTypeUnitsRequiredDescription
actor_countunsigned-integernoneyesMember actor count.
building_countunsigned-integernoneyesMember building count.
household_countunsigned-integernoneyesMember household count.
job_countunsigned-integernoneyesMember job count.
revisionunsigned-integernoneyesOwner revision.
settlement_idstable-idnoneyesSettlement identity.
stockpile_countunsigned-integernoneyesMember stockpile count.

Errors

Examples

local result = world.query("world.settlement.capability", {page_size = 16})
if result.status == "completed" then
    for _, record in ipairs(result.records) do
        -- Render or inspect detached record fields here.
    end
end

API history

Related symbols

Project references