query · world.settlement

Settlement needs

Returns the latest retained settlement needs, forecasts, severity, evidence count, and direct reason for one settlement.

world.settlement.needs(filters?, cursor?, page_size?) -> query-page
Stable ID
world.settlement.needs
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 latest Settlement-owned food, water, fuel, housing, storage, labor, maintenance, and development assessment without creating a goal or changing a gameplay owner. Supply settlement_id to select the settlement.

Parameters

Returns

Detached need rows with the current and source Settlement revisions, assessment cadence, typed domain and unit, current, target, and projected quantities, severity, trend, confidence, horizon, retained evidence count, and direct measured reason.

Cost

One exact Settlement lookup plus one bounded traversal of the latest retained need assessment page. Recurring assessment uses the settlement definition's rotating visit budget and fixed cadence.

Fields

IDTypeUnitsRequiredDescription
assessment_tickunsigned-integerfixed-ticksyesFixed tick assessed.
completed_assessment_countunsigned-integernoneyesDurable assessment sequence count.
confidenceunsigned-integerbasis-pointsyesForecast confidence.
current_quantityunsigned-integernoneyesCurrent measured quantity.
domainenumerationnoneyesTyped settlement need domain.
horizon_ticksunsigned-integerfixed-ticksyesForecast horizon.
next_assessment_tickunsigned-integerfixed-ticksyesNext fixed tick when assessment may run.
projected_quantityunsigned-integernoneyesQuantity forecast at the configured horizon.
reasonstringnoneyesDirect measured explanation.
settlement_idstable-idnoneyesSettlement identity.
settlement_revisionrevisionnoneyesCurrent Settlement owner revision.
severityunsigned-integerbasis-pointsyesShortfall severity.
source_countunsigned-integernoneyesOwner evidence stamps retained.
source_settlement_revisionrevisionnoneyesSettlement revision used to compose the assessment.
target_quantityunsigned-integernoneyesData-authored target quantity.
trendenumerationnoneyesImproving, stable, or worsening forecast.
unitenumerationnoneyesQuantity unit for current and target values.

Errors

Examples

local needs = world.query("world.settlement.needs", {filters = {settlement_id = 1}, page_size = 8})

API history

Related symbols

Project references