In-Game Font Changer
This is something I discovered while working on my project, Bloodstained Hands. It's a useful little bit of code that allows you to change the font in-game of battle options, the menu, and if you aren't using too many complicated scripts that change the font, it can also change the font of the text boxes too.
In order for this to work, however, you do need to alter the code of one script. In "Main" below Begin and Graphics.freeze just put these two lines:
Font.default_name = ["Font_Name"]
Font.default_size = 20
The Font name can be changed to whatever you want, and so can the font size, but you may want to keep to fonts that are common to all computers (Arial, Arial Black, Verdana, ect). You may also want to experiment with sizes to make sure there are no words cut off.
By the way, that code does not belong to me. I got it from a script by Woratana.
Now then, changing the font in-game!
You can do this anytime you want. Just create an event that looks like this:
@>Script: Font.default_name = ["Font_Name"]
@>Script: Font.default_size = Font_Size
(Where Font_Name is the name of the font you want to use and Font_Size is the size you want to use.)
Yes, the script is exactly the same as what was entered in Main. Yes, it can be used in-game. Yes, it is cool. You can use this for some pretty cool things, for example, an epic scene with the last boss of the game where the font for his voice is really big and creepy and the font for the main character is normal. Or you could create an item that calls a common event that sets game settings in which you could set the font (or if you have a special menu script, call it from there). The event system I use looks like this:
@>Show Choices: Verdana, Arial Black, Pristina
: When [Verdana]
@>Script: Font.default_name = ["Verdana"]
@>Script: Font.default_size = 20
@>Set Variable [0001:Font] = 1
@>
: When [Arial Black]
@>Script: Font.default_name = ["Arial Black"]
@>Script: Font.default_size = 23
@>Set Variable [0001:Font] = 2
@>
: When [Pristina]
@>Script: Font.default_name = ["Pristina"]
@>Script: Font.default_size = 30
@>Set Variable [0001:Font] = 3
@>
: Branch End
@>
Basically, what this does is show some choices as to what font you want to use, and sets the font to the one you selected. In addition, it sets the font size to fit in the window properly and it sets a variable to a number representing that font. The variable is used in a slightly different event that is necessary to make this event work properly. See, the problem with this system is that when the game is reset, so is the default font. So, once you reload your game, the font is back to normal. This can be fixed by using the following event:
@>Conditional Branch: Variable [0001:Font] == 1
@>Script: Font.default_name = ["Verdana"]
@>Script: Font.default_size = 20
: Else
@>Conditional Branch: Variable [0001:Font] == 2
@>Script: Font.default_name = ["Arial"]
@>Script: Font.default_size = 23
: Else
@>
: Branch End
@>
: Branch End
What this does is reads what number the Font variable is set to, and then sets the font to whatever font that number represents. This can be done for as many fonts as you want. The trick with this, however, is that it has to be running at all times in all maps. The easiest way to do this is to set is to a common event with a parallel process activated by a switch.
So that is the in-game font changer. Credit goes to Woratana for the code, you don't need to credit me for the system. Although you can if you want to and feel nice. Feedback is appreciated.
Thought I might just mention this now, although it can also be seen in the comments below, you must have all custom fonts included in the DL of your game.