Page 1 of 1

I need an alias I can run from the console to set CVARs.

Posted: Sat May 22, 2021 9:54 am
by yum13241
So I want to set these CVARs with one command

Code: Select all

deathmatch 1
dmflags 9064576
dmflags2 136316416
sv_cheats 1
and I would also like it to start a new game for me, so all the CVAR changes take effect. I am not planning to use this for human multiplayer, that's why I have sv_cheats on.

Re: I need an alias I can run from the console to set CVARs.

Posted: Sat May 22, 2021 10:01 am
by Rachael
Enclose the entire statement in quotes, and separate each command with a semicolon.
alias mybigalias "dmflags 9064576;dmflags2 136316416;sv_cheats 1;map map01 dm"

Note that the "map" command overrides any previous "deathmatch" setting so it must be changed using the command itself. Adding "dm" as a separate parameter accomplishes this.

Re: I need an alias I can run from the console to set CVARs.

Posted: Sat May 22, 2021 1:33 pm
by yum13241
Rachael wrote:Enclose the entire statement in quotes, and separate each command with a semicolon.
alias mybigalias "dmflags 9064576;dmflags2 136316416;sv_cheats 1;map map01 dm"

Note that the "map" command overrides any previous "deathmatch" setting so it must be changed using the command itself. Adding "dm" as a separate parameter accomplishes this.
Where do I put this?

Re: I need an alias I can run from the console to set CVARs.

Posted: Sat May 22, 2021 1:38 pm
by Rachael
It can be typed directly in the console.

Re: I need an alias I can run from the console to set CVARs.

Posted: Sat May 22, 2021 1:53 pm
by yum13241
Rachael wrote:It can be typed directly in the console.
And this is persistent, correct?

Re: I need an alias I can run from the console to set CVARs.

Posted: Sat May 22, 2021 1:54 pm
by Rachael
For the current game (i.e. Doom/Heretic/Hexen/etc) yes.

Re: I need an alias I can run from the console to set CVARs.

Posted: Sat May 22, 2021 2:06 pm
by yum13241
Rachael wrote:For the current game (i.e. Doom/Heretic/Hexen/etc) yes.
Good. So once I do it for DOOM1, does it work on DOOM2?

Re: I need an alias I can run from the console to set CVARs.

Posted: Mon May 24, 2021 10:16 am
by Matt
You can also make an autoexec.cfg to make sure this stuff gets set when you're using a new IWAD or something happens to the ini.

I think generally it'll be recognized if it's in the same folder as the ini.