RMMV Are Longer HP Gauges possible?

DarkPlasmaBall

Veteran
Veteran
Joined
Apr 29, 2020
Messages
62
Reaction score
1
First Language
English
Primarily Uses
RMMV
Hey everyone,

I'm wondering if there's a way to stretch/ lengthen the HP gauges seen during battles. There's a lot of dead space between the battlers' names and the HP gauge, and I was hoping to basically double the length of the HP gauge, which would be especially helpful, visually, when the battlers had significantly more HP later in the game. (The default HP gauge would naturally be longer for the entire game, not gradually lengthen over time.) I'm familiar with Yanfly's segmented/sectioned plugins, but those seem to split up the current size of the HP gauge into pieces, rather than actually make the gauge longer. I think that a longer HP gauge would also look nicer, aesthetically, so I wanted to tinker with that option, if it exists. Is this possible? Picture is attached to help explain. Thanks!
 

Attachments

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,926
Reaction score
628
First Language
Dutch
Primarily Uses
RMMV
you can make the mlong, the easiest way (personally) is to images and SRD_HUDMaker
and make sure the gauge is based on actors HP.

another way to to find what function the hp gauge is draw and make an alias and put
the lenght in size of that part. but it really depends what info you want to show and
which one hidden, if you want all info on 4 actors, you need to modify the code a bit.
 

Ritter

Veteran
Veteran
Joined
Jan 17, 2017
Messages
62
Reaction score
28
First Language
English
Primarily Uses
RMMV
I guess you could do something like this. find this function in rpg_windows.js and play around with the values below or alias the function in another plugin and play around with the values.

Default function
JavaScript:
Window_BattleStatus.prototype.drawGaugeAreaWithTp = function(rect, actor) {
    this.drawActorHp(actor, rect.x + 0, rect.y, 108);
    this.drawActorMp(actor, rect.x + 123, rect.y, 96);
    this.drawActorTp(actor, rect.x + 234, rect.y, 96);
};
Edited function
JavaScript:
Window_BattleStatus.prototype.drawGaugeAreaWithTp = function(rect, actor) {
    this.drawActorHp(actor, rect.x - 100, rect.y, 208);
    this.drawActorMp(actor, rect.x + 123, rect.y, 96);
    this.drawActorTp(actor, rect.x + 234, rect.y, 96);
};
it seems like what you'd want to do is add a number to the final number 108 and then subtract that number from rect.x + 0,

so if you add 100 to 108 as i did in my example then you would subtract 100 from rect.x instead of + 0.

In that quick test i ran i agree it does look nice as long as it doesn't interfere with anything else in the battle, I haven't really used the actual battle system too too much.
 
Last edited:

DarkPlasmaBall

Veteran
Veteran
Joined
Apr 29, 2020
Messages
62
Reaction score
1
First Language
English
Primarily Uses
RMMV
Thank you for the suggestions! I'll try these out!

