Script Disabler

TDS

- T D S -
Veteran
Joined
Mar 5, 2012
Messages
361
Reaction score
129
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
185
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
42
Reaction score
0
First Language
English
Primarily Uses
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
185
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
Developer
Joined
Mar 1, 2012
Messages
14,705
Reaction score
14,529
First Language
Filipino
Primarily Uses
VNM
@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
42
Reaction score
0
First Language
English
Primarily Uses
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
185
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
129
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
185
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
129
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,230
Reaction score
3,071
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
552
Reaction score
136
First Language
Javascript
Primarily Uses
RMMV
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,200
Reaction score
1,256
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,030
Reaction score
335
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,641
Reaction score
2,971
First Language
Tagalog
Primarily Uses
so basically, this is useful for games in development... pretty neat... 
 

Misaki

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

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I've noticed that the website has changed a lot since I left in August last year...
One of my kitties after a long, tiring day of being adorable.
We have good wifi here now thanks to a guy who had the audacity to tell the Director "Sir, the wifi sucks. Make it faster and increase the bandwidth" in this arrogant tone. The Director is a complete sweetheart so he did just that. So you may see me around often now, being disturbing as usual.
To compensate for me feeling too sick to interact properly, have an old recording of me calming you with Zelda's Lullaby. https://vocaroo.com/jqTcbzdQTw5 :kaojoy:
Finally found someone to make battlers for me. Just wants $50 for a small one. And $75 for a big one. So who wants to help me make a GoFundMe page? Scratch that. How much can I get for a kidney on the black market?

Forum statistics

Threads
93,361
Messages
911,669
Members
122,853
Latest member
Ordan
Top