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.

Default Text Color

HoRe

Member

Hey all. I know this is a terrible noob question, but I am desperately trying to change my default text color to black. I have messed around with the script in window_base, but while it changes the text color in, say, the title screen and the battle screen, but it remains white in the text boxes. Help, please. :-/
 

khmp

Sponsor

Message boxes use the default colour defined inside Window_Base. I know it sounds kind of tiresome but message boxes also use a code to change the colour of the text "\c[n]", where n is the number of the color it accept 0-7 I think by default but you can add to this by altering a method inside Window_Base. However if you want to permanently change this colour. Insert this script right above Main in the script listings.

Code:
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Get Normal Text Color !OVERRIDE!
  #--------------------------------------------------------------------------
  def normal_color
    return Color.new(0, 0, 0, 255)
  end
end

If you are unclear on installation refer to the RGSS FAQ. Just so you know that will effectively override the normal color used in the menus and message boxes. If you want to get rid of the black text at any point during your game's development, just delete this script.

Good luck with it HoRe! :thumb:
 

HoRe

Member

Hey khmp, the script seems to work... part of the time... For instance, when I go into a battle, the stats and names of the characters will be black, but the HP and SP will be white!! And things like text boxes or items from the equip menu are still in white! It's kinda driving me bonkers. I can change the color of my windowskin, but that isn't gonna help in the equip menu. Anyone have ideas?
 

khmp

Sponsor

Only things that use that use normal_color will be black. Some other drawing elements use other colors like critical_color, system_color etc. The next big color to override would be system color though. That's the light blue color that HP/SP/etc. draw in. And to override that color just overwrite that little blurb of code I gave before with this piece.

Code:
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Get Normal Text Color !OVERRIDE!
  #--------------------------------------------------------------------------
  def normal_color
    return Color.new(0, 0, 0, 255)
  end
  #--------------------------------------------------------------------------
  # * Get System Text Color !OVERRIDE!
  #--------------------------------------------------------------------------
  def system_color
    return Color.new(0, 0, 0, 255)
  end
end

If you want system_color to be any other color just play around with the zeros inside that Color initialization. The last value is the alpha and you should probably keep that pretty high. 255 is the max though.

Good luck with it HoRe! :thumb: When I read that aloud it sounds like I'm insulting you.  :lol:
 

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