Half-Life 2

Half-Life 2

View Stats:
Console commands don't save.
Some of my binds and console commands I turned on won't save when I leave the game. I put them into an autoexec.cfg file and that fixed all of them but one. For whatever reason, r_portalsopen 1 won't stay on. If I execute the autoexec.cfg file in game it will turn on but it won't do it automatically. It isn't cheat protected but it also turns off when I disable cheats.
< >
Showing 1-2 of 2 comments
Calmly Frenetic Dec 17, 2023 @ 11:30pm 
There are several classifications of "cheat" commands in the game.
(To display commands with full descriptions, use the "find" command.)

Commands classified as "game cheat" can only be changed when sv_cheats is on.

Commands classified as "cheat" or "client cheat" can be used at any time, but are automatically reset to default when "sv_cheats 0" is used (even if already set to 0).
Presumably "sv_cheats 0" is used by the game near the end of the launch sequence.

None of the various "cheat" commands are saved when the game is quit, so they will not appear in the config.cfg file. Any commands that do appear in config.cfg do not need to be in autoexec.cfg (or launch options).


So, the question is how to set "cheat" commands to non-default values at launch. :question_mark:

If it can't be done automatically, you could bind an unused key to quickly execute autoexec.cfg manually.
Big Daddy Matty Dec 18, 2023 @ 1:55pm 
Originally posted by Calmly Frenetic:
There are several classifications of "cheat" commands in the game.
(To display commands with full descriptions, use the "find" command.)

Commands classified as "game cheat" can only be changed when sv_cheats is on.

Commands classified as "cheat" or "client cheat" can be used at any time, but are automatically reset to default when "sv_cheats 0" is used (even if already set to 0).
Presumably "sv_cheats 0" is used by the game near the end of the launch sequence.

None of the various "cheat" commands are saved when the game is quit, so they will not appear in the config.cfg file. Any commands that do appear in config.cfg do not need to be in autoexec.cfg (or launch options).


So, the question is how to set "cheat" commands to non-default values at launch. :question_mark:

If it can't be done automatically, you could bind an unused key to quickly execute autoexec.cfg manually.


I'm gonna go look around in the game files and see if I can change the "cheat" commands, thanks for the reply.

EDIT: i looked around for half an hour and couldn't find anything, granted I only really looked at some easily accessible files. If somebody stumbles upon this and knows how to change this please let me know.
Last edited by Big Daddy Matty; Dec 18, 2023 @ 2:09pm
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Dec 17, 2023 @ 1:42pm
Posts: 2