Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

how to change "would you like to save" font and color

I barely know scripting, but I do know that in scene_save and scene_load there are sections where you can change the message for saving and loading.  I'm wanting to change the color and font type to something else than what it already is, but I don't want all of the fonts in the game to be changed.
I've tried using:
    self.contents.font.name = "Caflisch Script Pro Regular"
    self.contents.font.color = Color.new(0,0,0,150)
This doesn't work at all.  I'm using the Mog Scene File script and SDK 2.3 if that matters.  I would greatly appreciate any help.
 

poccil

Sponsor

It's actually more complicated than it seems.  Find the following lines in the script section Scene_File.
Code:
    @help_window = Window_Help.new
    @help_window.set_text(@help_text)
Change them to the following:
Code:
    @help_window = Window_Help.new
    @help_window.contents.clear
    # Note that alternate fonts are specified in case Caflisch Script
    # doesn't exist, to ensure that the text is shown at all times.  
    # This is a best practice.
    @help_window.contents.font.name = ["Caflisch Script Pro Regular", 
       "Monotype Corsiva", "Times New Roman"]
    @help_window.contents.font.color = Color.new(0,0,0,150)
    @help_window.contents.draw_text(4, 0, @help_window.width - 40, 32, @help_text)
I hope this helps.

[This assumes the default scripts, rather than Mog Scene File script.  Please notify me if the solution does not work as expected.]
 

poccil

Sponsor

Add a line like the following before the "draw_text" line above (see the code in bold below for an example):
    @help_window.contents.font.name = ["Caflisch Script Pro Regular",
      "Monotype Corsiva", "Times New Roman"]
    @help_window.contents.font.color = Color.new(0,0,0,150)
    # change 30 below if necessary
    @help_window.contents.font.size=30

    @help_window.contents.draw_text(4, 0, @help_window.width - 40, 32, @help_text)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top