RMMV YEP MessageCore Name Box Position strangeness

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
517
Reaction score
347
First Language
English
Primarily Uses
RMMV
Hey all, I've got a little problem with MessageCore's name boxes.

I have them set up so that they display like this:

1615152088215.png

This works fine if the text box is in the middle or bottom positions, but when I use the top position, they come out like this:

1615152049969.png

Has anyone ever seen this, and know why it's happening?
 

Jules98

Veteran
Veteran
Joined
Jul 10, 2017
Messages
335
Reaction score
219
First Language
Dutch
Primarily Uses
RMMV
I suspect that this is actually intended behaviour. The plugin inverts the Y offset of the name box to prevent it from going offscreen when the message box is positioned at the top of the screen, which is what would happen when you use the default name boxes.
 

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
517
Reaction score
347
First Language
English
Primarily Uses
RMMV
I suspect that this is actually intended behaviour. The plugin inverts the Y offset of the name box to prevent it from going offscreen when the message box is positioned at the top of the screen, which is what would happen when you use the default name boxes.
Ah I see; is there a straightforward way to modify the behaviour?

I can see how it'd be useful, but it's over-zealous - the positioning when in the top setting is very different to in the others. If I had more fine-tune control it'd be okay.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
670
Reaction score
354
First Language
English
Primarily Uses
RMMV
You appear to already have modified the code for the name box, because that's not the default appearance - you should find the positioning information in the same area, I'd think.

Or are you using another plugin to do that?
 

Jules98

Veteran
Veteran
Joined
Jul 10, 2017
Messages
335
Reaction score
219
First Language
Dutch
Primarily Uses
RMMV
Let me see...

Code:
Window_NameBox.prototype.adjustPositionY = function() {
    if ($gameMessage.positionType() === 0) {
      this.y = this._parentWindow.y + this._parentWindow.height;      
      this.y -= eval(Yanfly.Param.MSGNameBoxBufferY);                    
\\This tells the game to draw the name box below the message box if the message box is at the
\\top of the screen.

   } else {
      this.y = this._parentWindow.y;
      this.y -= this.height;
      this.y += eval(Yanfly.Param.MSGNameBoxBufferY);
    }
\\This draws the name box at the usual location.

    if (this.y < 0) {
      this.y = this._parentWindow.y + this._parentWindow.height;
      this.y -= eval(Yanfly.Param.MSGNameBoxBufferY);
    }
\\This also tells the game to draw the name box below the message box if the name box would go
\\offscreen for whatever reason. It's basically a failsafe.

};

With that in mind, this should be what you're looking for:

Code:
Window_NameBox.prototype.adjustPositionY = function() {

      this.y = this._parentWindow.y;
      this.y -= this.height;
      this.y += eval(Yanfly.Param.MSGNameBoxBufferY);
     
};

Save this as a .js file and place it under YEP_messageCore in the plugin manager. This should ensure that the name box is always drawn at your specified location.
 

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
517
Reaction score
347
First Language
English
Primarily Uses
RMMV
Thanks! I have one other issue too, in the same area.

1615156792445.png

An alternative I was exploring was to do this; but a problem here is that the Name Box element is enormous, even if I made the text smaller. I tried manually editing the script to see if I could make it smaller, but if I do this, it pushes the text off the bottom of the box.

What I ideally need is to make that box around a third of its existing height, then I can lower it slightly and it should hopefully work in all situations.

Is it possible in script to "align to top" when it comes to boxes? Or maybe to reduce the padding/margins on this one box?

You appear to already have modified the code for the name box, because that's not the default appearance - you should find the positioning information in the same area, I'd think.

Or are you using another plugin to do that?
Nope; I just modified the settings in MessageCore (you can turn off the box backdrop and adjust the text colour/size all within the plugin settings).

Edit: ok it's late here in the UK so I'll have to pick this up tomorrow, but if anyone knows how I can adjust that padding to make the name box window shorter, please let me know.
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
670
Reaction score
354
First Language
English
Primarily Uses
RMMV
Nope; I just modified the settings in MessageCore (you can turn off the box backdrop and adjust the text colour/size all within the plugin settings).
My bad, it's not in the documentation and I didn't look at the actual plugin parameters.
Edit: ok it's late here in the UK so I'll have to pick this up tomorrow, but if anyone knows how I can adjust that padding to make the name box window shorter, please let me know.
It's not just the Name Box Padding parameter?
 

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
517
Reaction score
347
First Language
English
Primarily Uses
RMMV
My bad, it's not in the documentation and I didn't look at the actual plugin parameters.

It's not just the Name Box Padding parameter?
Thanks for the suggestion! However when I try that, I just get this:

1615189432251.png

That's if I set the padding to zero and modify the script to make the box shorter, so there's a kind of vertical padding/margin, which isn't actually set in the script; it uses a global default.

I need the ability to change that global default for this window only, so I can centre that row of smaller text in that box.

EDIT: I've discovered this is because my WindowPadding is set to 18 in my YEP_CoreEngine; however I need to keep that so that it applies everywhere else. I just need to find a way to reduce it here.
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
670
Reaction score
354
First Language
English
Primarily Uses
RMMV
Search the plugin for reference to WindowPadding, and subtract/change it to whatever value you want. If I get the chance, I'll take a look.

Looks like line 1086 is defining the height of the name box, so try subtracting values from that, or returning a set value instead of the function call...see if that helps.
 

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
517
Reaction score
347
First Language
English
Primarily Uses
RMMV
Search the plugin for reference to WindowPadding, and subtract/change it to whatever value you want. If I get the chance, I'll take a look.

