New problem: How to draw exp as a percent in a window?

Started by Zephor, November 08, 2011, 04:21:57 pm

Previous topic - Next topic

Zephor

The problem in the spoiler was fixed by editing the actual window_base. My new problem is instead of using 10/900 for exp as an example, to use a percent. Such as 34.92% or something. Can't figure out how this would be done in a script though.

Spoiler: ShowHide
I've been fiddling with it for the past hour trying to figure out how to get numbered experience (0/26 for example) under the bar instead of to the side.

I don't know if posting just the code is enough for someone to figure it out, but here (it's a bit of a mess because I'm doing an edit on MOG's menu as well):

#==============================================================================
# ** MOG Scene Menu Itigo V1.5
#     By Moghunter  
#     http://www.atelier-rgss.com
#------------------------------------------------------------------------------
# ** Reinvisioned version
#    
#    This variant has retooled the MOG module by adding more configurables for
#    the user.  No longer are the graphics hardwired into the code but are now
#    able to be altered in the revised configuration serction.
#
#    Also, certain classes have been renamed  back to their original versions.
#    As such...  classes such as Window_Gold2 and Window_MenuStatus2 have been
#    renamed back to Window_Gold and Window_MenuStatus. This change within the
#    script also allowed for the deletion of unnecessary and redundant methods
#    within the script:
#
#    Classes and methods renamed:
#    * Window_MenuStatus2
#    * Window_Gold2    
#    * Window_PlayTime2
#    * Window_Steps2    
#    * draw_actor_state2 (in the Window_Base class)
#
#    Methods deleted from the original system:
#    * refresh    (Window_Gold)
#    * update     (Window_Playtime)
#    * initialize (Scene_Menu)
#==============================================================================

# Gauge Border Colors
  COG_COLOR1 = Color.new(0, 0, 0, 192)         # Outer Border
  COG_COLOR2 = Color.new(255, 255, 192, 192)   # Inner Border
# Gauge Empty filler
  COG_COLOR3 = Color.new(0, 0, 0, 192)         # Half of Inner Shading
  COG_COLOR4 = Color.new(64, 0, 0, 192)        # Half of Inner Shading
# Alignment
  COG_ALIGN1 = 1    # Type 1: (0: Left / 1: Center / 2: Right Justify)
  COG_ALIGN2 = 2    # Type 2: (0: Upper / 1: Central / 2: Lower)
  COG_ALIGN3 = 0    # FILL ALIGNMENT (0: Left Justify / 1: Right Justify)
# Gauge Settings
  COG_GRADE1 = 1    # EMPTY  gauge (0: Side / 1: Vertical / 2: Slanted)
  COG_GRADE2 = 0    # FILLER gauge (0: Side / 1: Vertical / 2: Slanted)

module MOG

 # BASIC MENU CONFIGURATION
   # Main Menu Graphics Used
     MAIN_LAYOUT       = "Layout-Menu"     # Main Menu Graphics
     MAIN_BACKGROUND   = "Back-Menu"       # Animated background graphic
     MAIN_CURSOR       = "MogCursor"       # Animated cursor graphic
     MAIN_CURSOR_FX    = false             # Animated cursor fx on/off switch
     SECOND_CURSOR     = "MogCursor_2"     # Animated secondary cursor graphic
     SECOND_CURSOR_FX  = false             # Animated second cursor fx
     FACE_SMALL        = "_Fs"             # Suffix for face graphics (small)
     MAIN_MAPNAME      = true              # If true, shows the map name
   # Menu
     MAIN_FX           = 0                 # Back FX (0=Moving/ 1=Still/ 2=Map)
     MAIN_TRAN_TIME    = 20                # Transition Time.
     MAIN_TRAN_TYPE    = "006-Stripe02"    # Transition Type (Name)
   # Font Used
     MAIN_FONT         = "Georgia"         # Font used in Main Menu
 
 # MENU GAUGE GRAPHICS
   # Empty Bars
     MAIN_BAR_E        = "BAR0"            # Blank bar
     MAIN_BAR_XP_E     = "Exp_Back"        # Blank bar for EXP
   # Fill Bars
     MAIN_BAR_HP       = "HP_Bar"          # Fill bar for HP
     MAIN_BAR_SP       = "SP_Bar"          # Fill bar for SP
     MAIN_BAR_XP       = "Exp_Meter"       # Fill bar for EXP
   # Gauge Texts
     MAIN_TEXT_HP      = "HP_Tx"           # Text graphic for HP
     MAIN_TEXT_SP      = "SP_Tx"           # Text graphic for SP
     MAIN_TEXT_XP      = "Exp_tx"          # Text graphic for EXP
     MAIN_TEXT_LV      = "LV_tx"           # Text graphic for Level
 
