The Farmer Was Replaced is a programming idler: you write Python-ish code that drives a drone around a grid farm, and the entire progression is bought with what that farm produces. It is a numbers game under the hood, which is what this guide is for — the costs below are the game's own unlock-cost data, and the arithmetic in the leaderboard section is worked out in the open so you can check it.
The version this is written for
- Game: The Farmer Was Replaced, by Timon Herzog (published by Metaroot). 1.0 released 10 October 2025, bringing multiple drones, a reworked exponential tech tree, achievement hats and a rebuilt unlock screen.
- Current Steam build at the time of writing: 25234622, dated 10 September 2026 (read from Steam's app info for app 2060160 and dated on the update trackers). Post-1.0 patches along the way: quality-of-life and leaderboard rebalance (4 Dec 2025), macOS release (18 Dec 2025), custom themes and editor improvements (17 Feb 2026), external-editor and macOS keybind fixes (April 2026).
- The unlock cost table is the wiki's Unlocks Data page — a dump of the game's own unlock-cost function — last edited 22 October 2025, i.e. the 1.0 build. The mechanics pages (watering, fertilizer, polyculture, cactus, pumpkins, sunflowers, trees, mazes, dinosaurs, megafarm, leaderboard, simulation, timing, senses, costs, tooltips) were re-synced with the in-game docs in August 2026, so they describe the current game.
How the numbers in this guide were handled
The full cost ladders below were generated by script from the wiki's own data page, not retyped, so a figure can only be wrong if the wiki's dump is wrong. Every number in the "reading the leaderboard targets" section is arithmetic on two published figures and it reproduces exactly (I checked each one). Where the wiki's pages contradict each other, both numbers are printed and the contradiction is named — see Numbers I could not verify near the end. Nothing here is filled in from memory or from a video.
The tick model: 400 ticks a second, 200 ticks per action
Your program's statements are charged in ticks, and the game runs at 400 ticks per second before upgrades. This is the model you are optimising against, so it is worth learning early.
| What you do | Cost |
|---|---|
A farm action that succeeds — move(), harvest(), plant(), till(), use_item(), swap(), change_hat(), spawn_drone(), unlock(), set_world_size() | 200 ticks |
| The same action when it fails (empty tile, wall, no items, blocked move) | 1 tick |
A getter — get_pos_x(), can_harvest(), measure(), num_items(), get_cost(), can_move(), get_time() | 1 tick |
+ - * / // % **, and, or, comparing two numbers or two enums | 1 tick |
Variable read/write, a function call by name, return, break, continue, import, else | free |
def, pass, entering a for or while, an if test | 1 tick |
print(...) | 1 second, flat |
do_a_flip() | 1 second, flat |
quick_print(...), get_tick_count() | free |
Two things follow straight from that table. A failed action costs 1 tick and a successful one costs 200, so probing is nearly free and acting blindly is not — that is the entire reason the maze puzzle is solvable in ten lines. And print() in a working loop is a catastrophe: one print per tile is 1024 seconds on a full farm. Use quick_print(), which is free and lands in output.txt.
The tick rate is raised by Unlocks.Speed (5 levels: 20 Hay → 20 Wood → 50 Carrot + 50 Wood → 500 Carrot → 1000 Carrot), which speeds up both the drone and code execution, and by Power from sunflowers, which doubles drone speed while you have it and burns 1 power per 30 actions.
The shape of the curve: every ladder multiplies by 4 to 6 per level
This is the single most useful thing to internalise about the progression. The upgrade ladders are geometric, and the multipliers are consistent:
| Unlock node | Levels | Cost ladder (single item per level) | Ratio per level |
|---|---|---|---|
Unlocks.Carrots (Wood) | 10 | 50 → 250 → 1250 → 6250 → 31200 → 156000 → 781000 → 3910000 → 19500000 → 97700000 | x5, x5, x5, x4.99, x5, x5.01, x5.01, x4.99, x5.01 |
Unlocks.Grass (Hay) | 10 | 100 → 300 → 500 → 2500 → 12500 → 62500 → 312000 → 1560000 → 7810000 → 39100000 | x3, x1.67, x5, x5, x5, x4.99, x5, x5.01, x5.01 |
Unlocks.Polyculture (Bone) | 5 | 3000 → 10000 → 50000 → 250000 → 1250000 | x3.33, x5, x5, x5 |
Unlocks.Trees (Hay) | 9 | 300 → 1200 → 4800 → 19200 → 76800 → 307000 → 1230000 → 4920000 → 19700000 | x4, x4, x4, x4, x4, x4.01, x4, x4 |
Unlocks.Pumpkins (Carrot) | 9 | 1000 → 4000 → 16000 → 64000 → 256000 → 1020000 → 4100000 → 16400000 → 65500000 | x4, x4, x4, x4, x3.98, x4.02, x4, x3.99 |
Unlocks.Watering (Wood) | 9 | 50 → 200 → 800 → 3200 → 12800 → 51200 → 205000 → 819000 → 3280000 | x4 |
Unlocks.Megafarm (Gold) | 5 | 2000 → 8000 → 32000 → 128000 → 512000 | x4 |
Unlocks.Cactus (Pumpkin) | 6 | 5000 → 20000 → 120000 → 720000 → 4320000 → 25900000 | x4, x6, x6, x6, x6 |
Unlocks.Dinosaurs (Cactus) | 6 | 2000 → 12000 → 72000 → 432000 → 2590000 → 15600000 | x6, x6, x6, x6, x6.02 |
Unlocks.Mazes (Cactus) | 6 | 1000 → 12000 → 72000 → 432000 → 2590000 → 15600000 | x12, x6, x6, x6, x6.02 |
Unlocks.Fertilizer (Wood) | 4 | 500 → 1500 → 9000 → 54000 | x3, x6, x6 |
The unlock descriptions are explicit that for carrots, cactus, pumpkins and dinosaurs an upgrade raises both the yield and the cost, so upgrading a crop makes each planting more expensive as well as more productive. For watering and fertilizer the upgrades raise the amount you receive per 10 seconds, not the price.
The farm: 1×1 to 32×32
reset()puts you back on a 1×1 plot with no resources and most unlocks locked. A fresh save starts the same way, with onlyharvest()anddo_a_flip()available.Unlocks.Expand(9 levels, starting at 30 Hay, then 20 Wood, then 30 Wood + 20 Carrot, then 100 Wood + 50 Carrot, then Pumpkin 1,000 → 8,000 → 64,000 → 512,000 → 4,100,000) grows the farm and unlocksmove(). The in-game text for the next node reads "Your farm has expanded again! Now the tiles are no longer in a nice row" — that is the row becoming a square.- Each Expand upgrade also clears the farm. If you upgrade mid-harvest, everything you have planted is gone.
- The maximum is 32×32 = 1024 tiles, and it is the size the endgame is scored on.
get_world_size()(unlocked with Expand 2, alongside theforloop) returns the side length, so write your traversals asfor i in range(get_world_size())once and never touch them again.Unlocks.Debug_2(500 Gold) addsset_world_size()(minimum 3; anything smaller restores the full farm) andset_execution_speed(). These are for watching your program work, not for producing more.
The unlock list by currency
There are 34 unlock nodes in the tree. The cheapest way to see the progression is by what each node's first level costs — the tree is cost-driven, not choice-driven, and this is the order the currencies arrive in.
Bought with hay — the first hour
| Unlock node | Levels | Cost of each level, cheapest/earliest first | What it gives you |
|---|---|---|---|
Unlocks.Loops | 1 | 5 Hay | A simple while loop. |
Unlocks.Expand | 9 | 30 Hay → 20 Wood → 20 Carrot + 30 Wood → 50 Carrot + 100 Wood → 1000 Pumpkin → 8000 Pumpkin → 64000 Pumpkin → 512000 Pumpkin → 4100000 Pumpkin | Expands the farm land and unlocks movement. Each upgrade expands the farm further and clears it. |
Unlocks.Plant | 1 | 50 Hay | Planting. |
Unlocks.Hats | 1 | 50 Hay | Hats for the drone. |
Unlocks.Debug | 1 | 50 Hay + 50 Wood | Tools to help with debugging programs. |
Unlocks.Senses | 1 | 100 Hay | The drone can see what is under it and where it is. |
Unlocks.Grass | 10 | 100 Hay → 300 Hay → 500 Wood → 2500 Wood → 12500 Wood → 62500 Wood → 312000 Wood → 1560000 Wood → 7810000 Wood → 39100000 Wood | Increases the yield of grass. |
Unlocks.Operators | 1 | 150 Hay + 10 Wood | Arithmetic, comparison and logic operators. |
Unlocks.Speed | 5 | 20 Hay → 20 Wood → 50 Carrot + 50 Wood → 500 Carrot → 1000 Carrot | Increases the speed of both the drone and code execution. |
Bought with wood
| Unlock node | Levels | Cost of each level, cheapest/earliest first | What it gives you |
|---|---|---|---|
Unlocks.Carrots | 10 | 50 Wood → 250 Wood → 1250 Wood → 6250 Wood → 31200 Wood → 156000 Wood → 781000 Wood → 3910000 Wood → 19500000 Wood → 97700000 Wood | Till the soil and plant carrots; upgrades raise yield and cost. |
Unlocks.Trees | 10 | 70 Carrot + 50 Wood → 300 Hay → 1200 Hay → 4800 Hay → 19200 Hay → 76800 Hay → 307000 Hay → 1230000 Hay → 4920000 Hay → 19700000 Hay | Trees. Upgrades raise the yield of bushes and trees. |
Unlocks.Watering | 9 | 50 Wood → 200 Wood → 800 Wood → 3200 Wood → 12800 Wood → 51200 Wood → 205000 Wood → 819000 Wood → 3280000 Wood | Water the plants to make them grow faster; upgrades give more water. |
Unlocks.Fertilizer | 4 | 500 Wood → 1500 Wood → 9000 Wood → 54000 Wood | Grow plants instantly; upgrades give more fertilizer. |
Bought with carrots
| Unlock node | Levels | Cost of each level, cheapest/earliest first | What it gives you |
|---|---|---|---|
Unlocks.Variables | 1 | 35 Carrot | Assign values to variables. |
Unlocks.Functions | 1 | 40 Carrot | Define your own functions. |
Unlocks.Import | 1 | 80 Carrot | Import things from other files. |
Unlocks.Sunflowers | 1 | 500 Carrot | Sunflowers and Power. |
Unlocks.Lists | 1 | 500 Carrot | Lists to store lots of values. |
Unlocks.Pumpkins | 10 | 200 Carrot + 500 Wood → 1000 Carrot → 4000 Carrot → 16000 Carrot → 64000 Carrot → 256000 Carrot → 1020000 Carrot → 4100000 Carrot → 16400000 Carrot → 65500000 Carrot | Pumpkins! Upgrades raise yield and cost. |
Bought with pumpkins
| Unlock node | Levels | Cost of each level, cheapest/earliest first | What it gives you |
|---|---|---|---|
Unlocks.Timing | 1 | 1000 Pumpkin | It's about time! (get_time, get_tick_count) |
Unlocks.Utilities | 1 | 1000 Pumpkin | Unlocks min(), max(), abs() and random(). |
Unlocks.Costs | 1 | 2500 Pumpkin | Access to the cost of things: get_cost(). |
Unlocks.Dictionaries | 1 | 2500 Pumpkin | Dictionaries and sets. |
Unlocks.Polyculture | 5 | 3000 Pumpkin → 10000 Bone → 50000 Bone → 250000 Bone → 1250000 Bone | Companion planting to increase the yield. |
Unlocks.Cactus | 6 | 5000 Pumpkin → 20000 Pumpkin → 120000 Pumpkin → 720000 Pumpkin → 4320000 Pumpkin → 25900000 Pumpkin | Unlock Cactus! Upgrades raise both the yield and the cost of cactus. |
Unlocks.Auto_Unlock | 1 | 5000 Pumpkin | Automatically unlock things. |
Bought with cactus, weird substance, gold and bone
| Unlock node | Levels | Cost of each level, cheapest/earliest first | What it gives you |
|---|---|---|---|
Unlocks.Mazes | 6 | 1000 Weird Substance → 12000 Cactus → 72000 Cactus → 432000 Cactus → 2590000 Cactus → 15600000 Cactus | A maze with a treasure in the middle; upgrades raise the gold and the substance needed. |
Unlocks.Dinosaurs | 6 | 2000 Cactus → 12000 Cactus → 72000 Cactus → 432000 Cactus → 2590000 Cactus → 15600000 Cactus | Majestic ancient creatures (the Dinosaur Hat); upgrades raise yield and cost. |
Unlocks.Debug_2 | 1 | 500 Gold | Slow the execution down and make the farm smaller (set_execution_speed, set_world_size). |
Unlocks.Megafarm | 5 | 2000 Gold → 8000 Gold → 32000 Gold → 128000 Gold → 512000 Gold | More drones! Upgrades raise the drone limit. |
Unlocks.Simulation | 1 | 5000 Gold | Test faster and under reproducible conditions. |
Unlocks.Leaderboard | 1 | 2000000 Bone + 1000000 Gold | Enter the leaderboard for the fastest times. |
Unlocks.The_Farmers_Remains | 1 | 100000000 Bone | Hidden unlock, description obscured in-game as ????? |
Unlocks.Top_Hat | 1 | 1000000000 Cactus + 1000000000 Carrot + 100000000 Gold + 1000000000 Hay + 10000000000 Wood | Secret unlock outside the tree: 'A very fancy hat that only the best drones get to wear.' |
A defensible order for the first few hours
The costs force most of this order, but the sequencing is my recommendation and I have said why for each step.
Unlocks.Loops— 5 Hay. The only thing you can do at the start is mashharvest(); awhile True:loop with acan_harvest()test turns the first hour into standing still.Unlocks.Expand— 30 Hay. It is cheaper thanPlant, it grows the plot, and it unlocksmove(). More tiles is more grass per loop.Unlocks.Plant— 50 Hay. Now you can lay downEntities.Bushfor wood, which every wood-tier node wants.Unlocks.Senses— 100 Hay. This is the step that makes your code a program:num_items(),get_entity_type(),get_ground_type()andnum_unlocked()all arrive together, i.e. the ability to decide instead of repeat.Unlocks.Operators— 150 Hay + 10 Wood. Comparisons are what turn anifinto a decision worth making.Unlocks.Speedlevel 1 and 2 — 20 Hay, then 20 Wood. The two cheapest multipliers in the game; they make everything after them faster, including all the farming you have not done yet. Level 3 costs 50 Carrot + 50 Wood, so wait for carrots.Unlocks.Grass— 100 Hay to open the node, then 300 Hay and 500 Wood. The grass ladder's own table shows these two upgrades doubling the yield of grass twice (100% → 200% → 400%). Hay is the currency you have most of, so buying the early grass line with hay is cheap.Unlocks.Trees— 50 Wood + 70 Carrot. Trees are 5 wood each against the bush's smaller drop, and the node also raises bush yield. Don't plant trees shoulder to shoulder (see the traps).Unlocks.Carrots— 50 Wood, then 250 Wood, 1,250 … This is the gate to the whole carrot tier: Variables (35 Carrot), Functions (40), Import (80), Sunflowers (500), Lists (500), and Pumpkins (500 Wood + 200 Carrot).Unlocks.Watering— 50 Wood. Water is the cheapest output multiplier you own once you are growing anything on soil: growth runs from 1× at water level 0 to 5× at water level 1.Unlocks.Fertilizer— 500 Wood, thenUnlocks.Mazesat 1,000 Weird Substance. Fertilized plants are infected, and infected plants pay half their yield as weird substance — which is the only way to make a maze, and therefore the only way to get gold.
Water and fertilizer: the two free meters
Both accrue on a timer and both are doubled by their own upgrade node.
| Water | Value |
|---|---|
| Accrual | 1 tank every 10 seconds; each Unlocks.Watering level doubles the amount per 10 s (9 levels: 50 → 200 → 800 → 3,200 → 12,800 → 51,200 → 205,000 → 819,000 → 3,280,000 Wood) |
| Tank size | 0.25 water |
| Ground water level | 0 to 1, read with get_water() |
| Growth effect | linear: 1× at level 0, 5× at level 1 |
| Drying | ground loses on average 1% of its current water per second with variance; the 1.0 patch made this a 10% chance of drying every 0.1 seconds |
| Quirk | because of float rounding, a tile that has been watered once never reads exactly 0.0 again |
| Fertilizer | Value |
|---|---|
| Accrual | 1 per 10 seconds, doubled per Unlocks.Fertilizer level (4 levels: 500 → 1,500 → 9,000 → 54,000 Wood) |
| Effect | use_item(Items.Fertilizer) cuts 2 seconds off the plant's remaining grow time |
| Side effect | the plant becomes infected |
| Infected harvest | half the yield is paid as Items.Weird_Substance instead of the normal item |
| Weird substance | use_item(Items.Weird_Substance) on a plant toggles infection on it and on all adjacent plants; on a bush it grows a hedge maze |
So the maze currency is paid for out of your harvest. Fertilizing a plant you were going to harvest anyway is not a loss if you needed substance; fertilizing your main crop is a 50% tax on it.
Growth times
The game does not publish these; the wiki's table is community-measured, and it is the most precise figure anyone has. Times are in seconds, before water and fertilizer.
| Plant | Minimum | Mean | Maximum |
|---|---|---|---|
| Grass | 0.5 | 0.5 | 0.5 |
| Bush | 3.2 | 4.0 | 4.8 |
| Carrot | 4.8 | 6.0 | 7.2 |
| Tree | 5.6 | 7.0 | 8.4 |
| Pumpkin | 0.2 | 2.0 | 3.8 |
| Cactus | 1.0 | 1.0 | 1.0 |
| Sunflower | 5.6 | 7.0 | 8.4 |
| Dinosaur | 0.18 | 0.2 | 0.22 |
Cactus being exactly 1.0 is not a rounding artefact — the 1.0 patch notes state that cactus grow time became exactly 1 second. Water multiplies the growth rate up to 5×, fertilizer subtracts two flat seconds.
Per-plant mechanics and yields
Only the figures that are published are listed. Where a yield is not given, it is not given here either.
- Grass grows by itself on grassland and grows back; harvest for hay. Soil has to be re-tilled from grass with
till(), andtill()again turns soil back into grassland. - Bush — planted on grass or soil, drops wood. The wiki never states how much; it only says trees are the better wood source, so treat the bush as the beginner's wood trickle.
- Tree — 5 wood each. Each tree on a tile directly north, east, west or south of another doubles its grow time, so a tree on every tile takes 2⁴ = 16× as long. Space them out or accept the wait.
- Carrot — needs soil, so a
till()before each planting. - Pumpkin — needs soil. Fully grown pumpkins that are next to each other merge into one giant pumpkin, and the payout is superlinear: 1×1 pays 1, 2×2 pays 8, 3×3 pays 27, 4×4 pays 64, 5×5 pays 125 — i.e. n³ — and from 6×6 up it is 6n². At the 32×32 maximum a fully merged field pays 32² × 6 = 6,144 pumpkins in one harvest. The catch: one pumpkin in five dies when it ripens and leaves a dead pumpkin that blocks the merge;
can_harvest()is alwaysFalseon a dead pumpkin, and you clear it just by planting something new on that tile. - Cactus — 1 second to grow, and each one has a size 0–9 read with
measure(). Harvest a cactus while every neighbour is grown and in sorted order and the harvest spreads to the neighbours recursively, paying n² cactus for n harvested at once. A grown cactus is brown until it is sorted, green once it is. Sorted means every cactus to the north and east is grown and at least as large, and every cactus to the south and west is grown and no larger. - Sunflower — 7 to 15 petals;
measure()works even before it is fully grown. Harvesting the largest-petal sunflower while at least 10 sunflowers are on the farm pays 8× power. Harvest one that is not the largest and your next harvest loses the bonus too, so sort the field withmeasure()before touching anything. - Dinosaur — the hat; see below.
Polyculture: the yield multiplier
Grass, bushes, trees and carrots yield more when the right companion plant is nearby, and the preference is random per plant — which is why guessing is pointless and get_companion() exists.
- It returns
(companion_type, (x, y)), e.g.(Entities.Carrot, (3, 5))for a bush that wants carrots at that tile. - The companion is always one of Grass, Bush, Tree or Carrot, never the same type as the plant itself, and the position is always within 3 moves of the plant, never its own tile.
- The companion's growth stage does not matter — an unharvested grass tile counts. Grass is therefore the cheap companion to plant.
- If nothing plantable is under the drone,
get_companion()returnsNone. - The wiki states the multiplier plainly: "Before polyculture is unlocked, the yield multiplier is 5. It doubles everytime you upgrade it." Read literally that means level 0 already pays 5×, and each of the 5 levels doubles it (3,000 Pumpkin → 10,000 → 50,000 → 250,000 → 1,250,000 Bone). The wording is odd, so the number is quoted here rather than interpreted.
Mazes: the gold line
Items.Weird_Substanceon a bush grows a hedge maze. Without maze upgrades, n substance makes an n×n maze; each maze level doubles the treasure and doubles the substance the same maze needs.- Harvest the treasure to be paid gold equal to the maze's area, multiplied by the maze upgrade; harvest anything else and the whole maze simply disappears.
- The drone cannot fly over hedges.
move()returnsFalseon a wall,can_move(dir)checks without moving, andmeasure()anywhere in the maze returns the treasure's position (1.0 change — you no longer have to stand on it to measure). - Reuse: using weird substance on the treasure again relocates it, and each relocation may knock out walls — so reused mazes can contain loops and become harder, not easier. The treasure can be relocated up to 300 times.
- The wiki's own verdict on reuse: "Reusing a maze doesn't give you more gold than just harvesting and spawning a new maze." It is a leaderboard-only challenge.
- Mazes contain no loops until you reuse one, which is why the wall-following solution works: with no loops the walls form one connected wall that leads past every tile.
Dinosaurs: the bone line
Unlocks.Dinosaursstarts at 2,000 Cactus and has 6 levels.- Equip with
change_hat(Hats.Dinosaur_Hat). If you have enough cactus, an apple is bought and placed under the drone; move onto the apple to eat it and the tail grows by one. Apples cannot spawn on an occupied tile. - The tail is dragged behind the drone, filling tiles you have left.
move()fails if you try to move onto your own tail — except the last segment, which moves out of the way. While wearing the hat you also cannot wrap around the edge of the farm. - Bones are paid when you unequip the hat (equip a different hat): tail length squared. Length 4 → 16 bones, length 100 → 10,000 bones.
- The hat is heavy:
move()costs 400 ticks instead of 200, reduced by 3% (rounded down) per apple eaten. - Only one drone can wear it, and the wiki suggests shrinking the farm with
set_world_size()if you do not need a full-field tail.
The megafarm: more than one drone
Five levels, 2,000 Gold → 8,000 → 32,000 → 128,000 → 512,000, and it is the biggest single change to how you write code in 1.0.
spawn_drone(function, *args)starts a new drone on the spawning drone's tile running that function; it returns a handle, orNoneif every drone slot is already taken.num_drones()andmax_drones()tell you where you stand.- Spawning costs 200 ticks, and so does a drone that does nothing useful. Never spawn a drone per tile.
- There is no shared memory. Each drone has its own globals — a spawned drone incrementing a global increments its own copy — and the arguments are copied, so a spawned function appending to a list does not change the caller's list.
wait_for(handle)blocks until the drone finishes and returns the function's return value;has_finished(handle)checks without blocking.- Race conditions are real and the wiki names them. Two drones on the same tile act in the same tick and the result depends on order: fertilise and harvest the same tree simultaneously and you may get the wood or you may not. The classic bug is several drones each evaluating
if get_water() < 0.5:before any of them waters, and all of them pouring water on the same tile. - The pattern worth stealing, from the wiki:
if not spawn_drone(task): task()— use a spare drone if there is one, otherwise do it yourself.
Endgame: simulation and the leaderboards
Two nodes take you past ordinary play. Unlocks.Simulation (5,000 Gold) runs simulate(filename, unlocks, items, globals, seed, speedup): the real farm is restored afterwards, you can start with any unlocks at any level (negative values mean maximum), and a fixed seed fixes plant growth times, maze layouts and water decay — which is what makes comparisons between two versions of your code meaningful. The speedup factor never changes the result.
Unlocks.Leaderboard (2,000,000 Bone + 1,000,000 Gold) unlocks leaderboard_run(leaderboard, filename, speedup) — a simulation with fixed starting conditions per category. Two rules bite: a run only counts if your program terminates, and every run is repeated until it totals 2 hours of game time, then averaged and uploaded. Speed the simulation up rather than waiting.
| Category | Target |
|---|---|
Fastest_Reset | Unlock Unlocks.Leaderboard again from a single plot, fastest |
Maze | 9,863,168 Gold |
Dinosaur | 33,488,928 Bone |
Cactus | 33,554,432 Cactus |
Sunflowers | 100,000 Power |
Pumpkins | 200,000,000 Pumpkin |
Wood | 10,000,000,000 Wood |
Carrots | 2,000,000,000 Carrot |
Hay | 2,000,000,000 Hay |
Maze_Single | 616,448 Gold (one drone, 8×8 farm) |
Cactus_Single | 131,072 Cactus |
Sunflowers_Single | 10,000 Power |
Pumpkins_Single | 10,000,000 Pumpkin |
Wood_Single | 500,000,000 Wood |
Carrots_Single | 100,000,000 Carrot |
Hay_Single | 100,000,000 Hay |
Reading the leaderboard targets the way the game does
The odd-looking endgame numbers are not arbitrary. Divide them and the intended runs fall out:
Maze: 9,863,168 = 301 × 32,768. 301 is the first treasure plus the 300 relocations the treasure allows. 32,768 is1024 × 32, i.e. the area of a 32×32 maze with the maximum maze upgrade (five doublings). So the target is one fully upgraded 32×32 maze, relocating the treasure 300 times.Maze_Single: 616,448 = 301 × (64 × 32). Same run, 8×8 farm: 64 tiles × 32 per treasure × 301 treasures.Cactus: 33,554,432 = 32 × 1024². Thirty-two harvests of a fully sorted 32×32 field, each paying n² for n = 1024.Cactus_Single: 131,072 = 32 × 64². Same thirty-two perfect harvests on an 8×8 field.Dinosaur: 33,488,928 = 32 × 1023². Thirty-two full-length tails. 1023 is the farm's 1024 tiles minus the tile the drone itself occupies, which is the only way the count comes out exact.
Those five lines all land on exactly the same picture of a 32×32 farm — which is how the maximum farm size is established here, since no page states it outright. The remaining resource targets (100,000 power, 200,000,000 pumpkins, 10,000,000,000 wood, 2,000,000,000 carrots and hay) do not factor as cleanly, so I have just listed them rather than explaining them.
Traps that will cost you a day
print()costs a full second of game time anddo_a_flip()costs a full second. Neither is affected by speed upgrades. In a loop over a 1024-tile farm, oneprint()per tile is 17 minutes. Usequick_print().- Upgrading
Unlocks.Expandclears the farm. Every expansion wipes what you had planted. harvest()on anything unripe destroys it. The wiki's wording: if you harvest an entity that can't be harvested, it is destroyed. Always guard withcan_harvest().- A failed action costs 1 tick and a successful one 200 — so
move()into a wall to test it is nearly free, and that is the cheap wall-tester the maze puzzle is built around.can_move(dir)gives the same answer without moving at all. - Pumpkins die 20% of the time at ripeness and the dead pumpkin blocks the mega-pumpkin merge for that whole square. On a 6×6+ plot you will almost always have to replant something.
- Trees next to trees grow slower — doubling per orthogonal neighbour, 16× in a solid grid. Adjacency matters for trees and only for trees.
- Watering more than you need wastes a tank per use (a tank is 0.25 water, and you get one every 10 seconds). Watering a tile from 0 to 1 costs 4 tanks.
- Fertilizing infects the plant, and an infected plant pays half its harvest as weird substance. That is a 50% cut to your carrot or pumpkin output — good if you were chasing maze substance, bad otherwise. Weird substance used on a healthy plant infects it and its neighbours.
- Harvest a maze anywhere but the treasure and the maze is gone. No second attempt on that layout.
- Reusing a maze is not more gold, and each relocation can open loops in the maze that make it harder to solve.
- Harvesting the wrong sunflower costs you two harvests — the 8× bonus is lost for the non-max harvest and for the next one. Only harvest after checking
measure()across the field, and only while 10+ sunflowers exist. - A cactus harvest only spreads when every neighbour is grown and sorted. One wrongly-ordered neighbour means you get n² for n = 1.
- Bones are only paid when you take the dinosaur hat off. And with the hat on,
move()costs double (400 ticks) and you cannot wrap around the farm edge. - Only one drone can wear the dinosaur hat.
- Multiple drones share no globals.
global xinside a spawned drone's function edits that drone's copy. Arguments are copied too. - Race conditions between drones are a real failure mode, not a theoretical one:
if get_water() < 0.5: use_item(Items.Water)run by several drones on the same tile wastes water four times over. - A leaderboard run that does not terminate does not count. The simulation does not stop when you hit the target; it stops when your program ends.
num_unlocked()returns 1 + the number of upgrades, not a level index.num_unlocked(Unlocks.Mazes)on a maxed maze is 6, not 5 — andnum_unlocked(Items.Carrot)only ever returns 0 or 1.- The language is not Python. No classes, no lambdas, no list comprehensions, no named arguments, no
int()(usex // 1), noargs/kwargs, and lists/dicts/sets have only a couple of methods each. All numbers are floats, default parameter values bind on call* not on definition, andprint()writes smoke above the drone rather than tooutput.txt. - Imports are explicit in 1.0. Functions defined in another code window are no longer imported implicitly; you need
Unlocks.Import(80 Carrot) and a realimportstatement.
Numbers I could not verify
Planting costs. The wiki carries a code-derived table of what each planting costs, and it conflicts with the game's own in-game documentation. It is printed here as the wiki gives it, with the contradiction attached:
| Plant | Planting cost (wiki's code-derived table) |
|---|---|
| Apple | 64 Cactus |
| Bush | nothing |
| Cactus | 64 Pumpkin |
| Carrot | 512 Hay + 512 Wood |
| Grass | nothing |
| Hedge (maze) | 32 Weird Substance |
| Pumpkin | 512 Carrot |
| Sunflower | 1 Carrot |
| Treasure | 32 Weird Substance |
| Tree | nothing |
The contradiction: the game's own in-game docs for get_cost() use get_cost(Entities.Pumpkin) returning {Items.Carrot:1} as the worked example, while the table above says 512 Carrot. Both cannot be current. The likely explanation is that planting costs scale with the plant's upgrade level (the unlock descriptions for carrots, pumpkins, cactus and dinosaurs all say an upgrade "increases the yield and cost"), and the table was extracted at one particular level that the wiki does not state. The maze figures fit better than the crop figures do: a full-field maze at the maximum farm size needs world_size × 2^(level-1) substance, which is 32 at a 32×32 farm with one maze level — exactly the 32 in the table. In game, always ask get_cost(); do not trust either number.
Farm size per Expand level. No source lists the sequence. Only the two ends are established: 1×1 at the start (reset() restores "a 1x1 square") and 32×32 as the maximum, derived from the leaderboard arithmetic above.
The maze substance formula disagrees between two wiki pages. The Mazes page gives substance = get_world_size() * 2**(num_unlocked(Unlocks.Mazes) - 1); the tooltips reference gives n_substance = get_world_size() * num_unlocked(Unlocks.Mazes). They agree at maze level 1 (32 on a 32×32 farm) and diverge after that. The doubling version is the one that makes the leaderboard's 32,768-per-treasure come out right.
Base yields that are simply absent. The wiki never states how much wood a bush drops, how many carrots a carrot harvest pays, or how much power a sunflower pays before the 8× bonus. Those numbers are missing from this guide rather than guessed.
The wiki's explanation of the dinosaur target is loose. It says 33,488,928 bones is "exactly the number of bones you will get if you fill a 32x32 area with the dinosaur tail"; a single 1023-tile tail at n² bones pays 1,046,529, so the target is 32 such tails (see above). The target is right; the one-line explanation is imprecise.
Growth times are community measurements. The wiki states that the game does not provide them, so treat the min/mean/max table as the best available measurement rather than as game data.
The cost table is from the 1.0 build (22 October 2025), not from the September 2026 build. Unlock costs in an exponential idle game are the least likely thing to be tweaked in a cosmetics and editor patch cycle, and the 2026 patches were themes, external-editor support and macOS work — but the table has not been re-verified against the current build.
Sources
- Official wiki (thefarmerwasreplaced.wiki.gg), pages: Unlocks Data, Unlocks, Entity Planting Costs, Costs, Operation Costs, Timing, Tooltips Code, Senses, Expand, Expand 2, Debug 2, Plant growth, Watering, Fertilizer, Polyculture, Cactus, Pumpkins, Sunflowers, Trees, Mazes, Dinosaurs, Megafarm, Simulation, Leaderboard, Reset, Grass, Entities, Items, Grounds, Differences from python
- Steam news for app 2060160 (1.0 release notes, 10 Oct 2025; the 2025–2026 patch posts)
- Steam app info for app 2060160 — current public build 25234622
- Version dating: gameupdatenotifier.com/g/the-farmer-was-replaced
Written for: The Farmer Was Replaced, current Steam build 25234622 (10 September 2026), post-1.0 release line. Unlock costs are from the 1.0 data dump (22 October 2025) as published on the official wiki.
Guide changelog
What has changed in this guide, newest first.
- 2026-10-01Published. The Farmer Was Replaced, current Steam build 25234622 (10 September 2026) - the post-1.0 release line; base game only, no The Miner Was Replaced DLC (announced, not released). Built from the official wiki at thefarmerwasreplaced.wiki.gg, read as raw wikitext through the MediaWiki API: the Unlocks Data page (a dump of the game's own unlock-cost function, 1.0 build, 22 October 2025) for all 34 nodes and their per-level cost ladders, plus Unlocks, Entity Planting Costs, Costs, Operation Costs, Timing, Tooltips Code, Senses, Expand, Expand 2, Debug 2, Plant growth, Watering, Fertilizer, Polyculture, Cactus, Pumpkins, Sunflowers, Trees, Mazes, Dinosaurs, Megafarm, Simulation, Leaderboard, Reset, Grass, Entities, Items and Grounds - most of them re-synced with the in-game docs in August 2026. Build number from Steam's app info for app 2060160; patch dating from the Steam news API and gameupdatenotifier.com. Planting costs, per-Expand farm sizes and base yields are missing from every source and are flagged on the page rather than guessed; the leaderboard targets are decomposed arithmetically on the page (301 x 32,768 maze gold, 32 x 1023^2 bone, 32 x 1024^2 cactus, 301 x 64 x 32 single-drone maze), which is what pins the maximum farm at 32x32.