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.

Yet another hud request

I know there are like a million hud requests out there but if I could bother you scripters\eventers for a fairly basic hud I would worship you. Basicly what I want is this:

*A life bar - green gradient
*A magic bar - blue gradient
*An experience bar - yellow gradient
*First character in party's name at top of hud

Possibly:

*Hero's front graphic scaled down
*How much gold the party has
*Make the bars curve in a fancy way
*Map Name

I want this in the lower right corner of the map, as small as possible while still looking good, and formatable. As for a reference picture I will make one in a few minutes so just wait please, and thank you.

 
I don't think this may be difficult. I actually think you may need to create a window script that may show you this info on screen unless your hero changes to another scene like menu scene.

edit:
well, I wouldn't try to make the bars curve at all...
by the way, I don't think that scripter's worshipping may be the solution here ha ha ha ha

I may say now that a single Gold HUD window may not take more than 2 minutes to finish it...
 
let me check the list once again...

*A life bar - green gradient
*A magic bar - blue gradient
*An experience bar - yellow gradient
*First character in party's name at top of hud - DONE

Possibly:

*Hero's front graphic scaled down - DONE
*How much gold the party has - DONE
*Make the bars curve in a fancy way
*Map Name - I asked OS for a script that would display the map name and it was quite small actually. - DONE

Code:
class Scene_Menu
  alias_method :sm_main, :main
  def main
    @mapname_window = Window_MapName.new
    @mapname_window.y = 320
    @mapname_window.z = 104
    sm_main
    @mapname_window.dispose
  end
end

class Window_MapName < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, 'Lugar')
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_map.map_name, 2)
  end
end

class Game_Map
  attr_reader :map_name
  alias gm_setup :setup
  def setup(map_id)
    gm_setup(map_id)
    map_infos = load_data('Data/MapInfos.rxdata')
    @map_name = map_infos[@map_id].name
  end 
end
 
well, actually I already included some hp and sp (mp) bars in the HP GOLD & TIME HUD (this version is still unreleased). The only thing I may need to tell you is that I don't know how should I make them look more curvy...
 

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