1. The Farmer Was Replaced
  2. News

The Farmer Was Replaced News

Simulation Update

It took a bit longer than expected but the Simulation Update is finally here.
It improves a lot but also breaks existing code and removes the old dinosaurs. If you prefer to keep the old version you can switch back to it in Steam via "The Farmer Was Replaced -> Properties -> Betas -> Jul 2024".

Breaking Changes:
You'll have to change these in your code.
-`Items.Bones` has been renamed to `Items.Bone` so all items are singular.
-`Entities.Carrots` has been renamed to `Entities.Carrot` so all entities are singular.
-`Grounds.Turf` has been renamed to `Grounds.Grassland` to make it easier to understand.
-`Items.Water_Tank` has been renamed to `Items.Water` because the tank refill feature has been removed.
-`Unlocks.Benchmark` has been replaced with `Unlocks.Timing`.
-`get_op_count()` has been renamed to `get_tick_count()`.
-`set_farm_size()` has been renamed to `set_world_size()` to be consistent with `get_world_size()`.
-`get_companion()` now returns a tuple of the form (entity, (x, y)) instead of a list.
-`trade()` has been removed from the game.

Simulation:
The way the game simulates the farm has been completely reworked. Some of the most noteable consequences of this are:
-Fixed all sorts of time inconsistency bugs.
-Added a `simulate()` function that allows testing code much faster.
-Starting a leaderboard run now starts a simulation for a specified file.
-The speed factor now only speeds up the simulation and not the rest of the game.

Leaderboards:
-There are now multiple leaderboard categories.
-`timed_reset()` has been replaced by `leaderboard_run()`.
-`leaderboard_run()` can now be given a starting speed factor which can be up to 256.
-`leaderboard_run()` now also resets the water level.
-Leaderboard runs no longer allow precomputing values before the timer starts.
-Leaderboard runs are now repeated and averaged until a total of 2h of virtual time has passed.

Operation Costs:
In the past it was possible to save ops in ways that made the code uglier. For the full new timing model see the new Timing unlock that replaces Benchmark.
-Function calls now free so it's no longer encouraged to inline everything.
-Reading and writing variables is now completely free (This is required for function calls to be free).
-Loops now only cost one tick once instead of every iteration.
-Indexing to write to a dict or list is no longer free.
-The time of accessing a dictionary or a set now depends on the size of the key.
-If the game isn't able to keep up with how fast the program is supposed to run it will no longer freeze. Instead the simulation time is slowed down to match it.

Unlock Tree:
-The unlock tree has been restructured. Dinosaurs, Cactus and Mazes can now be done in any order you like.

Dinosaurs:
Dinosaurs were by far the least fun challenge of the game. A change was needed.
-Dinosaurs have been completely reworked. Read the docs on them.

Cactus:
-Harvesting a cactus no longer harvests all cacti but instead the harvest propagates to adjacent cacti if they are all larger or equal to the harvested cactus.
-Harvesting `n` cacti with a single harvest call yields `n * floor(sqrt(n))` cacti.
-Harvesting cacti before they are grown no longer yields anything.

Mazes:
-Mazes are no longer spawned with fertilizer. You have to use weird substance instead.
-Mazes are no longer required to fill the whole grid. The size of the maze depends on how much weird substance you use.

Fertilizer and Water:
The problem with fertilizer and water was that they were a bit expensive early on and almost free late in the game, making them impossible to balance. These water and fertilizer changes try to fix that.
-Fertilizer and Water are no longer traded. Instead you now automatically receive a fixed amount of water and fertilizer over time based on the upgrade level of each one.
-Fertilizer no longer dries out the ground.
-Fertilizer now turns 50% of the yield of the fertilized plant into weird substance.
-Water now affects all ground types.

Seeds:
Trading for seeds doesn't really serve any purpose. The only interesting thing about seeds was that you could prebuy them before upgrades to get them cheaper, but this made the game really hard to balance.
-You no longer need to trade for seeds to before you plant. Instead the `plant()` command directly removes the cost of the plant.
-The `trade()` function is no longer used for anything.
-The multi trade unlock has been removed.

