Difference between revisions of "Autoexec"

From P2SR Wiki

(Created page with "Category:file {{P2_Title|Autoexec.cfg}} =Overview= The [https://developer.valvesoftware.com/wiki/Autoexec autoexec] is a configuration file that stores settings. .cfg...")
 
(Basic-ify Autoexec page.)
 
(3 intermediate revisions by one other user not shown)
Line 4: Line 4:
 
=Overview=
 
=Overview=
  
The [https://developer.valvesoftware.com/wiki/Autoexec 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 executed upon launch of your game. It is most commonly used to alter settings that are reverted after every game close.
+
The [https://developer.valvesoftware.com/wiki/Autoexec 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 [[Alias]]es
 
For more information on .cfg files, and configuration files check out the page on [[.cfg Files]] and [[Alias]]es
Line 10: Line 10:
 
=Where is my autoexec?=
 
=Where is my autoexec?=
  
The autoexec is located at Portal 2's installation folder (usually <code>C:\Program Files (x86)\Steam\steamapps\common\Portal 2\portal2\cfg</code>), and is called <code>autoexec.cfg</code>. 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. [https://www.softwarert.com/show-change-file-extensions-windows-10/ How to show/change file names on Windows 10].
+
The autoexec is located at Portal 2's installation folder (usually <code>C:\Program Files (x86)\Steam\steamapps\common\Portal 2\portal2\cfg</code>), and is called <code>autoexec.cfg</code>.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. [https://www.softwarert.com/show-change-file-extensions-windows-10/ How to show/change file names on Windows 10].
  
==What should be in my autoexec?==
+
=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.
 
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.
  
*[[SAR]] commands are not kept between sessions, as well as [[SAR]] loading itself.
+
*Many [[SAR]] commands are not kept between sessions, as well as [[SAR]] loading itself.
 
*[[Alias]]es are not kept between sessions.
 
*[[Alias]]es are not kept between sessions.
 
*cvars like <code>cl_showpos</code> and <code>r_portal_use_pvs_optimization</code> are reverted to 0 after restarting.
 
*cvars like <code>cl_showpos</code> and <code>r_portal_use_pvs_optimization</code> are reverted to 0 after restarting.
  
===Commands for fullgame runs===
+
==Just give me a pre-filled autoexec, please!==
 
+
Check out [https://s.portal2.sr/srconfigs srconfigs]! srconfigs is a set of config files made for Portal 2 speedrunning, you can check out more information about it on the [https://github.com/p2sr/srconfigs?tab=readme-ov-file#srconfigs srconfigs README].
SAR commands for full game runs
 
 
 
<code>sar_speedrun_autostart 0</code> - Prevents immediate start when loading into the level<br>
 
<code>sar_autorecord 1</code> - Will continue demo recordings after death and through level transitions<br>
 
<code>sar_speedrun_offset 16868</code>  - Offset for your timer to work with the containerridesave<br>
 
<code>sar_speedrun_time_pauses 0</code> - Timer will not continue while paused (Be sure to look into rules about pause abuse)<br>
 
<code>cl_showpos 1</code> - Shows your player's look angle, and position and velocity (Used for Secret Panel, Column Blocker, and Three Gels)<br>
 
 
 
===Alias===
 
 
 
[[Alias]] is a console command that takes two arguments. The first argument will be the name of whatever command you are creating, and the second argument is what will happen as the result of you calling that command. They are incredibly powerful, but are forgotten by the game upon closing, so they are perfect for an autoexec.
 
 
 
View a large list of alias examples by visiting the wiki page on [[Alias]]es.
 
 
 
===Showing Textures Out-of-bounds===
 
 
 
By default, after leaving the games normal bounds, the surrounding area is just white. You can fix this to see out of bounds with the command <code>r_portal_use_pvs_optimization 0</code>. It's another command that should be placed in your autoexec if you plan on ever playing around OoB.
 
 
 
==I need one for Full Game Runs, quick.==
 
 
 
[https://drive.google.com/drive/folders/1f4UGomomOzWOxMiJ2ugq8L5vWznaLzfB?usp=sharing Say no more]
 
 
 
==Massive Autoexec with tons of useful commands and Aliases==
 
 
 
{{P2_Video|url=https://www.youtube.com/watch?v=9jWLC3XINiY|time=0|desc=Video with common examples and explanations}}
 
 
 
[https://drive.google.com/drive/folders/1bDeJrOMr7idy8PtpkJL9yO2mggpDd0fx cfg suite ] (includes large autoexec.cfg file), more information about commands on the Wiki page for [[Alias]]es
 

Latest revision as of 15:49, 30 October 2024

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.