Jump to content
Kadafi

Kadafi - Command Disabler

Recommended Posts

Command Disabler

By : Kadafi

 

Version : 1.2

Change Logs :

  • 2014.06.19 - Started and Finished script
  • 2014.06.20 - Added Formation, Save, and Escape Commands
  • 2014.06.20 - Updated the Script Structures

Introduction :

This script can disable almost all of the commands in every scene by just turn ON / OFF the switch. Disabling Command like a boss! \m/

 

Features :

  • Disable any commands in menus or even battles

Screenshots :

 

 

 

CYR3aPC.png

 

 

6nV9LD2.png

 

 

YXa0pDg.png

 

 

 

 

Download :

Script

 

Special Thanks :

  • TheoAllen
  • KilloZapit
Edited by Kadafi

Share this post


Link to post
Share on other sites

The skeptic in me just has to ask:

 

Which commands can it NOT disable?

Share this post


Link to post
Share on other sites

Almost all the commands are ENABLED by default. This script works like turn on a switch to make a command DISABLED. Just turn off the switch back to re-enabled it.

Share this post


Link to post
Share on other sites

Ok.

I looked through your script a bit and didn't see a switch for the dreaded Party Command, Escape.

 

I'm using a custom battle system with a self-made preemptive/surprise attack snippet.

I'd love to flip a switch that could disable escape for the first turn of a surprise attack.

 

Can your script be made to help with that?

Share this post


Link to post
Share on other sites

Ok.

I looked through your script a bit and didn't see a switch for the dreaded Party Command, Escape.

 

I'm using a custom battle system with a self-made preemptive/surprise attack snippet.

I'd love to flip a switch that could disable escape for the first turn of a surprise attack.

 

Can your script be made to help with that?

Done. Now the script has been updated.

Share this post


Link to post
Share on other sites

You know if you wanted to, you could probably just override Window_Command's add_command and make it look up a hash for the switch number or something. Just an idea. Maybe like this?

 

 

 

module Command_Switches

  Switch_Hash = {
    :Window_MenuCommand_item => 1 # Main Menu's item command
  }

end

class Window_Command < Window_Selectable
  
  alias_method :add_command_switch_base, :add_command
  def add_command(name, symbol, enabled = true, ext = nil)
    command_switch = Command_Switches::Switch_Hash[(self.class.name + "_" + symbol.to_s).to_sym]
    enabled = false if command_switch && !$game_switches[command_switch]
    add_command_switch_base(name, symbol, enabled, ext)
  end

end

 

 

I haven't tested that though. And maybe the hash keys could be better. I donno.

Edited by KilloZapit

Share this post


Link to post
Share on other sites

I would like to go with command name though. Not all script users know the :symbol.

 

 

module Command_Switches

  Switch_Hash = {
    "Game End" => 1 # Game End switch
  }

end

class Window_Command < Window_Selectable
  
  alias_method :add_command_switch_base, :add_command
  def add_command(name, symbol, enabled = true, ext = nil)
    switch_id = Command_Switches::Switch_Hash[name]
    enabled = !$game_switches[switch_id] if switch_id
    add_command_switch_base(name, symbol, enabled, ext)
  end

end 

 

 

Basically, you just need to put key hash same as command name

Edited by TheoAllen

Share this post


Link to post
Share on other sites

That works, but it might be tricky if you use the same name in different windows for diffrent scenes... How much that is actualy a problem I am not sure. Anyway I have used null symbols in my menus before so I guess it's better using the name anyway.

Share this post


Link to post
Share on other sites

That works, but it might be tricky if you use the same name in different windows for diffrent scenes...

There is a little "trick" though. "Name" and "Name " are different string only just because of space

Share this post


Link to post
Share on other sites

You know if you wanted to, you could probably just override Window_Command's add_command and make it look up a hash for the switch number or something. Just an idea. Maybe like this?

 

 

 

module Command_Switches

  Switch_Hash = {
    :Window_MenuCommand_item => 1 # Main Menu's item command
  }

end

class Window_Command < Window_Selectable
  
  alias_method :add_command_switch_base, :add_command
  def add_command(name, symbol, enabled = true, ext = nil)
    command_switch = Command_Switches::Switch_Hash[(self.class.name + "_" + symbol.to_s).to_sym]
    enabled = false if command_switch && !$game_switches[command_switch]
    add_command_switch_base(name, symbol, enabled, ext)
  end

end

 

 

I haven't tested that though. And maybe the hash keys could be better. I donno.

 

 

 

I would like to go with command name though. Not all script users know the :symbol.

 

 

module Command_Switches

  Switch_Hash = {
    "Game End" => 1 # Game End switch
  }

end

class Window_Command < Window_Selectable
  
  alias_method :add_command_switch_base, :add_command
  def add_command(name, symbol, enabled = true, ext = nil)
    switch_id = Command_Switches::Switch_Hash[name]
    enabled = !$game_switches[switch_id] if switch_id
    add_command_switch_base(name, symbol, enabled, ext)
  end

end 

 

 

Basically, you just need to put key hash same as command name

Thank you for the suggestions. :)

 

Now the script has been updated~

Share this post


Link to post
Share on other sites

One problem I see is the battle item menu and the main menu item menu have the same name... Though, actualy it may make sense to disable both at once.

 

 

That works, but it might be tricky if you use the same name in different windows for diffrent scenes...

There is a little "trick" though. "Name" and "Name " are different string only just because of space

 

I don't see how that would help, unless you want to manualy rename all the duplicates. Actualy it might be more woth while to make a hash of hashes for each menu and/or scene. But yeah that would get rather complicated. It's rather nice that someone can add and delete keys for any script they want to install easily while only using the menu name.

Edited by KilloZapit

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted