Level Troubleshooting

When making levels for NSMBW, it is always possible to do something wrong and make the level crash in-game. This article will look at simple ways to troubleshoot your levels crashing or behaving wrong.

=Basic Troubleshooting with Level Diagnostics Tool= For basic troubleshooting, there is a tool built into Reggie Next. To open it, you can go to  -->   (or press  ). It will diagnose the level and report any common issues it finds. The tool doesn't diagnose the entire level, only the area it's ran in, so be sure to run it in every area. The image shows an example of a problem found in the level (this problem would result in the game crashing). If you fix the problems reported (if any), and you are still having crashes, or you are using a version of Reggie Updated (which does not have the Level Diagnostics Tool, you can move on to Advanced Troubleshooting below.



=Advanced Troubleshooting=

1. Does your level surpass the limitations of Areas and/or Zones?
This is an issue that can result in your level crashing or causing potential slowdown. Let's look at some of the limitations areas and zones have.

1.1 Does your level have a high amount of zones in one area?
NSMBW can handle around 6-9 unique zones in an area. It can handle more if it uses the same settings as another zone, seeing as the game only needs to load one set of zone settings and put it in two zones, instead of loading two different chunks of zone data.

1.2 Does your level have a large amount of sprites in one area?
According to documentation on another wiki article, anywhere up to possibly 1000 sprites can be handled, but certain sprites will use more memory and resources so there isn't a definite number. Bowser, for example, would obviously use more resources than a Goomba.

1.3 Does your level have a large amount of tiles/extremely large tiles?
NSMBW cannot handle large amounts of tiles in an area. The game also doesn't particularly like large individual tiles, anything above 127x127 is way too large, although how could anyone use a single tile that big? Avoid unnecessary tiling, such as walls that extend out far beyond what the camera would ever see, and areas in the terrain that won't be seen, such as a dark level where the inner tiles would be mostly unseen. Here's a good tip for deciding if you have too many tiles and whatnot: if you have a PC that's not absolute garbage from the Windows XP era, and Reggie is lagging from your level file, you have TOO MANY tiles. It's as simple as that.

1.4 Does your level use too much of the area size?
This is really simple, areas are a size of 1024x512 blocks (with code hacks you can get up to a size of 4095x4095 blocks). Don't use anything close to being that large. You shouldn't even need a level that large.

2. Is your level using custom assets?
Custom assets are fine, but you need to make sure they are set up properly, and are actually functional.

2.1 Does your level use custom tilesets?
If yes, make sure they are correctly set up, and are in the game's  folder (possibly   if you're using a Newer-based mod).

2.2 Does your level use custom objects?
Messing up an object in-game can cause all sorts of bugs and crashes. Be sure your  folder is using functional, properly working files, and not any broken ones that may have been edited. When editing files from the objects folder (this goes for other files in the game's filesystem as well), make sure you create a backup of the file you plan to edit, in case anything goes wrong during the editing process.

2.3 Does your level use custom code?
You should make sure any code edits you've made are done correctly. If a code edit you've made is from a page on the wiki, try reading over the article and seeing if you messed up a step. You can find all code editing related articles here.

3. Is your level using settings that are known to crash/cause issues?
In the case that the level is rendering incorrectly, or a sprite has unexpected behavior, read the below.

3.1 Is your level using Zone Camera settings that are known to cause issues?
Certain camera settings can cause issues, such as weird camera movement, or increase the risk of camera related deaths. Be sure to hover over an option to get a description of what the setting does, as well as notes/examples of what certain values do.

3.2 Is your level using a Screen Size of 28?
A screen size of 28 is known to cause problems, such as tiles being in incorrect places, and other strange rendering glitches.

3.3 Is your level rendering oddly, such as having odd lighting?
This isn't necessarily an issue, however you may have set the wrong rendering settings in the Zone Settings window. Note that Zone Themes do more than just applying different rendering affects, such as ? blocks with items jumping out of them will make a Boo Laugh sound effect. Also, values with an asterisk (*) mean there are no notable changes compared to the default 'Overworld' theme.

4. Is your level crashing in Dolphin after you saved the level?
Note, this is only referring to if you saved the level while the game is open in Dolphin, and the level is now crashing.

This isn't a bug, but it happens because you're changing the level's  file size every time you save, and the game doesn't know how to handle that, so it crashes.

To fix this, go to the Reggie Next Preferences, and tick the box "Pad level with null bytes", then set the "Fixed level size (bytes)" to a somewhat large value, such as 50000. This will make your levels have a fixed size by padding it with null bytes, so you can edit your level in any way, and still be able to play it in Dolphin without having to close the game and reopen it.



Also, don't set it to a very large number, as the level file will take up lots of space. For example, a fixed level size of 900000000 resulted in a (roughly) 900MB level file.

5. Is your level crashing with a constant "rrrrr" noise when the World Map fades out?
This error can happen when directly editing LZ-compressed level files, and saving them. Save the level as a regular  file, and you should be fine. Also, be sure to delete the LZ-compressed level, those take higher priority over regular level files.