end

# Mogscript global
$mogscript = {} if $mogscript == nil
$mogscript["menu_itigo"] = true


#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
 def now_exp
 #--------------------------------------------------------------------------
 # * Get EXP
 #--------------------------------------------------------------------------    
   return @exp - @exp_list[@level]
 end
 #--------------------------------------------------------------------------
 # * Get Next Level EXP
 #--------------------------------------------------------------------------
 def next_exp
   return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
 end
end


#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#  This class handles the map. It includes scrolling and passable determining
#  functions. Refer to "$game_map" for the instance of this class.
#==============================================================================
class Game_Map
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_reader   :map_id                   # map id
 #--------------------------------------------------------------------------
 # * Map Name
 #--------------------------------------------------------------------------  
 def mpname
   $mpname = load_data("Data/MapInfos.rxdata")
   $mpname[@map_id].name
 end
end


#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
 #--------------------------------------------------------------------------
 # * Draw Empty Face
 #--------------------------------------------------------------------------  
 def nada
   face = RPG::Cache.picture("")
 end    
 #--------------------------------------------------------------------------
 # * Draw Face
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #--------------------------------------------------------------------------  
 def drw_face(actor, x, y)
   face = RPG::Cache.picture(actor.name + MOG::FACE_SMALL) rescue nada
   cw = face.width
   ch = face.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x , y - ch, face, src_rect)    
 end  
 #--------------------------------------------------------------------------
 # * Draw HP from Image
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #--------------------------------------------------------------------------  
 def draw_maphp3(actor, x, y)
   back = RPG::Cache.picture(MOG::MAIN_BAR_E)
   cw = back.width  
   ch = back.height
   src_rect = Rect.new(0, 0, cw, ch)    
   self.contents.blt(x + 65, y - ch + 30, back, src_rect)
   meter = RPG::Cache.picture(MOG::MAIN_BAR_HP)
   cw = meter.width  * actor.hp / actor.maxhp
   ch = meter.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
   text = RPG::Cache.picture(MOG::MAIN_TEXT_HP)
   cw = text.width  
   ch = text.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 35, y - ch + 30, text, src_rect)
   self.contents.font.color = Color.new(0, 0, 0, 255)
   self.contents.draw_text(x + 81, y - 1, 20, 32, actor.hp.to_s, 2)
   self.contents.font.color = Color.new(255, 255, 255, 255)
   self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2)    
 end  
 #--------------------------------------------------------------------------
 # * Draw SP from Image
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #--------------------------------------------------------------------------
 def draw_mapsp3(actor, x, y)
   back = RPG::Cache.picture(MOG::MAIN_BAR_E)
   cw = back.width  
   ch = back.height
   src_rect = Rect.new(0, 0, cw, ch)    
   self.contents.blt(x + 65, y - ch + 30, back, src_rect)
   meter = RPG::Cache.picture(MOG::MAIN_BAR_SP)    
   cw = meter.width  * actor.sp / actor.maxsp
   ch = meter.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
   text = RPG::Cache.picture(MOG::MAIN_TEXT_SP)
   cw = text.width  
   ch = text.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 35, y - ch + 30, text, src_rect)
   self.contents.font.color = Color.new(0, 0, 0, 255)
   self.contents.draw_text(x + 81, y - 1, 48, 32, actor.sp.to_s, 2)
   self.contents.font.color = Color.new(255, 255, 255, 255)
   self.contents.draw_text(x + 80, y - 2, 48, 32, actor.sp.to_s, 2)    
 end  
 #--------------------------------------------------------------------------
 # * Draw State
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #     width : draw spot width
 #--------------------------------------------------------------------------
 def draw_actor_state(actor, x, y, width = 80)
   text = make_battler_state_text(actor, width, true)
   self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
   self.contents.draw_text(x, y, width, 32, text, 2)
 end  
end


