query · world.project

Project proposals

Returns the latest retained autonomous project decision and its complete bounded candidate trace for one settlement.

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

Query one settlement's latest retained autonomous project decision. Each detached row contains one candidate's hard-gate result and complete fixed-point score plus the shared decision status, explanation, source Settlement revision, selected Construction identity, retained terminal outcome when present, next decision tick, tuning version, useful-project threshold, candidate and consideration counts, and the Building and stockpile owner visits used to compose the facts. Follow next_cursor to inspect every retained candidate.

Parameters

Returns

A detached candidate page. Decision-level and optional terminal-outcome fields are repeated on every row so continuation pages remain self-describing. Returns capability-unavailable when the Settlement owner or its latest decision is absent.

Cost

One Settlement lookup plus one owner visit per returned candidate, bounded by page size and the calling package's query budgets.

Fields

IDTypeUnitsRequiredDescription
building_definition_idstringnoneyesCandidate building definition identity.
building_visit_countunsigned-integernoneyesBuilding owner facts visited while composing the decision.
candidate_idstringnoneyesStable authored proposal identity.
capacity_pressure_contributionsigned-integerbasis-pointsyesHousing or storage pressure score contribution.
consideration_evaluation_countunsigned-integernoneyesFixed-point score components evaluated by the reasoner.
decision_detailstringnoneyesOwner-retained decision explanation.
decision_statusenumerationnoneyesSelected or no-selection result.
decision_tickunsigned-integerfixed-ticksyesFixed tick evaluated.
eligibility_detailstringnoneyesSpecific eligibility or rejection reason.
eligiblebooleannoneyesWhether the candidate passed every hard gate.
eligible_candidate_countunsigned-integernoneyesCandidates that passed every hard eligibility gate.
inverse_labor_cost_contributionsigned-integerbasis-pointsyesLower-labor-cost score contribution.
material_readiness_contributionsigned-integerbasis-pointsyesMaterial-readiness score contribution.
minimum_scoreunsigned-integerbasis-pointsyesRequired useful-project score.
next_project_decision_tickunsigned-integerfixed-ticksyesNext fixed tick when autonomous planning may run.
project_outcome_building_definition_idstring-or-nullnonenoBuilding definition retained with the terminal outcome.
project_outcome_building_idstable-id-or-nullnonenoBuilding identity retained with the terminal outcome.
project_outcome_causeenumeration-or-nullnonenoRetained terminal cause of the selected project.
project_outcome_construction_idstable-id-or-nullnonenoConstruction identity retained with the terminal outcome.
project_outcome_construction_revisionrevision-or-nullnonenoConstruction revision observed at the terminal outcome.
project_outcome_recorded_at_tickunsigned-integer-or-nullfixed-ticksnoTick when Settlement retained the terminal outcome.
project_outcome_statusenumeration-or-nullnonenoRetained terminal status of the selected project.
selectedbooleannoneyesWhether this candidate won the decision.
selected_construction_idstable-id-or-nullnonenoConstruction created by the selected proposal.
settlement_idstable-idnoneyesSettlement identity.
settlement_revisionrevisionnoneyesCurrent Settlement owner revision.
source_settlement_revisionrevisionnoneyesSettlement revision evaluated by the reasoner.
stockpile_visit_countunsigned-integernoneyesStockpile owner facts visited while composing the decision.
total_scoresigned-integerbasis-pointsyesCandidate's complete fixed-point score.
tuning_versionunsigned-integernoneyesFixed-point reasoner tuning version.
visited_candidate_countunsigned-integernoneyesCandidates visited by the bounded reasoner.

Errors

Examples

local result = world.query("world.project.proposals", {
    page_size = 8,
    filters = {settlement_id = settlement.settlement_id}
})
if result.status == "completed" then
    for _, proposal in ipairs(result.records) do
        local outcome = proposal.eligible and tostring(proposal.total_score)
            or proposal.eligibility_detail
        ui.row(proposal.building_definition_id, outcome)
    end
end

API history

Related symbols

Project references