Resolution + Font + Window issues

Good morning / afternoon / evening

I'm using a custom resolution: 1104 x 624 and the problems are piling up.


20.11.2023_12.32.25_REC.png

20.11.2023_12.32.39_REC.png


How do I make it so it will always only show current MP in the battle status window, thereby fixing this problem?

also

There is a problem where the font automatically resizes when it feels it won't fit... is there a way to disable this completely?

20.11.2023_10.41.34_REC.png



Any help is appeciated.
I'm using a custom resolution: 1104 x 624 and the problems are piling up.
Just as a note, you're talking about your game's window size. Resolution is the size of a user's display area.

Both of your questions have to do with your UI elements taking up a different proportion of the available space than the game planned on.

I'd suggest the better route is to tweak the placement of them so they all look the way you want, rather than actually changing basic display functions that may affect other parts of the game you haven't considered.

Also, when asking about the UI, it would make sense for you to give screenshots and describe what part of the game you're talking about, rather than cropped screenshots so we're guessing. I'm guessing your max MP question is on the battle status window.

How do I make it so it will always only show current MP, thereby fixing this problem?
Put this in a text file, save as a *.js, include as a plugin.
Code:
Window_BattleStatus.prototype.drawCurrentAndMax = function(current, max, x, y,
                                                   width, color1, color2) {
    var labelWidth = this.textWidth('HP');
    var valueWidth = this.textWidth('0000');
    var x1 = x + width - valueWidth;
    this.changeTextColor(color1);
    this.drawText(current, x1, y, valueWidth, 'right');
};

There is a problem where the font automatically resizes when it feels it won't fit... is there a way to disable this completely?
I strongly recommend against that. If you're seeing that happen, it's because whatever is being drawn would overlap with the element next to it.

I don't understand how having things overlap could possibly look better than compressing the text.

You can resize the area, move things, put less space in between things...but that's like saying "The seatbelts hurt my shoulder when I crash my car into trees, can we cut out the seatbelts?" when the obvious solution is to not crash into trees.
Just as a note, you're talking about your game's window size. Resolution is the size of a user's display area.

Both of your questions have to do with your UI elements taking up a different proportion of the available space than the game planned on.

I'd suggest the better route is to tweak the placement of them so they all look the way you want, rather than actually changing basic display functions that may affect other parts of the game you haven't considered.

Also, when asking about the UI, it would make sense for you to give screenshots and describe what part of the game you're talking about, rather than cropped screenshots so we're guessing. I'm guessing your max MP question is on the battle status window.


Put this in a text file, save as a *.js, include as a plugin.
Code:
Window_BattleStatus.prototype.drawCurrentAndMax = function(current, max, x, y,
                                                   width, color1, color2) {
    var labelWidth = this.textWidth('HP');
    var valueWidth = this.textWidth('0000');
    var x1 = x + width - valueWidth;
    this.changeTextColor(color1);
    this.drawText(current, x1, y, valueWidth, 'right');
};


I strongly recommend against that. If you're seeing that happen, it's because whatever is being drawn would overlap with the element next to it.

I don't understand how having things overlap could possibly look better than compressing the text.

You can resize the area, move things, put less space in between things...but that's like saying "The seatbelts hurt my shoulder when I crash my car into trees, can we cut out the seatbelts?" when the obvious solution is to not crash into trees.

I tried the plugin, but now it's doing the same to HP. I want it to only apply to MP. I am using the Yanfly Core Engine... I disabled your plugin, the HP went back to normal showing the current max with my custom resolution, but when I activated your plugin combined with this one. The HP was affected to... what do I need to change?
the HP went back to normal showing the current max with my custom resolution
Just as a note, you're talking about your game's window size. Resolution is the size of a user's display area.

I tried the plugin, but now it's doing the same to HP. I want it to only apply to MP.
Replace what I gave you before with this:
Code:
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);
    
    var labelWidth = this.textWidth('HP');
    var valueWidth = this.textWidth('0000');
    var x1 = x + width - valueWidth;
    this.changeTextColor(this.mpColor(actor));
    this.drawText(actor.mp, x1, y, valueWidth, 'right');
};
Thank you so much for this. If any problem arises I'll let you know!

Original thread: https://forums.rpgmakerweb.com/threads/resolution-font-window-issues.163101/