The Overworld Design Contest ends in
Views: 896,627,122
12 users online:  BTD6_maker, FYRE150, h.carrell, Infinity,  JamesD28, JonnyManjiro,  KevinM, Klug, mae_86, MrDeePay, Ruiyabi, Saela - Guests: 27 - Bots: 164 Users: 50,293 (2,287 active)
Latest: YBW
Tip: Make sure your overworld's aesthetic, and the levels within, are coherent.
Not logged in.
Introduction to Map16
Forum Index - SMW Hacking - SMW Hacking Help - Tutorials - New Tutorials - Introduction to Map16
Pages: « 1 » Link
how to delete poll
Votes: 3 75.0%
Votes: 1 25.0%
Total voters: 4
Welcome to the new and improved Map16 tutorial! In this tutorial, I'll teach you how and why we use Map16 in SMW Hacking! To make this tutorial easy to follow, I'll be using a copy of the Super Mario World (U) ROM, and I'll be working with Level 105, the default level in Lunar Magic.

Once you're all set up, it should look like this. Let's get started!

Table of Contents:
1. What is Map16?
2. Vanilla Map16 Pages and Navigation
3. Using the 8 x 8 Tile Selector to Create Tiles
4. Useful Vanilla Tiles and Custom Ground Building
5. Organizing your Map16
6. Saving/Loading Map16 to/from Files
7. Other Map16 Buttons Explained
8. Remapping Graphics
9. Final Remarks

1. What is Map16?
Once you've loaded your ROM in Lunar Magic, probably the first thing you'll want to do is place objects into a level. The simplest way of doing this is to use the #lm{objects} Add Objects window:

Take some time to explore this window. The main benefit of the #lm{objects} Add Objects window is that you can place many objects that are larger than just one tile. What is a tile, you ask? It's a 16 x 16 arrangement of pixels that act together in a certain way. For example, one turn block fills up one tile:

You can place turn blocks with the #lm{objects} Add Objects window. Navigate to this spot in the level, and then click on the purple pipe right below it. See how the whole pipe is highlighted?

This is because the pipe was inserted using the #lm{objects} Add Objects window. What if you only wanted to place the top-left corner of a pipe, like this?

How'd I do that? With Map16! This is why we call it Map16, or officially the #lm{16x} 16 x 16 Tile Map Editor: it lets us place individual 16 x 16 pixel tiles directly into our level! To access it, click on the #lm{16x} 16 x 16 Tile Map Editor (from here on, I'll just call it #lm{16x} Map16). We're now ready to start talking about #lm{16x} Map16!

Locate and open the #lm{16x} Map16 Editor:

Your #lm{16x} Map16 should look like this:

Click on the #lm{page} Display Page Numbers button, and your Map16 will look like this:

If you scroll around, you'll see that each page has 256 16 x 16 tiles. Wondering why everything comes in 16s? Well, it's because SMW is coded in hexadecimal (Base 16).

Great! Now we can begin to talk about the different #lm{16x} Map16 pages that are available for your use.

2. Vanilla Map16 and Navigation
Before we get too giddy about making our own #lm{16x} Map16 tiles, it's important that we talk about the original game's Map16 pages. As you've now seen, Map16 has already used almost all of page 00 and page 01 (equivalent to 0 and 1). We don't want to touch these pages at all, even if some of it looks like garbage (for example, B0 to C6). Why? Because a lot of these tiles are what we call "tileset-specific". This means that when you load different graphics files, the function and appearance of some of these tiles will change.

Even though page 2 looks like it's blank, it's also recommended that you don't place new tiles on page 2 because it is possible to let page 2 contain even more tileset-specific tiles. I won't cover that in much detail here, but if you press CTRL and F1 together Lunar Magic will give you the option to explore it.

Great! Now use the scroll bar on the right-hand side of your #lm{16x} Map16 to scroll all the way down to the bottom of #lm{16x} Map16. Hopefully, you've noticed two things:

