query · world.settlement
Loaded settlements
Returns a bounded stable-ID page of loaded Settlement capability facts.
world.settlement.list(filters?, cursor?, page_size?) -> query-page
- Stable ID
world.settlement.list- 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.9.0
Usage
Read a bounded stable page of loaded settlements without requiring an Actor selection. Use the detached counts for the normal village summary.
Parameters
- cursor: optional continuation cursor.
- page_size: bounded settlement count.
Returns
Detached Settlement identities, revisions, names, and resident, Household, Building, stockpile, and active-project counts in stable order.
Cost
Bounded by page size and direct Settlement index visits.
Fields
| ID | Type | Units | Required | Description |
|---|---|---|---|---|
actor_count | unsigned-integer | none | yes | Member actor count. |
building_count | unsigned-integer | none | yes | Member building count. |
household_count | unsigned-integer | none | yes | Member household count. |
job_count | unsigned-integer | none | yes | Member job count. |
revision | unsigned-integer | none | yes | Owner revision. |
settlement_id | stable-id | none | yes | Settlement identity. |
stockpile_count | unsigned-integer | none | yes | Member stockpile count. |
Errors
error.capability-unavailableerror.invalid-queryerror.query-budget-exhaustederror.query-contract-violation
Examples
local villages = world.query("world.settlement.list", {page_size = 1})
API history
- 1.9.0: Bounded settlement listing added for the normal village interface.