RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RESOLVED]How would i change the color of text like "HP" in battle?

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 87
Master of Stepmania
I have a problem in-battle. I'm using the default battle system, (Yes, urgh! If there's the default battle system with battlers and a twist like hp bars or something, feel free to inform me!) and I have a problem because my character has a blue water glow around him, and that overlaps the HP and SP text since the font is blue! Can i change the color of the font?

Thanks in advance,
- David
« Last Edit: June 01, 2008, 11:07:01 AM by gameo »
Does 2+2 equal a peanut?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Yes, try adding this script right below Window_BattleStatus. This is untested, but it ought to work fine.

Code: [Select]
class Window_BattleStatus

  #--------------------------------------------------------------------------
  # * Draw HP
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : draw spot width
  #--------------------------------------------------------------------------
  def draw_actor_hp(actor, x, y, width = 144)
    # Draw "HP" text string
    #----------------------------------------------------------------------
    # EDITABLE:
    #    To set the new color, change around the numbers below after Color.new
    #    The format is Color.new (red, green, blue, opacity)
    #----------------------------------------------------------------------
    self.contents.font.color = Color.new (100, 100, 100, 255)
    self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
    # Calculate if there is draw space for MaxHP
    if width - 32 >= 108
      hp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      hp_x = x + width - 48
      flag = false
    end
    # Draw HP
    self.contents.font.color = actor.hp == 0 ? knockout_color :
      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
    self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
    # Draw MaxHP
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
      self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
    end
  end
end