Chernobyl: SimulatorChernobyl:Simulator Sign in
GETTING STARTED

Autoexec

Last updated Jun 30, 2026, 11:02:49 AM by just.jiu

autoexec.cfg is an optional text file you create yourself. Every line in it is run through the console automatically, once, every time the game starts — so it's the place to keep your favourite settings, key bindings and shortcuts permanently.

Think of it as a list of things you'd otherwise type into the console by hand, that the game types for you at launch instead.

New to the console? Read Console Commands & Settings and Controls & Key Bindings first — autoexec.cfg just replays the same commands those pages describe.


Why use it?

The game already saves your settings and keybinds for you, in two files it manages itself:

  • keys.cfg — your key bindings (saved automatically whenever you rebind a key).
  • client.cfg — your saved settings/convars (written when you run config.writecfg).

The catch: the game owns those two files and may rewrite them. If you hand-edit keys.cfg and then change a bind in-game, your edits get overwritten.

autoexec.cfg is different. The game never writes to it — it only reads it, last of all, at startup. That makes it the safe, permanent home for anything you want to set in stone:

  • bindings you never want to lose,
  • settings you like to force every session,
  • aliases and shortcuts you've invented,
  • a tidy, commented setup you can back up or share with a friend.

Where the file goes

autoexec.cfg lives in the game's cfg folder, right next to keys.cfg and client.cfg. The folder is created the first time you play.

Platform Folder
Windows %USERPROFILE%\AppData\LocalLow\Rikarin\Chernobyl Simulator\cfg\
macOS ~/Library/Application Support/Rikarin/Chernobyl Simulator/cfg/
Linux ~/.config/unity3d/Rikarin/Chernobyl Simulator/cfg/

Tip: the easiest way to find the folder is to run config.writecfg in the console once. That creates/updates client.cfg in exactly the folder you're looking for — then just open that folder and create autoexec.cfg beside it.

The file does not exist by default — you create it. A missing autoexec.cfg is simply ignored, so there's nothing to break.

Create it with any plain-text editor (Notepad, TextEdit in plain-text mode, VS Code, etc.). Make sure the name is exactly autoexec.cfg and not autoexec.cfg.txt.


When it runs (and why it wins)

At launch the game loads config in this order, each step able to override the one before it:

  1. Built-in defaults — the shipped key layout and setting values.
  2. keys.cfg — your saved key bindings.
  3. client.cfg — your saved settings.
  4. autoexec.cfgyour file. ← runs last, so it gets the final say.
  5. Launch options — any +setting value you pass on the command line beat everything, including autoexec.cfg.

Because autoexec.cfg runs after keys.cfg and client.cfg, anything you put in it overrides your normal saved config. That's the whole point: it's the last word on how your game starts.


What you can put in it

Anything you could type into the console, one command per line. The most common uses:

Force a setting

Copy
camera.fov 90
audio.master 0.6

Lock in a key binding

Copy
bind backspace "+reactor.az5_trigger"   // one-key emergency SCRAM
bind g general.open_manual
bind mouse2 +zoom

Create a shortcut (alias)

Copy
alias scram "+reactor.az5_trigger"
alias panic "audio.master 0; camera.fov 70"

Now typing scram or panic in the console runs the whole thing.

Run another config file

Copy
config.exec my_reactor_setup

config.exec runs any other .cfg file in the same folder, so you can split a big setup into pieces and have autoexec.cfg pull them in.


Writing the file — the rules

A .cfg file is just a transcript of console lines, so the same rules as typing in the console apply.

  • One command per line.

  • Comments start with //. Everything after // on a line is ignored:

    Copy
    bind v "+reactor.az3_trigger"   // partial emergency insertion
    // this whole line is a note
  • Quote any command that contains a semicolon. A ; normally separates two commands, so to bind several actions to one key, wrap them in double quotes:

    Copy
    bind arrowup "+reactor.rods_withdraw;+crane.forward"

    A command with spaces but no ; needs no quotes (camera.preset 1).

  • Decimal points use a dot, never a comma — always 0.6, never 0,6, no matter your system's regional settings. (0,6 would be read as the number 0.)

  • Hold / toggle prefixes carry over from binds: +name while held, ~name to toggle on each press. See Controls & Key Bindings for the full explanation of +, - and ~.

If one line has a typo, the game reports that single line as an error and keeps running the rest of the file — a mistake on line 3 won't stop line 4.


A complete example

A realistic autoexec.cfg you could drop in as a starting point:

Copy
// ===== autoexec.cfg =====
// Loads automatically at startup, after my saved config. Edit freely.

// ---- look & feel ----
camera.fov 90
audio.master 0.7

// ---- operator shortcuts ----
bind backspace "+reactor.az5_trigger"   // emergency SCRAM on one key
bind v         "+reactor.az3_trigger"   // partial emergency insertion
bind g         general.open_manual
bind mouse2    +zoom

// ---- aliases ----
alias scram "+reactor.az5_trigger"
alias quiet "audio.master 0"

// ---- pull in a separate file of advanced tweaks ----
// config.exec advanced

Save it, restart the game, and every line above is applied for you.


Testing without restarting

You don't have to relaunch to try your file. Open the console (F1) and run:

Copy
config.exec autoexec

That executes autoexec.cfg immediately, exactly as startup does, so you can tweak and re-run until it behaves the way you want.


Frequently asked

Will the game ever overwrite my autoexec.cfg? No. The game only reads it. It writes keys.cfg and client.cfg, never autoexec.cfg.

Do I need both autoexec.cfg and client.cfg? No. client.cfg is optional and game-managed; autoexec.cfg is optional and yours. Many players use only one. If a setting appears in both, the autoexec.cfg value wins because it loads last.

A bind or setting in my file seems to do nothing. Check the name with find <word> and help <name> in the console — a typo'd convar name simply does nothing. Also note a few values reset every session by design (held-button and debug toggles); those aren't meant to be forced.

Can I share my setup with someone? Yes — autoexec.cfg is a plain text file with no machine-specific data. Copy it into their cfg folder and it works.


See also