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.cfgjust 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 runconfig.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.writecfgin the console once. That creates/updatesclient.cfgin exactly the folder you're looking for — then just open that folder and createautoexec.cfgbeside 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:
- Built-in defaults — the shipped key layout and setting values.
keys.cfg— your saved key bindings.client.cfg— your saved settings.autoexec.cfg— your file. ← runs last, so it gets the final say.- Launch options — any
+setting valueyou pass on the command line beat everything, includingautoexec.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
camera.fov 90
audio.master 0.6Lock in a key binding
bind backspace "+reactor.az5_trigger" // one-key emergency SCRAM
bind g general.open_manual
bind mouse2 +zoomCreate a shortcut (alias)
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
config.exec my_reactor_setupconfig.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:Copybind v "+reactor.az3_trigger" // partial emergency insertion // this whole line is a noteQuote any command that contains a semicolon. A
;normally separates two commands, so to bind several actions to one key, wrap them in double quotes:Copybind 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, never0,6, no matter your system's regional settings. (0,6would be read as the number 0.)Hold / toggle prefixes carry over from binds:
+namewhile held,~nameto 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:
// ===== 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 advancedSave 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:
config.exec autoexecThat 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
- Console Commands & Settings — every setting and command.
- Controls & Key Bindings — the
bindcommand,+/~prefixes, chords, and the default layout.
