The Farmer Was Replaced VS Code Setup: External Editor and File Watcher

The in-game editor is enough to finish the game, but long scripts are easier in Visual Studio Code. The game supports this officially: the in-game docs have an External Editor page. Here is the full setup.

How it works

Step 1: find the save folder

In the game, open Load and click Open Folder. That opens the folder of the current save.

On Windows the saves are usually under:

C:\Users\<you>\AppData\LocalLow\TheFarmerWasReplaced\TheFarmerWasReplaced\Saves\<save name>

On macOS, use the same Open Folder button to find the location.

Step 2: open it in VS Code

  1. In VS Code choose File → Open Folder… and pick the save folder itself, so __builtins__.py sits in the workspace.
  2. Install the Python extension (Pylance) for autocomplete and go-to-definition.
  3. Open any of your code files and type har — harvest() should autocomplete.

If you split code into files, add from utils import * (or similar) at the top. The game skips the import line, but VS Code now knows where your helpers come from.

Step 3: turn on File Watcher

In the game’s Options, enable File Watcher. Now every save in VS Code shows up in the game without reloading. Press execute in game to run the new version.

Creating and deleting files

File Watcher only picks up edits to existing files. If you create or delete a file outside the game:

Warning: don’t press Save before Load after creating files externally — saving first can overwrite the folder and wipe files the game hasn’t imported yet.

Useful VS Code settings

FAQ

Can I use VS Code with The Farmer Was Replaced? Yes. Code is stored as .py files; open the save folder in VS Code and enable File Watcher.

Why doesn’t my new file show up in the game? File Watcher only reloads existing files. Create the file in game first, or reload the save via Load.

Is the game language real Python? No, it is Python-like. Most syntax matches, but not every Python feature or library is available.

Does it work with other editors? Yes, any editor that edits .py files works; VS Code just has the best Python autocomplete.