Autoexec

From P2SR Wiki

Revision as of 15:49, 30 October 2024 by Jaio (talk | contribs) (Basic-ify Autoexec page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Autoexec.cfg


Overview

The autoexec is a configuration file that stores settings. .cfg Files can be executed by Portal 2, and the autoexec is a configuration file that is automatically executed upon launch of your game (hence the name). It is most commonly used to alter settings that are reverted after every game close.

For more information on .cfg files, and configuration files check out the page on .cfg Files and Aliases

Where is my autoexec?

The autoexec is located at Portal 2's installation folder (usually C:\Program Files (x86)\Steam\steamapps\common\Portal 2\portal2\cfg), and is called autoexec.cfg.There is a chance you don't have this file by default, creating it should be fine, just ensure that you have the right file type. How to show/change file names on Windows 10.

What should be in my autoexec?

You can put anything you want in your autoexec, a good autoexec should save you time and keep you from having to type any commands into Portal 2 when you launch the game.

  • Many SAR commands are not kept between sessions, as well as SAR loading itself.
  • Aliases are not kept between sessions.
  • cvars like cl_showpos and r_portal_use_pvs_optimization are reverted to 0 after restarting.

Just give me a pre-filled autoexec, please!

Check out srconfigs! srconfigs is a set of config files made for Portal 2 speedrunning, you can check out more information about it on the srconfigs README.