헤메이다가 NRMC 에서 구했습니다
여기 자료실에있는 것은 0.3 버전이던데 에러가 나더군요
0.4 버전을 NRMC 강좌실에서 찾아서 적용시켜보니
에러가 안뜹니다 제작자분께 정말 감사드립니다~~
#==============================================================================
# □ 커스터마이즈(customize) 포인트
#==============================================================================
class Window_Base
SYSTEM_WORD_EVA = "회피" # 「회피 수정」의 용어
end
#
# - Window_EquipLeft 클래스의
# 메소드 refresh, set_new_parameters를 재정의 하고 있습니다 -
#
#==============================================================================
# ■ 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 :eauipitem_index # 장비 아이템 윈도우의 커서 인덱스
#-------------------------------------------------------------- ------------
# ● 오브젝트 초기화
# actor : 엑터
#--------------------------------------------------------------------------
alias xrxs_mp1_initialize initialize
def initialize(actor)
xrxs_mp1_initialize(actor)
self.height = 416
self.contents = Bitmap.new(width - 32, height - 32)
@eauipitem_index = -1
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
draw_actor_parameter(@actor, 4, 192, 3)
draw_actor_parameter(@actor, 4, 224, 4)
draw_actor_parameter(@actor, 4, 256, 5)
draw_actor_parameter(@actor, 4, 288, 6)
draw_actor_parameter(@actor, 4, 320, 7)
if @new_str != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 192, 40, 32, "→", 1)
self.contents.font.color = @actor.str < @new_str ? system_color :
@actor.str > @new_str ? disabled_color :
normal_color
self.contents.draw_text(200, 192, 36, 32, @new_str.to_s, 2)
end
if @new_dex != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 224, 40, 32, "→", 1)
self.contents.font.color = @actor.dex < @new_dex ? system_color :
@actor.dex > @new_dex ? disabled_color :
normal_color
self.contents.draw_text(200, 224, 36, 32, @new_dex.to_s, 2)
end
if @new_agi != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 256, 40, 32, "→", 1)
self.contents.font.color = @actor.agi < @new_agi ? system_color :
@actor.agi > @new_agi ? disabled_color :
normal_color
self.contents.draw_text(200, 256, 36, 32, @new_agi.to_s, 2)
end
if @new_int != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 288, 40, 32, "→", 1)
self.contents.font.color = @actor.int < @new_int ? system_color :
@actor.int > @new_int ? disabled_color :
normal_color
self.contents.draw_text(200, 288, 36, 32, @new_int.to_s, 2)
end
if @new_eva != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 320, 40, 32, "→", 1)
self.contents.font.color = @actor.eva < @new_eva ? system_color :
@actor.eva > @new_eva ? disabled_color :
normal_color
self.contents.draw_text(200, 320, 36, 32, @new_eva.to_s, 2)
end
#
# 값을 보존
#
@eauipitem_index_last = @eauipitem_index
end
#---------- ----------------------------------------------------------------
# ● 장비 변경 후의 파라미터 설정
#--------------------------------------------------------------------------
def set_new_parameters(new_atk, new_pdef, new_mdef)
if @eauipitem_index_last != @eauipitem_index
@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 @eauipitem_index_last != @eauipitem_index
@new_str = new_str
@new_agi = new_agi
@new_int = new_int
@new_dex = new_dex
@new_eva = new_eva
# 원기회복
refresh2
end
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
# 현재 장비중의 아이템을 취득
item1 = @right_window.item
# 현재의 아이템 윈도우를 @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.active
@left_window. eauipitem_index = -2
end
# 아이템 윈도우가 액티브의 경우
if @item_window.active
@left_window.eauipitem_index = @item_window.index
end
#
# 귀환시킨다
#
xrxs_mp1_refresh
#
#
#
# 라이트 윈도우가 액티브의 경우
if @right_window.active
# 장비 변경 후의 파라미터를 소거
@left_window.set_new_parameters2(nil, nil, nil, nil, nil)
end
# 아이템 윈도우가 액티브의 경우
if @item_window.active
# 현재 선택중의 아이템을 취득
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
여기 자료실에있는 것은 0.3 버전이던데 에러가 나더군요
0.4 버전을 NRMC 강좌실에서 찾아서 적용시켜보니
에러가 안뜹니다 제작자분께 정말 감사드립니다~~
#==============================================================================
# □ 커스터마이즈(customize) 포인트
#==============================================================================
class Window_Base
SYSTEM_WORD_EVA = "회피" # 「회피 수정」의 용어
end
#
# - Window_EquipLeft 클래스의
# 메소드 refresh, set_new_parameters를 재정의 하고 있습니다 -
#
#==============================================================================
# ■ 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 :eauipitem_index # 장비 아이템 윈도우의 커서 인덱스
#-------------------------------------------------------------- ------------
# ● 오브젝트 초기화
# actor : 엑터
#--------------------------------------------------------------------------
alias xrxs_mp1_initialize initialize
def initialize(actor)
xrxs_mp1_initialize(actor)
self.height = 416
self.contents = Bitmap.new(width - 32, height - 32)
@eauipitem_index = -1
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
draw_actor_parameter(@actor, 4, 192, 3)
draw_actor_parameter(@actor, 4, 224, 4)
draw_actor_parameter(@actor, 4, 256, 5)
draw_actor_parameter(@actor, 4, 288, 6)
draw_actor_parameter(@actor, 4, 320, 7)
if @new_str != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 192, 40, 32, "→", 1)
self.contents.font.color = @actor.str < @new_str ? system_color :
@actor.str > @new_str ? disabled_color :
normal_color
self.contents.draw_text(200, 192, 36, 32, @new_str.to_s, 2)
end
if @new_dex != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 224, 40, 32, "→", 1)
self.contents.font.color = @actor.dex < @new_dex ? system_color :
@actor.dex > @new_dex ? disabled_color :
normal_color
self.contents.draw_text(200, 224, 36, 32, @new_dex.to_s, 2)
end
if @new_agi != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 256, 40, 32, "→", 1)
self.contents.font.color = @actor.agi < @new_agi ? system_color :
@actor.agi > @new_agi ? disabled_color :
normal_color
self.contents.draw_text(200, 256, 36, 32, @new_agi.to_s, 2)
end
if @new_int != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 288, 40, 32, "→", 1)
self.contents.font.color = @actor.int < @new_int ? system_color :
@actor.int > @new_int ? disabled_color :
normal_color
self.contents.draw_text(200, 288, 36, 32, @new_int.to_s, 2)
end
if @new_eva != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 320, 40, 32, "→", 1)
self.contents.font.color = @actor.eva < @new_eva ? system_color :
@actor.eva > @new_eva ? disabled_color :
normal_color
self.contents.draw_text(200, 320, 36, 32, @new_eva.to_s, 2)
end
#
# 값을 보존
#
@eauipitem_index_last = @eauipitem_index
end
#---------- ----------------------------------------------------------------
# ● 장비 변경 후의 파라미터 설정
#--------------------------------------------------------------------------
def set_new_parameters(new_atk, new_pdef, new_mdef)
if @eauipitem_index_last != @eauipitem_index
@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 @eauipitem_index_last != @eauipitem_index
@new_str = new_str
@new_agi = new_agi
@new_int = new_int
@new_dex = new_dex
@new_eva = new_eva
# 원기회복
refresh2
end
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
# 현재 장비중의 아이템을 취득
item1 = @right_window.item
# 현재의 아이템 윈도우를 @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.active
@left_window. eauipitem_index = -2
end
# 아이템 윈도우가 액티브의 경우
if @item_window.active
@left_window.eauipitem_index = @item_window.index
end
#
# 귀환시킨다
#
xrxs_mp1_refresh
#
#
#
# 라이트 윈도우가 액티브의 경우
if @right_window.active
# 장비 변경 후의 파라미터를 소거
@left_window.set_new_parameters2(nil, nil, nil, nil, nil)
end
# 아이템 윈도우가 액티브의 경우
if @item_window.active
# 현재 선택중의 아이템을 취득
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