Script Disabler

TDS

- T D S -
Veteran
Joined
Mar 5, 2012
Messages
361
Reaction score
130
First Language
English
Primarily Uses
Script Disabler 1.1




by TDS


Introduction

This script allows you to disable groups of scripts without the need to delete them.

Features

- Disable scripts

How to Use

Instructions are on the script. But here is an example image of the tag name and placing



Script

Script

Credit and Thanks

- TDS

Author's Notes

Since this script deals with an internal variable of the system, there might be a few unforeseen bugs related to how scripts may be tracked. The script however never touches the scripts in the database so nothing there should be changed.

Restrictions

Only for use in non-commercial games.
 
Last edited by a moderator:

Helladen

Deviant Designer
Veteran
Joined
Jul 13, 2012
Messages
635
Reaction score
188
First Language
English
Wow, very useful!
 

BigEd781

undefined method 'stupid_title' found for nil:NilC
Veteran
Joined
Mar 1, 2012
Messages
940
Reaction score
304
First Language
Dothraki
Primarily Uses
N/A
So, it's a neat idea, but personally I don't think Ctrl+A Ctrl+Q is any more difficult and it has the same affect.
 

MakoInfused

Veteran
Veteran
Joined
Jul 17, 2012
Messages
55
Reaction score
9
First Language
English
Primarily Uses
RMMZ
Hm...not to be a spoil sport, but this effect can be achieved without a script, at least not one that has more than 1 word in it. I certainly like the effort, though! Besides, your work did inspire me to speak about my method.

My way of disabling scripts:

1. Make a new script entry under "Main" (You can just cut and paste "Main" to move it, if necessary)

2. Title it "Unused" or whatever you want

3. in the script area simply write



Code:
exit
Now anytime you want to disable a script just place it below our "Unused" script.

Explanation: That's it, there is no possible way this script will ever run because before the program can get to it's entry it will have read and interpreted the exit command.
 

Helladen

Deviant Designer
Veteran
Joined
Jul 13, 2012
Messages
635
Reaction score
188
First Language
English
Yes that is true, but when you have a ton of scripts, and you do not want to move them out of that spot, this is the best way to do it. Moving them back and forth is a huge waste of time and effort.
 
Last edited by a moderator:

Archeia

Level 99 Demi-fiend
Staff member
Developer
Joined
Mar 1, 2012
Messages
15,170
Reaction score
15,516
First Language
Filipino
Primarily Uses
RMMZ
@Mako The good part about this script is nothing needs to be moved around (The Ctrl+A Ctrl+Q can achieve the same thing). But instead of highlighting everything and CTRL+Qing and if some scripters did that for their comments, since it does happen. You can just put tags. It's helpful if you have 150 scripts, specially <w<;
 
Last edited by a moderator:

MakoInfused

Veteran
Veteran
Joined
Jul 17, 2012
Messages
55
Reaction score
9
First Language
English
Primarily Uses
RMMZ
I'll take your word for it :) . I didn't know moving scripts was so troublesome, I guess it never was a problem for me so I dismissed the need for it. I'm glad there is a need though, because even though the script is short it would be a shame if it went unused!

Edit: Also, I never knew how to use Ruby to get a list of the current scripts in the database, that's neat!
 
Last edited by a moderator:

Helladen

Deviant Designer
Veteran
Joined
Jul 13, 2012
Messages
635
Reaction score
188
First Language
English
Even though this script is nice, it has a major drawback which caused me to go to Ctrl + A/Ctrl + Q. Whenever you get an error, it will not go directly to that line or even the script if you have disabled scripts above it, because it doesn't take those into consideration.
 

TDS

- T D S -
Veteran
Joined
Mar 5, 2012
Messages
361
Reaction score
130
First Language
English
Primarily Uses
Yeah, someone testing it gave me an idea of what the error could be.

Try the new version and let me know if it still causes the error.
 

Helladen

Deviant Designer
Veteran
Joined
Jul 13, 2012
Messages
635
Reaction score
188
First Language
English
It is fixed, thanks. :)
 

Drei7717

Villager
Member
Joined
May 14, 2012
Messages
11
Reaction score
0
First Language
English
Primarily Uses
is there a way to disable a script during the middle of a game with this?
 

TDS

- T D S -
Veteran
Joined
Mar 5, 2012
Messages
361
Reaction score
130
First Language
English
Primarily Uses
Nope, this is meant to be used as a testing tool to disable scripts while testing your game.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,851
First Language
English
is there a way to disable a script during the middle of a game with this?
I don't see much point in disabling scripts at run-time. If you don't want something to run then just use a flag.

If a script overrides another class/method definition, and you want to make it so that you can "un-override" it or override it later...there's something wrong with that design.
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
954
Reaction score
525
First Language
Javascript
Primarily Uses
RMMZ
Thanks a bunch for this nice simple script. Saves me a lot of time when debugging. BD
 

Zeriab

Huggins!
Veteran
Joined
Mar 20, 2012
Messages
1,275
Reaction score
1,439
First Language
English
Primarily Uses
RMXP
Nice idea :D

I like that you can disable section of scripts :3

For single sections I would still make the interpreter stop parsing early. I.e.putting the following code line as the first:

__END__The downside of this is that it may change the behavior if you merge several sections together into fewer sections.

is there a way to disable a script during the middle of a game with this?


I don't see much point in disabling scripts at run-time. If you don't want something to run then just use a flag.

If a script overrides another class/method definition, and you want to make it so that you can "un-override" it or override it later...there's something wrong with that design.

There is a different between a script that allows you to turn on and off by a script, and editing each specific script to allow that.

One use could be to have features disabled to start with, and the enabling them as the game progresses.

Of course it probably impossible to make such a script in a generic sense.

*hugs*
 
Last edited by a moderator:

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,372
Reaction score
615
First Language
indonesian
the key maybe on how the script is loaded in the first place.

i realize this. if we put TDS script below other script. We CANNOT disable that script.

so when the

$RGSS_SCRIPTSvariable changed. the scripts is already loaded.

until we found out this step there's no way to script something for that.

even we found a way to 'reload' the script with parameter passed to the loading method to enable the disabled script. but won't all the game object back to initialized?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,004
First Language
Tagalog
Primarily Uses
RMVXA
so basically, this is useful for games in development... pretty neat... 
 

Misaki

Dusk
Veteran
Joined
Apr 21, 2013
Messages
156
Reaction score
27
First Language
English
Primarily Uses
RMMV

Latest Threads

Latest Posts

Latest Profile Posts

The self-righteous indignation of family when you expect them to pay back money you've leant to them never ceases to amaze me.
Gamedev for relaxing? yes or no?
I've been having a rough couple of months and as such let down some friends of mine in the RPG Maker community. I still need time to get back to my normal self, but it's nice to be back, to read articles, and to design again (albeit at a slow pace). Hope to give updates on Kid Crescent soon.
Friendly reminder that you don't have to be able to do absolutely everything. It's okay to scale back features or assets if things are too much - especially if you're the only one working on the game! And you can always add things in later. <3
My new cutscene system makes it so much easier to add parallel stuff happening in the background, I can easily fill the whole screen with action.

Forum statistics

Threads
107,734
Messages
1,031,728
Members
139,867
Latest member
angeallen
Top