#============================================================
# 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
$display_eva = [true, 8] # Evasion
# 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 $display_eva[0] == true
draw_actor_parameter(@actor, 8, $list_start_y_pos+($seperation_distance*$display_eva[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_eva != nil
if $color_coded_bonuses == true
if @new_eva > @actor.eva
self.contents.font.color = $stat_goes_up_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_eva[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_eva[1]), 36, 32, @new_eva.to_s, 2)
elsif @new_eva == @actor.eva
self.contents.font.color = $stat_stays_the_same_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_eva[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_eva[1]), 36, 32, @new_eva.to_s, 2)
elsif @new_eva < @actor.eva
self.contents.font.color = $stat_goes_down_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_eva[1]), 40, 32, $desired_arrow_style, 1)
self.contents.draw_text(200, $list_start_y_pos+($seperation_distance*$display_eva[1]), 36, 32, @new_eva.to_s, 2)
end
elsif
self.contents.font.color = system_color
self.contents.draw_text(160, $list_start_y_pos+($seperation_distance*$display_eva[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_eva[1]), 36, 32, @new_eva.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, new_eva)
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 or @new_eva != new_eva
@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
@new_eva = new_eva
refresh
end
end
end