Exp bar in Window_MenuStatus
Version: 1.1
By: Teth
Introduction
This script show exp bar in Window_MenuStatus
*There was error made by me ^^ script is now ok*
Information
Version 1.1 - Percentage exp text made :)
Added demo
Screenshots

Demo
Argh... take it ^^ http://www.speedyshare.com/300862514.html
Script
Instructions
Just place it above main
Compatibility
This script overwrites Window_MenuStatus
Credits and Thanks
Thanks to Tavoeltav for request
Version: 1.1
By: Teth
Introduction
This script show exp bar in Window_MenuStatus
*There was error made by me ^^ script is now ok*
Information
Version 1.1 - Percentage exp text made :)
Added demo
Screenshots

Demo
Argh... take it ^^ http://www.speedyshare.com/300862514.html
Script
script
Spoiler
- #==============================================================================
- # â– Window_MenuStatus
- # Script made by Teth
- #==============================================================================
- class Window_MenuStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # * Object Initialization
- # x : window X coordinate
- # y : window Y coordinate
- #--------------------------------------------------------------------------
- def initialize(x, y)
- super(x, y, 384, 416)
- refresh
- self.active = false
- self.index = -1
- end
- #--------------------------------------------------------------------------
- # â— Refresh
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.members.size
- for actor in $game_party.members
- draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
- x = 104
- y = actor.index * 96 + WLH / 2
- draw_actor_name(actor, x, y)
- draw_actor_class(actor, x + 120, y - 13)
- draw_actor_level(actor, x, y + WLH * 1)
- draw_actor_state(actor, x, y + WLH * 2)
- draw_actor_hp(actor, x + 120, y + WLH * 1 - 13)
- draw_actor_mp(actor, x + 120, y + WLH * 2 - 13)
- draw_actor_expbar(actor, x + 120, y + WLH * 3 - 13)
- end
- end
- end
- #--------------------------------------------------------------------------
- # â— Update
- #--------------------------------------------------------------------------
- def update_cursor
- if @index < 0 # カーソルãªã—
- self.cursor_rect.empty
- elsif @index < @item_max # 通常
- self.cursor_rect.set(0, @index * 96, contents.width, 96)
- elsif @index >= 100 # 自分
- self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
- else # 全体
- self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
- end
- end
- #--------------------------------------------------------------------------
- # â— Actor expbar code
- #--------------------------------------------------------------------------
- def draw_actor_expbar(actor, x, y, width = 120)
- draw_actor_exp_gauge(actor, x, y)
- s1 = actor.exp_s - actor.current_lvl_exp
- s2 = actor.next_lvl_exp
- s3 = 100*s1/s2
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 40, Window_Base::WLH, 'Exp')
- self.contents.font.color = hp_color(actor)
- last_font_size = self.contents.font.size
- xr = x + width
- if width < 120
- self.contents.draw_text(xr - 44, y, 34, Window_Base::WLH, s3, 2)
- else
- self.contents.draw_text(xr - 89, y, 34, Window_Base::WLH, s3, 2)
- self.contents.font.color = normal_color
- self.contents.draw_text(xr - 55, y, 11, Window_Base::WLH, "%", 2)
- end
- end
- def draw_actor_exp_gauge(actor, x, y, width = 120)
- color_behind = Color.new(39, 58, 83, 255)
- exp_color = Color.new(0, 200, 0, 255)
- nextexp_color = Color.new(0, 100, 0, 255)
- s1 = actor.exp_s
- s2 = actor.current_lvl_exp
- level = actor.level
- if level != 99 #For avoid Fixnum bug
- s3 = s1-s2
- s4 = actor.next_lvl_exp
- self.contents.fill_rect(x, y + Window_Base::WLH - 8,width,6,color_behind)
- self.contents.gradient_fill_rect(x, y + Window_Base::WLH - 8,(width*s3)/s4,6,exp_color,nextexp_color)
- else
- self.contents.gradient_fill_rect(x, y + Window_Base::WLH - 8,width,6,exp_color,nextexp_color)
- end
- end
- #--------------------------------------------------------------------------
- # â— End of expbar code
- #--------------------------------------------------------------------------
- #==============================================================================
- # ** Game_Actor
- #------------------------------------------------------------------------------
- # This class handles actors. It's used within the Game_Actors class
- # ($game_actors) and referenced by the Game_Party class ($game_party).
- #==============================================================================
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- # â— Two needed defs ^^
- #--------------------------------------------------------------------------
- def current_lvl_exp
- return @exp_list[@level]
- end
- def next_lvl_exp
- return @exp_list[@level+1]-@exp_list[@level]
- end
- end
Expand to see the code.
Instructions
Just place it above main
Compatibility
This script overwrites Window_MenuStatus
Credits and Thanks
Thanks to Tavoeltav for request