Effects

Effects from the original game
7xDysvlGILA

General explanation
Effects are split in two files, a  and a   file. All effect files in NSMBW can be found in the directory.

A  file contains the control information and a    file the graphic and texture data. For more information on the file formats themselves, consider visiting [|BREFF and BREFT (File Format) on Tokdom].

Some of the effects need certain sprites placed in the level to be spawned. The files  and   are always loaded, which means adding a new entry here allows us to easily spawn the new effect with its name only within our custom Code.

Adding new effects
(written for Windows, should work with other operating systems as well though)

After testing multiple tools, Wiimms SZS Tools proofed to be the most reliable one for adding new effects. BrawlCrate crashes when editing breff files, and BrawlBox breaks the files when saving. Wexos Toolbox supposedly didn't work for some users as well.

After installing Wiimms SZS Tools (wszst), restart your computer.

If wszst is installed it should have been added to your environment variables (Path). This makes it possible to use wzszt in the cmd without having to specify its installation path.

Extracting existing effects
Open the cmd and go to the effects folder, e.g. : Extract the existing effects, e.g  and  :

Adding a new effect
To add a new effect you have to make a copy of one of the extracted effects to use as a base.

Basically you have to duplicate an effect from the extracted files, e.g. for  and   in the following directories: These directories get created when extracting the existing effects with wszst.

If the new effect shall use the same image as the effect that was used as the base, there is no need to change the  file.

If a new texture should be used, you have to convert the new texture you want to put in the  folder using wimgt according to CLF78.

Now repack the  and   (see below). Afterwards you can edit the added effects:

- You can edit the duplicated files in the repacked  file with the BREFF Editor.

- BrawlCrate may be able to replace textures in a  without breaking the file, try at your own risk though.

(Re-)Pack the breff and breft files
The last step is to create the new breff and breft files. You can delete or backup your existing effect files at this point.

While in the directory where you extracted the existing effects, e.g. for  and , type: Now you have successfully added your new effect(s) to the game.

Spawning effects with code
To spawn a new effect added to  and   you can use the following code:

In order to use effects from the other files in the Effect folder, you have to make sure the game loads these files. For sprites you can use this code from NewerGEM in order to get the game to load other effect files:

You can take a look around the address  of the original code, e.g. with Ghidra, to understand how to use this.

Credits: Nin0, Zementblock, Grop