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.

Font.default_shizzle

Alright, so adding in main these lines of script to influence the regular font, I was wondering if there's a way to make it possible to change font or size, or more specifically italic/bold/underlinedness in the message window itself. Can this be achieved by adding something simple in the script, or does that really require some sort of custom message thingy?
Seems like it could work like the \c code, which is a simple when "n" is replaced by a certain number, then display that. It could work with numbers as well (where eg 1 is for bold, 2 is for italic, 3 is for underlined, ...)
This would of course make the amount of text significantly smaller (seeing as I'm mainly wanting to use this to make character names a different colour and bold...)

Another thing I might want to ask is the possibility of enlarging the amount of colours in Window_Base.
Code:
#--------------------------------------------------------------------------
  # * Get Text Color
  #     n : text color number (0-8)
  #--------------------------------------------------------------------------
  def text_color(n)
    case n
    when 0
      return Color.new(72, 39, 6, 255)
    when 1
      return Color.new(0, 31, 217, 255)
    when 2
      return Color.new(13, 157, 2, 255)
    when 3
      return Color.new(123, 62, 0, 255)
    when 4
      return Color.new(217, 0, 0, 255)
    when 5
      return Color.new(255, 108, 0, 255)
    when 6
      return Color.new(174, 0, 200, 255)
    when 7
      return Color.new(0, 136, 118, 255)
    else
      normal_color
    end
  end

But say if I want to add an eigth colour? Why will

Code:
   when 8
      return Color.new(100, 39, 6, 200)

not work? Is the amount of possible colours set somewhere? I probably won't need this many colours, though, it's just something I was wondering about.
 
Take a look at one of the CMS scripts (Ccoa's, Dubealex'). They have extended the inline commands for messages to include Bold, Italic, etc....

For the color change, look at Window_Message, line 104

          if color >= 0 and color <= 7
            self.contents.font.color = text_color(color)
          end

You'll also need to change the '7' here to something higher, or the "text_color" method won't get called.

Be Well
 

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