#################################################################### # Window_HUD_VARS v2.0 # # By: SojaBird # Site: http://www.nestcast.blogspot.com # Discription: This little script creates a HUD wich can show up to 10 different variables simultaneously. # #################################################################### module SojaBird_WHV ############# # Start SETUP # ############# HUD_SWITCH = 1 # HUD¸¦ »ç¿ëÇÒÁö ¿©ºÎ¸¦ ½ºÀ§Ä¡ ¹øÈ£·Î Á¤ÇÔ. # #²À ½ºÀ§Ä¡¸¦ on ÇØÁÖ¼Å¾ß È­¸é¿¡ Ç¥½ÃµÊ. AMOUNT = 3 # Ç¥½ÃÇÒ ÁÙÀÇ ¼ö °°¾Æ¿ä. VAR_ID_1 = 2 # ³âµµ¿ùÀÏ Ç¥½Ã TEXT1 = " " VAR_ID_2 = 1 #½Ã°è Ç¥½Ã TEXT2 = " " VAR_ID_3 = 3 # ¿ùÈ­¼ö¸ñ±ÝÅäÀÏ À̸§ Ç¥½Ã TEXT3 = " " VAR_ID_4 = 10 #Áö³­ Àϼö TEXT4 = "ÀÏ°" VAR_ID_5 = 21 TEXT5 = " " VAR_ID_6 = 22 TEXT6 = " " VAR_ID_7 = 23 TEXT7 = " " VAR_ID_8 = 24 TEXT8 = " " VAR_ID_9 = 25 TEXT9 = " " VAR_ID_10 = 26 TEXT10 = " " FILE = "Window" # Name of windowstyle [Default "Window"] X_PLACEMENT = 1 # Left=1, Right=2 Y_PLACEMENT = 3 # Top=1, Middle=2, Bottom=3 WIDTH = 230 # Width of the hud ############ # End SETUP # ############ end class Window_HUD_VARS < Window_Base include SojaBird_WHV def initialize super(0, 0, WIDTH, 24*AMOUNT+32)#(0, 0, WIDTH, 24*AMOUNT+32) case X_PLACEMENT when 1 self.x = 0 when 2 self.x = 494#494 end case Y_PLACEMENT when 1 self.y = 0 when 2 self.y = 208-(24*AMOUNT+32)/2 when 3 self.y = 416-(24*AMOUNT+32) end self.windowskin = Cache.system(FILE) self.visible = $game_switches[HUD_SWITCH] refresh end def refresh contents.clear # get values @v1 = $game_variables[VAR_ID_1] @v2 = $game_variables[VAR_ID_2] @v3 = $game_variables[VAR_ID_3] @v4 = $game_variables[VAR_ID_4] @v5 = $game_variables[VAR_ID_5] @v6 = $game_variables[VAR_ID_6] @v7 = $game_variables[VAR_ID_7] @v8 = $game_variables[VAR_ID_8] @v9 = $game_variables[VAR_ID_9] @v10 = $game_variables[VAR_ID_10] # º¯¼ö°ª À§Ä¡ contents.draw_text(0, 0, contents.width - 0, WLH, @v1, 0) #À§Ä¡ Á¶Á¤¹ý contents.draw_text(0, 24, contents.width - 0, WLH, @v2, 2) #(0, 0, con....) Á¦ÀÏ ¾ÕÀÇ contents.draw_text(0, 0, contents.width - 0, WLH, @v3, 2) #¼ýÀÚ µÎ°³´Â HUD â¿¡¼­ contents.draw_text(35, 48, contents.width - 0, WLH, @v4, 1)#À§Ä¡ÇÒ xy, ¾Æ·¡ ±âÁØÀ» Áß½ÉÀ¸·Î Á¶Á¤ÇÑ´Ù. contents.draw_text(0, 96, contents.width - 0, WLH, @v5, 2) #(...@v1, 0) Á¦ÀÏ µÚÀÇ contents.draw_text(0, 120, contents.width - 0, WLH, @v6, 2)#¼ýÀÚ´Â HUDâ¿¡¼­ÀÇ ±âÁØ. contents.draw_text(0, 144, contents.width - 0, WLH, @v7, 2)#0Àº ¿ÞÂÊ, 1Àº Áß¾Ó, 2´Â ¿À¸¥ÂÊ contents.draw_text(0, 168, contents.width - 0, WLH, @v8, 2)#À¸·Î À§Ä¡µÊ contents.draw_text(0, 192, contents.width - 0, WLH, @v9, 2) contents.draw_text(0, 216, contents.width - 0, WLH, @v10, 2) # º¯¼ö À̸§ À§Ä¡ // contents.draw_text(0, 0, contents.width - 0, WLH, TEXT1, 0) contents.draw_text(0, 24, contents.width - 0, WLH, TEXT2, 0) contents.draw_text(0, 0, contents.width - 0, WLH, TEXT3, 0)# contents.draw_text(0, 48, contents.width - 0, WLH, TEXT4, 2) contents.draw_text(0, 96, contents.width - 0, WLH, TEXT5, 0) contents.draw_text(0, 120, contents.width - 0, WLH, TEXT6, 0) contents.draw_text(0, 144, contents.width - 0, WLH, TEXT7, 0) contents.draw_text(0, 168, contents.width - 0, WLH, TEXT8, 0) contents.draw_text(0, 192, contents.width - 0, WLH, TEXT9, 0) contents.draw_text(0, 216, contents.width - 0, WLH, TEXT10, 0) end def update self.visible = $game_switches[HUD_SWITCH] return if !self.visible if @v1 != $game_variables[VAR_ID_1] or @v2 != $game_variables[VAR_ID_2] or @v3 != $game_variables[VAR_ID_3] or @v4 != $game_variables[VAR_ID_4] or @v5 != $game_variables[VAR_ID_5] or @v6 != $game_variables[VAR_ID_6] or @v7 != $game_variables[VAR_ID_7] or @v8 != $game_variables[VAR_ID_8] or @v9 != $game_variables[VAR_ID_9] or @v10 != $game_variables[VAR_ID_10] refresh end end end #------------------------------------------------------------ # * Scene_Map: Attach HUD to map #------------------------------------------------------------ class Scene_Map < Scene_Base alias soja_scemap_sta_hudv start alias soja_scemap_ter_hudv terminate alias soja_scemap_upd_hudv update def start soja_scemap_sta_hudv @soj_hudv = Window_HUD_VARS.new end def terminate @soj_hudv.dispose soja_scemap_ter_hudv end def update soja_scemap_upd_hudv @soj_hudv.update end end