[SOLVED] Changing Gauge Name width

DoctorOfHabit

Non-Medical, Not Professional
Member
Joined
Jul 9, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hello, I've been trying through different ways and plugins to make the width of the HP and MP parameter's name a bit longer, but haven't found a way to fully manage it, only in the Battle Status Window thanks to DreamX's plugin extension to Yanfly's own Battle Status Window plugin. I may be very foolishly ignoring an option I already have at my disposal, but could someone please point me then to a setting/plugin that could help me with this?
(Apologies if there's a problem with this post, I haven't fully figured out how these forums work yet.)

Current state (note the very squished text):
Example 2.PNG

The case desired for the main menu as well:
Example 1.PNG

Thanks in advance.
 
Last edited:

DoctorOfHabit

Non-Medical, Not Professional
Member
Joined
Jul 9, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
I still have not figured out a solution and would love to get some help towards one, I haven't seen rules against bumping a thread but wouldn't want to spam much so I suppose this will be a sort of last attempt at getting some tips from here, ha ha!
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,116
Reaction score
808
First Language
English
Primarily Uses
RMMV
Your pics aren't showing for me...
 

DoctorOfHabit

Non-Medical, Not Professional
Member
Joined
Jul 9, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
Oh, I might have messed up something when putting them in the spoiler boxes, let's try again.

First Picture (problem)
Example 2.PNG

Second Picture (how the solution should look like)
Example 1.PNG
 

Attachments

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,116
Reaction score
808
First Language
English
Primarily Uses
RMMV
I just realized I'm experiencing the same issue as you. Something is predetermining the maximum width of the text on gauges.

1594549276644.png

The text "Next Lv." looks to be the same width as your "Health Points" & "Magic Points". Not sure where the width is defined though...
 

DoctorOfHabit

Non-Medical, Not Professional
Member
Joined
Jul 9, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
Oh, well then knowing now would be twice as useful then! If you ever find a solution to this issue, would you be so kind to notify me? Of course I would likewise do so if I find one as well (and probably edit the first post with the answer!)
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
478
Reaction score
210
First Language
English
Primarily Uses
RMMV
The drawGauge function takes the width of the gauge as its third argument. So, your first step is to identify which window has the problem. You can so that using the WindowId plugin that can be found in the dlc folder in your Steam installation (if you have the standalone version, I believe it's in a separate download, but I'm not sure which one contains it).

Next, open up the window where you see the issue and hold down the control key. You should see the window's name in red in the top left corner. If you don't, it means the WindowId plguin wasn't installed or enabled correctly.

Once you have the name of the window, you need to find where it's defined. If it's a built-in window, it will be in rpg_windows.js, but it could also be in a plugin. Look for a call to drawGauge. If you don't find one, you can also search some functions that call drawGauge - try drawActorHp, drawActorMp, or drawActorTp.

Once you've found the specific drawGauge call, just change the third argument to the width you want. If it was a drawActorHp/Mp/Tp call, change the fourth argument. If there is no third/fourth argument, you can add one.


EDIT: Whoops, the issue was the text, not the gauge. Sorry. Just find the drawActorHp/Mp/Tp function in rpg_windows.js and change 44 in the drawText call to the width you need.
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,116
Reaction score
808
First Language
English
Primarily Uses
RMMV
Hmm, I found the functions for the HP/MP/TP gauges, but couldn't find it for XP...
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
478
Reaction score
210
First Language
English
Primarily Uses
RMMV
In the default status screen that would be drawExpInfo in rpg_windows.js, but you're using a custom status screen right? So probably try searching for drawText calls in that plugin and see if you can figure out which one is drawing the experience text.
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,116
Reaction score
808
First Language
English
Primarily Uses
RMMV
Oh, the Galv_BustMenu.js plugin I'm using simply moves the default elements around, it doesn't actually change them in any way. Anyways, I found "drawExpInfo" in rpg_windows.js but I'm not sure what to change in order to increase the width of the text box...

