에러가 난다는 말에 = = ; 올려봅니다~ 중복이면 댓글부탁... 중복이다! 하기전에 실행 확인 여부 역시 부탁.
출처 모르....는..
# ▼▲▼ XRXS 1. 装備・全能力表示 ver.2 ▼▲▼
# by 桜雅 在土
#==============================================================================
# □ カスタマイズポイント
#==============================================================================
class Window_Base
SYSTEM_WORD_EVA = "회피 수정치" # 「回避修正」の用語
end
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# ● パラメータの描画
#--------------------------------------------------------------------------
alias xrxs_mp1_draw_actor_parameter draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
case type
when 7
parameter_name = SYSTEM_WORD_EVA
parameter_value = actor.eva
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
return
end
xrxs_mp1_draw_actor_parameter(actor, x, y, type)
end
end
#==============================================================================
# ■ Window_EquipLeft
#==============================================================================
class Window_EquipLeft < Window_Base
#--------------------------------------------------------------------------
# ○ 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :contents2
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias xrxs_mp1_initialize initialize
def initialize(actor)
xrxs_mp1_initialize(actor)
self.height = 416
self.contents = Bitmap.new(width - 32, height - 32)
@contents2_window = Window_Base.new(self.x, self.y, self.width, self.height)
@contents2_window.contents = Bitmap.new(width - 32, height - 32)
@contents2_window.opacity = 0
refresh
refresh2
end
#--------------------------------------------------------------------------
# ● リフレッシュ [再定義]
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_level(@actor, 4, 32)
draw_actor_parameter(@actor, 4, 64, 0)
draw_actor_parameter(@actor, 4, 96, 1)
draw_actor_parameter(@actor, 4, 128, 2)
if @new_atk != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 64, 40, 32, "→", 1)
self.contents.font.color = @actor.atk < @new_atk ? system_color :
@actor.atk > @new_atk ? disabled_color :
normal_color
self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
end
if @new_pdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 96, 40, 32, "→", 1)
self.contents.font.color = @actor.pdef < @new_pdef ? system_color :
@actor.pdef > @new_pdef ? disabled_color :
normal_color
self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
end
if @new_mdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 128, 40, 32, "→", 1)
self.contents.font.color = @actor.mdef < @new_mdef ? system_color :
@actor.mdef > @new_mdef ? disabled_color :
normal_color
self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ○ リフレッシュ2
#--------------------------------------------------------------------------
def refresh2
@contents2_window.contents.clear
@contents2_window.draw_actor_parameter(@actor, 4, 192, 3)
@contents2_window.draw_actor_parameter(@actor, 4, 224, 4)
@contents2_window.draw_actor_parameter(@actor, 4, 256, 5)
@contents2_window.draw_actor_parameter(@actor, 4, 288, 6)
@contents2_window.draw_actor_parameter(@actor, 4, 320, 7)
if @new_str != nil
@contents2_window.contents.font.color = system_color
@contents2_window.contents.draw_text(160, 192, 40, 32, "→", 1)
@contents2_window.contents.font.color = @actor.str < @new_str ? system_color :
@actor.str > @new_str ? disabled_color :
normal_color
@contents2_window.contents.draw_text(200, 192, 36, 32, @new_str.to_s, 2)
end
if @new_dex != nil
@contents2_window.contents.font.color = system_color
@contents2_window.contents.draw_text(160, 224, 40, 32, "→", 1)
@contents2_window.contents.font.color = @actor.dex < @new_dex ? system_color :
@actor.dex > @new_dex ? disabled_color :
normal_color
@contents2_window.contents.draw_text(200, 224, 36, 32, @new_dex.to_s, 2)
end
if @new_agi != nil
@contents2_window.contents.font.color = system_color
@contents2_window.contents.draw_text(160, 256, 40, 32, "→", 1)
@contents2_window.contents.font.color = @actor.agi < @new_agi ? system_color :
@actor.agi > @new_agi ? disabled_color :
normal_color
@contents2_window.contents.draw_text(200, 256, 36, 32, @new_agi.to_s, 2)
end
if @new_int != nil
@contents2_window.contents.font.color = system_color
@contents2_window.contents.draw_text(160, 288, 40, 32, "→", 1)
@contents2_window.contents.font.color = @actor.int < @new_int ? system_color :
@actor.int > @new_int ? disabled_color :
normal_color
@contents2_window.contents.draw_text(200, 288, 36, 32, @new_int.to_s, 2)
end
if @new_eva != nil
@contents2_window.contents.font.color = system_color
@contents2_window.contents.draw_text(160, 320, 40, 32, "→", 1)
@contents2_window.contents.font.color = @actor.eva < @new_eva ? system_color :
@actor.eva > @new_eva ? disabled_color :
normal_color
@contents2_window.contents.draw_text(200, 320, 36, 32, @new_eva.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ● 装備変更後のパラメータ設定 [再定義]
#--------------------------------------------------------------------------
def set_new_parameters(new_atk, new_pdef, new_mdef)
if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef
@new_atk = new_atk
@new_pdef = new_pdef
@new_mdef = new_mdef
refresh
end
end
#--------------------------------------------------------------------------
# ○ 装備変更後のパラメータ設定2
#--------------------------------------------------------------------------
def set_new_parameters2(new_str, new_dex, new_agi, new_int, new_eva)
if @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or
@new_int != new_int or @new_eva != new_eva
@new_str = new_str
@new_agi = new_agi
@new_int = new_int
@new_dex = new_dex
@new_eva = new_eva
refresh2
end
end
#--------------------------------------------------------------------------
# ○ 解放 [オーバーライド]
#--------------------------------------------------------------------------
def dispose
@contents2_window.dispose
super
end
end
#==============================================================================
# ■ Window_EquipItem
#==============================================================================
class Window_EquipItem < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias xrxs_mp1_initialize initialize
def initialize(actor, equip_type)
xrxs_mp1_initialize(actor, equip_type)
self.x = 272
self.width = 368
self.contents = Bitmap.new(width - 32, height - 32)
@column_max = 1
refresh
end
end
#==============================================================================
# ■ Scene_Equip
#==============================================================================
class Scene_Equip
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
alias xrxs_mp1_refresh refresh
def refresh
# 呼び戻す
xrxs_mp1_refresh
# ライトウィンドウがアクティブの場合
if @right_window.active
# 装備変更後のパラメータを消去
@left_window.set_new_parameters2(nil, nil, nil, nil, nil)
end
# アイテムウィンドウがアクティブの場合
if @item_window.active
# 現在装備中のアイテムを取得
item1 = @right_window.item
item2 = @item_window.item
# 装備を変更
last_hp = @actor.hp
last_sp = @actor.sp
@actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
# 装備変更後のパラメータを取得
new_str = @actor.str
new_dex = @actor.dex
new_agi = @actor.agi
new_int = @actor.int
new_eva = @actor.eva
# 装備を戻す
@actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
@actor.hp = last_hp
@actor.sp = last_sp
# レフトウィンドウに描画
@left_window.set_new_parameters2(new_str,new_dex,new_agi,new_int,new_eva)
end
end
end