AutoExec

From WolfWiki
Jump to: navigation, search

Default AutoExec

When started, ET attempts to load and the file autoexec.cfg. If you start with +set fs_game <mod directory> ET looks in the fs_game directory first. Some external server browsers may do this for you when you connect to a server that is running a mod.

This is often used to store important settings that would normally be in your etconfig.cfg file, as if the server forces a cvar to a value that does not match what you set the cvar's value to in your etconfig.cfg file then that value will then be changed in your config file.

However if you store the cvar setting in your autoexec.cfg file, then even if a server changes the cvar value, the next time you connect to a server the original setting you chose will be used again.

Client Auto Map Scripts

When a map loads or restarts, the client will look for the following scripts and run them if found:

  • autoexec_mapname.cfg
  • autoexec_default.cfg

For example if the map rotates to battery, the client would look for autoexec_battery.cfg and run it. If autoexec_battery.cfg is not found, it would try to run autoexec_default.cfg instead.

Client Auto Team/Class Scripts

When players spawn with a changed team or class, the client will look for the following scripts and run them if found:

  • autoexec_axis.cfg
  • autoexec_allies.cfg
  • autoexec_spectator.cfg
  • autoexec_soldier.cfg
  • autoexec_medic.cfg
  • autoexec_engineer.cfg
  • autoexec_fieldops.cfg
  • autoexec_covertops.cfg

These are only run when the team or class changes, they are not run on every spawn.