Is it something in here?
JavaScript:
Window_Status.prototype.drawExpInfo = function(x, y) {
    var lineHeight = this.lineHeight();
    var expTotal = TextManager.expTotal.format(TextManager.exp);
    var expNext = TextManager.expNext.format(TextManager.level);
    var value1 = this._actor.currentExp();
    var value2 = this._actor.nextRequiredExp();
    if (this._actor.isMaxLevel()) {
        value1 = '-------';
        value2 = '-------';
    }
    this.changeTextColor(this.systemColor());
    this.drawText(expTotal, x, y + lineHeight * 0, 270);
    this.drawText(expNext, x, y + lineHeight * 2, 270);
    this.resetTextColor();
    this.drawText(value1, x, y + lineHeight * 1, 270, 'right');
    this.drawText(value2, x, y + lineHeight * 3, 270, 'right');
};
Edit: Nvm, I found it!
 
Last edited:

DoctorOfHabit

Non-Medical, Not Professional
Member
Joined
Jul 9, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
Ah! I had tried snooping around that file but couldn't make out where exactly the values were! Thank you very much!
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,116
Reaction score
808
First Language
English
Primarily Uses
RMMV
Ah! I had tried snooping around that file but couldn't make out where exactly the values were! Thank you very much!
It's actually here (for HP/MP) in rpg_windows.js:
JavaScript:
Window_Base.prototype.drawActorHp = function(actor, x, y, width) {
    width = width || 186;
    var color1 = this.hpGaugeColor1();
    var color2 = this.hpGaugeColor2();
    this.drawGauge(x, y, width, actor.hpRate(), color1, color2);
    this.changeTextColor(this.systemColor());
    this.drawText(TextManager.hpA, x, y, 44);
    this.drawCurrentAndMax(actor.hp, actor.mhp, x, y, width,
                           this.hpColor(actor), this.normalColor());
};

Window_Base.prototype.drawActorMp = function(actor, x, y, width) {
    width = width || 186;
    var color1 = this.mpGaugeColor1();
    var color2 = this.mpGaugeColor2();
    this.drawGauge(x, y, width, actor.mpRate(), color1, color2);
    this.changeTextColor(this.systemColor());
    this.drawText(TextManager.mpA, x, y, 44);
    this.drawCurrentAndMax(actor.mp, actor.mmp, x, y, width,
                           this.mpColor(actor), this.normalColor());
};
Replace "44" with whatever width you want.
 

DoctorOfHabit

Non-Medical, Not Professional
Member
Joined
Jul 9, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
Yes yes, it was easy to find once i knew what value to look for! But it is extra nice of you to specify, and will probably be of help to others in the future : o )
 

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

Latest Threads

Latest Posts

Latest Profile Posts

ESAMarathon on Twitch, now streaming "Eat Girl". Yep, that's the title of a game... Apparently it's a Pacman knockoff.... Which is of course the only logical conclusion one would get from a name like "Eat Girl". :kaopride: I can't believe anybody would think anything else! :kaoback:
Super stoked i just finished my first town in my project, by finished i mean i can always add more decorative aesthetics and the NPCs don't talk yet but the mapping is complete and all the important chess pieces are present!
My brain: Hey, I have an idea how to make the transition to the main story quest in The Wastes more natural!
Me: Good!
My brain: You need to remake the hotel you start out in, it's not realistic enough.
Me: Ok... This was unexpected, but I can do it.
My brain: Now make each hotel floor 5 times as large to match the main part. Oh, you also need to make a bunch of new npcs to fill in the space on these maps.
Me: Crap.
Should be able to release Haxe MV/MZ next weekend.
It look that somehow MZ tracks are messed up (for example battle4 is obviously a theme, castle2 is a ship, ship1 is a scene and so on..). Maybe they just named them after with some ambiguity.

Forum statistics

Threads
100,618
Messages
977,837
Members
132,228
Latest member
zhengdddddd
Top