Super Awesome Level Merging Tutorial Extravaganza
Have you ever made two separate levels, but then realized that they would have been better together as a single level? No need to remake that whole section, now; follow this guide and (hopefully) save some time! Basically, what you're doing here is taking two level codes and combining them into just one level code. Doesn't that sound like fun? : D
If you've read Superyoshi's Level Code Documentation before, you probably already have a pretty good idea on how to do this, but if you haven't/don't remember it/are lazy, then this guide is for you!
Before you get too excited, though, there are some things you need to know: In order to merge two levels, they must meet these two conditions: 1. Both levels must have the same y-dimension, and 2. The combined x-dimension must be below 999. Whereas the former can be easily amended, that second, well...too bad.
Also important: You can ONLY merge a level to the LEFT or RIGHT of another. If you try attaching a level above or below it, it would yield some funky results.
1. Decide how you want to merge the two levels. Which one do you want on the left, and which do you want on the right? From now on, I'll refer to the one on the left as "Level #1", and the one on the right as "Level #2".
2. Change the dimensions. Look at the x-dimensions of the two levels, and add them up. This will be the x-dimension of your merged level. Now, load up Level #2, and add columns to the LEFT until the x-dimension is equal to that new one you just found. (Basically, you're adding some open space in which Level #1 is going to go.) You don't have to do anything with Level #1's x-dimension just yet. Also, if the y-dimensions of the two levels do not match, now is the time to change them.
Note: You may want to add 2 to 6 extra columns to the right of Level #1 and left of Level #2 so that you can place a level transition in between when you finish merging. But that's up to you.
3. Copy and paste the level codes into Word, Notepad, or whatever.
4. Merge the tile codes. This is the trickiest part, so be careful. See that big block of letters, numbers, and asterisks in the beginning of each code? That stuff defines the tile placement (which I will now call the "tile code"). It starts and ends with "~". Now, look at Level #2's tile code. It should start with something that looks like "0*somenumber*". Omit this. Copy everything AFTER this until (but not including) the "~" in Level #2, and paste it to the END of the tile code of Level #1, right before the "~". Also, if you see any "0*somenumber*" at the END of Level #1's code, delete it. Remember this place (press enter for a space or something); we will be adding some more code here now!
Here come a slightly annoying part now... On the level editing screen, find the LOWEST TILE of the FARTHEST RIGHT COLUMN in Level #1 (that would be, the most bottom-right tile). Starting from this tile, count the empty tile spaces DOWNWARDS, moving to the top of the next column when you reach the bottom, until you reach the spot where the TOPMOST TILE of the FARTHEST LEFT COLUMN of Level #2 should be. Take this number you just counted and type it in that spot of the level code where Level #1's tile code ends and Level #2's tile code begins (which you hopefully remembered to mark). Make sure to separate this number from the end of Level #1's tile code and the beginning of Level #2's tile code with asterisks. (If you're wondering what you just did here, you just specified the space between Level #1's tiles and Level #2's tiles.) If you want to add additional vertical spaces in between, multiply the y-dimension by the number of spaces you want and add it to that number.
If all went well, you have now successfully merged the tiles of the two levels! Teh yayz!
5. Merge the item codes. Now, this part is simpler by far. The item code is that big patch of numbers and commas after the tile code. This also starts and ends with "~". Copy the item code of Level #2, and paste it to the end of the item code of Level #1. Make sure NOT to include Mario's starting position code piece. (It looks like "1,number,number". Start copying with the | after it.) You're done. Wasn't that easy? : D
6. Fix up the dimensions. Your merged level code is mostly complete, but there's one more thing to address. Remember that combined x-dimension you found before? At the very beginning of the level code, you should see "(number)x(number)". Replace the first number with your new x-dimension if it isn't already.
7. Load up your new merged level! Check to see if everything went smoothly. If you did everything correctly, the two original levels should now be right next to each other!
You may notice now that there are two Marios. While you can go back to the level code and delete the piece of code that specifies Mario's starting location, it's simpler to just drag the two Marios together so that you start in the correct place.
8. ???
9. Profit!
Other stuff:
Rearranging levels: If you have a level whose layout you want to change, you can split that level up into pieces by adjusting the dimensions, then merge those pieces with the same strategy as above!