ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,013
Reaction score
2,351
First Language
Dutch
Primarily Uses
RMMV
Hi community,

I'm looking for a plugin or as simply as possible or effective possible to change fonts
mid-game and not the entire game!

this need to target the gameMessage system only (and only temporaly) as it should
go to the default one after.

Now, I know about YEP_MessageCore plugin and YEP_LoadCustomFonts which I both own,
but while the MessageCore breaks my message system, I need a simple one to implement
into my current one as easy as possible.

while this plugin isnt going to public or not yet at least, I cannot really share the coding,
it is using ES5, as that is the one I know, but also a bit messy, but working.

if you know a very simple way of implimenting this (I dont mind if LoadCustomFonts) is required,
can be true scripcall, short code or plugin command.

I will tell, that the text editor input (is kinda broken as it doesn't draw the background), as scriptcall
of adding text works smoothly, so anything around this is really greatfull (which you get credits for),
if I can impliment it nicely.

I know there are alot of great coders, so if you need the code, I can DM you the plugin,
which you cannot share without permission or use it.

as I also know, it could be written in a better way, but I'm still learning.

Thanks in advance =)
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,013
Reaction score
2,351
First Language
Dutch
Primarily Uses
RMMV
Bumping topic, 3 hours early...

any working solution is welcome.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,013
Reaction score
2,351
First Language
Dutch
Primarily Uses
RMMV
still looking, as this is the final touch I need for it :)
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,013
Reaction score
2,351
First Language
Dutch
Primarily Uses
RMMV
noone?, even no snippet that could work?
 

SeaPhoenix

Veteran
Veteran
Joined
May 14, 2015
Messages
363
Reaction score
468
First Language
English
Primarily Uses
RMMV
If it were me, I'd modify the resetFontSettings function which can be found in Window_Base, but apply it specifically to Window_Message. For example:

JavaScript:
const _Window_Message_resetFontSettings = Window_Message.prototype.resetFontSettings;
Window_Message.prototype.resetFontSettings = function() {
  if ($gameSwitches.value(1)) {  // Whatever condition you want for when to switch fonts
    this.contents.fontFace = 'FontName';  // Change to your font's name
    this.contents.fontSize = this.standardFontSize();  // Can also change this if you want
    this.resetTextColor();
  } else {
    _Window_Message_resetFontSettings.call(this);
  }
};

You may have to use Yanfly's LoadCustomFonts to load the font. If you want this to apply to Window_ChoiceList as well you'll have to do the same thing for it.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
6,013
Reaction score
2,351
First Language
Dutch
Primarily Uses
RMMV
I have around 4 fonts to use, and reset is to default for the normal use.
so a small changeFont function with it's name would be more appreciated.

EDIT:
@SeaPhoenix as I overwrite the "resetFontSetting", what would be the
best way to "read" the event name and draw the event name by targetting?
as it is automatically to default if the target is NOT true.

otherwise, I can make the list longer with the variable value string "name"
that is bound to the image as well.

but I really want it shorter like

Windowmessage.newFont("name") to change the font or similair.

hardcoded way to mather much as long it works fine.
 
Last edited:

Latest Threads

Latest Profile Posts

My game has a (much needed) tutorial now...
Game Making Every Day #20:kaohi:

ScreenShot_8_14_2022_11_55_51.png
FINALLY added the comic bubble to the Title Screen...
I know I'll put one of my game's sprites here to give the illusion that I am a productive member of game society.
handelspriteanim.gif

Forum statistics

Threads
124,507
Messages
1,164,110
Members
163,333
Latest member
TheWarDon
Top