#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw EXP w/ Bars
#     actor : actor
#     x     : draw spot x-coordinate
#     y     : draw spot y-coordinate
#--------------------------------------------------------------------------
alias draw_actor_exp_original draw_actor_exp
def draw_actor_exp(actor, x, y, width = 80)
  if actor.next_exp != 0
    rate = actor.now_exp.to_f / actor.next_exp
  else
    rate = 1
  end
  # Calculate Bar Gradiation
  if actor.next_exp != 0
    rate = actor.now_exp.to_f / actor.next_exp
  else
    rate = 1
  end
  # Adjust Bar Color based on Gradiation
  color1 = Color.new(80 * rate, 80 - 80 * rate ** 2, 80 - 80 * rate, 192)
  color2 = Color.new(240 * rate, 240 - 240 * rate ** 2, 240 - 240 * rate, 192)
  # Calculate Bar Width
  if actor.next_exp != 0
    exp = width * actor.now_exp / actor.next_exp
  else
    exp = width
  end
  # Draw Bar Graph
  cw_gauge(x + 2, y + 25, width, 10, exp, color1, color2)
  # Call original EXP                
  draw_actor_exp_original(actor, x, y)
end
#--------------------------------------------------------------------------
# * Gauge Rectangle (New to Class)
#--------------------------------------------------------------------------
def cw_gauge(x, y, width, height, gauge, color1, color2)

  # Use Cogwheel PRESETS
  color3 = COG_COLOR1
  color4 = COG_COLOR2
  color5 = COG_COLOR3
  color6 = COG_COLOR4
  align1 = COG_ALIGN1
  align2 = COG_ALIGN2
  align3 = COG_ALIGN3
  grade1 = COG_GRADE1
  grade2 = COG_GRADE2
 
  # Create Rectangle Width based on gauge max.
  rect_width = width
 
  case align1
  when 1
    x += (rect_width - width) / 2
  when 2
    x += rect_width - width
  end
  case align2
  when 1
    y -= height / 2
  when 2
    y -= height
  end
  self.contents.fill_rect(x, y, width, height, color3)
  self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color4)
  if align3 == 0
    if grade1 == 2
      grade1 = 3
    end
    if grade2 == 2
      grade2 = 3
    end
  end
  if (align3 == 1 and grade1 == 0) or grade1 > 0
    color = color5
    color5 = color6
    color6 = color
  end
  if (align3 == 1 and grade2 == 0) or grade2 > 0
    color = color1
    color1 = color2
    color2 = color
  end
  self.contents.cw_grad_rect(x + 2, y + 2, width - 4, height - 4, color5, color6, grade1)
  if align3 == 1
    x += width - gauge
  end
  self.contents.cw_grad_rect(x + 2, y + 2, gauge - 4, height - 4, color1, color2, grade2)
end
end


#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
#  This window displays party member status on the menu screen.
#==============================================================================
class Window_MenuStatus < Window_Selectable
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------  
 def initialize
   super(0, 0, 420, 320)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.windowskin = RPG::Cache.windowskin("GG")
   self.opacity = 255
   self.z = 15
   refresh
   self.active = false
   self.index = -1
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------  
 def refresh
   self.contents.clear
   @item_max = $game_party.actors.size
   for i in 0...$game_party.actors.size
     x = i * 105
     y = 236
     actor = $game_party.actors[i]
     self.contents.font.name = MOG::MAIN_FONT
     if $mogscript["TP_System"] == true
       draw_actor_tp(actor, x + 285, y - 5, 4)  
       draw_actor_state(actor, x + 190, y - 5)
     else  
       draw_actor_state(actor, x + 220, y - 5)
     end
     drw_face(actor, x + 2, y + 50)
     draw_maphp3(actor, x - 35, y - 5)
     draw_mapsp3(actor, x - 35, y + 20)
     draw_actor_exp(actor, x + 10, y - 200, width = 80)
   end
 end
 #--------------------------------------------------------------------------
 # * Cursor Rectangle Update
 #--------------------------------------------------------------------------
 def update_cursor_rect
   if @index < 0
     self.cursor_rect.empty
   else
     self.cursor_rect.set(@index * 420 / 4, 0, 420 / 4, self.height - 32)
   end
   if Input.repeat?(Input::RIGHT)
     if (@column_max == 1 and Input.trigger?(Input::RIGHT)) or
         @index < @item_max - @column_max
       $game_system.se_play($data_system.cursor_se)
       @index = (@index + @column_max) % @item_max
     end
   end
   if Input.repeat?(Input::LEFT)
     if (@column_max == 1 and Input.trigger?(Input::LEFT)) or
         @index >= @column_max
       $game_system.se_play($data_system.cursor_se)
       @index = (@index - @column_max + @item_max) % @item_max
     end
   end
 end
