DrawNumber Cvar Support

Moderator: GZDoom Developers

Post Reply
User avatar
Major Cooke
Posts: 8208
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

DrawNumber Cvar Support

Post by Major Cooke »

As implied. It would be greatly appreciated if DrawNumber could also support cvars.
User avatar
Tapwave
Posts: 2096
Joined: Sat Aug 20, 2011 8:54 am
Preferred Pronouns: No Preference
Graphics Processor: nVidia with Vulkan support

Re: DrawNumber Cvar Support

Post by Tapwave »

I requested that quite a bit ago, but Blue Shadow only managed to make a conditional for CVars. Again, I cannot reiterate how much I want this feature, as this would massively sanitize my mod's ACS codebase.
Blue Shadow
Posts: 5042
Joined: Sun Nov 14, 2010 12:59 am

Re: DrawNumber Cvar Support

Post by Blue Shadow »

Could you provide an example where drawing the value of a console variable on the HUD would be useful?
User avatar
Tapwave
Posts: 2096
Joined: Sat Aug 20, 2011 8:54 am
Preferred Pronouns: No Preference
Graphics Processor: nVidia with Vulkan support

Re: DrawNumber Cvar Support

Post by Tapwave »

My mod requires a lot of ACS loopery to get the counters to draw on screen. I have about 50 globalvars that need to be refreshed on a regular basis, and being able to ax all this checking would make things infinitely easier and reduce the amount of ACS overhead going on.
User avatar
Major Cooke
Posts: 8208
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: DrawNumber Cvar Support

Post by Major Cooke »

It goes without saying that not everything's an inventory item as well. Time bombs for example of players near something about to explode.
Blue Shadow
Posts: 5042
Joined: Sun Nov 14, 2010 12:59 am

Re: DrawNumber Cvar Support

Post by Blue Shadow »

Tapwave wrote:My mod requires a lot of ACS loopery to get the counters to draw on screen. I have about 50 globalvars that need to be refreshed on a regular basis, and being able to ax all this checking would make things infinitely easier and reduce the amount of ACS overhead going on.
That doesn't satisfy my curiosity, because I still don't know why you'd want to display the value of a console variable (a user option) on the HUD.
Major Cooke wrote:It goes without saying that not everything's an inventory item as well. Time bombs for example of players near something about to explode.
Using console variables for something other than managing user options is questionable, I find, considering the values of these variables are lost when refreshing the .ini file (something which I do often). Also, someone might change them from the console at will. You're better off using inventory or global variables in this instance.
User avatar
Tapwave
Posts: 2096
Joined: Sat Aug 20, 2011 8:54 am
Preferred Pronouns: No Preference
Graphics Processor: nVidia with Vulkan support

Re: DrawNumber Cvar Support

Post by Tapwave »

Blue Shadow wrote:
Tapwave wrote:My mod requires a lot of ACS loopery to get the counters to draw on screen. I have about 50 globalvars that need to be refreshed on a regular basis, and being able to ax all this checking would make things infinitely easier and reduce the amount of ACS overhead going on.
That doesn't satisfy my curiosity, because I still don't know why you'd want to display the value of a console variable (a user option) on the HUD.
My mod uses a series of "scores" that are saved so that they can be followed through multiple playthroughs, on multiple IWADs. Some HUD elements display the current killcount of your weapon (which, at the moment, is obtained every cycle of the ready state via a massive ACS script which is basically a titanic pile of If statements), some display the individual killcounts for each monster, and some display the total killcount of all weapons for that specific monstertype. Again, all of this is done via a single ACS script, which cycles every ready frame, and has to re-compute all the CVARs into GlobalVars that are then used by SBarInfo.
User avatar
Major Cooke
Posts: 8208
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: DrawNumber Cvar Support

Post by Major Cooke »

Blue Shadow wrote:Using console variables for something other than managing user options is questionable, I find, considering the values of these variables are lost when refreshing the .ini file (something which I do often). Also, someone might change them from the console at will. You're better off using inventory or global variables in this instance.
You can't measure a bomb actor's countdown timer with SBARINFO. Also, just because someone can doesn't mean it'll work because of my user variables set on the bomb itself. I don't want to rely on ACS just to get a number drawn in some cases, just like we no longer have to rely on ACS to make translations.

Also I hate recompiling ACS every time and breaking my save games as a result.

And also, completeness sakes man.
User avatar
arookas
Posts: 265
Joined: Mon Jan 24, 2011 6:04 pm
Contact:

Re: DrawNumber Cvar Support

Post by arookas »

You could also be making a DM mod which shows the fraglimit on the hud along with your current frags.
User avatar
Major Cooke
Posts: 8208
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: DrawNumber Cvar Support

Post by Major Cooke »

The hell with it. I did it myself. Surprisingly easier than I thought.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”