Hey, anyone who can help, I have a question. I am using the N.A.S.T.Y. Extra Stats script in my project, and I want to change the equip menu to show the parameters it defines instead of the normal ones. Does anyone know how I would go about doing that?
Help With Equip Screen Editing
Javascript/Plugin Support
Code:
#==============================================================================
# Kadafi - Draw N.A.S.T.Y. Extra Stats in Scene_Equip
# Version : 1.0
# Contact : http://forums.rpgmakerweb.com/index.php?/user/33654-kadafi/
#==============================================================================
#==============================================================================
# CHANGE LOGS:
# -----------------------------------------------------------------------------
# 2016.10.23 - Finished script
#==============================================================================
#==============================================================================
# REQUIRED:
# -----------------------------------------------------------------------------
# N.A.S.T.Y. Extra Stats
#==============================================================================
#==============================================================================
# Configuration
#==============================================================================
module Kadafi
#--------------------------------------------------------------------------
# * Array of Parameters to be Drawn on Window_EquipStatus in Scene_Equip
#--------------------------------------------------------------------------
# Available parameters: :mhp, :mmp, :atk, :def, :mat, :mdf, :agi, :luk and
# the stats you set in Z26::STATS
#--------------------------------------------------------------------------
EquipParams = [:str,:con,:dex,:int,:wis,:mhp] # [etc, etc, etc, ... ]
end
#==============================================================================
# Don't edit below this line unless you know what to do.
#==============================================================================
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Forcibly Change Equipment
#--------------------------------------------------------------------------
alias kadafi_force_change_equip force_change_equip
def force_change_equip(equip_type, item)
last_item = equips[equip_type]
kadafi_force_change_equip(equip_type, item)
z26variate_equip(item)
z26variate_equip(last_item, false)
end
end
#==============================================================================
# ** Window_EquipStatus
#==============================================================================
class Window_EquipStatus < Window_Base
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
draw_actor_name(@actor, 4, 0) if @actor
Kadafi::EquipParams.size.times do |i|
param = Kadafi::EquipParams[i]
draw_item(0, line_height * (1 + i), param)
end
end
#--------------------------------------------------------------------------
# * Draw Item
#--------------------------------------------------------------------------
def draw_item(x, y, param)
draw_param_name(x + 4, y, param)
draw_current_param(x + 94, y, param) if @actor
draw_right_arrow(x + 126, y)
draw_new_param(x + 150, y, param) if @temp_actor
end
#--------------------------------------------------------------------------
# * Default Parameters
#--------------------------------------------------------------------------
DEFAULT_PARAM = [:mhp, :mmp, :atk, :def, :mat, :mdf, :agi, :luk]
#--------------------------------------------------------------------------
# * Draw Parameter Name
#--------------------------------------------------------------------------
def draw_param_name(x, y, param)
change_color(system_color)
if DEFAULT_PARAM.include?(param)
param_id = DEFAULT_PARAM.index(param)
draw_text(x, y, 80, line_height, Vocab::param(param_id))
elsif Z26::STATS.include?(param)
draw_text(x, y, 80, line_height, param.capitalize)
end
end
#--------------------------------------------------------------------------
# * Draw Current Parameter
#--------------------------------------------------------------------------
def draw_current_param(x, y, param)
change_color(normal_color)
if DEFAULT_PARAM.include?(param)
param_id = DEFAULT_PARAM.index(param)
draw_text(x, y, 32, line_height, @actor.param(param_id), 2)
elsif Z26::STATS.include?(param)
draw_text(x, y, 32, line_height, @actor.xstat[param], 2)
end
end
#--------------------------------------------------------------------------
# * Draw Post-Equipment Change Parameter
#--------------------------------------------------------------------------
def draw_new_param(x, y, param)
if DEFAULT_PARAM.include?(param)
param_id = DEFAULT_PARAM.index(param)
new_value = @temp_actor.param(param_id)
change_color(param_change_color(new_value - @actor.param(param_id)))
draw_text(x, y, 32, line_height, new_value, 2)
elsif Z26::STATS.include?(param)
new_value = @temp_actor.xstat[param]
change_color(param_change_color(new_value - @actor.xstat[param]))
draw_text(x, y, 32, line_height, new_value, 2)
end
end
end
I've moved this thread to plugin support. Please be sure to post your threads in the correct forum next time. Thank you.
Thanks Kadafi! That solves my problem. Do you know how to edit the shop to compare one of the xstats instead of atk as well? That would be a great help.
Original thread: https://forums.rpgmakerweb.com/threads/help-with-equip-screen-editing.70028/