Pastebin - RGSS(X) Script Disabler
Here's the code:
Spoiler
#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××# Script Disabler v1.0.2# FenixFyreX# RPG Maker XP, VX, and VXAce#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××# This script allows the user to disable scripts by id; more specifically, the # ScriptsToDisable array below includes scripts to disable at runtime that need# to be disabled so as to debug a project without actually deleting the script.## This script needs to be placed ABOVE ALL CUSTOM SCRIPTS to function; it does# not work if it isn't the VERY first custom script installed.#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××# CONFIG#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××# These are names of scripts (the left column in the script database) to# disable. This will ignore the Main script (you can't disable it).ScriptsToDisable = ["▼ Main Process"]#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××# PLEASE DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU ARE DOING.#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××# For The Curious Scripter - How It Works#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××# RPG Maker's internals call eval() to execute the scripts in the database; thus# I've overriden it to ignore eval'ing the script should it's index be found in# the config below. It "undefines" my alias to eval when the Main script is # reached.#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××$top_binding = bindingalias eval_disable_alot_of_scripts evaldef eval(code, *argv) if code.is_a?(String) && (script = $RGSS_SCRIPTS.find {|a| a[3] == code }) if code.include?("rgss_main { SceneManager.run }") eval("def eval(*argv); eval_disable_alot_of_scripts(*argv); end", $top_binding) $top_binding = nil else if ScriptsToDisable.include?(script[1]) code = "" end end end eval_disable_alot_of_scripts(code, *argv)end#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××# END SCRIPT#×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
1) I'm not sure about custom Main scripts, such as when people rewrite when and how rgss_main() is called; and
2) suggestions! I want opinions and options to make this better, and into an actual releasable script.
I know for a fact it works in at least VX and Ace (I don't know if Scene_Gameover exists in XP; I don't have XP) versions of RGSS; It -should- work in XP; try it out. And please, comment!