1. There are a lot of empty Map16 pages.
2. There's some more garbage right around the middle page.

To quickly navigate to the middle garbage, go to the left side of your #lm{16x} Map16 window, and hit the button that says "Page". You will instantly be warped to the page number that's displayed next to that box, which incidentally is the first page of the mess (Page 80).

If you hover over one of these tiles, you'll see that these are background tiles! The original game's background tiles are stored on pages 80 and 81, which is quite condensed! Once again, make sure not to touch any of these tiles, because their appearance and usability will depend on which graphics files you have loaded for the background.

All in all, you're free to edit pages 3-7F (remember how counting in hexadecimal works!) and 82-FF.

3. Using the 8 x 8 Tile Selector to Create Tiles
In this section, we'll be using the 8 x 8 Tile Selector #lm{8x} to help us create Map16 tiles. If you move around your cursor in Map16, you'll see that a red box appears, highlighting 4 of the little blue boxes at once. The 2 x 2 grid of blue squares are the default Map16 tiles. Now, to make our own tiles, we'll want to just edit 1 of the blue boxes at once, as all of the graphics data we'll be using is stored in a size that's just 1 of the squares, which is 8 x 8 pixels. Incidentally, to do this, we'll be using #lm{8xt} 8 x 8 Editing Mode!

To get started, click on the #lm{8xt} 8 x 8 Editing Mode button. Now, if you move your cursor around Map16, only one blue square is highlighted at once! This means we're now in 8 x 8 Editing Mode. (If you need to go back to 16 x 16 Editing Mode, you can simply press the #lm{8xt} button again.)

Our next step is to insert 8 x 8 tiles. To do this, we'll open the #lm{8x} 8 x 8 Tile Selector at the top of the Map16 window.

All of the 8 x 8 data you currently have access to is in this window, if you scroll down. Scrolling back up to the top and hovering your cursor over the top-left 8 x 8 tile in this window (a corner of a pipe), you'll see that there's some text in the bottom left of the window. In this case, it says "Tile 0 x 0" and then talks about the address. For most purposes, we only need to know what the tile number is (which in this case is just the second zero).

In the current view, you can see from Tile 0 in the top-left to Tile FF in the bottom-right. In this example, I'll be pasting a note block from the #lm{8x} 8 x 8 Tile Selector into a blank Map16 Tile. You can see here why we'll need to use 8 x 8 Editing Mode: while the original note block is a 16x16 square, it's represented in the #lm{8x} 8 x 8 Tile Selector as a line of four 8 x 8 tiles, namely 64 - 67. We'll start with the top two 8 x 8 tiles. Click on Tile 64 and drag to Tile 65. The top 2 8 x 8 tiles of the note block should now be selected.

Right-click on a blank tile in Map16, and the top of the note block will be pasted!

Now, repeat this process with the bottom 2 tiles (Tiles 66 and 67). Now, you should have a complete note block! Hit the save #lm{save} button to save your changes to Map16.

Great! Now we have a note block. Let's place it in our level.