end


#==============================================================================
# ** Window_Gold
#------------------------------------------------------------------------------
#  This window displays amount of gold.
#==============================================================================
class Window_Gold < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 160, 64)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.windowskin = RPG::Cache.windowskin("001-Blue01")
   self.opacity = 255
   self.z = 15
   refresh
 end
end


#==============================================================================
# ** Window_PlayTime
#------------------------------------------------------------------------------
#  This window displays play time on the menu screen.
#==============================================================================
class Window_PlayTime < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 160, 96)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.windowskin = RPG::Cache.windowskin("001-Blue01")
   self.opacity = 255
   self.z = 15
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   @total_sec = Graphics.frame_count / Graphics.frame_rate
   hour = @total_sec / 60 / 60
   min = @total_sec / 60 % 60
   sec = @total_sec % 60
   text = sprintf("%02d:%02d:%02d", hour, min, sec)
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 32, 120, 32, text, 2)
 end
end


#==============================================================================
# ** Window_Steps
#------------------------------------------------------------------------------
#  This window displays step count on the menu screen.
#==============================================================================
class Window_Steps < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 160, 96)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.windowskin = RPG::Cache.windowskin("001-Blue01")
   self.opacity = 255
   self.z = 15
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
 end
end


#==============================================================================
# ** Window_Map_Name
#------------------------------------------------------------------------------
#  This window displays the map name on the menu screen.
#==============================================================================
class Window_Map_Name < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 160, 60)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.windowskin = RPG::Cache.windowskin("001-Blue01")
   self.opacity = 255
   self.z = 15
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 2, 120, 32, $game_map.mpname.to_s, 1)
 end
end


