What I'm trying to do is have a character's name display in font A in the name box, and have their actual speech use font B in the text box below. Is this possible? I'm okay with using more plugins or code if needed, I just haven't been able to find an answer yet.
MV (Not solved) Separate fonts for name and text box in Yanfly's message core
Javascript/Plugin Supportsimple change the font by textcode at the beginning of the message
that text code is already part of the message core (fn - change font name)
that text code is already part of the message core (fn - change font name)
Of course, why didn't I think of that? Do you know if there's a way to automate this so I won't have to type it at the beginning of every single one?
is it always the same font?
if so, the modification would be quite easy to add.
on the message is a reset fontsetting, you can copy that one
to the namebox window, and alter the function and set the font face in
quotes to the one you want, this would be a hardcoded way, but always
the same font you set there automatically.
if so, the modification would be quite easy to add.
on the message is a reset fontsetting, you can copy that one
to the namebox window, and alter the function and set the font face in
quotes to the one you want, this would be a hardcoded way, but always
the same font you set there automatically.
It is always the same font yes.
I'm sorry, I don't really understand what you mean by that, I'm pretty new to the engine haha-- Since I use the code \n<character name> to set up nameboxes, do you mean I set the font before that with \fn<font.ttf> or something?
Also, I just ran into this problem while trying to figure out the font codes and stuff, that the namebox font is normal sized but the message font is hilariously tiny. Setting the Font Size parameter in YEP_MessageCore doesn't seem to change the message font size, but makes the namebox font bigger and it gets cut off at the bottom of the box, since it doesn't grow with the text. Does anyone know how I can make the message font appear larger?
the function inside the plugin itself
the function below is which font it takes here, so you can just
adjust the "standardFontFace" here, to return it like
this should fix the name box with the font you set.
you could do it as well in the resetFontSetting, but you need to add that function.
which I could help with it, but I think that function should be enough.
the function below is which font it takes here, so you can just
adjust the "standardFontFace" here, to return it like
JavaScript:
Window_NameBox.prototype.standardFontFace = function() {
//return $gameSystem.getMessageFontName();
return "FontName"; // do not use .ttf, .otf, but if it does throw an error, add it.
};
};
this should fix the name box with the font you set.
you could do it as well in the resetFontSetting, but you need to add that function.
which I could help with it, but I think that function should be enough.
Apologies for not understanding, but can you explain exactly how to use this? I'm very new and I don't have much experience at all with JS. Do you mean directly in the code of the plugin file, or something else? And if so, is this already in there and I just need to edit it, or do I need to add the whole thing?
Thanks again for your help anyhow!
(Also sorry for taking so long to respond, I've been a bit busy this week)
if you open YEP_MessageCore, you find this line.
I ruled out the default font and changed it to a new hardcoded font.
as it was coded, when you change font, so does the namebox font
to match the messagefont as well.
doing this only change the name box font and leave the rest alone.
however, putting this inside a new plugin and place right after
YEP_MessageCore overwrite his function, but the effect is the same 🙂
I ruled out the default font and changed it to a new hardcoded font.
as it was coded, when you change font, so does the namebox font
to match the messagefont as well.
doing this only change the name box font and leave the rest alone.
however, putting this inside a new plugin and place right after
YEP_MessageCore overwrite his function, but the effect is the same 🙂
EDIT: I've actually decided not to use nameboxes anymore (thought a bit more about the dialogue and decided just to use one character portrait on screen at a time, like Ace Attorney or In Stars and Time) so I don't need to fix this anymore. Thanks for your help!
Thanks for explaining!
They're now displaying in different fonts, which is definitely a step forward, but now I've run into a different problem and I would really appreciate if you were able to help me with it.
(Ignore my silly placeholder characters for a moment haha)
The message font is perfect, but the name font is displaying very small on the screen, and seems to have been replaced by a default font in the engine.
I tried basically the same thing you showed me for the font name, but a few lines below in font size, and tried changing it a bit:
I tried a few values, and 10 is the only one I tried that didn't make the name text vanish entirely. I tried 60 (because the font size parameter in the plugin is set to 28) and 1000 (just to see what would happen aha) and both made the words disappear.
Maybe I'm going in the total wrong direction (again, I don't actually know Javascript and have never made my own code for RPG Maker) but I figured this was my best bet.
Thanks for explaining!
They're now displaying in different fonts, which is definitely a step forward, but now I've run into a different problem and I would really appreciate if you were able to help me with it.
(Ignore my silly placeholder characters for a moment haha)
The message font is perfect, but the name font is displaying very small on the screen, and seems to have been replaced by a default font in the engine.
I tried basically the same thing you showed me for the font name, but a few lines below in font size, and tried changing it a bit:
JavaScript:
Window_NameBox.prototype.standardFontFace = function() {
//return $gameSystem.getMessageFontName();
return "WalterTurncoat-Regular"; // I tested with and without .ttf on the end, it gives the same result either way
};
Window_NameBox.prototype.standardFontSize = function() {
//return $gameSystem.getMessageFontSize();
return 10;
};
Maybe I'm going in the total wrong direction (again, I don't actually know Javascript and have never made my own code for RPG Maker) but I figured this was my best bet.
I got a question.
Is it possible make that line works with game variables?
cause i wanna add more than 2 or 3 custom fonts only for names.
it is, change the line to:
or if you want it safer:
than in game, N is your variable, if N is 120, if value of 120 = 1 or "Font Name" it will
change it to that font name.
be careful as number 120 makes "120" if you toString() but you can do it without it, just make
sure the name is in string and your good.
if can make it different like:
change GameFont to your font name, and ingame, change value to 0 (default), 1 or 2.
and let it work for you.
either way is fine, depends which way you are comfortable with.
$gameVariables.value(n);or if you want it safer:
$gameVariables.value(n).toString();than in game, N is your variable, if N is 120, if value of 120 = 1 or "Font Name" it will
change it to that font name.
be careful as number 120 makes "120" if you toString() but you can do it without it, just make
sure the name is in string and your good.
if can make it different like:
JavaScript:
Window_NameBox.prototype.standardFontFace = function() {
//return $gameSystem.getMessageFontName();
let fontName = $gameVariables.value(120); //=> change 120 to your ID
switch(fontName) {
case 1:
return "GameFont"; break;
case 2:
return "GameFont"; break;
case 0:
default:
return "GameFont"; break;
}
};
and let it work for you.
either way is fine, depends which way you are comfortable with.
@Anima7879YT, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/not-solved-separate-fonts-for-name-and-text-box-in-yanflys-message-core.175344/