How to make potion doors work in Super Mario Bros. X

In Super Mario Bros. 2, digging up and throwing a potion would reveal a door that took you to an inverted version of whatever level section you happened to be exploring. Usually there would be a mushroom nearby, and any plants you dug up would turn into coins. Moments later, you’d be warped back to where you were when you first entered the door.

Super Mario Bros. X has a similar function for its potion doors, but instead of temporarily leading you to an inverted area, they permanently take you to a whole different section. There are a number of things to beware of when using this feature. This guide will show you what to watch out for, and how to make the darn things even work at all. That’s right: they’re buggy.

So, you start by building the map you’re placing the potion in.

Ow, my nostalgia.

Now, you need to create a section for the potion door to lead to. Select it in the NPC advanced settings for the potion.

Like so. Now, when the player steps through that door, they’ll be taken to section 2. The door will start them on whatever coordinates the door had in the section they entered it. If section 2 has a different layout than section 1, you run the risk of the player entering inside a wall, or an enemy, or falling off a cliff. If you’re careful with your game design, you could have the new section be different from the first, but the safest thing to do is make them exactly the same. Plus, that’s what’s most similar to the original SMB2, after all. Luckily, SMBX has a feature that lets you clone sections! Hooray!

Clicking ‘Clone’ creates an exact replica of the source section in the target section. This way, no matter where the player enters the door from, they’re guaranteed to be in the same place in the section they go to. You can change the background, enemy placement, whatever you like. As long as the lay of the land is the same, the player will always start on sure footing. Oh, but here’s where our bug comes in…

Oh, what the bloody hell…

As you can see, even with auto-align checked, SMBX is trying to place blocks about a quarter of a tile too high. This doesn’t always happen when you clone a section, but when it does, it’s a pain to fix. You’ll either have to manually raise all the blocks to their proper height (and NPCs, background items, pretty much everything you placed) or raze the whole thing and try again. And no, trying to clone over the mistake won’t help. You’ll just end up with twice as many blocks because SMBX doesn’t delete what’s already there before placing the new stuff over it.

So what’s to be done? There are two ways to fix this nonsense.

1. Set the level boundaries of the clone section to match those of the original exactly. That means the top, left, right, and bottom edges of the clone section are exactly the same as the original. This is a tremendous pain in the butt for any sections bigger than one screen. The next method is much easier.

2. Compensate for the quarter tile. That’s a vague statement if ever there was one, so here’s a demonstration.

First, go to the section you’ll be making into a clone. SMBX sections start at the standard minimum size, which fits the window perfectly. It’s 25 blocks across and 19 blocks high.

Wait a minute! No it’s not!

It’s 18 and three-quarters blocks high! This is where that pesky quarter-block difference comes from.

There, now the section is a full 25x19 tiles. This is all you need to do to fix the problem. Adjusting the upper boundary to a full tile instead of a partial one solves everything.

Huzzah! The tiles aligned properly! Of course, you should make sure to delete any reference tiles you placed before cloning the section. Heheh.

It bears noting that even if you didn't need to change anything in the cloned section, the quarter-tile difference could still be detrimental. The player might be wall-crushed the moment they pass through the door!

Also, if the potion door is entered from underneath a block like the green mountain in the picture, the game may warp the player to the top of the screen instead of the potion's actual y-coordinate (x remains the same regardless). Sadly, there's no way around this one. Sometimes it happens, sometimes it doesn't. Just be careful.


Pages: 1
only 90s kids will like this admin
"Select it in the NPC advanced settings for the potion."

So that's where that was hiding! I had no idea what logic SMBX was using for the teleport. Time to make some legit SMB2 levels...
Pages: 1