I'd like to change the font in some dialogue boxes, is there an option to do so using an event or Script command, or will it require a plugin?
Possible to change font for a dialogue?
RPG Maker MZ Supportfont change text codes are not default, but included in most messaging type plugins.
Hello again!
Replace MyFont.ext with the filename of your font copied to the fonts folder with the extension:
Run this code by the "Scripts" event command.
Then to restore the default font run this command with the default font name:
Edit:
I have written a simple plugin that allows you to change the font of dialogs and numbers and also allows you to restore those defined in the database.
If you need me, let me know that I post a topic with the code.
Good luck!
Replace MyFont.ext with the filename of your font copied to the fonts folder with the extension:
JavaScript:
FontManager._urls["rmmz-mainfont"]="";
FontManager._states["rmmz-mainfont"]="";
FontManager.load("rmmz-mainfont","MyFont.ext");
Run this code by the "Scripts" event command.
Then to restore the default font run this command with the default font name:
JavaScript:
FontManager._urls["rmmz-mainfont"]="";
FontManager._states["rmmz-mainfont"]="";
FontManager.load("rmmz-mainfont",$dataSystem.advanced.mainFontFilename);
Edit:
I have written a simple plugin that allows you to change the font of dialogs and numbers and also allows you to restore those defined in the database.
If you need me, let me know that I post a topic with the code.
Good luck!
I have no idea what an .ext file is. I need help, lol.
ext is an abbreviation for extension, what RMMZ uses are TTF and WOFF:
Example:
Arial.ttf
References:
Example:
Arial.ttf
References:
Looks like VisuStella MZ Message Core has a relevant text code~
www.yanfly.moe
\FontChange<x> Changes font face to x font name.Message Core VisuStella MZ - Yanfly.moe Wiki
How exactly does it work? It's not a plugin command... is the font changed via the Script command?
It's a text code, used in Show Text (message window). I assume that's what you meant by "dialogue boxes"...? 😅
I think Dev_With_Coffee's suggestion (for use in a Script command) will simply replace the main game font with the specified one until you set it back, i.e. it will affect all windows that draw their text during that time. This might be OK depending on your use case.
I was surprised and sad to see that the requester does not know that files from any operating system use an extension to identify the format, for example:
I'm going to create the topic, but I'm not going to create a link here, just look in the Plugins View forum.
Good luck
- PNG Image -> Filename.png -> The graphics format used by most Rpg Makers
- Executable program for Windows -> Filename.exe -> Game Executable for Windows
- Dynamic-link library -> Filename.dll -> functions to make the system work on Windows
- Javascript -> Filename.js -> Rpg Maker Scripts or Plugins
- The HyperText Markup Language -> Filename.html -> Index.html to structure in game browser or via server (Itch.io, GameJolt or personal server)
I'm going to create the topic, but I'm not going to create a link here, just look in the Plugins View forum.
Good luck
I've had to reread that instruction like 10 times before it finally made sense. Now that it does, it doesn't seem like it was that confusing. But yeah, I got it working with that code, so thanks.
Original thread: https://forums.rpgmakerweb.com/threads/possible-to-change-font-for-a-dialogue.138229/