#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================
class Scene_Menu
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   s1 = ""
   s2 = ""
   s3 = ""
   s4 = ""
   s5 = ""
   s6 = ""
   @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
   @command_window.index = @menu_index
   if $game_party.actors.size == 0
     @command_window.disable_item(0)
     @command_window.disable_item(1)
     @command_window.disable_item(2)
     @command_window.disable_item(3)
   end
   @command_window.visible = false
   @command_window.x = -640
   @mnlay = Sprite.new
   @mnlay.bitmap = RPG::Cache.picture(MOG::MAIN_LAYOUT)
   @mnlay.z = 10
   @mnlay.opacity = 0
   @mnlay.x = -100
   if MOG::MAIN_FX == 0
     @mnback = Plane.new
     @mnback.bitmap = RPG::Cache.picture(MOG::MAIN_BACKGROUND)
     @mnback.blend_type = 0
     @mnback.z = 5
     @mnback2 = Plane.new
     @mnback2.bitmap = RPG::Cache.picture(MOG::MAIN_BACKGROUND)
     @mnback2.blend_type = 0
     @mnback2.z = 5
     @mnback2.opacity = 60
   elsif MOG::MAIN_FX == 1
     @mnback = Plane.new
     @mnback.bitmap = RPG::Cache.picture(MOG::MAIN_BACKGROUND)
     @mnback.blend_type = 0
     @mnback.z = 5
   else
     @spriteset = Spriteset_Map.new
   end
   @mnsel = Sprite.new
   @mnsel.bitmap = RPG::Cache.picture(MOG::MAIN_CURSOR)
   @mnsel.z = 20
   @mnsel.x = 0
   @mnsel.y = 200
   @mnop = 150
   if $game_system.save_disabled
     @command_window.disable_item(4)
   end
   @playtime_window = Window_PlayTime.new
   @playtime_window.x = 30
   @playtime_window.y = 375
   @playtime_window.contents_opacity = 0
   if MOG::MAIN_MAPNAME == true
     @mapname_window = Window_Map_Name.new
     @mapname_window.x = 425
     @mapname_window.y = 25
     @mapname_window.contents_opacity = 0
   end
   @steps_window = Window_Steps.new
   @steps_window.x = 230
   @steps_window.y = 375
   @steps_window.contents_opacity = 0
   @gold_window = Window_Gold.new
   @gold_window.x = 455
   @gold_window.y = 405
   @gold_window.contents_opacity = 0
   @status_window = Window_MenuStatus.new
   @status_window.x = 295
   @status_window.y = 75
   @status_window.contents_opacity = 0
   if MOG::MAIN_FX == 0
     Graphics.transition(MOG::MAIN_TRAN_TIME, "Graphics/Transitions/" +
       MOG::MAIN_TRAN_TYPE)
   elsif MOG::MAIN_FX == 1
     Graphics.transition(MOG::MAIN_TRAN_TIME, "Graphics/Transitions/" +
       MOG::MAIN_TRAN_TYPE)
   else
     Graphics.transition  
   end
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   for i in 0..10  
     if MOG::MAIN_FX == 0
       @mnback.oy += 1
       @mnback.ox += 1
       @mnback2.oy += 1
       @mnback2.ox -= 1
     end
     @status_window.x += 20
     @status_window.contents_opacity -= 25
     @mnsel.opacity -= 25
     @mnsel.zoom_x += 0.03
     @mnlay.x -= 10
     @mnlay.opacity -= 25
     if MOG::MAIN_MAPNAME == true
       @mapname_window.x += 5
       @mapname_window.contents_opacity -= 20
     end
     @steps_window.contents_opacity -= 25
     @gold_window.contents_opacity -= 25
     @playtime_window.contents_opacity -= 25
     Graphics.update  
   end
   Graphics.freeze
   @command_window.dispose
   @playtime_window.dispose
   @steps_window.dispose
   @gold_window.dispose    
   @status_window.dispose
   @mnlay.dispose
   if MOG::MAIN_FX == 0
     @mnback.dispose
     @mnback2.dispose
   elsif MOG::MAIN_FX == 1
     @mnback.dispose
   else
     @spriteset.dispose
   end
   @mnsel.dispose
   @mapname_window.dispose if MOG::MAIN_MAPNAME == true
   Graphics.update
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   if MOG::MAIN_CURSOR_FX
     if @mnsel.zoom_x <= 1.6
       @mnsel.zoom_x += 0.03
       @mnsel.opacity -= 10
     elsif @mnsel.zoom_x > 1.6
       @mnsel.zoom_x = 1.0
       @mnsel.opacity = 255
     end    
   end
   if @mnlay.x < 0
     @mnlay.opacity += 25
     @mnlay.x += 10
   elsif @mnlay.x >= 0  
     @mnlay.opacity = 255
     @mnlay.x = 0
   end
   @command_window.update if @command_window.active
   @playtime_window.update
   @status_window.update if @status_window.active
   if MOG::MAIN_FX == 0
     @mnback.oy += 1
     @mnback.ox += 1
     @mnback2.oy += 1
     @mnback2.ox -= 1
   end
   @mnop += 5
   # Secondary Cursor
   if @command_window.active == true
     @mnsel.bitmap = RPG::Cache.picture(MOG::MAIN_CURSOR)    
   else
     @mnsel.bitmap = RPG::Cache.picture(MOG::SECOND_CURSOR)
     unless MOG::SECOND_CURSOR_FX
       @mnsel.zoom_x = 1
       @mnsel.opacity = 255
     end
   end
   @mapname_window.contents_opacity += 15 if MOG::MAIN_MAPNAME == true
   @playtime_window.contents_opacity += 15
   @gold_window.contents_opacity += 15
   @playtime_window.contents_opacity += 15
   @steps_window.contents_opacity += 15
   if @status_window.x > 195
     @status_window.x -= 10
     @status_window.contents_opacity += 10
   elsif @status_window.x <= 195
     @status_window.x = 195
     @status_window.contents_opacity = 255
   end
   if @mnop >= 255
     @mnop = 120
   end  
   if @command_window.active
     update_command
     return
   end
   if @status_window.active
     update_status
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when command window is active)
 #--------------------------------------------------------------------------
 def update_command
   case @command_window.index
   when 0  
     @mnsel.x = 0
     @mnsel.y = 110
   when 1
     @mnsel.x = 25
     @mnsel.y = 155
   when 2
     @mnsel.x = 40
     @mnsel.y = 197
   when 3
     @mnsel.x = 45
     @mnsel.y = 242
   when 4
     @mnsel.x = 25
     @mnsel.y = 285
   when 5
     @mnsel.x = 0
     @mnsel.y = 325
   end    
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     $scene = Scene_Map.new
     return
   end
   if Input.trigger?(Input::C)
     if $game_party.actors.size == 0 and @command_window.index < 4
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     case @command_window.index
     when 0
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Item.new
     when 1
       $game_system.se_play($data_system.decision_se)
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 2
       $game_system.se_play($data_system.decision_se)
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 3
       $game_system.se_play($data_system.decision_se)
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 4
       if $game_system.save_disabled
         $game_system.se_play($data_system.buzzer_se)
       return
     end
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Save.new
     when 5
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_End.new
     end
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when status window is active)
 #--------------------------------------------------------------------------
 def update_status  
   case @status_window.index
   when 0  
     @mnsel.x = 180
     @mnsel.y = 130
   when 1
     @mnsel.x = 180
     @mnsel.y = 195
   when 2
     @mnsel.x = 180
     @mnsel.y = 255
   when 3
     @mnsel.x = 180
     @mnsel.y = 320
   end  
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @command_window.active = true
     @status_window.active = false
     @status_window.index = -1
     return
   end
   if Input.trigger?(Input::C)
     case @command_window.index
     when 1
       if $game_party.actors[@status_window.index].restriction >= 2
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Skill.new(@status_window.index)
     when 2  
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Equip.new(@status_window.index)
     when 3  
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Status.new(@status_window.index)
       end
     return
   end
 end
