query · world.settlement

Settlement spatial districts

Returns descriptive districts inferred by Settlement from current physical anchor proximity and services. District rows are read-only descriptions, not land authority.

world.settlement.spatial-districts(filters?, cursor?, page_size?) -> query-page
Stable ID
world.settlement.spatial-districts
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.19.0

Usage

Read the Settlement's latest descriptive grouping of current physical building and land anchors. Supply settlement_id. District descriptions do not claim land, set zoning, or authorize construction.

Parameters

Returns

Detached district rows with portfolio tick, stable key, descriptive kind, canonical anchor-cell list, distinct service list, Building and land-area counts, and direct derivation explanation. Residential-only districts may have an empty service list.

Cost

One exact Settlement lookup plus one bounded traversal of the latest retained district descriptions. Runtime derivation uses the authored district visit budget and proximity radius.

Fields

IDTypeUnitsRequiredDescription
anchor_cellsstringnoneyesStable comma-separated anchor-cell list.
anchor_countunsigned-integernoneyesCurrent physical anchors in the district.
building_countunsigned-integernoneyesCurrent Building anchors.
detailstringnoneyesDirect district derivation explanation.
district_keystringnoneyesStable descriptive district identity.
evaluation_tickunsigned-integerfixed-ticksyesPortfolio tick that described the district.
kindenumerationnoneyesResidential, civic, agrarian, craft, or mixed description.
land_area_countunsigned-integernoneyesCurrent land-area anchors.
service_countunsigned-integernoneyesDistinct services present.
servicesstringnoneyesStable comma-separated service list.
settlement_idstable-idnoneyesSettlement identity.
settlement_revisionrevisionnoneyesCurrent Settlement owner revision.

Errors

Examples

local districts = world.query("world.settlement.spatial-districts", {filters = {settlement_id = 1}, page_size = 16})
for _, district in ipairs(districts.records) do
    ui.text(district.kind, district.anchor_cells)
end

API history

Related symbols

Project references