I couldn't get the script to work. So I wrote it myself
$game_system.item_disabled
$game_system.skill_disabled
$game_system.equip_disabled
$game_system.status_disabled
By setting these variables to
true or
false you can disable and enable the menu options.
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles system-related data. Also manages vehicles and BGM, etc.
# The instance of this class is referenced by $game_system.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :timer # timer
attr_accessor :timer_working # timer working flag
attr_accessor :item_disabled
attr_accessor :skill_disabled
attr_accessor :equip_disabled
attr_accessor :status_disabled
attr_accessor :save_disabled # save forbidden
attr_accessor :menu_disabled # menu forbidden
attr_accessor :encounter_disabled # encounter forbidden
attr_accessor :save_count # save count
attr_accessor :version_id # game version ID
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
@timer = 0
@timer_working = false
@item_disabled = false
@skill_disabled = false
@equip_disabled = false
@status_disabled = false
@save_disabled = false
@menu_disabled = false
@encounter_disabled = false
@save_count = 0
@version_id = 0
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
if $game_party.members.size == 0 # If number of party members is 0
@command_window.draw_item(0, false) # Disable item
@command_window.draw_item(1, false) # Disable skill
@command_window.draw_item(2, false) # Disable equipment
@command_window.draw_item(3, false) # Disable status
end
if $game_system.item_disabled
@command_window.draw_item(0, false)
end
if $game_system.skill_disabled
@command_window.draw_item(1, false)
end
if $game_system.equip_disabled
@command_window.draw_item(2, false)
end
if $game_system.status_disabled
@command_window.draw_item(3, false)
end
if $game_system.save_disabled # If save is forbidden
@command_window.draw_item(4, false) # Disable save
end
end
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.item_disabled and @command_window.index == 0
Sound.play_buzzer
return
elsif $game_system.skill_disabled and @command_window.index == 1
Sound.play_buzzer
return
elsif $game_system.equip_disabled and @command_window.index == 2
Sound.play_buzzer
return
elsif $game_system.status_disabled and @command_window.index == 3
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # Item
$scene = Scene_Item.new
when 1,2,3 # Skill, equipment, status
start_actor_selection
when 4 # Save
$scene = Scene_File.new(true, false, false)
when 5 # End Game
$scene = Scene_End.new
end
end
end
end