Author Topic: [TUTORIAL]Modifying Stormtronics CMS  (Read 2036 times)

Offline $3B

  • Trained Member
  • *
  • Posts: 16
  • LV: 0
  • Gender: Male
  • Why I am in black and white? This page is in RGB
    • View Profile
[TUTORIAL]Modifying Stormtronics CMS
« on: August 12, 2012, 06:34:16 AM »
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
« Last Edit: August 12, 2012, 10:40:21 PM by $3B »
"If you win, win with joy, if you lose, lose with honor."
You don't understand? Just don't bother

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3247
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [TUTORIAL]Modifying Stormtronics CMS
« Reply #1 on: August 12, 2012, 07:27:40 AM »
Just letting you know, this is incorrect:

Code: [Select]
@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:
Code: [Select]
@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.

Code: [Select]
@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.

Offline $3B

  • Trained Member
  • *
  • Posts: 16
  • LV: 0
  • Gender: Male
  • Why I am in black and white? This page is in RGB
    • View Profile
Re: [TUTORIAL]Modifying Stormtronics CMS
« Reply #2 on: August 12, 2012, 07:25:51 PM »
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

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3247
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [TUTORIAL]Modifying Stormtronics CMS
« Reply #3 on: August 12, 2012, 08:43:53 PM »
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.