Dumb question (I'm brand new and have zero experience with JS): when you say "find this function in rpg_windows.js", I'm actually having trouble opening it/ knowing how to run it. I've located that js file, but I don't know how to actually get into the code to edit the function. (As in, double-clicking it just gives me an error and nothing happens.)

Also, "you can make the mlong, the easiest way (personally) is to images and SRD_HUDMaker
and make sure the gauge is based on actors HP." Where do I find this? I don't see SRD_HUDMaker (or anything similar) anywhere in my files.
 
Last edited:

Ritter

Veteran
Veteran
Joined
Jan 17, 2017
Messages
62
Reaction score
28
First Language
English
Primarily Uses
RMMV
you would open it with a text editor. I suggest Notepad++ as that is easy to use and has highlighting.

download Notepad++ and install it, right click on the .js file and click edit with notepad++

hit ctrl+f and search for Window_BattleStatus.prototype.drawGaugeAreaWithTp

play around with the values. although changing the values in here directly is typically not the best way to handle this but if it doesn't break anything then i guess its no harm no foul. it would probably be best to keep a backup of the original function in case you want to revert back.

OR

you can just download this 'plugin' and set a value in the plugin parameter and see what happens. try 100 and go from there, the bigger the number the bigger the gauge. though if there is another plugin which modifies this function it may not be compatible and things may happen in which case i'd need to know what plugin you're using in order to set the size in the correct place lol.
 

Attachments

DarkPlasmaBall

Veteran
Veteran
Joined
Apr 29, 2020
Messages
62
Reaction score
1
First Language
English
Primarily Uses
RMMV
I found the function in Notepad and adjusted it multiple times (by 100, 200, 500, even 1000) and the HP gauge doesn't seem to be changing its length at all :( I consistently adjusted both the .x and .y parameters by the same amount each time, and still the battle HP gauge looks identical. (Attached picture shows one example.) Thoughts?
 

Attachments

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,926
Reaction score
628
First Language
Dutch
Primarily Uses
RMMV
probably you also need the same function on "WITHOUT TP wich is below".
but it does work, but it's also easier for you if those are params for the in editor change
and play around.

SRD_HUDMaker is a plugin, which when you playtest (play test only) can create gauges
where you want it on map or in battle scene (start a battle, than open HUDMaker)
to create gauges for actors. (watch the tutorial how to do it) which can be made unique
in your own way, make them as long as you wish too.
 

Ritter

Veteran
Veteran
Joined
Jan 17, 2017
Messages
62
Reaction score
28
First Language
English
Primarily Uses
RMMV
I haven't looked into those plugins you mentioned yet to see if they modify the original function or not, but in order for you to see any changes you would need to save the changes in the text editor and then battletest. the changes you make would not show until you restart the play test.

i just tested the 'plugin' i attached earlier with the yanfly sectioned gauges plugin and they do work together. it changed the size of the gauge as you wanted it to. if changing the values using that plugin i attached you would set a value in the parameters then save the game and open your troops database and hit battletest. also if using that plugin i attached be sure to revert the original function back to default values of
this.drawActorHp(actor, rect.x + 0, rect.y, 108);
 
Last edited:

DarkPlasmaBall

Veteran
Veteran
Joined
Apr 29, 2020
Messages
62
Reaction score
1
First Language
English
Primarily Uses
RMMV
I also adjusted the "without TP" equally, to try that, and I've definitely been closing and restarting the entire system and restarting the play test. Unfortunately, tinkering with the numbers inside of that file doesn't seem to be adjusting my HP gauges.

Edit: I'll take a look at the plug-in too. Thanks!
 

DarkPlasmaBall

Veteran
Veteran
Joined
Apr 29, 2020
Messages
62
Reaction score
1
First Language
English
Primarily Uses
RMMV
I tinkered with the plugin (after reverting back to the original JS values, even though they didn't seem to adjust anything), and the plugin is definitely increasing my HP gauge! There are 2 new issues now, though:

1. The MP and TP gauges are squished as a reaction to the HP gauge being extended;
2. It's shifting all my gauges (HP/MP/TP) to the left, so that there's a blank space on the right.
Is there any way to keep the MP and TP gauges the same sizes as originally shown (or, better yet, can I increase their lengths too?) + realign the gauges to the right edge, while still retaining these longer HP gauges? I've included 2 pictures (plugin OFF vs. ON) to help explain. Thank you!

Edit: Also, I'm still not sure why adjusting the JS values didn't do anything. Might other plugins prevent the adjustment of the JS values from actually taking effect? I have a bunch of Yanfly plugins turned on too; I don't know if those would actively interfere with what I'm trying to accomplish.
 

Attachments

Last edited:

DarkPlasmaBall

Veteran
Veteran
Joined
Apr 29, 2020
Messages
62
Reaction score
1
First Language
English
Primarily Uses
RMMV
Update: I figured it out! I ended up going back and tinkering with the JS files after reading up on even more suggestions from past threads on how to tinker with general JS files... and I got the changing of the rpg_windows.js numbers to work :)

My issue (undoubtedly due to me being a tech noob) was that I was only adjusting the numbers of the default JS file that was still in the js folder, but I hadn't put in the converted values as a brand new plugin and dropped it into the plugin folder. Once I copy/pasted the GaugeAreaWith(out)Tp sections into a brand new notepad file as a js and added this modified version to the plugin folder, and tinkered with *those* numbers, it worked! All I had to do was create a new plugin with the adjusted values and turn it on. Here's the code for what I used in the new plugin, and the attached picture shows the result! Thanks ShadowDragon and Ritter for helping!

Window_BattleStatus.prototype.drawGaugeAreaWithTp = function(rect, actor) {
this.drawActorHp(actor, rect.x - 350, rect.y, 408);
this.drawActorMp(actor, rect.x + 73, rect.y, 246);
this.drawActorTp(actor, rect.x + 334, rect.y, 206);
};

Window_BattleStatus.prototype.drawGaugeAreaWithoutTp = function(rect, actor) {
this.drawActorHp(actor, rect.x - 350, rect.y, 551);
this.drawActorMp(actor, rect.x + 166, rect.y, 214);
};
 

Attachments

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,926
Reaction score
628
First Language
Dutch
Primarily Uses
RMMV
most time when you save the JS, alot of time, you need to go to teh plugin database,
right click it and refresh -> apply and than playtest to take effect.
 

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

Latest Threads

Latest Profile Posts

The more I look at the QPlugins... The more I am amazed at what they can do. Which I'm not going to lie is pretty awkward, because I already consider them far and away the best plugins MV has to offer. :kaoback:
spending a week trying to figure out what was wrong with my font has me DED
504 threads to go upon the time of this post until the forum reaches 100k threads. Thread Dead Redemption. Thready Van Halen. Thread Zeppelin. Doesn't have to be a band or a game
Random thought: Looks like putting in effort in learning a language is like a taboo for most people. :kaoswt2:
Not sure about RPG Maker MZ ; We see a lot of things, but they could have enhanced a lot of things in MV first... We're at the era of updates nowadays, not new products over and over and over :/

Forum statistics

Threads
99,500
Messages
966,128
Members
131,133
Latest member
guuh1
Top