ReinoRpg HUD (Ace)

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Bravo2Kilo, Apr 3, 2012.

  1. Bravo2Kilo

    Bravo2Kilo ᕦ(ò_óˇ)ᕤ Veteran

    Messages:
    48
    Likes Received:
    6
    Location:
    U.S.
    ReinoRpg Hud





    Author: LB

    Translation: Dartdaman

    Ported: Dartdaman

    Toggle Key: Kal

    This script was wrote by LB in RGSS2 in Portuguese. Some time ago i translated this script into English, now i have ported this script from RGSS2 to RGSS3. I have also made various edits to the script other than porting it from RGSS2 to RGSS3. Thanks to Kal for adding the toggle key to the script.

    Screenshot

    [​IMG]
    Script

    Code:
    [SIZE=14px]#================================================#[/SIZE]
    [SIZE=14px]# ¦ ReinoRPG HUD v0.6[/SIZE]
    [SIZE=14px]# Script: LB[/SIZE]
    [SIZE=14px]# Translated: Dartdaman[/SIZE]
    [SIZE=14px]# Toggle key: Kal[/SIZE]
    [SIZE=14px]#================================================#[/SIZE]
    [SIZE=14px]puts "HUD Loaded"[/SIZE]
    [SIZE=14px]module PR_RRPG_HUD[/SIZE]
    
    [SIZE=14px]#================================================#[/SIZE]
    [SIZE=14px]#============= General Settings ===============#[/SIZE]
    [SIZE=14px]#================================================#[/SIZE]
    [SIZE=14px]  # Post nil if you want to center on screen[/SIZE]
    [SIZE=14px]  # Place a minus sign in front of value to refer to the opposite side.[/SIZE]
    [SIZE=14px]  Position_X = nil[/SIZE]
    [SIZE=14px]  Position_Y = -8[/SIZE]
    [SIZE=14px]  Bottom_of_the_HUD = "Back.png"[/SIZE]
    [SIZE=14px]  Bar_HP = "HP.png"[/SIZE]
    [SIZE=14px]  Bar_MP = "MP.png"[/SIZE]
    
    [SIZE=14px]  Using_transparency_in_the_entrance = true # Makes the HUD fade when go under it[/SIZE]
    [SIZE=14px]  Using_transparency_in_the_exit = true # FadeOut to disappear in just[/SIZE]
    
    [SIZE=14px]  Speed = 3 # Speed to FadeIn/FadeOut[/SIZE]
    [SIZE=14px]  Final_Opacity = 255 # Final 0pacity of the HUD[/SIZE]
    [SIZE=14px]  Opacity_Final_Element = 255 # Opacity of the final elements of the HUD[/SIZE]
    [SIZE=14px]  Character_Opacity = 150 # Opacity if the character is under[/SIZE]
    [SIZE=14px]  Opacity_Character_Element = 160 # Opacity of the elements[/SIZE]
    
    [SIZE=14px]  Switch_Control = 1 # Switch that controls whether the HUD is active or not[/SIZE]
    [SIZE=14px]					 # HUD to be active ON and OFF to turn it off.[/SIZE]
    
    [SIZE=14px]  Number_Character = 1 # The number of character in order according to menu[/SIZE]
    
    [SIZE=14px]  HUD_Toggle_Show_Key = Input::L # Press this key to show/hide the HUD[/SIZE]
    [SIZE=14px]								 # L is the Q key on a keyboard.[/SIZE]
    [SIZE=14px]								 # Press F1 in a game to see what the default[/SIZE]
    [SIZE=14px]								 # key mappings are.[/SIZE]
    
    [SIZE=14px]#==============================================#[/SIZE]
    [SIZE=14px]#=============== HUD Elements ================#[/SIZE]
    [SIZE=14px]#==============================================#[/SIZE]
    
    [SIZE=14px]  # Set to true to display graphic charset (false to not display)[/SIZE]
    [SIZE=14px]  Char_Show = true[/SIZE]
    [SIZE=14px]  Char_X = 46[/SIZE]
    [SIZE=14px]  Char_Y = 66[/SIZE]
    
    [SIZE=14px]  # Set true to show the character's name (false to not display)[/SIZE]
    [SIZE=14px]  Name_Show = true[/SIZE]
    [SIZE=14px]  Name_Alignment = 1 # 0 = Left | 1 = Center | 2 = Right[/SIZE]
    [SIZE=14px]  Name_X = 92[/SIZE]
    [SIZE=14px]  Name_Y = 25[/SIZE]
    [SIZE=14px]  Name_Width = 134[/SIZE]
    [SIZE=14px]  Name_Color = Color.new(255,255,255)[/SIZE]
    [SIZE=14px]  Name_Font = nil # Font to use, write nil to use the default[/SIZE]
    [SIZE=14px]  Name_Size_of_Font = 17 # Size_of Font[/SIZE]
    
    [SIZE=14px]  # Set true to show the character's class (false to not display)[/SIZE]
    [SIZE=14px]  Class_Show = true[/SIZE]
    [SIZE=14px]  Class_Alignment = 0 # 0 = Left | 1 = Center | 2 = Right[/SIZE]
    [SIZE=14px]  Class_X = 229[/SIZE]
    [SIZE=14px]  Class_Y = 25[/SIZE]
    [SIZE=14px]  Class_Width = 60[/SIZE]
    [SIZE=14px]  Class_Color = Color.new(255,255,255)[/SIZE]
    [SIZE=14px]  Class_Font = nil # Font to use, write nil to use the default[/SIZE]
    [SIZE=14px]  Class_Size_of_Font = 16 # Size_of Font[/SIZE]
    
    [SIZE=14px]  # Set true to show the bar that represents the character's HP (false to not display)[/SIZE]
    [SIZE=14px]  HP_Show = true[/SIZE]
    [SIZE=14px]  HP_X = 92[/SIZE]
    [SIZE=14px]  HP_Y = 42[/SIZE]
    
    [SIZE=14px]  # Set true to show the bar that represents the character's MP (false to not display)[/SIZE]
    [SIZE=14px]  MP_Show = true[/SIZE]
    [SIZE=14px]  MP_X = 92[/SIZE]
    [SIZE=14px]  MP_Y = 59[/SIZE]
    
    [SIZE=14px]  # Set true to show the value of Current HP bar (false to not display)[/SIZE]
    [SIZE=14px]  Values_HP_Show_Current = false[/SIZE]
    [SIZE=14px]  # Set true to show the maximum value of the HP bar (false to not display)[/SIZE]
    [SIZE=14px]  Values_HP_Show_Total = false[/SIZE]
    [SIZE=14px]  Values_HP_Color = Color.new(255,255,255)[/SIZE]
    [SIZE=14px]  Values_HP_Font = nil # Font to use, write nil to use the default[/SIZE]
    [SIZE=14px]  Values_HP_Size_of_Font = 14 # Size_of Font[/SIZE]
    [SIZE=14px]  Values_HP_X = 92[/SIZE]
    [SIZE=14px]  Values_HP_Y = 38[/SIZE]
    
    [SIZE=14px]  # Set true to show the value of Current MP bar (false to not display)[/SIZE]
    [SIZE=14px]  Values_MP_Show_Current = false[/SIZE]
    [SIZE=14px]  # Set true to show the maximum value of the MP bar (false to not display)[/SIZE]
    [SIZE=14px]  Values_MP_Show_Total = false[/SIZE]
    [SIZE=14px]  Values_MP_Color = Color.new(255,255,255)[/SIZE]
    [SIZE=14px]  Values_MP_Font = nil # Font to use, write nil to use the default[/SIZE]
    [SIZE=14px]  Values_MP_Size_of_Font = 14 # Size_of Font[/SIZE]
    [SIZE=14px]  Values_MP_X = 92[/SIZE]
    [SIZE=14px]  Values_MP_Y = 55[/SIZE]
    
    [SIZE=14px]  # Set true to show the character's level (false to not display)[/SIZE]
    [SIZE=14px]  LV_Show = true[/SIZE]
    [SIZE=14px]  LV_Color = Color.new(255,255,255)[/SIZE]
    [SIZE=14px]  LV_Font = nil # Font to use, write nil to use the default[/SIZE]
    [SIZE=14px]  LV_Size_of_Font = 19 # Size_of Font[/SIZE]
    [SIZE=14px]  LV_Width = 30[/SIZE]
    [SIZE=14px]  LV_X = 241[/SIZE]
    [SIZE=14px]  LV_Y = 49[/SIZE]
    
    [SIZE=14px]  # Set true to show the character of money (false to not display)[/SIZE]
    [SIZE=14px]  Gold_Show = true[/SIZE]
    [SIZE=14px]  Gold_Color = Color.new(255,255,255)[/SIZE]
    [SIZE=14px]  Gold_Font = nil # Font to use, write nil to use the default[/SIZE]
    [SIZE=14px]  Gold_Size_of_Font = 18 # Size_of Font[/SIZE]
    [SIZE=14px]  Gold_X = 281[/SIZE]
    [SIZE=14px]  Gold_Y = 35[/SIZE]
    [SIZE=14px]  Gold_Width = 50[/SIZE]
    
    [SIZE=14px]  # Set true to show the suffix of play money (false to not display)[/SIZE]
    [SIZE=14px]  Text_Show = true[/SIZE]
    [SIZE=14px]  Text_Color = Color.new(255,255,255)[/SIZE]
    [SIZE=14px]  Text_Font = nil # Font to use, write nil to use the default[/SIZE]
    [SIZE=14px]  Text_Size_of_Font = 15 # Size_of Font[/SIZE]
    [SIZE=14px]  Text_X = 281[/SIZE]
    [SIZE=14px]  Text_Y = 50[/SIZE]
    [SIZE=14px]  Text_Width = 50[/SIZE]
    [SIZE=14px]  Text = "Gold" # Name of game currency[/SIZE]
    [SIZE=14px]end[/SIZE]
    [SIZE=14px]#===============================================#[/SIZE]
    [SIZE=14px]#============ End of Settings ================#[/SIZE]
    [SIZE=14px]#===============================================#[/SIZE]
    [SIZE=14px]#============ Top of Script ==================#[/SIZE]
    [SIZE=14px]#===============================================#[/SIZE]
    [SIZE=14px]module Cache[/SIZE]
    [SIZE=14px]  #--------------------------------------------------------------------------[/SIZE]
    [SIZE=14px]  # * Get HUD Graphic[/SIZE]
    [SIZE=14px]  # filename : Filename[/SIZE]
    [SIZE=14px]  #--------------------------------------------------------------------------[/SIZE]
    [SIZE=14px]  def self.hud(filename)[/SIZE]
    [SIZE=14px]	load_bitmap("Graphics/Hud/", filename)[/SIZE]
    [SIZE=14px]  end[/SIZE]
    [SIZE=14px]end[/SIZE]
    [SIZE=14px]class Scene_Map < Scene_Base[/SIZE]
    [SIZE=14px]  include PR_RRPG_HUD[/SIZE]
    
    [SIZE=14px]  alias hud_start start[/SIZE]
    [SIZE=14px]  alias hud_update update[/SIZE]
    [SIZE=14px]  alias hud_terminate terminate[/SIZE]
    
    [SIZE=14px]  def start[/SIZE]
    [SIZE=14px]	active_hud[/SIZE]
    [SIZE=14px]	hud_start[/SIZE]
    [SIZE=14px]  end[/SIZE]
    
    [SIZE=14px]  def active_hud[/SIZE]
    [SIZE=14px]	unless @hud_has_run_before[/SIZE]
    [SIZE=14px]	  $game_switches[Switch_Control] = true[/SIZE]
    [SIZE=14px]	  @hud_has_run_before = true[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	@animation_hud1 = Using_transparency_in_the_entrance[/SIZE]
    [SIZE=14px]	@animation_hud2 = Using_transparency_in_the_entrance[/SIZE]
    [SIZE=14px]	@animation_hud_1 = Using_transparency_in_the_exit[/SIZE]
    [SIZE=14px]	@animation_hud_2 = Using_transparency_in_the_exit[/SIZE]
    [SIZE=14px]	@back = Sprite.new[/SIZE]
    [SIZE=14px]	@back.bitmap = Cache.hud(Bottom_of_the_HUD)[/SIZE]
    [SIZE=14px]	@back.opacity = 0 if @animation_hud1 == true[/SIZE]
    [SIZE=14px]	x = Position_X[/SIZE]
    [SIZE=14px]	y = Position_Y[/SIZE]
    [SIZE=14px]	w = @back.width[/SIZE]
    [SIZE=14px]	h = @back.height[/SIZE]
    [SIZE=14px]	x = ( x == nil ? ( 544 - w ) / 2 : ( x < 0 ? ( 544 + x - w ) : x ) )[/SIZE]
    [SIZE=14px]	y = ( y == nil ? ( 416 - h ) / 2 : ( y < 0 ? ( 416 + y - h ) : y ) )[/SIZE]
    [SIZE=14px]	@back.x = x[/SIZE]
    [SIZE=14px]	@back.y = y[/SIZE]
    [SIZE=14px]	@back.z = 190[/SIZE]
    [SIZE=14px]	@wind = Window_Base.new(x-16,y-16,w+32,h+32)[/SIZE]
    [SIZE=14px]	@wind.opacity = 0[/SIZE]
    [SIZE=14px]	@wind.contents_opacity = 0 if @animation_hud2 == true[/SIZE]
    [SIZE=14px]	@wind.z = 195[/SIZE]
    [SIZE=14px]	@wind.contents.font.shadow = false[/SIZE]
    [SIZE=14px]	@id = Number_Character-1[/SIZE]
    [SIZE=14px]	@info = [][/SIZE]
    [SIZE=14px]	@hp = Sprite.new[/SIZE]
    [SIZE=14px]	@hp.bitmap = Bitmap.new(32,32)[/SIZE]
    [SIZE=14px]	@mp = Sprite.new[/SIZE]
    [SIZE=14px]	@mp.bitmap = Bitmap.new(32,32)[/SIZE]
    [SIZE=14px]	@hp.x = HP_X + x[/SIZE]
    [SIZE=14px]	@mp.x = MP_X + x[/SIZE]
    [SIZE=14px]	@hp.y = HP_Y + y[/SIZE]
    [SIZE=14px]	@mp.y = MP_Y + y[/SIZE]
    [SIZE=14px]	@hp.z = 192[/SIZE]
    [SIZE=14px]	@mp.z = 193[/SIZE]
    [SIZE=14px]	@hp.opacity = 0 if @animation_hud2 == true[/SIZE]
    [SIZE=14px]	@mp.opacity = 0 if @animation_hud2 == true[/SIZE]
    [SIZE=14px]	hud_real_update if status_update[/SIZE]
    [SIZE=14px]  end[/SIZE]
    
    [SIZE=14px]  def terminate[/SIZE]
    [SIZE=14px]	if @animation_hud_1 == true[/SIZE]
    [SIZE=14px]	  @back.bitmap.dispose[/SIZE]
    [SIZE=14px]	  @back.dispose[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if @animation_hud_2 == true[/SIZE]
    [SIZE=14px]	  @hp.bitmap.dispose[/SIZE]
    [SIZE=14px]	  @hp.dispose[/SIZE]
    [SIZE=14px]	  @mp.bitmap.dispose[/SIZE]
    [SIZE=14px]	  @mp.dispose[/SIZE]
    [SIZE=14px]	  @wind.contents.dispose[/SIZE]
    [SIZE=14px]	  @wind.dispose[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	hud_terminate[/SIZE]
    [SIZE=14px]  end[/SIZE]
    
    [SIZE=14px]  def update[/SIZE]
    [SIZE=14px]	if $game_switches[Switch_Control] == true and @hud_keyboard_switch[/SIZE]
    [SIZE=14px]	  if @back != nil[/SIZE]
    [SIZE=14px]		if @back.opacity < Final_Opacity and @animation_hud1 == true[/SIZE]
    [SIZE=14px]		  @back.opacity += Speed[/SIZE]
    [SIZE=14px]		else[/SIZE]
    [SIZE=14px]		  @back.opacity = Final_Opacity[/SIZE]
    [SIZE=14px]		  @animation_hud1 = false[/SIZE]
    [SIZE=14px]		end[/SIZE]
    [SIZE=14px]		if @wind.contents_opacity < Opacity_Final_Element and @animation_hud2 == true[/SIZE]
    [SIZE=14px]		  @wind.contents_opacity += Speed[/SIZE]
    [SIZE=14px]		  @hp.opacity += Speed[/SIZE]
    [SIZE=14px]		  @mp.opacity += Speed[/SIZE]
    [SIZE=14px]		else[/SIZE]
    [SIZE=14px]		  @wind.contents_opacity = Opacity_Final_Element[/SIZE]
    [SIZE=14px]		  @hp.opacity = Opacity_Final_Element[/SIZE]
    [SIZE=14px]		  @mp.opacity = Opacity_Final_Element[/SIZE]
    [SIZE=14px]		  @animation_hud2 = false[/SIZE]
    [SIZE=14px]		end[/SIZE]
    [SIZE=14px]	  else[/SIZE]
    [SIZE=14px]		active_hud[/SIZE]
    [SIZE=14px]	  end[/SIZE]
    [SIZE=14px]	else[/SIZE]
    [SIZE=14px]	  if @back != nil[/SIZE]
    [SIZE=14px]		if @back.opacity > Speed-1 and @animation_hud_1 == true[/SIZE]
    [SIZE=14px]		  @back.opacity -= Speed[/SIZE]
    [SIZE=14px]		else[/SIZE]
    [SIZE=14px]		  @back.bitmap.dispose[/SIZE]
    [SIZE=14px]		  @back.dispose[/SIZE]
    [SIZE=14px]		  @back = nil[/SIZE]
    [SIZE=14px]		  @animation_hud_1 = false[/SIZE]
    [SIZE=14px]		end[/SIZE]
    [SIZE=14px]		if @wind.contents_opacity > Speed-1 and @animation_hud_2 == true[/SIZE]
    [SIZE=14px]		  @wind.contents_opacity -= Speed[/SIZE]
    [SIZE=14px]		  @hp.opacity -= Speed[/SIZE]
    [SIZE=14px]		  @mp.opacity -= Speed[/SIZE]
    [SIZE=14px]		else[/SIZE]
    [SIZE=14px]		  if @animation_hud_2 == true[/SIZE]
    [SIZE=14px]			@hp.bitmap.dispose[/SIZE]
    [SIZE=14px]			@hp.dispose[/SIZE]
    [SIZE=14px]			@hp = nil[/SIZE]
    [SIZE=14px]			@mp.bitmap.dispose[/SIZE]
    [SIZE=14px]			@mp.dispose[/SIZE]
    [SIZE=14px]			@mp = nil[/SIZE]
    [SIZE=14px]			@wind.contents.dispose[/SIZE]
    [SIZE=14px]			@wind.dispose[/SIZE]
    [SIZE=14px]			@wind = nil[/SIZE]
    [SIZE=14px]			@animation_hud_2 = false[/SIZE]
    [SIZE=14px]		  end[/SIZE]
    [SIZE=14px]		end[/SIZE]
    [SIZE=14px]	  end[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if @back != nil[/SIZE]
    [SIZE=14px]	  if $game_player.screen_x >= @back.x and $game_player.screen_x <= @back.x + @back.width and[/SIZE]
    [SIZE=14px]		 $game_player.screen_y >= @back.y and $game_player.screen_y <= @back.y + @back.height[/SIZE]
    [SIZE=14px]		@back.opacity = Character_Opacity[/SIZE]
    [SIZE=14px]		@hp.opacity = Opacity_Character_Element[/SIZE]
    [SIZE=14px]		@mp.opacity = Opacity_Character_Element[/SIZE]
    [SIZE=14px]		@wind.contents_opacity = Opacity_Character_Element[/SIZE]
    [SIZE=14px]	  end[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	real_update if status_update[/SIZE]
    [SIZE=14px]	hud_check_key_toggle[/SIZE]
    [SIZE=14px]	hud_update[/SIZE]
    [SIZE=14px]  end[/SIZE]
    
    [SIZE=14px]  def hud_real_update[/SIZE]
    [SIZE=14px]	a = $game_party.members[@id][/SIZE]
    [SIZE=14px]	@wind.contents.clear[/SIZE]
    [SIZE=14px]	@wind.draw_character(a.character_name, a.character_index, Char_X, Char_Y) if Char_Show[/SIZE]
    [SIZE=14px]	if Name_Show[/SIZE]
    [SIZE=14px]	  @wind.contents.font.name = Name_Font if Name_Font != nil[/SIZE]
    [SIZE=14px]	  @wind.contents.font.color = Name_Color[/SIZE]
    [SIZE=14px]	  @wind.contents.font.size = Name_Size_of_Font[/SIZE]
    [SIZE=14px]	  @wind.contents.draw_text(Name_X, Name_Y, Name_Width, Name_Size_of_Font, a.name, Name_Alignment)[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if Class_Show[/SIZE]
    [SIZE=14px]	  @wind.contents.font.name = Class_Font if Class_Font != nil[/SIZE]
    [SIZE=14px]	  @wind.contents.font.color = Class_Color[/SIZE]
    [SIZE=14px]	  @wind.contents.font.size = Class_Size_of_Font[/SIZE]
    [SIZE=14px]	  @wind.contents.draw_text(Class_X, Class_Y, Class_Width, Class_Size_of_Font, a.class.name, Class_Alignment)[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if HP_Show[/SIZE]
    [SIZE=14px]	  @hp.bitmap.dispose[/SIZE]
    [SIZE=14px]	  @hp.bitmap = Cache.hud(Bar_HP)[/SIZE]
    [SIZE=14px]	  @hp.bitmap.clear_rect(Rect.new((@hp.width*a.hp/a.mhp),0,@hp.width,@hp.height))[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if MP_Show[/SIZE]
    [SIZE=14px]	  @mp.bitmap.dispose[/SIZE]
    [SIZE=14px]	  @mp.bitmap = Cache.hud(Bar_MP)[/SIZE]
    [SIZE=14px]	  @mp.bitmap.clear_rect(Rect.new((@mp.width*a.mp/a.mmp),0,@mp.width,@mp.height))[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if Values_HP_Show_Current[/SIZE]
    [SIZE=14px]	  text = a.hp.to_s[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if Values_HP_Show_Total[/SIZE]
    [SIZE=14px]	  text = a.mhp.to_s[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if Values_HP_Show_Current and Values_HP_Show_Total[/SIZE]
    [SIZE=14px]	  text = a.hp.to_s + "/" + a.mhp.to_s[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if text != nil[/SIZE]
    [SIZE=14px]	  @wind.contents.font.name = Values_HP_Font if Values_HP_Font != nil[/SIZE]
    [SIZE=14px]	  @wind.contents.font.color = Values_HP_Color[/SIZE]
    [SIZE=14px]	  @wind.contents.font.size = Values_HP_Size_of_Font[/SIZE]
    [SIZE=14px]	  @wind.contents.draw_text(Values_HP_X, Values_HP_Y, @hp.width, Values_HP_Size_of_Font, text, 2)[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	text = nil[/SIZE]
    [SIZE=14px]	if Values_MP_Show_Current[/SIZE]
    [SIZE=14px]	  text = a.mp.to_s[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if Values_MP_Show_Total[/SIZE]
    [SIZE=14px]	  text = a.mmp.to_s[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if Values_MP_Show_Current and Values_MP_Show_Total[/SIZE]
    [SIZE=14px]	  text = a.mp.to_s + "/" + a.mmp.to_s[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if text != nil[/SIZE]
    [SIZE=14px]	  @wind.contents.font.name = Values_MP_Font if Values_MP_Font != nil[/SIZE]
    [SIZE=14px]	  @wind.contents.font.color = Values_MP_Color[/SIZE]
    [SIZE=14px]	  @wind.contents.font.size = Values_MP_Size_of_Font[/SIZE]
    [SIZE=14px]	  @wind.contents.draw_text(Values_MP_X, Values_MP_Y, @hp.width, Values_MP_Size_of_Font, text, 2)[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if LV_Show[/SIZE]
    [SIZE=14px]	  @wind.contents.font.name = LV_Font if LV_Font != nil[/SIZE]
    [SIZE=14px]	  @wind.contents.font.color = LV_Color[/SIZE]
    [SIZE=14px]	  @wind.contents.font.size = LV_Size_of_Font[/SIZE]
    [SIZE=14px]	  @wind.contents.draw_text(LV_X, LV_Y, LV_Width, LV_Size_of_Font, a.level, 1)[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if Gold_Show[/SIZE]
    [SIZE=14px]	  @wind.contents.font.name = Gold_Font if Gold_Font != nil[/SIZE]
    [SIZE=14px]	  @wind.contents.font.color = Gold_Color[/SIZE]
    [SIZE=14px]	  @wind.contents.font.size = Gold_Size_of_Font[/SIZE]
    [SIZE=14px]	  @wind.contents.draw_text(Gold_X, Gold_Y, Gold_Width, Gold_Size_of_Font, $game_party.gold, 1)[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]	if Text_Show[/SIZE]
    [SIZE=14px]	  @wind.contents.font.name = Text_Font if Text_Font != nil[/SIZE]
    [SIZE=14px]	  @wind.contents.font.color = Text_Color[/SIZE]
    [SIZE=14px]	  @wind.contents.font.size = Text_Size_of_Font[/SIZE]
    [SIZE=14px]	  @wind.contents.draw_text(Text_X, Text_Y, Text_Width, Text_Size_of_Font, Text, 1)[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]  end[/SIZE]
    
    [SIZE=14px]  def status_update[/SIZE]
    [SIZE=14px]	return false if @wind == nil[/SIZE]
    [SIZE=14px]	a = $game_party.members[@id][/SIZE]
    [SIZE=14px]	return update_infos if a.id != @info[0][/SIZE]
    [SIZE=14px]	return update_infos if a.character_name != @info[1][/SIZE]
    [SIZE=14px]	return update_infos if a.character_index != @info[2][/SIZE]
    [SIZE=14px]	return update_infos if a.name != @info[3][/SIZE]
    [SIZE=14px]	return update_infos if a.class_id != @info[4][/SIZE]
    [SIZE=14px]	return update_infos if a.class.name != @info[5][/SIZE]
    [SIZE=14px]	return update_infos if a.hp != @info[6][/SIZE]
    [SIZE=14px]	return update_infos if a.mhp != @info[7][/SIZE]
    [SIZE=14px]	return update_infos if a.mp != @info[8][/SIZE]
    [SIZE=14px]	return update_infos if a.mmp != @info[9][/SIZE]
    [SIZE=14px]	return update_infos if a.level != @info[10][/SIZE]
    [SIZE=14px]	return update_infos if $game_party.gold != @info[11][/SIZE]
    [SIZE=14px]	return false[/SIZE]
    [SIZE=14px]  end[/SIZE]
    
    [SIZE=14px]  def update_infos[/SIZE]
    [SIZE=14px]	a = $game_party.members[@id][/SIZE]
    [SIZE=14px]	@info[0] = a.id[/SIZE]
    [SIZE=14px]	@info[1] = a.character_name[/SIZE]
    [SIZE=14px]	@info[2] = a.character_index[/SIZE]
    [SIZE=14px]	@info[3] = a.name[/SIZE]
    [SIZE=14px]	@info[4] = a.class_id[/SIZE]
    [SIZE=14px]	@info[5] = a.class.name[/SIZE]
    [SIZE=14px]	@info[6] = a.hp[/SIZE]
    [SIZE=14px]	@info[7] = a.mhp[/SIZE]
    [SIZE=14px]	@info[8] = a.mp[/SIZE]
    [SIZE=14px]	@info[9] = a.mmp[/SIZE]
    [SIZE=14px]	@info[10] = a.level[/SIZE]
    [SIZE=14px]	@info[11] = $game_party.gold[/SIZE]
    [SIZE=14px]	return true[/SIZE]
    [SIZE=14px]  end[/SIZE]
    [SIZE=14px]  def hud_check_key_toggle[/SIZE]
    [SIZE=14px]	@hud_keyboard_switch = true if @hud_keyboard_switch.nil?[/SIZE]
    [SIZE=14px]	if Input.trigger?(HUD_Toggle_Show_Key)[/SIZE]
    [SIZE=14px]	  @hud_keyboard_switch = !@hud_keyboard_switch[/SIZE]
    [SIZE=14px]	end[/SIZE]
    [SIZE=14px]  end[/SIZE]
    
    [SIZE=14px]end[/SIZE]
    If you want the hud, hp, and mp graphic

    [​IMG][​IMG][​IMG]
    Terms of Use:

    Give credit

    no use in commercial game
     
    Last edited by a moderator: Apr 3, 2012
    #1
  2. Mr. Bubble

    Mr. Bubble Makes stuff. Member

    Messages:
    853
    Likes Received:
    163
    Location:
    Portland, Oregon
    Please provide LB's terms of use if they exist.
     
    #2
  3. Bravo2Kilo

    Bravo2Kilo ᕦ(ò_óˇ)ᕤ Veteran

    Messages:
    48
    Likes Received:
    6
    Location:
    U.S.
    #3
  4. Retro21

    Retro21 Villager Member

    Messages:
    15
    Likes Received:
    0
    First Language:
    English
    Script gives an error when the player loses HP.
     
    #4
  5. xmclxjuggalo

    xmclxjuggalo Villager Member

    Messages:
    7
    Likes Received:
    0
    First Language:
    english
    hello script runs beautifully, when damage is accumulated in battle. but when character gets hurt by an event, example= spikes on floor.

    i get this error.

    script " line273: NameError occurred.undefined local variable or method `real_update' for#<Scene_Map:0x90843b>i put the script on the bottom, right above the last script titled main.

    any help would be apprecaited i really like this hud and would love to use it
     
    #5
  6. -LB-

    -LB- Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    Portuguese
    Hi.

    Just go to line 273 and change it from

    real_update if status_updateto

    Code:
    hud_real_update if status_update
     
    #6
  7. Pugh95Bear

    Pugh95Bear Veteran Veteran

    Messages:
    191
    Likes Received:
    11
    Location:
    Alabama
    First Language:
    English
    Okay, I don't know if this is just me being stupid, but I can't seem to do anything with it. I keep clicking the widgets, but nothing is happening EXCEPT something that isn't supposed; the name of the creator and the version number keep moving around the screen. What am I doing wrong? I love the idea of this HUD generator, but I have no idea why I can't get it to work...
     
    #7

Share This Page