Sauerbraten config tweak

These days I modified my config for the open source FPS / egoshooter Sauerbraten. It's purpose is to bind the weapons to specific keys around the movement keys I prefer (which are S,D,F and E). Furthermore I introduced an auto-jump feature which in the script is called "dance_mode". Certain weapons implicitely make me jump after firing, especially the rocket launcher, which is one of my favourite weapons in Sauerbraten.

Some other things the script does:

  • 3 level zoom on SPACE key
  • reset weapon before switching it ("setweapon 0")
  • change FOV (field of view) from 120 to 130 vice versa on demand
  • adjust mouse sensitivity on demand

To apply these settings to your Sauerbraten installation, just open the autoexec.cfg file (located in the Sauerbraten folder) and paste all lines of the script into it.

Please note this script is optimized for SDFE movement, which has to be set manually before or after applying the script.

bind "SPACE" [ zoom1 ]
bind MOUSE3 [ switch_dance_mode ]
bind MOUSE2 [ jump;zoom0; ]
bind MOUSE1 [ if (= $dance_mode 1) [dance] [attack] ]
bind "R" [ setweapon 0; setweapon 3; dance_on;  default_fov = 130;fov 130 ]
bind "W" [ setweapon 0; setweapon 2; dance_off; default_fov = 120;fov 120 ]
bind "Q" [ setweapon 0; setweapon 4; dance_on;  default_fov = 120;fov 120 ]
bind "G" [ setweapon 0; setweapon 1; dance_off; default_fov = 120;fov 120 ]
bind "T" [ setweapon 0; setweapon 5; dance_off; default_fov = 130;fov 130 ]

crosshairsize 12
fov 130
maxroll 0
crosshairfx 1
sensitivity 7

dance_mode = 1

zoom0 = [ fov $default_fov; hudgun 0; sensitivity 7; bind "SPACE" [ zoom1 ] ]
zoom1 = [ fov 30; hudgun 0; sensitivity 2; bind "SPACE" [ zoom2 ] ]
zoom2 = [ fov 80; hudgun 0;  sensitivity 4; bind "SPACE" [ zoom0 ] ]

dance = [attack; jump;]

switch_dance_mode = [ if ( = $dance_mode 0 ) [dance_on] [dance_off ] ]
dance_on = [dance_mode = 1]
dance_off = [dance_mode = 0]

The script is open source ;) and free to use in other scripts or so. But please be fair and recommend this website if you like to reuse the script. Thanks!