[TUTORIAL]Modifying Stormtronics CMS

Started by $3B, August 12, 2012, 12:34:16 am

Previous topic - Next topic

$3B

August 12, 2012, 12:34:16 am Last Edit: August 12, 2012, 04:40:21 pm by $3B
Fist of all, if this is not the correct section for this tutorial, just move it.

Are you using Blizz-ABS and ST CMS, but you don't want the option "Battle BGM" to appear?

With this tutorial, this is no problem.

First, go to the ST CMS script and search: "Window_CMSOptions" , use Ctrl+F.

The, look for this array:

@commands = ['BGM Volume', 'SFX Volume', 'Battle BGM']

Now erase 'Battle BGM', it must look like this:

@commands = ['BGM Volume', 'SFX Volume']

Now, create a new line, and write this:

@commands.push('Battle BGM') if !$BlizzABS

Must look like:

@commands = ['BGM Volume', 'SFX Volume']
@commands.push('Battle BGM') if !$BlizzABS

How does it work?


You are separating "Battle BGM" to be displayed with a condition, and the condidtion is, if the global variable $BlizzABS is not listed. So,if you are using BABS, the variable will be listed, and the command wil not be displayed.

Vocabulary for non-scripters


Array: Variable that can contain more than one value

Credits for:

Blizzard, for making the ST CMS
"If you win, win with joy, if you lose, lose with honor."
You don't understand? Just don't bother

ForeverZer0

Just letting you know, this is incorrect:

@commands = ['BGM Volume', 'SFX Volume']
@commands.push['Battle BGM'] if !$BlizzABS


You are adding an array to an array, so the final product would look like this:
@commands # => ['BGM Volume', 'SFX Volume', ['Battle BGM']]


You want to use (), not [] for method arguments. The way you did it wouldn't throw an error because Ruby actually doesn't enforce their use, but it is convention.

@command.push('Battle BGM')


I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

$3B

Thansk Zer0, I have some errors cause I don't know scripting.
"If you win, win with joy, if you lose, lose with honor."
You don't understand? Just don't bother

ForeverZer0

Its just one minor one, but you may want to change it for the sake of the tutorial...
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.