Do you need to block the player's ability to consume items?
Or do you hate the team and wish to make it suffer by blocking all skills just because?
Or perhaps you should prevent the player from equiping new gear at any specific moment...
If any of those things is true, then this scriptlet is for you!
Just configure the game switch ID's accordingly.
I do think it is some sort of a hack, but that seemed to be the only way to make it work without rewriting large portions of the Scene_Menu script.
Ruby:
# * MenuDisabler XP * #
# Scripter : Kyonides Arkanthes
# 2024-03-17
# It uses 3 game switches to block items, skills or equipment.
module MenuDisabler
BLOCK_ITEM_SWITCH = 100
BLOCK_SKILL_SWITCH = 150
BLOCK_EQUIP_SWITCH = 200
extend self
attr_accessor :used
end
module Vocab
STATUS = "Status"
SAVE = "Save"
END_GAME = "End Game"
end
class Window_Command
include MenuDisabler
alias :kyon_menu_disabler_win_cmd_ref :refresh
def refresh
if MenuDisabler.used
refresh_commands
else
kyon_menu_disabler_win_cmd_ref
end
end
def refresh_commands
MenuDisabler.used = nil
terms = $data_system.words
item = terms.item
skill = terms.skill
equip = terms.equip
anybody = $game_party.actors.size > 0
@states = {}
@states[item] = (anybody and !$game_switches[BLOCK_ITEM_SWITCH])
@states[skill] = (anybody and !$game_switches[BLOCK_SKILL_SWITCH])
@states[equip] = (anybody and !$game_switches[BLOCK_EQUIP_SWITCH])