40b — Farming cultivation depth
Parent: 40 — Property plots & player farming
Related: 37 — Economic map zones, 38 — Biomes & cultivate, 09 — Crafting, 23 — Harvest.
1. Summary
The own → till → plant → grow → harvest loop uses tools, timed channels, growth-zone soil difficulty, and fallow revert:
| Theme | Behavior |
|---|---|
| Cultivate | Requires a hoe on person; duration and stamina scale by growth zone |
| Plant | Requires a dibber; timed channel per crop via planting_ticks |
| Fallow | Empty tilled cells revert after fallow_revert_ticks |
| Teardown | Crown sellback, reclaim, and any plot removal clear terrain deltas and farm crops |
| Content | Hoe + dibber items, craft blueprints; Eli sells tools and teaches recipes |
2. Plot teardown
Any time a PropertyPlot is removed (sell to crown, upkeep reclaim, admin), the sim:
- Removes all
farm_crops/ farm crop resource nodes on the plot. - Clears
terrain_deltasfor cells inside the plot rect whenfarming.wither_on_reclaimis true. - Cancels in-flight cultivate / plant channels targeting those cells.
3. Growth zone fields
On segment growth_zones (Map layout property panel):
| Field | Type | Default | Role |
|---|---|---|---|
cultivate_ticks |
u32? |
inherit | Sim ticks to finish one cultivate channel in this zone |
cultivate_stamina_mult |
f32 |
1.0 |
Multiplies cultivate stamina (> 1 = harder soil) |
fallow_revert_ticks |
u32? |
inherit | Ticks without a crop before tilled soil reverts |
fertility |
f32 |
— | Speeds crop growth (separate from till duration) |
Sampling: highest z_order growth zone covering the cell (37).
Cells outside any growth zone:
cultivate_ticks→property_plots.cultivate_tickscultivate_stamina_mult→1.0fallow_revert_ticks→farming.default_fallow_revert_ticks
ticks = zone.cultivate_ticks.unwrap_or(settings.property_plots.cultivate_ticks)
stamina = settings.vitals.action_costs.cultivate_stamina * zone.cultivate_stamina_mult
4. Tools
| Tool | tool_kind |
Use |
|---|---|---|
| Hoe | hoe |
Cultivate / till |
| Dibber | dibber |
Plant seeds |
Must be on person (bag or worn). Reject messages are friendly (“You need a hoe to till soil.”).
Craft / vendor:
- Blueprint
crude_hoe— lumber + iron ingot + leather strap; Eli teaches and sells hoe (~20 cp). - Blueprint
crude_dibber— lumber + leather strap; Eli teaches and sells dibber (~12 cp).
5. Cultivate channel
- Player (or worker) starts cultivate on an owned / permitted cell.
- Terrain shows dirt (tilling in progress), then tilled on complete.
- Duration / stamina from §3; hoe required.
- Completing till resets the fallow timer for that cell.
6. Planting channel
Crop defs (assets/crops/crops.yaml, content-admin Crops tab) include:
| Field | Role |
|---|---|
planting_ticks |
Channel length to plant one seed |
grow_ticks |
Time to mature (modified by fertility / biome / weather) |
seed_item |
Template consumed |
harvest.loot_table |
Yields on harvest (23) |
Player / worker flow:
- Commit plant intent with a seed type (dibber required).
- Server picks one nearest free tilled cell; consumes one seed at channel start.
- On complete: spawn farm crop, keep tilled, reset fallow timer.
- Duplicate plant while busy is rejected (same pattern as cultivate / harvest).
Example: potato planting_ticks: 150, carrot planting_ticks: 120.
7. Fallow (untilled revert)
Runtime tracks tilled-cell metadata (last_tended_tick, optional plot_id) alongside terrain_deltas.
Each tick (or batched): for each Tilled cell with no farm crop:
revert_ticks = growth_zone.fallow_revert_ticks or farming.default_fallow_revert_ticks
if tick - last_tended_tick >= revert_ticks:
clear terrain delta; drop meta
Do not revert in-progress Dirt. Reset last_tended_tick on: cultivate complete, plant complete, harvest complete (cell stays tilled).
8. Growth & harvest
base_ticks_to_mature = crop.grow_ticks
fertility = growth_zone_at(cell).fertility or 1.0
biome_mult / weather_mult (default 1.0 until weather layers apply)
progress advances each tick toward 1.0
sprite_mode: grow_10 → grow_20 → grow_60 → grow_100
At grow_100, the crop is a harvestable resource node. Yield comes from the crop’s loot table (produce + chance of seeds). Cell remains tilled for replant.
9. Content surfaces
| Surface | Fields |
|---|---|
| Map layout | Growth zone: cultivate_ticks, cultivate_stamina_mult, fallow_revert_ticks, fertility, crop tags |
| Crops | planting_ticks, grow/harvest fields |
| Items | tool_kind: hoe | dibber |
| Crafting / NPCs | crude_hoe, crude_dibber; Eli sells + teaches |
| CLI | flatland-admin crop list|get|validate |
10. Non-goals
- Multi-cell single-ack batch plant (sequential channels are the loop)
- Sickle/scythe harvest tool gates (extend
tool_kindlater if needed) - Particle growth VFX beyond sprite modes