here this is a pretty user friendly script. It will do what you want, read the comments.
#============================================================
# Enhanced Equip Window
#------------------------------------------------------------------------------------------------------------------------
# By Trance
# Version 1.0
# January 2nd, 2007 [happy new year!]
#------------------------------------------------------------------------------------------------------------------------
# This script will allow you to easily customize your equip screen.
# I simply changed the equip screen around, so it should be
# fully compatable with more or less everything (but not custom
# menu systems, of course! =P). I have tried to make this as
# simple and well organized as possible, so even a complete newb
# (like myself) can understand it. Note, that the default settings
# make the equip screen look like it was unchanged--however with
# all stats displayed.
#============================================================
# ?Customization
#------------------------------------------------------------------------------------------------------------------------
# Okay, this is what you have to change around to create your
# very own, personalized equipment window!
$desired_font = "Arial"
$desired_font_size = 14
# Odvious, hmm? These are the font, and font size.
$desired_arrow_style = "?"
# This is the arrow that will be showing up during equipment
# changes. You can change it to whatever you want, though
# other smart choices may be "?", ">>>", or "=>".
$color_coded_bonuses = true
# If this option is set to true, when you are equiping a new item,
# the arrow pointing to your stat increase will change color
# depending on if the stat is going up, down, or staying the same.
# Note, also that the stat increase also changes color.
$stat_goes_up_color = Color.new(0, 200, 0)
$stat_goes_down_color = Color.new(200, 0, 0)
$stat_stays_the_same_color = Color.new(150, 150, 150)
# Rather self explanitory. If 'color_coded_bonuses' is off, these
# color changes do not apply.
$display_str = [true, 1] # Strength
$display_dex = [true, 2] # Dexterity
$display_agi = [true, 3] # Agility
$display_int = [true, 4] # Intelligence
$display_atk = [true, 5] # Attack Power
$display_pdef = [true, 6] # Physical Defense
$display_mdef = [true, 7] # Magical Defense
# The settings here that are true will be displayed on the equip
# screen. The second number is the order in which they will
# appear. Make sure it is set to '0' if false. Don't make it higher
# than '7', unless you want a 'crash my game script'. But you odviously
# wouldn't do this scince there is only seven options.
$list_start_y_pos = 25
$seperation_distance = 15
# This is how far apart the stats that are visible will apear, and
# how high/low the list will start.
#============================================================
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
class Window_EquipLeft < Window_Base
def initialize(actor)
super(0, 64, 272, 192)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $desired_font # "Equip" left side (Status) window font
self.contents.font.size = $desired_font_size
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_level(@actor, 4, 20)
if $display_str[0] == true
draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_str[1]), 3)
end
if $display_dex[0] == true
draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_dex[1]), 4)
end
if $display_agi[0] == true
draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_agi[1]), 5)
end
if $display_int[0] == true
draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_int[1]), 6)
end
if $display_atk[0] == true
draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_atk[1]), 0)
end
if $display_pdef[0] == true
draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 1)
end
if $display_mdef[0] == true
draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 2)
end
if @new_str != nil
if $color_coded_bonuses == true
if @new_str > @actor.str
self.contents.font.color = $stat_goes_up_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_str[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_str[1]), 36, 32, @new_str.to_s, 2)
elsif @new_str == @actor.str
self.contents.font.color = $stat_stays_the_same_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_str[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_str[1]), 36, 32, @new_str.to_s, 2)
elsif @new_str < @actor.str
self.contents.font.color = $stat_goes_down_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_str[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_str[1]), 36, 32, @new_str.to_s, 2)
end
elsif
self.contents.font.color = system_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_str[1]), 40, 32, $desired_arrow_style, 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_str[1]), 36, 32, @new_str.to_s, 2)
end
end
if @new_dex != nil
if $color_coded_bonuses == true
if @new_dex > @actor.dex
self.contents.font.color = $stat_goes_up_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_dex[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_dex[1]), 36, 32, @new_dex.to_s, 2)
elsif @new_dex == @actor.dex
self.contents.font.color = $stat_stays_the_same_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_dex[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_dex[1]), 36, 32, @new_dex.to_s, 2)
elsif @new_dex < @actor.dex
self.contents.font.color = $stat_goes_down_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_dex[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_dex[1]), 36, 32, @new_dex.to_s, 2)
end
elsif
self.contents.font.color = system_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_dex[1]), 40, 32, $desired_arrow_style, 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_dex[1]), 36, 32, @new_dex.to_s, 2)
end
end
if @new_agi != nil
if $color_coded_bonuses == true
if @new_agi > @actor.agi
self.contents.font.color = $stat_goes_up_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_agi[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_agi[1]), 36, 32, @new_agi.to_s, 2)
elsif @new_agi == @actor.agi
self.contents.font.color = $stat_stays_the_same_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_agi[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_agi[1]), 36, 32, @new_agi.to_s, 2)
elsif @new_agi < @actor.agi
self.contents.font.color = $stat_goes_down_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_agi[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_agi[1]), 36, 32, @new_agi.to_s, 2)
end
elsif
self.contents.font.color = system_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_agi[1]), 40, 32, $desired_arrow_style, 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_agi[1]), 36, 32, @new_agi.to_s, 2)
end
end
if @new_int != nil
if $color_coded_bonuses == true
if @new_int > @actor.int
self.contents.font.color = $stat_goes_up_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_int[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_int[1]), 36, 32, @new_int.to_s, 2)
elsif @new_int == @actor.int
self.contents.font.color = $stat_stays_the_same_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_int[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_int[1]), 36, 32, @new_int.to_s, 2)
elsif @new_int < @actor.int
self.contents.font.color = $stat_goes_down_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_int[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_int[1]), 36, 32, @new_int.to_s, 2)
end
elsif
self.contents.font.color = system_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_int[1]), 40, 32, $desired_arrow_style, 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_int[1]), 36, 32, @new_int.to_s, 2)
end
end
if @new_atk != nil
if $color_coded_bonuses == true
if @new_atk > @actor.atk
self.contents.font.color = $stat_goes_up_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_atk[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_atk[1]), 36, 32, @new_atk.to_s, 2)
elsif @new_atk == @actor.atk
self.contents.font.color = $stat_stays_the_same_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_atk[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_atk[1]), 36, 32, @new_atk.to_s, 2)
elsif @new_atk < @actor.atk
self.contents.font.color = $stat_goes_down_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_atk[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_atk[1]), 36, 32, @new_atk.to_s, 2)
end
elsif
self.contents.font.color = system_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_atk[1]), 40, 32, $desired_arrow_style, 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_atk[1]), 36, 32, @new_atk.to_s, 2)
end
end
if @new_pdef != nil
if $color_coded_bonuses == true
if @new_pdef > @actor.pdef
self.contents.font.color = $stat_goes_up_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 36, 32, @new_pdef.to_s, 2)
elsif @new_pdef == @actor.pdef
self.contents.font.color = $stat_stays_the_same_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 36, 32, @new_pdef.to_s, 2)
elsif @new_pdef < @actor.pdef
self.contents.font.color = $stat_goes_down_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 36, 32, @new_pdef.to_s, 2)
end
elsif
self.contents.font.color = system_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 40, 32, $desired_arrow_style, 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_pdef[1]), 36, 32, @new_pdef.to_s, 2)
end
end
if @new_mdef != nil
if $color_coded_bonuses == true
if @new_mdef > @actor.mdef
self.contents.font.color = $stat_goes_up_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 36, 32, @new_mdef.to_s, 2)
elsif @new_mdef == @actor.mdef
self.contents.font.color = $stat_stays_the_same_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 36, 32, @new_mdef.to_s, 2)
elsif @new_mdef < @actor.mdef
self.contents.font.color = $stat_goes_down_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 36, 32, @new_mdef.to_s, 2)
end
elsif
self.contents.font.color = system_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 40, 32, $desired_arrow_style, 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_mdef[1]), 36, 32, @new_mdef.to_s, 2)
end
end
end
#--------------------------------------------------------------------------
# * Set parameters after changing equipment
# new_atk : attack power after changing equipment
# new_pdef : physical defense after changing equipment
# new_mdef : magic defense after changing equipment
#--------------------------------------------------------------------------
def set_new_parameters(new_str, new_dex, new_agi, new_int, new_atk, new_pdef, new_mdef)
if @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or @new_int != new_int or @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef
@new_str = new_str
@new_dex = new_dex
@new_agi = new_agi
@new_int = new_int
@new_atk = new_atk
@new_pdef = new_pdef
@new_mdef = new_mdef
refresh
end
end
end
#==============================================================================
# ** Scene_Equip
#------------------------------------------------------------------------------
# This class performs equipment screen processing.
#==============================================================================
class Scene_Equip
#--------------------------------------------------------------------------
# * Object Initialization
# actor_index : actor index
# equip_index : equipment index
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
@equip_index = equip_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Get actor
@actor = $game_party.actors[@actor_index]
# Make windows
@help_window = Window_Help.new
@left_window = Window_EquipLeft.new(@actor)
@right_window = Window_EquipRight.new(@actor)
@item_window1 = Window_EquipItem.new(@actor, 0)
@item_window2 = Window_EquipItem.new(@actor, 1)
@item_window3 = Window_EquipItem.new(@actor, 2)
@item_window4 = Window_EquipItem.new(@actor, 3)
@item_window5 = Window_EquipItem.new(@actor, 4)
# Associate help window
@right_window.help_window = @help_window
@item_window1.help_window = @help_window
@item_window2.help_window = @help_window
@item_window3.help_window = @help_window
@item_window4.help_window = @help_window
@item_window5.help_window = @help_window
# Set cursor position
@right_window.index = @equip_index
refresh
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@help_window.dispose
@left_window.dispose
@right_window.dispose
@item_window1.dispose
@item_window2.dispose
@item_window3.dispose
@item_window4.dispose
@item_window5.dispose
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Set item window to visible
@item_window1.visible = (@right_window.index == 0)
@item_window2.visible = (@right_window.index == 1)
@item_window3.visible = (@right_window.index == 2)
@item_window4.visible = (@right_window.index == 3)
@item_window5.visible = (@right_window.index == 4)
# Get currently equipped item
item1 = @right_window.item
# Set current item window to @item_window
case @right_window.index
when 0
@item_window = @item_window1
when 1
@item_window = @item_window2
when 2
@item_window = @item_window3
when 3
@item_window = @item_window4
when 4
@item_window = @item_window5
end
# If right window is active
if @right_window.active
# Erase parameters for after equipment change
#============================================================
# CHANGED!
#============================================================
@left_window.set_new_parameters(nil, nil, nil,nil,nil,nil,nil)
#============================================================
end
# If item window is active
if @item_window.active
# Get currently selected item
item2 = @item_window.item
# Change equipment
last_hp = @actor.hp
last_sp = @actor.sp
@actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
# Get parameters for after equipment change
#============================================================
# CHANGED!
#============================================================
new_str = @actor.str
new_dex = @actor.dex
new_agi = @actor.agi
new_int = @actor.int
new_atk = @actor.atk
new_pdef = @actor.pdef
new_mdef = @actor.mdef
#============================================================
# Return equipment
@actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
@actor.hp = last_hp
@actor.sp = last_sp
# Draw in left window
#============================================================
# CHANGED!
#============================================================
@left_window.set_new_parameters(new_str, new_dex, new_agi, new_int, new_atk, new_pdef, new_mdef)
#============================================================
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@left_window.update
@right_window.update
@item_window.update
refresh
# If right window is active: call update_right
if @right_window.active
update_right
return
end
# If item window is active: call update_item
if @item_window.active
update_item
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when right window is active)
#--------------------------------------------------------------------------
def update_right
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to menu screen
$scene = Scene_Menu.new(2)
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# If equipment is fixed
if @actor.equip_fix?(@right_window.index)
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Activate item window
@right_window.active = false
@item_window.active = true
@item_window.index = 0
return
end
# If R button was pressed
if Input.trigger?(Input::R)
# Play cursor SE
$game_system.se_play($data_system.cursor_se)
# To next actor
@actor_index += 1
@actor_index %= $game_party.actors.size
# Switch to different equipment screen
$scene = Scene_Equip.new(@actor_index, @right_window.index)
return
end
# If L button was pressed
if Input.trigger?(Input::L)
# Play cursor SE
$game_system.se_play($data_system.cursor_se)
# To previous actor
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# Switch to different equipment screen
$scene = Scene_Equip.new(@actor_index, @right_window.index)
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (when item window is active)
#--------------------------------------------------------------------------
def update_item
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Activate right window
@right_window.active = true
@item_window.active = false
@item_window.index = -1
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Play equip SE
$game_system.se_play($data_system.equip_se)
# Get currently selected data on the item window
item = @item_window.item
# Change equipment
@actor.equip(@right_window.index, item == nil ? 0 : item.id)
# Activate right window
@right_window.active = true
@item_window.active = false
@item_window.index = -1
# Remake right window and item window contents
@right_window.refresh
@item_window.refresh
return
end
end
end