Jump to content

What do CVAR do?


Recommended Posts

I don't really get how this code works exactly. I was messing around Doom Shinobi and Third Person.wad and I realized that these mods use CVAR for Chase Camera. I think this is how they made it default camera mode instead of toggling it from First Person to Chase Camera. 

Share this post


Link to post

CVAR just stands for "Console Variable." It's a way to store (and set) the engine settings. Usually, there will be a menu provided to change these, but sometimes, there isn't and you have to set them via the console.

It's unlikely the WADs you mention "use" CVARs "for" the chance camera. Rather, the variable is used to set that option.

Share this post


Link to post
2 hours ago, AbeAwesome said:

It's unlikely the WADs you mention "use" CVARs "for" the chance camera. Rather, the variable is used to set that option.

What do you mean it is unlikely for them to use CVARs for the chase camera?

Share this post


Link to post
14 hours ago, Leather Realms said:

What do you mean it is unlikely for them to use CVARs for the chase camera?

I mean that chase-cam behavior is either defined in-engine, or scripted using ZScript or something like that (if the WAD includes some non-standard camera behavior).

 

The CVAR is (most likely) just used to toggle the effect on/of, and maybe adjust some options, but most runtime variables should not be exposed to the end-user.

 

 

To give an example with a different concept: player speed, ammo count, and monster health are are variables, but they're not console variables. Autorun on/of is a CVAR, and it has an effect on player speed, but it doesn't control it.

Edited by AbeAwesome

Share this post


Link to post
4 hours ago, AbeAwesome said:

I mean that chase-cam behavior is either defined in-engine, or scripted using ZScript or something like that (if the WAD includes some non-standard camera behavior).

 

The CVAR is (most likely) just used to toggle the effect on/of, and maybe adjust some options, but most runtime variables should not be exposed to the end-user.

 

 

To give an example with a different concept: player speed, ammo count, and monster health are are variables, but they're not console variables. Autorun on/of is a CVAR, and it has an effect on player speed, but it doesn't control it.

How come I can't toggle on/off Chase Camera when I played Doom Shinobi?
I don't get it.

Edited by Leather Realms

Share this post


Link to post
  • 3 weeks later...
On 1/10/2024 at 12:57 PM, Leather Realms said:

How come I can't toggle on/off Chase Camera when I played Doom Shinobi?


set cvar

dmflags2 2097152

if that doesn't work, idk what will - I don't use GZDoom

Share this post


Link to post
  • 2 weeks later...
On 1/26/2024 at 4:27 AM, Horizon said:


set cvar


dmflags2 2097152

if that doesn't work, idk what will - I don't use GZDoom

I don't get it then, why are you telling me this code if you don't use GZDoom?

Share this post


Link to post
1 hour ago, Leather Realms said:

I don't get it then, why are you telling me this code if you don't use GZDoom?

I think Horizon is just pretty much saying that they can't guarantee it'll work. Or perhaps it is something much more nefarious.

Edited by TheMagicMushroomMan

Share this post


Link to post
On 1/10/2024 at 4:57 AM, Leather Realms said:

How come I can't toggle on/off Chase Camera when I played Doom Shinobi?
I don't get it.

Doom Shinobi has its own chase camera implementation that doesn't read GZDoom's built-in "chase" toggle, probably because GZDoom's chase camera is pretty bare-bones and doesn't let you do things like have the camera face a different direction than the player. Though it still uses chase_dist as the setting for how far away the camera should be.

Edited by Shepardus

Share this post


Link to post
On 2/3/2024 at 8:00 PM, Shepardus said:

Doom Shinobi has its own chase camera implementation that doesn't read GZDoom's built-in "chase" toggle, probably because GZDoom's chase camera is pretty bare-bones and doesn't let you do things like have the camera face a different direction than the player. Though it still uses chase_dist as the setting for how far away the camera should be.

OHHH so, they made their own chase camera and they made it default. The GZDoom engine read the script and made it in the way Doom Shinobi wanted too. If that's not what you are saying then, I'm still confused. What are we talking about?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...