Lighting

New Super Mario Bros Wii comes with a selection of different environment files (each one of those files includes settings related to lighting, fog, and others). Changing them will allow us to change completely the appearance of Mario, the enemies, and sprites. The environment file is called , and it's located in the   directory, in the root of the game.

If you open that file with BrawlCrate (or BrawlBox), you'll find a folder called. Inside, there are some  files. Those are the files related to the lighting.

Are you ready for the tutorial!

How can I select a specific environment?
As we have said above, the game comes with some pre-created environments. Those can be selected in Reggie. You must open the "zone settings" button and, then, select "Zone Theme".

Every one of those options is a "pack", that includes the lighting (a  file), the fog (a   file) and others files. This is the equivalency of what Reggie shows (the first column is the option to select) and what files are included (the second column is the  file you must edit in order to change that lighting).

Let's talk about the lighting
The lighting is determined by a specific  file (see table above).

There are 2 different types of lighting:


 * This light is applied to a specific group of sprites (probably determined by a z-value). Changing that light does not have any repercussion with other sprites. There are 36 lights of this kind (0-35).
 * A light more general. There are 8 (0-7).


 * Let's explain better what each type does.

Light objects
Every  has 36 different lights. They are sorted by groups of 5 lights. The first value of that group is the one that has the biggest impact. Here's an example. IDs 6-10 are responsible for the BgA lighting. Editing the ID 6 would make the BgA look very different. On the other hand, editing ID 7 doesn't change much at all.

This is the list with the IDs and what they change:

Ambient light
What about ? They do a global change, they're like the "sun" in the game. Just that... well, there're different suns. They cannot be edited with the EnvEditor unfortunately. There are only 8 lights (0-7).

What program should I use?
We have 2 different programs to use. If we want to change the  or only the , we must use the. We can select the whole  and it will work.

EnvironmentEditor

If run.bat doesn't work, install this, too:

PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x64.exe

To edit the lights ( and  ), we need to use the PE-Editor (Post Effect Editor).

Post Effect Editor"The PE Editor is done by Wexos, a user with a bad reputation. Another of his projects searches for the IP and sends it to a server. Nothing is known about a similar behaviour in PE Editor."

How to use EnvEditor for lighting?
When we have opened the program, we can go to  and open our. After it's opened, we must press  to start editing the lighting. The first step is to select, which  we want to open (which lighting we have selected in Reggie for that specific zone) (see table above  SELECTING SPECIFIC ENVIRONMENTS).

Then, we see the next selector. That's for the light ID (I explained this better above). The list of the IDs of the  is above too (table LIGHT OBJECT ID). Remember, the  only works with the PE Editor.

Then, you'll have a lot of options to select. You can change the opacity from 1 to 0 (it will put the objects grey). You can also change the color (it's in hexadecimal). Other options are untested or don't change anything.

For example, if we wanted to edit the lighting for the overworld (world map), and we wanted to edit the lighting around Mario (ID 16), we should have something similar to what we have in the DOC 1:

If you want to edit the lighting, the Env Editor is not the best, since it's missing some features. I totally recommend using the PE Editor for lighting.

How to use PE Editor for lighting?
For using the PE Editor, first we need to extract the  that we want. It's not possible to open  directly, as we did with EnvEditor. The PE Editor can only open the extracted  files.

So, we must extract the  using BrawlCrate or BrawlBox (the   files are here).

Export it to your computer. We're now ready to open it with the PE Editor. In that program, select file → open, and select our  file.

We'll se that we have 2 different tabs: Light Objects and Ambient Lights.

Light Objects works similar as in the EnvEditor. The left-most column is the ID (in hexadecimal). Look at the table above to know what ID you must edit, the table called LIGHT OBJECTS ID.

About the other columns, some of them are still unknown or not used in NSMBW (because this program was designed for MKW). Still that, you can edit the colors (RED, GREEN, BLUE). Alpha doesn't change anything (probably it's hardcoded).

Ambient light is easier, you just have to edit the colors. Again, alpha doesn't work (or, at least, I couldn't see any difference). What every ID does can be found in the table above (AMBIENT LIGHTS ID).

Let's be honest, I just want to do a silhouette level!
Alright. Then, with the PE Editor, you just have to change every color from every light ID ( and  ) to 00. With that, you'll have your own silhouette level.

Well, not at all. There are still some problems. BgA isn't completely dark, and BgB isn't changed at all. Also, some sprites are not affected by the lighting (red ring, for example), and the fire/ice ball is as usual. Finally, tilesets are not changed, so you'll have to use a completely black tileset.

All those issues can probably be solved by using fogs, but that would be another day!

Huge thanks to Zement and Ashely, who have really helped me a lot doing this tutorial.