질문과 답변

Extra Form
 스크립은 http://avangs.info/index.php?mid=rgss_vx_ace&category=969434&search_target=title&document_srl=378033

여기서 복붙했고요,

module Extra_Slots  
 
   Slots = []  
   # Edit here to add new slot types  
   # Slots[armour_type_id] = "name"  
   # I know it is named in the database but I don't believe you can access  
   # that name through Vocab  
   
   Slots[5] = "Additional"
   
 end 
 
 class Game_Actor < Game_Battler 
   #--------------------------------------------------------------------------
   # ● Rewrites equip_slots  
   #--------------------------------------------------------------------------  
   # Edit here to change what slots are available to your characters  
   # 0 - Weapon  
   # 1 - Shield  
   # 2 - Head  
   # 3 - Body  
   # 4 - Accessory  
   # 5+ a custom slot  
   def equip_slots    
     return [0,0,2,3,4,5,5,5] if dual_wield?    
     return [0,1,2,3,4,5,5,5]  
   end 

수정을 이렇게 했습니다.

문제는 게임을 켜봤는데 슬롯이 늘어나지를 않습니다. 이게 왜 그런건가요?

+ 위의 슬롯추가는 안건드리고 밑부분을 return [0,1,2,3,4,4,4,4]  이런식으로 고쳐봤는데도 적용이 되지를 않습니다.

스크립트는 에디터 맨 아래칸, main 바로 밑부분에다가 넣었고요.

+ 이도류로 캐릭터를 변경시켜봤지만 역시나 먹히지를 않네요. 그냥 스크립트 자체가 씹혀버리는거 같은데. 제가 설치를 잘못했나요? 해당 링크에서

#--------------------------------------------------------------------------
# ● New Module Extra_Slots
#--------------------------------------------------------------------------
module Extra_Slots

 
Slots = []
 
# Edit here to add new slot types
 
# Slots[armour_type_id] = "name"
 
# I know it is named in the database but I don't believe you can access
 
# that name through Vocab
 
Slots[7] = "Spell Tomes"

end

class Game_Actor < Game_Battler
 
#--------------------------------------------------------------------------
 
# ● Rewrites equip_slots
 
#--------------------------------------------------------------------------
 
# Edit here to change what slots are available to your characters
 
# 0 - Weapon
 
# 1 - Shield
 
# 2 - Head
 
# 3 - Body
 
# 4 - Accessory
 
# 5+ a custom slot
 
def equip_slots
   
return [0,0,2,3,4,4,4,7] if dual_wield?
   
return [0,1,2,3,4,4,4,7]
 
end
 
#--------------------------------------------------------------------------
 
# ● Rewrites change_equip
 
#--------------------------------------------------------------------------
 
def change_equip(slot_id, item)
   
return unless trade_item_with_party(item, equips[slot_id])
   
if item == nil
     
return if item && equip_slots[slot_id] != item.etype_id
   
else
     
if item.is_a?(RPG::Armor)
       
if Extra_Slots::Slots[item.atype_id] == nil
         
return if item && equip_slots[slot_id] != item.etype_id
       
else
         
return if item && equip_slots[slot_id] != item.atype_id
       
end
     
else
       
return if item && equip_slots[slot_id] != item.etype_id
     
end
   
end
   
@equips[slot_id].object = item
    refresh
 
end
 
#--------------------------------------------------------------------------
 
# ● Rewrites release_unequippable_items
 
#--------------------------------------------------------------------------
 
def release_unequippable_items(item_gain = true)
   
@equips.each_with_index do |item, i|
     
if !equippable?(item.object) || item.object.etype_id != equip_slots[i]
       
if item.is_armor?
         
unless Extra_Slots::Slots[equip_slots[i]] == nil
           
unless item.object.atype_id == equip_slots[i]
              trade_item_with_party
(nil, item.object) if item_gain
              item
.object = nil
           
end
         
else
            trade_item_with_party
(nil, item.object) if item_gain
            item
.object = nil
         
end
       
else
          trade_item_with_party
(nil, item.object) if item_gain
          item
.object = nil
       
end
     
end
   
end
 
end
end

class Window_EquipSlot < Window_Selectable
 
#--------------------------------------------------------------------------
 
# ● Rewrites slot_name
 
#--------------------------------------------------------------------------
 
def slot_name(index)
   
if @actor.equip_slots[index] >= 5
     
Extra_Slots::Slots[@actor.equip_slots[index]]
   
else
     
@actor ? Vocab::etype(@actor.equip_slots[index]) : ""
   
end
 
end
end

class Window_EquipItem < Window_ItemList
 
#--------------------------------------------------------------------------
 
# ● Rewrites include?
 
#--------------------------------------------------------------------------
 
