Guest gino Posted May 23, 2011 Share Posted May 23, 2011 (edited) gino hp&sp bars Descrizione Questo script modifica il Battle System Standard di RPG Maker XP, aggiungendo delle belle e leggerissime barre. C'è a chi piace, c'è a chi non piace. Autore gino Allegati Chi ha bisogno di una demo, non è degno di usare questo script. Istruzioni per l'uso Aggiungete questo script prima di MAIN e fine. Poi fa tutto da solo. #=============================================================================== # gino hp&sp Bars # #------------------------------------------------------------------------------- # Adds Bars for HP & SP #=============================================================================== #=============================================================================== # Window_Base #------------------------------------------------------------------------------- # Added three colors. Completely overrided draw_actor_hp & draw_actor_sp. #=============================================================================== class Window_Base < Window def transparent_color return Color.new(0, 0, 0, 0) end def hp_color #color for hp bar return Color.new(255, 75, 0) end def sp_color #color for sp bar return Color.new(0, 75, 255) end def draw_actor_hp(actor, x, y) #draws the hp bar o_size=self.contents.font.size self.contents.font.size=20 self.contents.font.bold=true perc=(actor.hp * 100)/actor.maxhp self.contents.fill_rect(x, y, 112, 22, normal_color) width = (perc * 110)/100 self.contents.fill_rect(x+1, y+1, 100, 20, transparent_color) self.contents.fill_rect(x+1, y+1, width, 20, hp_color) text = "HP " + actor.hp.to_s + "/" + actor.maxhp.to_s self.contents.draw_text(x+6, y-4, 104, 32, text) self.contents.font.size=o_size self.contents.font.bold=false end def draw_actor_sp(actor, x, y) #draws the sp bar o_size=self.contents.font.size self.contents.font.size=20 self.contents.font.bold=true perc=(actor.sp * 100)/actor.maxsp self.contents.fill_rect(x, y, 112, 22, normal_color) width = (perc * 110)/100 self.contents.fill_rect(x+1, y+1, 100, 20, transparent_color) self.contents.fill_rect(x+1, y+1, width, 20, sp_color) text = "MANA " + actor.sp.to_s + "/" + actor.maxsp.to_s self.contents.draw_text(x+6, y-4, 104, 32, text) self.contents.font.size=o_size self.contents.font.bold=false end end #=============================================================================== # Window_BattleStatus # #------------------------------------------------------------------------------- # Due to the loss of an argument in draw_actor_hp & draw_actor_sp methods, # refresh method needs to be redefined. #=============================================================================== class Window_BattleStatus < Window_Base def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size actor = $game_party.actors[i] actor_x = i * 160 + 4 draw_actor_name(actor, actor_x, 0) #removed WIDTH argument draw_actor_hp(actor, actor_x, 32) draw_actor_sp(actor, actor_x, 64) #@@ if @level_up_flags[i] self.contents.font.color = normal_color self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!") else draw_actor_state(actor, actor_x, 96) end end end end Bugs e Conflitti Noti Usatelo solo se volete modificare il BS standard aggiungendo le barre. Se volete altro esistono moltissimi script. Altri Dettagli Come ripeto sempre, di essere creditato non me ne frega nulla, e se qualcuno volesse fare il figo e spacciare questo script per suo, libero di farlo. Edited April 27, 2013 by Dilos Script monoriga sistemato. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now