153 lines
7 KiB
Ruby
153 lines
7 KiB
Ruby
#==============================================================================
|
|
# ■ RGSS3 非表示アイテム・スキル Ver3.00 by 星潟
|
|
#------------------------------------------------------------------------------
|
|
# 特定アイテム・スキルをアイテム・スキルウィンドウに表示しないようにします。
|
|
# また、戦闘中/アイテム画面/装備選択/マップ時のみの
|
|
# 表示/非表示に設定する事も可能です。
|
|
#
|
|
# やや効果が重複する設定が存在しますがそこはご愛敬。
|
|
#==============================================================================
|
|
# アイテムのメモ欄に記述
|
|
#------------------------------------------------------------------------------
|
|
# <戦闘時非表示>
|
|
#
|
|
# そのアイテム・スキルは戦闘時は表示されなくなる。
|
|
#------------------------------------------------------------------------------
|
|
# <戦闘時のみ表示>
|
|
#
|
|
# そのアイテム・スキルは戦闘時のみ表示される。
|
|
#------------------------------------------------------------------------------
|
|
# <アイテム時非表示>
|
|
#
|
|
# そのアイテムはアイテム画面の時は表示されなくなる。
|
|
# (スキルはアイテム画面でリストに含まれないので最初から無効)
|
|
#------------------------------------------------------------------------------
|
|
# <アイテム時のみ表示>
|
|
#
|
|
# そのアイテムはアイテム画面の時のみ表示される。
|
|
# (スキルはアイテム画面でリストに含まれないので最初から無効)
|
|
#------------------------------------------------------------------------------
|
|
# <装備時非表示>
|
|
#
|
|
# そのアイテムは装備画面の時は表示されなくなる。
|
|
# 仕様上、『武器』『防具』カテゴリのアイテムの設定のみを想定。
|
|
#------------------------------------------------------------------------------
|
|
# <装備時のみ表示>
|
|
#
|
|
# そのアイテムは装備画面の時のみ表示される。
|
|
# 仕様上、『武器』『防具』カテゴリのアイテムの設定のみを想定。
|
|
#------------------------------------------------------------------------------
|
|
# <マップ時非表示>
|
|
#
|
|
# そのアイテムはマップ画面の時は表示されなくなる。
|
|
# 通常、イベントコマンドの『アイテム選択』を使用しない限り
|
|
# マップ上でアイテムリストが表示される事はない為
|
|
# 『大事なもの』カテゴリのアイテムの設定のみを想定。
|
|
#------------------------------------------------------------------------------
|
|
# <マップ時のみ表示>
|
|
#
|
|
# そのアイテムはマップ画面の時のみ表示される。
|
|
# 通常、イベントコマンドの『アイテム選択』を使用しない限り
|
|
# マップ上でアイテムリストが表示される事はない為
|
|
# 『大事なもの』カテゴリのアイテムの設定のみを想定。
|
|
#------------------------------------------------------------------------------
|
|
# <常時非表示>
|
|
#
|
|
# そのアイテム・スキルは常時非表示になる。
|
|
#==============================================================================
|
|
module InvisibleItem
|
|
|
|
#設定用キーワード群を用意。
|
|
|
|
Words = [
|
|
"戦闘時非表示",
|
|
"戦闘時のみ表示",
|
|
"アイテム時非表示",
|
|
"アイテム時のみ表示",
|
|
"装備時非表示",
|
|
"装備時のみ表示",
|
|
"マップ時非表示",
|
|
"マップ時のみ表示",
|
|
"常時非表示"
|
|
]
|
|
|
|
end
|
|
class Window_Selectable < Window_Base
|
|
#--------------------------------------------------------------------------
|
|
# 可視条件
|
|
#--------------------------------------------------------------------------
|
|
def item_visible_flag(item)
|
|
return true unless item
|
|
item.visible_timing.each {|i|
|
|
case i
|
|
when 0;return false if SceneManager.scene_is?(Scene_Battle) #戦闘時非表示
|
|
when 1;return false if !SceneManager.scene_is?(Scene_Battle)#戦闘時のみ表示
|
|
when 2;return false if SceneManager.scene_is?(Scene_Item) #アイテム時非表示
|
|
when 3;return false if !SceneManager.scene_is?(Scene_Item) #アイテム時のみ表示
|
|
when 4;return false if SceneManager.scene_is?(Scene_Equip) #装備時非表示
|
|
when 5;return false if !SceneManager.scene_is?(Scene_Equip) #装備時のみ表示
|
|
when 6;return false if SceneManager.scene_is?(Scene_Map) #マップ時非表示
|
|
when 7;return false if !SceneManager.scene_is?(Scene_Map) #マップ時のみ表示
|
|
when 8;return false #常時非表示
|
|
end}
|
|
true
|
|
end
|
|
end
|
|
class Window_SkillList < Window_Selectable
|
|
#--------------------------------------------------------------------------
|
|
# スキルをリストに含めるかどうか
|
|
#--------------------------------------------------------------------------
|
|
alias include_invisible? include?
|
|
def include?(item)
|
|
include_invisible?(item) && item_visible_flag(item)
|
|
end
|
|
end
|
|
class Window_ItemList < Window_Selectable
|
|
#--------------------------------------------------------------------------
|
|
# アイテムをリストに含めるかどうか
|
|
#--------------------------------------------------------------------------
|
|
alias include_invisible? include?
|
|
def include?(item)
|
|
include_invisible?(item) && item_visible_flag(item)
|
|
end
|
|
end
|
|
class Window_BattleItem < Window_ItemList
|
|
#--------------------------------------------------------------------------
|
|
# アイテムをリストに含めるかどうか
|
|
#--------------------------------------------------------------------------
|
|
alias include_invisible? include?
|
|
def include?(item)
|
|
include_invisible?(item) && item_visible_flag(item)
|
|
end
|
|
end
|
|
class Window_EquipItem < Window_ItemList
|
|
#--------------------------------------------------------------------------
|
|
# アイテムをリストに含めるかどうか
|
|
#--------------------------------------------------------------------------
|
|
alias include_invisible? include?
|
|
def include?(item)
|
|
include_invisible?(item) && item_visible_flag(item)
|
|
end
|
|
end
|
|
module ItemVisibleTiming
|
|
#--------------------------------------------------------------------------
|
|
# アイテム/スキルの可視タイミング
|
|
#--------------------------------------------------------------------------
|
|
def visible_timing
|
|
@visible_timing ||= create_visible_timing
|
|
end
|
|
#--------------------------------------------------------------------------
|
|
# アイテム/スキルの可視タイミングデータ作成
|
|
#--------------------------------------------------------------------------
|
|
def create_visible_timing
|
|
a = []
|
|
InvisibleItem::Words.each_with_index {|w,i| a.push(i) if /<#{w}>/ =~ note}
|
|
a
|
|
end
|
|
end
|
|
class RPG::UsableItem < RPG::BaseItem
|
|
include ItemVisibleTiming
|
|
end
|
|
class RPG::EquipItem < RPG::BaseItem
|
|
include ItemVisibleTiming
|
|
end
|