DrawNumber Cvar Support
Moderator: GZDoom Developers
- 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
As implied. It would be greatly appreciated if DrawNumber could also support cvars.
- 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
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.
-
- Posts: 5042
- Joined: Sun Nov 14, 2010 12:59 am
Re: DrawNumber Cvar Support
Could you provide an example where drawing the value of a console variable on the HUD would be useful?
- 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
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.
- 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
It goes without saying that not everything's an inventory item as well. Time bombs for example of players near something about to explode.
-
- Posts: 5042
- Joined: Sun Nov 14, 2010 12:59 am
Re: DrawNumber Cvar Support
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.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.
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.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.
- 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
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.Blue Shadow wrote: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.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.
- 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
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.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.
Also I hate recompiling ACS every time and breaking my save games as a result.
And also, completeness sakes man.
Re: DrawNumber Cvar Support
You could also be making a DM mod which shows the fraglimit on the hud along with your current frags.
- 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
The hell with it. I did it myself. Surprisingly easier than I thought.