Level Troubleshooting

From NSMBW Modding Database
Jump to navigation Jump to search

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 Edit --> Level Diagnostics Tool (or press Ctrl-Shift-D). 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 issues, or you are using a version of Reggie that doesn't have the Level Diagnostics Tool, you can move on to Advanced Troubleshooting below.

Advanced Troubleshooting

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.

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 for multiple zones, rather than loading 2 different chunks of zone data.

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.

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.

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.

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.

Does your level use custom tilesets?

If yes, make sure they are correctly set up, and are in the game's /Stage/Texture folder (possibly /Tilesets if you're using a NewerSMBW-based mod).

Does your level use custom objects (Backgrounds, Sprite Models, etc.)?

Messing up an object in-game can cause all sorts of bugs and crashes. Be sure your /Object folder (possibly /BGs or /SpriteTex if you're using a NewerSMBW-based mod) 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.

Is your level/the game showing a black screen and not loading after adding a custom object?

If you're getting a black screen after adding a custom object, the game might be running out of memory. Try seeing if any models/textures you've added might be too large. Make sure textures aren't encoded in RGBA8 unless they absolutely need to be.

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.

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.

Is your level using known problematic camera settings?

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.

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.

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. Values with an asterisk (*) mean there are no notable changes compared to the default Overworld theme.

Is your level crashing in Dolphin Emulator after saving 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 .arc 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 file size by padding it with null bytes (empty data), 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.

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.

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 .arc file, and you should be fine. Make sure to delete the LZ-compressed level file, as those take higher priority over regular level files.