Building a Heads-up Display or Menu With My own Variables

Larn Conner

Villager
Member
Joined
Aug 7, 2013
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Hello, read the rules before posting and it seems this is the place to post my question about HUDs and variables.

I'm using RPG Maker VX Ace.

I hope to keep this question as simple as possible.

Looking for a way to display on the main screen stats like "gold amount" or "HP" without using a text window.

Basically display numbers of stats or variables on the main screen all the time.

Using pictures of numbers I've been able to display variable numbers, even managed to find a way to display

very high variable counts with less event code using 1s, 10s, 100s, 1000s, 10000s, 100000s, 1000000s and so

on, but there is a major flaw in that adding and subtracting from the count is going to be very messy.

I've searched for days now, checking out every tutorial on here and Youtube and across the internet that deals

with HUDs, menus and displaying information on the screen.  I know there are scripts that do huds and so on,

but I'm interested in learning how to do make my own, not just plug in someone else's code that I can't

understand.

I'm also interested if there's a way to display variable information using a window command.  Like if there's a

menu option called "gems" and when I click it it would display a variable of how many gems I got.  This is just

an example of course, the point being if there's a way to attach a variable to a window command.

Sorry if any of this is a bit muddled.  I've been wrestling with asking a question on here for days, been trying

to figure these things out on my own.

Thanks for any help.

p.s. searching for "hud" keyword is impossible because of the search restrictions.
 

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
Hello, read the rules before posting and it seems this is the place to post my question about HUDs and variables.

I'm using RPG Maker VX Ace.

I hope to keep this question as simple as possible.

Looking for a way to display on the main screen stats like "gold amount" or "HP" without using a text window.

Basically display numbers of stats or variables on the main screen all the time.

Using pictures of numbers I've been able to display variable numbers, even managed to find a way to display

very high variable counts with less event code using 1s, 10s, 100s, 1000s, 10000s, 100000s, 1000000s and so

on, but there is a major flaw in that adding and subtracting from the count is going to be very messy.

I've searched for days now, checking out every tutorial on here and Youtube and across the internet that deals

with HUDs, menus and displaying information on the screen.  I know there are scripts that do huds and so on,

but I'm interested in learning how to do make my own, not just plug in someone else's code that I can't

understand.

I'm also interested if there's a way to display variable information using a window command.  Like if there's a

menu option called "gems" and when I click it it would display a variable of how many gems I got.  This is just

an example of course, the point being if there's a way to attach a variable to a window command.

Sorry if any of this is a bit muddled.  I've been wrestling with asking a question on here for days, been trying

to figure these things out on my own.

Thanks for any help.

p.s. searching for "hud" keyword is impossible because of the search restrictions.
If I understand you correctly I was wanting to do something similar with my game.  Espon provided me with this link http://victorscripts...s/control-text/

So it seems you need a pretty heavy duty script with it's own engine to accomplish this.  I have stayed away from it so far because the idea of having to add a new engine to my game intimidates me.  But if you try it I would appreciate you letting me know how it works out.
 
Last edited by a moderator:

Larn Conner

Villager
Member
Joined
Aug 7, 2013
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Thanks for the reply, Barylstone, but that script seems to be dealing only with change things about the text in a message box, I guess even adding icons.
 

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
Thanks for the reply, Barylstone, but that script seems to be dealing only with change things about the text in a message box, I guess even adding icons.
Ok my mistake then. I thought it allowed you to insert variables into the actual window commands.
 

Larn Conner

Villager
Member
Joined
Aug 7, 2013
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Here is a video of the simple HUD I've been working on.  It displays a variable that is being counted up, simulating

money being added to the counter.

[SIZE=10pt][/SIZE]

http://youtu.be/BoDrxQ_VvH0[SIZE=10pt][/SIZE]

How this event-driven counter works.  I use png numbers from 0 to 9 for each variable.  When the furthest number

to the right reaches 10, numb_var10s is updated by one and so on down the line to say numb_var1000000s to

keep count of very large variables.  The problem is adding large numbers or subtracting numbers from this display

would be very messy.

I'd like to display the RPG maker stat for "gold" instead, so I can add or subtract very easily, but I don't know how to

add the RPG Maker stat "gold" to a HUD that I can display on my main screen as the example above.
 

Dark Paladin

Game Designer
Veteran
Joined
Jul 10, 2012
Messages
165
Reaction score
10
First Language
English
Primarily Uses
RMMV
You will probably need a script for this. Huds are not terribly difficult to make. Just take a look at other hud scripts and study how they work. If you have a basic knowledge of scripting it shouldn't be a problem. I suggest going through Dp3's tutorials (all of them CLICK) so you can pick up a basic understanding of the way ruby works. Don't just watch the videos either actually do the scripts while your watching so you can absorb it faster. Once you have that understanding You can pretty much look at any script and see what it does and how its pieced together. Then building your own will be a walk in the park.
 
Last edited by a moderator:

Larn Conner

Villager
Member
Joined
Aug 7, 2013
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Thanks Dark Paladin.   Yeah, I believe I've gone through Dp3's tutorials.  I'll have a look at them.  I've tried python and other programming languages and I get a lot of it, but when I start having to make function and all that my mind just can't seem to grasp it very well.  Same thing with scripts.  I can read through and see what a lot of it does, but when I try to put it all together on my own, I can't make sense of it.  Perhaps with enough practice it will eventually start to click.
 

Dark Paladin

Game Designer
Veteran
Joined
Jul 10, 2012
Messages
165
Reaction score
10
First Language
English
Primarily Uses
RMMV
Thanks Dark Paladin.   Yeah, I believe I've gone through Dp3's tutorials.  I'll have a look at them.  I've tried python and other programming languages and I get a lot of it, but when I start having to make function and all that my mind just can't seem to grasp it very well.  Same thing with scripts.  I can read through and see what a lot of it does, but when I try to put it all together on my own, I can't make sense of it.  Perhaps with enough practice it will eventually start to click.
Practice makes perfect. I had the same trouble when I first started. I actually did dp3's tutorials twice before I really grasped what was going on. I've watched a lot of other tutorials but his just made it click for me. After I got the basics down I started editing other peoples scripts to see what I could do then I started making my own. Took me around 2 months to start writing them without having to stop and look things up. 
 

Zeriab

Huggins!
Veteran
Joined
Mar 20, 2012
Messages
1,268
Reaction score
1,422
First Language
English
Primarily Uses
RMXP
Assuming that the max number can be kept within a single variable I suggest you use that for all non-hud manipulations.

For displaying the hud use the Mod and Div variable operations to grind down the number into their digits.

For illustration look at this event code:



If you do not actually need the individual digits otherwise I would suggest creating a loop.

Here is an example where I assume the Draw Digit common event can figure out which 0-9 to draw based on a variable containing the number and a variable containing the index of that digit in the number.



Of course with such cases you really should check stuff like what happens if the number is 0 and negative. I haven't build the loop with those cases in mind so who knows what will happen in those cases.

*hugs*

 - Zeriab
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,859
Messages
1,017,030
Members
137,566
Latest member
Fl0shVS
Top