def include?(item)
   
return true if item == nil
   
return false unless item.is_a?(RPG::EquipItem)
   
return false if @slot_id < 0
   
if item.is_a?(RPG::Armor)
     
if Extra_Slots::Slots[item.atype_id] == nil
       
return false if item.etype_id != @actor.equip_slots[@slot_id]
     
else
       
return false if item.atype_id != @actor.equip_slots[@slot_id]
     
end
   
else
     
return false if item.etype_id != @actor.equip_slots[@slot_id]
   
end
   
return @actor.equippable?(item)
 
end
end

class Scene_Equip < Scene_MenuBase
 
#--------------------------------------------------------------------------
 
# ● Aliases create_slot_window
 
#--------------------------------------------------------------------------
 
alias custom_slots_create_slot_window create_slot_window
 
def create_slot_window
    custom_slots_create_slot_window
   
@slot_window.create_contents
   
@slot_window.refresh
 
end
 
#--------------------------------------------------------------------------
 
# ● Aliases on_actor_change
 
#--------------------------------------------------------------------------
 
alias custom_slots_on_actor_change on_actor_change
 
def on_actor_change
    custom_slots_on_actor_change
   
@slot_window.create_contents
   
@slot_window.refresh
 
end
end

요 부분을 복사해서 스크립트 에디터 맨 아래칸 main칸 밑에다가 그대로 붙여넣기 한 다음에 수치만 변경시켰습니다.

부탁드려요 고수분들 이거 막혀서 진행이 안됩니다.
Comment '2'
  • ?
    repola 2014.04.03 20:29
    아, 스크립트를 아무대나 중간부분에 껴넣으니 작동이 되네요 ㅠ
  • ?
    lud 2014.04.04 04:50

    http://avangs.info/kin/290902

    공지사항이 안지켜집니다.


List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12447
RMXP 스크립트 수정하고 싶은데 도와주세요. 1 아미상 2014.04.05 610
RMVXA 타일 블록 설정이 먹통입니다. 어떻게 해야 하나요? 2 file repola 2014.04.05 766
RMVX 아이템,무기,스킬 중간에 순서를 바꾸고싶습니다. 레몬 2014.04.05 555
RMVX 밀치기 (밀어내기) 스킬 말고 '끌어 당기기' 스킬은 어떻게 만들죠? 무지개우산 2014.04.05 650
RMVXA 상점에 물품 카테고리별로 나누어서 무기는 무기끼리 방어구는 방어구끼리 이런식으로 팔게 할 수는 없나요? repola 2014.04.05 582
RMVXA 그림판으로 복사-붙여넣기시 하얀 테두리가 생깁니다. 이거 해결법이 없나요? 2 repola 2014.04.05 1030
RMVX 전투중에 얼굴 그래픽이 보이는 스크립트 타임즈 2014.04.05 642
RMVXA 저...몬스터가 따라오고 잡히면 게임 오버되고,몬스터가 쫓아올때 중간의 멈추는 방법을....모르겠어요...ㅜㅜ 4 a코코아a 2014.04.05 731
RMVX 네오 세이브 시스템에서 저장슬롯 윈도우의 배치를 다르게 하는 방법 2 file Reverier 2014.04.05 713
RMVXA 이벤트와 접촉시 전투가 일어나게 하는 이벤트 설정 질문입니다. 4 file repola 2014.04.04 615
RMVXA BGM 피치 조정 스크립트 1 김훈 2014.04.04 587
RMVXA 맵 이름 출력을 삭제하고 싶습니다. 2 에뎀이 2014.04.04 769
RMVXA 다단히트 공격시 공격마다 랜덤한 적을 공격하게 만들고 싶습니다. 1 repola 2014.04.04 616
RMVXA 아이템의 이름 앞이나 뒤에 접사가 붙는 스크립트 사용하는데 문제발생 7 간파더 2014.04.04 865
RMVXA 커먼이벤트를 통한 몹들 공격을 만드는데 도저히 작동이 안됩니다. 7 file repola 2014.04.03 718
RMVXA 장비슬롯 늘이기 스크립이 작동하질 않습니다. 2 repola 2014.04.03 689
RMVXA 무기의 스탯치 제한, 스킬 공격횟수 제한을 풀 수 있는 방법이 있나요? 혹은 스크립트나. repola 2014.04.03 568
RMVXA 갑자기 게임 테스트시 이러한 에러가 뜹니다. 1 repola 2014.04.03 588
RMVXA 전투 인터페이스를 고치고 싶은데... 2 repola 2014.04.03 683
기타 C 출력 오류 2 file 말라야 2014.04.03 941
Board Pagination Prev 1 ... 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 ... 516 Next
/ 516