Custom vars for UI
Moderators: GSH, VSMIT, Red Devil, Commando
-
- Drunken Scav
- Posts: 11
- Joined: Mon May 16, 2011 8:17 pm
Custom vars for UI
Hey guys,
Is there a way to define custom variables for the UI? For instance I wanna make a scrap.supply*2 var to use for the scrap gauge in bzgame_scrap_v2_0.cfg so that it'll keep it's aspect ratio.
I'm worried it might not be possible since it wasn't done already in the patch13.pak but I figured i'd ask.
Is there a way to define custom variables for the UI? For instance I wanna make a scrap.supply*2 var to use for the scrap gauge in bzgame_scrap_v2_0.cfg so that it'll keep it's aspect ratio.
I'm worried it might not be possible since it wasn't done already in the patch13.pak but I figured i'd ask.
- Red Devil
- Recycler
- Posts: 4398
- Joined: Fri Feb 18, 2011 5:10 pm
- Location: High in the Rocky Mountains
Re: Custom vars for UI
something like this?
ConfigureVarSys()
{
CreateInteger("editor.shell.page", 0);
SetIntegerRange("editor.shell.page", 0, 8);
}
ConfigureVarSys()
{
CreateInteger("editor.shell.page", 0);
SetIntegerRange("editor.shell.page", 0, 8);
}
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln
Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV
Lifetime member of JBS and NRA
Abraham Lincoln
Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV
Lifetime member of JBS and NRA
-
- Drunken Scav
- Posts: 11
- Joined: Mon May 16, 2011 8:17 pm
Re: Custom vars for UI
Do you know if there's a way to run math operations on these variables? I see you can use Cmd() to set a literal value but don't see where I could multiply it.
Basically I just want the scrap gauge to go up two pixels instead of one for each scrap.supply
Basically I just want the scrap gauge to go up two pixels instead of one for each scrap.supply
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: Custom vars for UI
Hmm, seems that the engine does control the height of the gauges. Pooooooooooooooooooooooooooooooooo.
Try this, find the maximum height of the stock?ish scrap gauge, and make a Gauge that is set to UseVar("scrap.supply");
put it on the bottom of your _x2 scrap config, and it should work?
Try this, find the maximum height of the stock?ish scrap gauge, and make a Gauge that is set to UseVar("scrap.supply");
put it on the bottom of your _x2 scrap config, and it should work?
Battlezone Classic Public Forums
*****General BlackDragon*****
*****General BlackDragon*****
- Red Devil
- Recycler
- Posts: 4398
- Joined: Fri Feb 18, 2011 5:10 pm
- Location: High in the Rocky Mountains
Re: Custom vars for UI
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln
Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV
Lifetime member of JBS and NRA
Abraham Lincoln
Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV
Lifetime member of JBS and NRA
-
- Drunken Scav
- Posts: 11
- Joined: Mon May 16, 2011 8:17 pm
Re: Custom vars for UI
Here's the difference I'm seeing
RD's version vs the stock 2.0 version vs Normal
While the width changes, the height of the gauge is still 40 pixels
I'm not sure i'm following GBD, as far as I'm aware the height doesn't matter at all. In all of the variations, the gauge is defined with a height of 0.
RD's version vs the stock 2.0 version vs Normal
While the width changes, the height of the gauge is still 40 pixels
I'm not sure i'm following GBD, as far as I'm aware the height doesn't matter at all. In all of the variations, the gauge is defined with a height of 0.
- Red Devil
- Recycler
- Posts: 4398
- Joined: Fri Feb 18, 2011 5:10 pm
- Location: High in the Rocky Mountains
Re: Custom vars for UI
neat optical delusion there. so, you want the height taller? that is probably determined by the coordinates used for colorize.tga and colorize.tga itself.
i've also seen some scrap gauges that are semi-circular, if that helps.
i've also seen some scrap gauges that are semi-circular, if that helps.
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln
Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV
Lifetime member of JBS and NRA
Abraham Lincoln
Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV
Lifetime member of JBS and NRA
-
- Drunken Scav
- Posts: 11
- Joined: Mon May 16, 2011 8:17 pm
Re: Custom vars for UI
Afaik the colorize.tga is used to draw the blue border.
I'm talking specifically about the white square (or blue square in your version.) I can change the width, but the height seems to be directly linked with the variable used. As in, when scrap.supply = 20 the bar is 20 pixels tall when scrap.supply = 25 the bar is 25 pixels tall, etc.
Is there a way I can use another var that's a multiple of scrap.supply? like UseVar("scrap.supply" * 2);
I'm talking specifically about the white square (or blue square in your version.) I can change the width, but the height seems to be directly linked with the variable used. As in, when scrap.supply = 20 the bar is 20 pixels tall when scrap.supply = 25 the bar is 25 pixels tall, etc.
Is there a way I can use another var that's a multiple of scrap.supply? like UseVar("scrap.supply" * 2);
- Red Devil
- Recycler
- Posts: 4398
- Joined: Fri Feb 18, 2011 5:10 pm
- Location: High in the Rocky Mountains
Re: Custom vars for UI
ah, thinking not (via cfg anyways).
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln
Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV
Lifetime member of JBS and NRA
Abraham Lincoln
Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV
Lifetime member of JBS and NRA
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: Custom vars for UI
No, it's controlled by the engine
Battlezone Classic Public Forums
*****General BlackDragon*****
*****General BlackDragon*****
-
- Drunken Scav
- Posts: 11
- Joined: Mon May 16, 2011 8:17 pm
Re: Custom vars for UI
Dang, that's kinda what i figured though.
BTW i decided to put my old toybox recy up on github. It shamelessly swipes assets from other mods so it'll never be released as a final thing, but it's hella fun to play with. Especially on a map with a bunch of pools and the custom thug recys
BTW i decided to put my old toybox recy up on github. It shamelessly swipes assets from other mods so it'll never be released as a final thing, but it's hella fun to play with. Especially on a map with a bunch of pools and the custom thug recys