Basic Configuration
autoexec.cfg and config.cfg
These files reside in the base installation folder. If anything
funny happens - like key bindings not working anymore - you should be prepared to move (or even delete) your
config.cfg. This file is autosaved during
quit and executed upon engine start. It is used to keep values from one run to the next for persistent game settings and for any "on-the-fly" scripting you might have done during your last sessions. The trouble is ... this may result in bogus data being saved - the only way to win is : not to play - so, just be ready for trashing config.cfg to return to a clean setup.
It will be written at every clean exit. If it doesn't exist it will initially contain whatever is in
./data/defaults.cfg - so never modify
that file! It helps to remind yourself that
config.cfg is actually
merely a
saved.cfg!
Since a few releases we now have personal home-directories used for the engine, which means you need to check that folder for the config.cfg too.
- On Linux it's to be found in ~/.sauerbraten
- On Windows somewhere inside C:\Documents and Settings and
- On Mac the Launcher-application has a menu entry that takes you to the correct folder, a rumour has it "username/Library/Application Support/sauerbraten" is the destination it takes you to.
If this information is too sketchy for you, just perform a search over your harddisk for files called config.cfg!
Keyboard
Binding Keys
You can bind your own CubeScript to keys simply by adding appropriate lines to your
autoexec.cfg.
bind P [echo "I pressed the key P"]
editbind P [echo "I'm in editing and pressed P"]
// fullscreen only works on linux
bindvar F2 fullscreen
Internationalization
If you want to use extra keys on your keyboard, that aren't bindable by default - like german Umlaut-keys for example - you'll have to edit
data/keymap.cfg. You need to know the ANSI code for the key and add it to the configuration. As an example - here the required lines for those german keys:
// added for de support
keymap 223 SZ
keymap 252 UE
keymap 246 OE
keymap 228 AE
Then you can bind them just like
CARET,
HOME or
KP_5 (e.g. any other key).
If you are on
linux or
Mac OS X the tool to find out about the codes is called
xev.
xev|egrep "code|button"