query · world.settlement

Settlement supply options

Returns the latest Settlement-owned physical supply alternatives, direct rejection reasons, scores, selections, and exact Supply owner bindings.

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

Inspect the Settlement-owned physical food, water, fuel, and development-material alternatives considered during its latest supply evaluation. The query is detached and cannot create, claim, or advance Supply or Work.

Parameters

Returns

Detached option rows with portfolio cadence and budget counts; demand, beneficiary, resource, container, and Site identities; observed quantity, capacity, route, danger, need, gap, relief, re-entry, urgency, and alert facts; deterministic score and rejection; selection; and the exact Supply identity and revision when bound.

Cost

One exact Settlement lookup plus one bounded traversal of the latest retained supply-option page. Recurring composition uses authored Settlement, source, candidate, mutation, history, and cadence budgets.

Fields

IDTypeUnitsRequiredDescription
available_quantityunsigned-integernoneyesAvailable source quantity.
beneficiary_idstable-id-or-nullnonenoResident beneficiary for need supply.
candidate_visit_countunsigned-integernoneyesPhysical source alternatives visited by the bounded reasoner.
completed_evaluation_countunsigned-integernoneyesDurable supply portfolio sequence count.
consumption_quantityunsigned-integernoneyesQuantity consumed by one need-supply execution.
destination_container_idstable-idnoneyesPhysical destination container identity.
destination_free_quantityunsigned-integernoneyesObserved free destination capacity.
destination_site_idstable-idnoneyesPhysical destination site identity.
detailstringnoneyesDirect selection or rejection explanation.
domainenumerationnoneyesSettlement need domain.
eligible_candidate_countunsigned-integernoneyesAlternatives that passed every hard eligibility gate.
evaluation_tickunsigned-integerfixed-ticksyesFixed tick evaluated.
job_urgencyunsigned-integerbasis-pointsyesMaterial supply job urgency.
need_reentryunsigned-integerbasis-pointsyesNeed threshold that permits repeat execution.
need_reliefunsigned-integerbasis-pointsyesNeed relief per execution.
need_severityunsigned-integerbasis-pointsyesCurrent demand severity.
next_evaluation_tickunsigned-integerfixed-ticksyesNext fixed tick when evaluation may run.
option_idstable-idnoneyesDurable physical option identity.
policy_keystringnoneyesData-authored demand policy identity.
purposeenumerationnoneyesFood, water, or material execution purpose.
rejectionenumerationnoneyesDirect ineligibility reason or none.
requested_quantityunsigned-integernoneyesRequested transfer quantity.
resource_idstable-idnoneyesResource owner identity.
route_cost_ticksunsigned-integerfixed-ticksyesObserved route cost.
route_dangerunsigned-integerbasis-pointsyesObserved route danger.
scoresigned-integerbasis-pointsyesDeterministic option score.
selectedbooleannoneyesWhether Settlement selected this option.
selected_candidate_countunsigned-integernoneyesAlternatives selected for normal Supply execution.
settlement_idstable-idnoneyesSettlement identity.
settlement_revisionrevisionnoneyesCurrent Settlement owner revision.
source_container_idstable-idnoneyesPhysical source container identity.
source_need_assessment_tickunsigned-integerfixed-ticksyesNeed assessment used as source evidence.
source_settlement_revisionrevisionnoneyesSettlement revision used to compose the portfolio.
source_site_idstable-idnoneyesPhysical source site identity.
stock_gap_quantityunsigned-integernoneyesObserved stock shortfall.
supply_idstable-id-or-nullnonenoBound Supply owner identity.
supply_revisionrevision-or-nullnonenoBound Supply owner revision.
tuning_versionunsigned-integernoneyesFixed-point supply portfolio tuning version.
unfilled_alert_after_ticksunsigned-integerfixed-ticksyesDelay before an unfilled supply alerts.

Errors

Examples

local options = world.query("world.settlement.supply-options", {filters = {settlement_id = 1}, page_size = 32})

API history

Related symbols

Project references