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

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
yum13241
Posts: 237
Joined: Mon May 10, 2021 8:08 pm
Discord: yum13241#8226
Github ID: yum13241
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan Support

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

Post 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.
User avatar
Rachael
Admin
Posts: 12957
Joined: Tue Jan 13, 2004 1:31 pm
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Preferred Pronouns: She/Her

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

Post 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.
yum13241
Posts: 237
Joined: Mon May 10, 2021 8:08 pm
Discord: yum13241#8226
Github ID: yum13241
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan Support

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

Post 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?
User avatar
Rachael
Admin
Posts: 12957
Joined: Tue Jan 13, 2004 1:31 pm
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Preferred Pronouns: She/Her

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

Post by Rachael »

It can be typed directly in the console.
yum13241
Posts: 237
Joined: Mon May 10, 2021 8:08 pm
Discord: yum13241#8226
Github ID: yum13241
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan Support

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

Post by yum13241 »

Rachael wrote:It can be typed directly in the console.
And this is persistent, correct?
User avatar
Rachael
Admin
Posts: 12957
Joined: Tue Jan 13, 2004 1:31 pm
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Preferred Pronouns: She/Her

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

Post by Rachael »

For the current game (i.e. Doom/Heretic/Hexen/etc) yes.
yum13241
Posts: 237
Joined: Mon May 10, 2021 8:08 pm
Discord: yum13241#8226
Github ID: yum13241
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan Support

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

Post 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?
User avatar
Matt
Posts: 9670
Joined: Sun Jan 04, 2004 5:37 pm
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

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

Post 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.

Return to “General”