Looks like line 1086 is defining the height of the name box, so try subtracting values from that, or returning a set value instead of the function call...see if that helps.
I tried that; that's what gives the result in the image above.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
670
Reaction score
354
First Language
English
Primarily Uses
RMMV
Is it just the thickness of the border of your window skin?
 

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
517
Reaction score
347
First Language
English
Primarily Uses
RMMV
Is it just the thickness of the border of your window skin?

No, definitely not; they're like 3px thick, literally just the white borders you see in that image.

It's starting to look like I might have to go with this:

1615236528301.png

Which I'm not totally thrilled with; I wanted a really small, tight box around the character name, but I just can't figure out how to do it. I can't bake it into the text box image (I'm using Galv's message backdrops plugin) because I have some scenarios where the character image is on the right and I want the name on the left, or I use the top version of the text box so it needs to be underneath etc., so it needs to be dynamic.

If anyone knows how to do this - to definitely fix it so that I can make the namebox much smaller without it obscuring the text with the margins/padding/whatever, please let me know, because I've tried all sorts and I just can't figure it out.

To clarify, if I turn the box on, I get this...

1615236821144.png

As you can see, the name box padding is GIGANTIC and I want to be able to tone it down, but just for that one window, not for the rest of the windows in the game (NALE has tens of thousands of lines that have all been typeset; so I can't do anything which would require me to check through and make changes to the body of the game for the sake of a feature like this - I need a one-size-fits solution, and if I could just make that damn box smaller, I could come up with a new windowskin without the white borders and it'd look fantastic).

I'm aiming for...

1615237226815.png

Which doesn't look great, but I think I could improve it with a bit of work on the windowskin of the namebox.
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
670
Reaction score
354
First Language
English
Primarily Uses
RMMV
No, definitely not; they're like 3px thick, literally just the white borders you see in that image.
Graphically, perhaps, but the engine specifications for the border to be read from your windowskin file is 16 pixels. I don't know where it's defined, but you could figure out how to change that...I don't know if you'd be able to do it differently for the nameboxes, though, as I assume they use the same window-drawing function as everything else and the code might not know what it's drawing the window for.
 

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
517
Reaction score
347
First Language
English
Primarily Uses
RMMV
Graphically, perhaps, but the engine specifications for the border to be read from your windowskin file is 16 pixels. I don't know where it's defined, but you could figure out how to change that...I don't know if you'd be able to do it differently for the nameboxes, though, as I assume they use the same window-drawing function as everything else and the code might not know what it's drawing the window for.
Maybe. Then again I'm about an hour from abandoning nameboxes as just not worth all this grief. Every solution I try hits a snag, where it's sort-of working but not quite, and I'd rather not have the feature than have a janky version of it.

I'm not sure how other people use them? Do people accept having those GIGANTIC nameboxes onscreen? Or if they make custom window art like I've tried, do they just never use the "upper" position for the text box? It just seems to place a lot of demands on the work.

EDIT: Okay, I think I'm just going to have to stick with this:

1615240019001.png

... but before I wrap up tonight, I wanted to ask if anyone has ever solved this problem. If you use the "dim" window setting (or even the clear one, I presume) it still uses the name box like above:

1615240070680.png

Does anyone know how to get the namebox to respect the setting for the window, and use either a dim or clear backdrop?
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
670
Reaction score
354
First Language
English
Primarily Uses
RMMV
I can only speak for myself, but I run my game at 1280x720, so as a percentage of the screen real estate...the name boxes just aren't as gigantic and huge to my tastes as you keep saying.

Line 1064 in the plugin sets the opacity for the namebox. There are also the control codes in the documentation \nd for a dimmed name box and \nt for a transparent one - these don't do what you want?
 
Last edited:

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
517
Reaction score
347
First Language
English
Primarily Uses
RMMV
I can only speak for myself, but I run my game at 1280x720, so as a percentage of the screen real estate...the name boxes just aren't as gigantic and huge to my tastes as you keep saying.

Line 1064 in the plugin sets the opacity for the namebox. There are also the control codes in the documentation \nd for a dimmed name box and \nt for a transparent one - these don't do what you want?
Thanks for telling me about those control codes. I can't use those, but I might be able to look at them in the script file as a basis for changing it to be automated, i.e. dim windows always use the dim namebox setting and transparent windows always use the transparent setting.
 

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
517
Reaction score
347
First Language
English
Primarily Uses
RMMV
There are also the control codes in the documentation \nd for a dimmed name box and \nt for a transparent one - these don't do what you want?
Hmm; I might actually have an older version of this script - as I can't find this in the documentation. I'll have to check.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
670
Reaction score
354
First Language
English
Primarily Uses
RMMV
My mistake, those are introduced in the Extended Message Pack 1. You can still control the opacity manually using the line I referenced above.
 

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
517
Reaction score
347
First Language
English
Primarily Uses
RMMV
My mistake, those are introduced in the Extended Message Pack 1. You can still control the opacity manually using the line I referenced above.
Thanks! Knowing that, I was able to go into the Ext pack 1 and figure out how it was doing that, and bring that functionality into my version of MessageCore, so now the namebox always uses the same display style as the message box.
 

Latest Threads

Latest Profile Posts

not me baking a pie because i was inspired by celeste
Doing RPG Maker News for 10th April, 2021. :LZScheeze: (Improving on the thumbnails, by using assets from the day's news.)
Just discovering the forum.
Since Final Fantasy VII has been trending today, decided to make a series of my favorite bars in the OG game! Check it out:

At 2021, we are now farther from the 1980's than they were from the 1950's. Consider that the next time you long for a 1980's song, when you thought your grandpa's taste for 1950's music was "outdated".

Forum statistics

Threads
110,296
Messages
1,052,052
Members
143,324
Latest member
Armyrule94
Top