What's that? Mario can't bounce on it? If you go into Map16 and change back to 16 x 16 editing mode (click on the #lm{8xt} 8 x 8 Editing Mode button again). Hover over your note block, and you'll see that it's currently just a cement block that looks like a note block!

Don't worry, this is an easy fix. First, click on your 16 x 16 note block. On the left side of the Map16 window, there's a small space that says "Act as" with a box after, which reads 130. Evidently, this is where we will change our note block to actually act like a note block (130 is the "Act as" number for cement). Every type of block in the original game has a number assigned to it, and you can find the number for the note block by scrolling up in your Map16 Editor window to view the beginning of page 01. You can also warp to page 01 by typing "1" or "01" into the box next to the "Page" Button in the mid-left of the Map16 window.

Here, you'll see that there are 4 different note blocks. You can hover over each one to see how they're different from the others, but for our purposes, we'll use the regular note block, tile 113. If you click on tile 113, you'll see that in addition to being the 113th tile in the Map16 Editor, its "Act as" setting is 113. How convenient!

Now, scroll back down to our work-in-progress note block. We now know that we want to change our "Act as" setting from 130 (the cement block) to 113 (the regular note block).

Simply select your WIP note block, and replace the 130 in the "Act as" box with 113. Make sure to save #lm{save} Map16 before you test it, because otherwise it'll still act like cement! Our note block from scratch now looks and feels like a regular note block!

One more thing before we move on. You might notice that:
1. Before you bounce on your note block, and in Map16, the note block is a light blue color.
2. After you bounce on it, it returns to a black and white color scheme.

Why? For the first one, it's because we're using the wrong palette for our note block! Check out the drop-down menu that says "Palette 0".

Here, you can change your note block's palette to match the original, which is palette 4. For this tutorial, I'll keep mine on palette 0 in order to distinguish my note block from the originals.

As for the second point, the reason it changes to the original palette after you bounce on it is because the note block actually changes into a sprite while Mario's bouncing on it. This is because tiles (blocks) can't move! After you bounce on it, the note block reverts to the appearance of tile 113 in Map16.

Now that we've created a new Map16 tile the full way, I'll teach you a few shortcuts! If you click on your custom note block in either 8 x 8 or 16 x 16 Editing Modes, you can paste parts of or the entire note block to a new tile.

Pretty handy, right? This is the method that I use most of the time to pull different 8 x 8 tiles for a new block I'm constructing.

Click on your 16 x 16 note block. Do you see the four boxes on the left side of Map16, arranged in a 2 x 2 square?

The numbers in there are the numbers of the 8 x 8 tiles we chose from the 8 x 8 Tile Selector! I often have the 8 x 8 Tile Selector open next to my Map16, and type in the numbers of the 8 x 8 tiles I want to use instead of copying and pasting.

Next, let's talk about other drop-down menu, as well as the "Flip X" and "Flip Y" buttons. This drop-down menu will say "Priority Off". Here, you can select either "Priority On" or "Priority Off".

If you enable priority for a block, all it means is that if Mario or most sprites pass through it, the block will be displayed "in front" of Mario or the sprite.

Finally, make sure you have your note block selected, and then try clicking the "Flip X" and "Flip Y" buttons. They flip your block horizontally and vertically, respectively. Note that you can also enter 8 x 8 Editing Mode #lm{8xt} and flip 8 x 8 tiles.

4. Useful Vanilla Tiles and Custom Ground Building

There are a number of Vanilla tiles that have "Act as" numbers that work in weird ways, but here, I'd like to introduce you to the main tiles that you'll be using most frequently when designing levels.

4.1 The Basic Ground Tiles

In this section, I'll show you the tiles and Act as settings used to make a basic 3 x 3 set of ground tiles, which looks like this:

(If you're really concerned about maximizing your use of the Vanilla tiles, then you could just use them where they're originally found, but I find making a separate box of them is incredibly useful)

I'll be starting with the top-left and proceeding the way we read in English, from left to right, and top to bottom. To make this, we'll be locating and copying the tiles (and Act as numbers) from Page 01 of Map16. I've included a graphic and a list to make this easier:

Top-Left corner: tile 145
Regular ground: tile 100
Top-Right corner: tile 148
Left wall: tile 14B
Dirt: tile 3F
Right wall: tile 14C
Bottom-Left corner: tile 14D
Upside-Down ground: tile 14E
Bottom-Right corner: tile 14F

For the corners of where wall meets ground, I would use tile 1E4, and you can flip it any which way and it should function the same way.

Before we move on, I'd like to address some changes you can make to these tiles to help make sure everything acts correctly in your levels. First, unless you plan on using this dirt in semisolids, I would recommend changing your central dirt tile (currently acting as 3F) to Act as 12F. Why? For two reasons:
1. If a player somehow gets stuck inside of your dirt, they might get softlocked.
2. It'll make swimming/flying under levels much more challenging or impossible.

Additionally, I'd like to point out that Vanilla tiles 150 and 151 are the y-flipped versions of 14B and 14C. This doesn't matter so much for this and most other tilesets, but it's especially noticeable (to me anyways) in the castle tileset, as it can look kind of strange if you don't use the correct one. For example, if you have a ceiling in a level, you'd want to put 150 directly above your bottom-left corner instead of 14B. Here's an illustration of what I mean, with the strange-looking version on the left, and the better version on the right:

4.2 Slopes
I can't possibly tell you how many people misuse upside-down slopes, so here's a graphic from Dinomar detailing the correct slope tiles:

(NOTE: In some tilesets, some of the upside-down slopes are not available graphically, but you can easily flip your existing slopes and substitute in the correct Act as settings)

(SECOND NOTE: I recently learned that in order for these slopes to work correctly, you must go to #lm{sgfxby}, enable GFX bypass, and then go to #lm{gfxby}, and change the tileset header to Underground 1 for these tiles to work properly.)

4.3 Other Important Tiles
Here, I'll list what I consider to be the most important tiles from the original Map16 pages. Remember that you can use any of your available graphics for a tile and set the Act as to have any tile behave like the following!

0: Water
6: Vine
11E: Turn Block
12F: Muncher
130: Cement block
133 and 134: Top tiles of a non-exit-enabled vertical pipe
137 and 138: Top tiles of an exit-enabled vertical pipe
13B: Top tile of a horizontal pipe (note: there isn't an exit-enabled version, since the game only checks the bottom tile)
13C: Bottom tile of a non-exit enabled horizontal pipe
13F: Bottom tile of an exit enabled horizontal pipe
1B4 and 1B5: Purple (pink?) triangles, require tile 1EB underneath them to work properly
1F0: Slope assist tile (note: sprites slide across it)

4.4 Ground Tiles Revisited
In the Vanilla Map16 pages, single-tile pillars of the main FG set don't exist. By this, I mean the following:

The easiest way to make these is to start with a corner/wall tile, then copy the wall/corner half and flip it to make the new single-wide tile.

5. Organizing your Map16
Together, the normal ground tiles and the single-tile variants constitute most of the tiles that I'll use, in conjunction with solo tiles like munchers, cement blocks, and turn blocks from the original Map16 Pages. When I talk about organizing your Map16, I mean placing all of these tiles together, for easy access.

I can't tell you what organizational style/exactitude of organization will be best suited for your needs, so I recommend playing around with it to figure out what works best for you. There are, however, some ideas that I think can apply universally to make staying organized an easier task.

1. Experiment to find the arrangement of main FG tiles that work the best for you.
2. If you need to make different copies of your FG (or if you're using ExGFX), it would probably be helpful to organize your FG tiles in the same way every time, and have a section off to the side for whatever single-use tiles you might need when making a specific level. This will help make your Map16 stay consistent and organized.
3. When possible, try to use the same palette for FG across levels, so that you don't have to make a whole new FG set for a new level. For example, I used one FG set (with different GFX files loaded) across 5 or so levels.

Here's an example of how I like to organize my FG set:

Also, I'll link here the custom Map16 I use when I'm starting a new hack, which includes these types of tiles and other useful ones (note: I'd like to mention here that a good number of the custom-created tiles were created by the lovely folks at ROMHack Races, but I also created many and organized these tiles myself): {WIP, link will come}

6. Saving/Loading Map16 to/from Files
This will be a short section devoted to Saving and Loading Map16 to and from files. First of all: why would you want to do this? Well, if you had a set of tiles you wanted to use across multiple ROMs (like a certain organized foreground :)), the easiest way to do it would be to save your set of tiles to a file, and then load them in the other ROM. Let's begin!

First, select your tiles, like so:

Now, find the Export Current Selection of Map16 Tiles to File #lm{expsel} button at the top of your Map16 window.

It'll bring you to your file directory, where you'll save these tiles to a .map16 file. Lunar Magic will automatically append .map16 at the end of your filename, so no need to add it! I'll call mine standardground.

Great! Before we load these tiles to a new ROM, I'd like to talk about one of the remaining buttons at the top of the Map16 window: #lm{16loc}. It has a really long name, but all it does, when enabled, is places the tiles where they originally came from in Map16: if your selection spanned Map16 tiles 300-320 in the original ROM, the tiles will be placed at 300-320 in the new ROM. I usually leave this unchecked, and I'll navigate to where I want to insert them before I actually load the Map16 data. Also, note that if you load these to a spot where you don't want them, or you cover existing tiles, you can move them while they're still selected to anywhere in Map16, or use CTRL + X and CTRL + V to paste them somewhere else.

Now, to load these tiles to a different ROM all we have to do is open up the other ROM, and navigate to the #lm{16x} Map16 Editor window. Next, find the button that's the opposite of the #lm{expsel} Export button: the #lm{impsel} Import button! It's right next to the Export button.

Next, double click on your file to load the tiles to your ROM:

Great! All done. Make sure to save your Map16!

Now that we've done that, I'll mention the alternate versions of Export and Import (#lm{expsel} and #lm{impsel}) that are right next to them: #lm{expfile} and #lm{impfile}. What do these do? The same exact thing, but for all tiles across all tilesets. I've never used this, but I imagine it to be quite useful if you need to port all of your data over to a new ROM if the original becomes unworkable for whatever reason.

7. Other Map16 Buttons Explained
By now, we've covered most of the helpful buttons in Map16 organically, as I introduced their use cases. Now, I'll talk about all of the outstanding buttons, and what use they serve you as you navigate Map16. For reference, I'll post a picture of the default Map16, and I'll start on the top row of buttons from the top left, moving right.

#lm{rgbrel}: This graphic is also found in the Palette Editor, which is why the name on SMWCentral doesn't match what it's used for in Map16. All this does is reset your Map16 to the last time you saved Map16 to your ROM.

I already talked about the importance of using the Save #lm{save} button in Map16, and the usefulness of the Undo/Redo buttons (#lm{undo} and #lm{redo}, but I'd say here that the Undo/Redo buttons will Undo/Redo any change you make to Map16, whether it's changing the palette a tile uses, any 8 x 8 OR 16 x 16 tile edits, any "Act as" changes, etc. These two buttons are incredibly useful.

#lm{zoom}: We haven't talked about the Zoom button yet, but what it does is change the magnification of your Map16 window (and 8 x 8 Tile Selector window at the same time!).

#lm{bpipe}: This button is, in my opinion, rather useless in today's hacking scene, as all it does is changes the palette color of the default pipes (tiles 133-13A on Map16 Page 01). A much easier way to choose palettes for pipes is to copy these pipe tiles, organize them in a better way, and then paste them multiple times, changing the palette each time. I'll also include a sample organized pipes section in my starter Map16 file.

#lm{seltil}: This button will just select all of the FG, BG, or all tiles. I guess this could be useful if you want to only export your FG or BG to files.

#lm{autodes}: "Auto-Deselect on Editor Select. If this is enabled, whenever you make a selection in the 8 x 8 Tile Selector window, anything selected in this window will be deselected." Honestly, I don't think this makes any difference at all to workflow, and while it certainly does what it says on the tin, it doesn't change how I interact with Map16 at all.

Finally, we'll talk about the four remaining icons, found above Flip X and Flip Y:

#lm{page}: Displays page numbers for Map16.

#lm{grid}: Adds grid for Map16, useful when adding 8 x 8 tiles to put them in valid 16 x 16 arrangements.

#lm{grad}: This button toggles whether the background color of Map16 is the background color of the level, or the default gradient from black to deep blue.

#lm{?}: This disabled icon will be enabled if you're editing bitmaps (this is something that is by no means necessary to anyone learning to make a hack, so chances are if you need this button, then you won't need this tutorial)

There's just one more button we haven't covered, and I'll address it in the final section.

8. Remapping Graphics
I've saved a very important topic for last. I'm referring to the Remap button, found underneath the "Act as" box label.

What does this do? Here, when we refer to remapping graphics, we're not talking about changing the organization of the graphics files, but rather which 8 x 8 graphics each tile uses.

For example, let's select our trusty note block...

... and press the Remap button, where you'll be greeted with this dialogue:

Up at the top, where "0" is highlighted, try typing in "4" and pressing enter:

Wow! It changed the graphic of our note block to an icy turn block! If you open up the 8 x 8 Tile Selector, you'll see that this "4" added 4 to each 8 x 8 tile that made up our note block. See how the turn block is 4 tiles to the right of the note block, arranged linearly in the 8 x 8 Tile Selector? This is how remapping works! Similarly, you can reselect your note block/turn block and type in "-4" to the Remap dialogue to revert it back to a note block. This is the most useful way to use the Map16 Remap feature, in my opinion. There are other ways to use this dialogue, which are all detailed below the dialogue box we used to change our graphics to an icy turn block. I'll introduce how it's used below.

Make sure your note block looks like a note block, and then we'll proceed. Now, reselect it, and open up the Remap window. The way that this window describes these commands is a little too narrow-focused for my liking, so I'll explain what they do here.

Let's consider the first example: "100, 25 Change tile 100 to tile 25". What this means is, for ONLY THE TILES YOU'VE CURRENTLY SELECTED, if there's any mention of 8 x 8 tile 100, each time it'll be changed to tile 25. This does NOT change every single instance of the mention of 8 x 8 tile 100 in all of your Map16 data, so don't worry about that. From there, the rest of the instructions follow naturally, allowing you to remap multiple tiles at once, change palettes of any mentioned instance of particular tiles, and so on.

So! Let's try using this method to change our note block back into the icy turn block. In our field below the instructions, try typing how you would add "4" to the individual tiles by using this direct method, instead of the just adding 4 method. It's worth noting that you can specify multiple 8 x 8 tiles by adding a new line before you hit OK.

I'll type:

Now, you should have an icy turn block again! If you wanted a faster way to do it, you can use hyphens (-) to specify ranges of tiles to remap, so instead of my above code, I could have written:

I recognize that this isn't the fastest way to deal with the issue of remapping for a single tile, but if you're trying to do scores of tiles at once, I find that it's extremely useful.

9. Final Remarks
I hope that this tutorial was helpful! Let me know if there's anything that would be better worded differently, or if you have any questions, feel free to reply or shoot me a PM.

I'll end with two very important take-aways: if you see garbage-y-looking tiles in your Map16, DO NOT overwrite them as they are likely used in a different tileset, and make sure to save your Map16 whenever you edit it!

Happy hacking everyone!

This tutorial is really well made and polished, just as i expected from quietmason #smw{^_^}.

It taught me some stuff i myself didn't know and i have been doing this for over 2 months now! (or 3, i can't remember :D)

Overall, the tutorial is really detailed, easy to learn from and have fun while doing so.
This is an example of how tutorials should look on the site! Great job Mason! #smw{:TUP:}

Lots of love, S1Z2 #w{<3}
Thank you, S1Z2.

For now, I'm going to mark this as completed, given that no other feedback has been forthcoming. Feel free to respond to this thread or PM me with your thoughts.
Also, you can delete the poll by editing your post to clear the poll "question" field.
Originally posted by BlueToad
Also, you can delete the poll by editing your post to clear the poll "question" field.

This really isn't needed and honestly doesn't add anything to this tutorial, yeah it'd clear up some clutter but that's about it.
Please only give feedback for the tutorials that are asking for feedback.
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - Tutorials - New Tutorials - Introduction to Map16

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Follow Us On

  • YouTube
  • Twitch
  • Twitter


  • Super Mario Bros. X Community
  • Mario Fan Games Galaxy
  • sm64romhacks