MenuDisabler ACE
by Kyonides
by Kyonides
Introduction
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. 😉
Script Updated!
Ruby:
# * MenuDisabler ACE * #
# 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
end
class Window_Command
def change_command(name, symbol, enabled, ext=nil)
hash = @list.find {|v| v[:name] == name }
if hash
hash[:enabled] = enabled
else
hash = { name: name, symbol: symbol, enabled: enabled, ext: ext }
@list << hash
end
n = @list.index(hash)
clear_item(n)
draw_item(n)
end
end
class Scene_Menu
alias :kyon_disable_equip_scn_mn_crt_cmd_win :create_command_window
alias :kyon_disable_equip_scn_mn_cmd_personal :command_personal
def create_command_window
kyon_disable_equip_scn_mn_crt_cmd_win
anybody = $game_party.members.size > 0
state = !$game_switches[MenuDisabler::BLOCK_ITEM_SWITCH]
@command_window.change_command(Vocab.item, :item, anybody && state)
state = !$game_switches[MenuDisabler::BLOCK_SKILL_SWITCH]
@command_window.change_command(Vocab.skill, :skill, anybody && state)
state = !$game_switches[MenuDisabler::BLOCK_EQUIP_SWITCH]
@command_window.change_command(Vocab.equip, :equip, anybody && state)
end
end
Terms & Conditions
Free for use in ANY game.
Due credit is mandatory.
That's it! 😛