Sunflowers and Pumpkins:
It was a bit too easy to get an almost infinite supply of power and pumpkins in the late game. These changes remove some of that late game scaling.
-Sunflower yield is now 1 power per sunflower and you get a constant yield multiplier if there are at least 10 sunflowers and you harvested the largest one.
-Harvesting a smaller sunflower no longer destroys the entire field.
-Pumpkin yield now only scales cubically up to 5x5, quadratic after that.

Polyculture:
Rushing polycuture as fast as possible has become the dominant strategy for leaderboard runs. These changes try to make the optimal unlock order a bit more interesting and the early game a bit less deterministic.
-Polyculture is now unlocked after the maze.
-Polyculture now starts at a 5x multiplier and can be upgraded up to a 15x multiplier.
-Polyculture is now active before it's unlocked. There is no way of knowing the companions but you can get some lucky hits.

Other:
-The `get_cost()` function used on unlocks now has an optional second argument for the upgrade level. It now returns `None` for unlocks that are already unlocked.
-The `unlock()` function now allows unlocking an unlock even if the parent unlock isn't unlocked yet. This way leaderboard unlock orders no longer need to deal with unlock dependencies.
-Updated the `__builtins__.py` file.
-The `__builtins__.py` file no longer gets regenerated unless you delete it.
-If you set an upgrade higher than it's max level the game will now disable stats and show a red warning in the unlock menu.

Fixes:
-Loading files with CRLF line endings no longer breaks the editor.
-Error messages when checking equality of a function are now also disabled by the corresponding option.
-Fixed broken links.
-Fixed empty return statements not returning `None`.
-Fixed pumpkins sometimes not merging correctly.
-Fixed problems with stat calculations.
-Fixed copying dicts with `dict()`.

Fixes

-Esc now closes the unlock menu.
-Links are now underlined.

-Fixed windows not scaling when using an external editor.
-Fixed links showing a tag sometimes.
-Fixed function calls in default arguments.
-Fixed 0 step size ranges.

Fixed the fixes of the fixes

-Fixed breakpoints not matching the lines.
-Fixed "modified collection during iteration" error showing at the wrong place.
-Fixed the warning setting
-Fixed output window clearing (really this time)

Follow up fixes of the Documentation Update

-The text in the ouput window now wraps.
-Fixed editing dicts during iteration.
-Fixed broken link.
-Fixed clicking links outside the windows.
-The output window now resets again when execution starting.
-Fixed spoiler tags.
-Fixed misaligned breakpoints.
-Fixed the cost in seed tooltips.

Documentation Update

- Reworked the in game documentation:
- Docs windows can now be added like code windows.
- Docs windows can now be closed and minimized like code windows.
- All windows can now be resized.
- Docs pages can now have inline links.
- Many changes and additions to the documentation texts.
- The game now keeps a few backups of your save files in case of file corruption.
- Added safeguard error message for forgetting the () after a function call.
- Added safeguard error message for shadowing variables.
- Added setting to disable warnings.
- Dicts can now be copied with `dict()`.
- `set_farm_size` now resets the drone position.
- Identifiers can now start with an underscore.

Fixes:
- Graphics setting no longer messes up the frame setting.
- # inside strings now has correct syntax coloring.
- `get_time` now gets unlocked by `Benchmark` instead of `Senses`.
- `print` and `quick_print` now return `None`.
- Sets and dicts now throw an error if you try change their size during iteration.
- `swap` no longer makes a sound when it doesn't work.
- Using `+=` on an undefined variable now gives the right error message.
- Fixed the error messages of `max` and `min`.
- Harvesting pumpkins before they are grown now destroys them like other plants.
- Fixed problem when calling `pop()` without arguments.
- Polyculture on 3x3 can no longer make a tile it's own companion.
- `list + []` now takes `len(list)` operations.
- `Items.Piggy` no longer shows up when iterating all items.
- The unlock button is no longer unclickable on very wide windows.