query · world.land

World land areas

Returns stable cell rows for World-owned irregular land areas and their retained condition.

world.land.areas(filters?, cursor?, page_size?) -> query-page
Stable ID
world.land.areas
Owner
sim.world
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 stable cell rows from World-owned irregular land areas. Each row repeats the area's validated land-use identity, retained condition, crop lifecycle, revision, and causal ticks without changing land. Active crop rows also expose physical work, forecast, recurring-cycle, worker-choice, replant, and blockage facts retained by Farming.

Parameters

Returns

A detached page containing one row per retained area cell in stable area and cell order, with area identity, total cell count, land use, condition, optional crop, lifecycle stage, revision, and causal ticks.

Cost

Bounded by page size and the package query and owner-visit budgets; the detached World area snapshot is scanned in canonical order.

Fields

IDTypeUnitsRequiredDescription
area_idstable-idnoneyesWorld land area identity.
cell_countunsigned-integernoneyesConnected cells in the area.
cell_xsigned-integergrid-cellsyesWorld-grid cell X coordinate.
cell_ysigned-integergrid-cellsyesWorld-grid cell Y coordinate.
controlling_site_idstable-id-or-nullnonenoSite currently controlling the area, independent of its dedication.
conversion_stageenumeration-or-nullnonenoCurrent retained physical conversion stage.
conversion_work_completedunsigned-integer-or-nullwork-unitsnoWork retained in the current conversion stage.
conversion_work_requiredunsigned-integer-or-nullwork-unitsnoWork required by the current conversion stage.
conversion_worker_idstable-id-or-nullnonenoResident currently committed to conversion work.
coverenumerationnoneyesCurrent retained land cover.
created_at_tickunsigned-integerticksyesArea creation tick.
crop_definition_idstring-or-nullnonenoCurrent crop identity.
dedicated_site_idstable-id-or-nullnonenoSettlement site responsible for the dedicated area.
dedicationenumerationnoneyesCurrent whole-area land dedication.
depletionunsigned-integerbasis-pointsyesCurrent retained depletion.
farming_blockage_reasonstring-or-nullnonenoDirect reason current settlement food need cannot advance this area.
farming_choice_reasonstring-or-nullnonenoDirect reason for the latest crop, area, and resident choice.
farming_completed_cyclesunsigned-integer-or-nullcyclesnoCompleted harvest or recovery cycles retained for this area.
farming_forecast_reasonstring-or-nullnonenoDirect explanation for the latest crop forecast or outcome.
farming_forecast_yieldunsigned-integer-or-nullbasis-pointsnoLatest deterministic crop yield forecast.
farming_growth_ready_tickunsigned-integer-or-nullticksnoTick when the current growth interval can advance.
farming_last_worker_idstable-id-or-nullnonenoLast resident selected for this crop cycle.
farming_next_replant_tickunsigned-integer-or-nullticksnoTick when retained land becomes eligible for another crop cycle.
farming_outcomeenumeration-or-nullnonenoLatest retained crop forecast or outcome.
farming_stageenumeration-or-nullnonenoCurrent retained crop-cycle stage.
farming_work_completedunsigned-integer-or-nullwork-unitsnoWork retained in the current crop stage.
farming_work_requiredunsigned-integer-or-nullwork-unitsnoWork required by the current crop stage.
farming_worker_idstable-id-or-nullnonenoResident currently committed to crop work.
fertilityunsigned-integerbasis-pointsyesCurrent fertility.
land_use_definition_idstringnoneyesValidated immutable land-use identity.
lifecycle_stageenumerationnoneyesCurrent crop or fallow lifecycle stage.
moistureunsigned-integerbasis-pointsyesCurrent moisture.
preferred_accessbooleannoneyesWhether this cell is a preferred gate or road access cell.
preferred_access_countunsigned-integernoneyesPreferred access cells retained for the whole area.
preparationenumerationnoneyesCurrent retained preparation state.
revisionrevisionnoneyesWorld land area revision.
stage_started_at_tickunsigned-integerticksyesCurrent lifecycle-stage start tick.
updated_at_tickunsigned-integerticksyesLatest area mutation tick.

Errors

Examples

local result = world.query("world.land.areas", {page_size = 32})
if result.status == "completed" then
    for _, cell in ipairs(result.records) do
        ui.row("Land " .. tostring(cell.area_id), cell.land_use_definition_id .. " / " .. cell.lifecycle_stage)
    end
end

API history

Related symbols

Project references