end


#==============================================================================
# ** Bitmap
#==============================================================================
class Bitmap
#--------------------------------------------------------------------------
# * Gradation Rectangle
#--------------------------------------------------------------------------
def cw_grad_rect(x, y, width, height, color3, color4, align = 0)
 if align == 0
   for i in x...x + width
     red   = color3.red + (color4.red - color3.red) * (i - x) / (width - 1)
     green = color3.green +
             (color4.green - color3.green) * (i - x) / (width - 1)
     blue  = color3.blue +
             (color4.blue - color3.blue) * (i - x) / (width - 1)
     alpha = color3.alpha +
             (color4.alpha - color3.alpha) * (i - x) / (width - 1)
     color = Color.new(red, green, blue, alpha)
     fill_rect(i, y, 1, height, color)
   end
 elsif align == 1
   for i in y...y + height
     red   = color3.red +
             (color4.red - color3.red) * (i - y) / (height - 1)
     green = color3.green +
             (color4.green - color3.green) * (i - y) / (height - 1)
     blue  = color3.blue +
             (color4.blue - color3.blue) * (i - y) / (height - 1)
     alpha = color3.alpha +
             (color4.alpha - color3.alpha) * (i - y) / (height - 1)
     color = Color.new(red, green, blue, alpha)
     fill_rect(x, i, width, 1, color)
   end
 elsif align == 2
   for i in x...x + width
     for j in y...y + height
       red   = color3.red + (color4.red - color3.red) *
               ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       green = color3.green + (color4.green - color3.green) *
               ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       blue  = color3.blue + (color4.blue - color3.blue) *
               ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       alpha = color3.alpha + (color4.alpha - color3.alpha) *
               ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       color = Color.new(red, green, blue, alpha)
       set_pixel(i, j, color)
     end
   end
 elsif align == 3
   for i in x...x + width
     for j in y...y + height
       red   = color3.red + (color4.red - color3.red) *
             ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       green = color3.green + (color4.green - color3.green) *
             ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       blue  = color3.blue + (color4.blue - color3.blue) *
             ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       alpha = color3.alpha + (color4.alpha - color3.alpha) *
             ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
       color = Color.new(red, green, blue, alpha)
       set_pixel(i, j, color)
     end
   end
 end
end
#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end

Fantasist

My first gues would be:


class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw EXP w/ Bars
#     actor : actor
#     x     : draw spot x-coordinate
#     y     : draw spot y-coordinate
#--------------------------------------------------------------------------
alias draw_actor_exp_original draw_actor_exp
def draw_actor_exp(actor, x, y, width = 80)
   if actor.next_exp != 0
     rate = actor.now_exp.to_f / actor.next_exp
   else
     rate = 1
   end
   # Calculate Bar Gradiation
   if actor.next_exp != 0
     rate = actor.now_exp.to_f / actor.next_exp
   else
     rate = 1
   end
   # Adjust Bar Color based on Gradiation
   color1 = Color.new(80 * rate, 80 - 80 * rate ** 2, 80 - 80 * rate, 192)
   color2 = Color.new(240 * rate, 240 - 240 * rate ** 2, 240 - 240 * rate, 192)
   # Calculate Bar Width
   if actor.next_exp != 0
     exp = width * actor.now_exp / actor.next_exp
   else
     exp = width
   end
   # Draw Bar Graph
   cw_gauge(x + 2, y + 25, width, 10, exp, color1, color2)
   # Call original EXP               
   draw_actor_exp_original(actor, x, y)
end

In the last line, replace y with y+32.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Zephor

Okay I ended up figuring it out. I had to edit the actual Window_Base.