Tutorials:Beginning Theming/Chapter 2

Why BGAnimations Now?
Looking at the structure of a StepMania theme, you'd think we'd cover Metrics.ini before BGAnimations. The truth is that the uniqueness of themes banks more so on BGAnimations.

If you've been looking at the default theme, you'll notice that it's pretty static. Compare it to other themes such as PROJEKT XV and pop*candy2, and you'll soon see what a difference BGAnimations can make.

In addition, it is possible to make your own screens using BGAnimations, although the possibilities of what you can do with those screens aren't as big as they would be if you coded your own screen in C++. We won't go there, though, as that's for really advanced theming.

Using BGAnimations
BGAnimations have their own directory in the theme, giving them an air of importance. If you open up the BGAnimations folder in the default theme, you'll see quite a bit of files and folders. Let's start off with something simple.

If you copied the default theme to use as a base for your theme, open up the  folder in your theme. If you've started from scratch, copy the  folder from the default theme to your theme. If you're really confident, you can start from scratch, as what we'll be doing is a bit simple.

There will be two files in the  folder, bg.png and BGAnimation.ini. Much like Metrics.ini, BGAnimation.ini houses the commands for the BGAnimation.

BGAnimation.ini
Let's take a look at BGAnimation.ini:

This may seem a bit confusing, or it may make some sort of sense. If you've worked with a graphics tool that uses layers, you may understand how this is going to work.

At the top of every BGAnimation.ini is, which lets StepMania know that this is a BGAnimation and not, say, a Font.

After that is, which sets up the first layer. In BGAnimations, everything is layered, with the lowest number appearing on the bottom. (If you know what you're doing, this doesn't always have to be true, but let's just assume it is true for now.) You can have many layers in a single BGAnimation.

Now that the Layer is defined, there is a File attribute. This points to a file containing the graphic to display. Simple enough.

Type is next. Many 3.9 BGAnimation files contain a comment (which start with ) explaining what the four types correspond to in numerical form. Sprite draws one copy of the object, Stretch stretches the object to the screen bounds, and Particles and Tiles require a few more parameters. We'll get to those later.

Finally, there's that Command again. You're not just limited to the single Command here, though, as you can use OnCommand and OffCommand if you wish. Command basically takes in commands, discussed last chapter.

Particles
StepMania's default theme doesn't use Particles, so we're going to have to look at a theme that does use them: StepMania System Zero.

File, Type, and Command are the same as usual. There are a few new parameters to set, however.

and  define the minimum and maximum size of the particles. In this example, particles can be anywhere from 25% to 150% of their original size.

simply defines how many particles should show up on screen at once.

The Velocity commands define how fast the particles should go. Keep in mind that negative values here will not make the particles slow; they will just move in the opposite direction. This is also true of Tiles...

Tiles
Luckily for us, StepMania's default theme does use tiles! If you're playing along (you should be), check.

Type 3 is Tiles, File is the same as usual.

Replacing the Min and Max Velocities are the two  parameters. They operate the same as the Particle Velocity commands.