SUPER MARIO WORLD SLOPE EDGE FIX by BMF54123 (C)2006 RuSteD ROM Hacks - http://bmf.rustedmagick.com ------------------------------------------------------ What is it? ----------- This custom block can be used to prevent Mario from passing through slopes and into walls under certain circumstances. Normally, if you want to place a slope directly above a solid wall (perhaps next to a pit), you have to place the wall (X) at the end of the slope (/), sticking out like so: __ / M/^ _/^ |X^ |X figure 1 (Why is this necessary? Read on...) However, a setup like this just doesn't make a good death trap, since Mario (M) can easily stop on the solid block at the end of the slope and run/jump back up. You really want a sudden dropoff, like so: __ / /^ ? M/^ -> M |X |X figure 2 Unfortunately, in this setup, Mario (M) can jump on the top left corner of the wall (X) and walk straight through the slope, and into the wall behind! Not good! This is due to the fact that slopes are actually made of two separate types of tiles: the slope tiles (/) themselves, and special "slope assist" tiles (^), which are placed directly below each slope tile, plugging the invisible "cracks" between the corners of neighboring slope tiles (conveniently illustrated by the breaks between the ASCII slashes). In figure 2, notice that the bottom-most slope assist tile has been replaced with a solid block (X). Without that "plug" in place, Mario (M) can pass through the invisible crack between the corner of the slope tile and the solid block. Oops. Here's where the Slope Edge Fix block (F) comes in. When placed at the top of the wall, in place of the solid block: __ / ! /^ M/^ |F |X figure 3 it will act as either a slope assist OR solid tile, depending on how Mario touches it. If he touches it from the side (i.e. while jumping against the wall), it will act like a solid block; if he touches it from above (i.e. while walking or jumping onto the corner of the wall), it will act like a slope assist tile, plugging the crack and forcing him back onto the slope. Problem solved! How to use it ------------- First, you'll need to apply the included RESERVE2.IPS patch to your ROM, which will enable a few block actions normally "reserved" by LM, and then remap the new "standing on edge" action to "touched from above". (This is based directly on FuSoYa's original RESERVED.IPS.) As a nice side effect, certain custom blocks that Mario could previously stand on the edge of without activating (mostly spikes and switches) will now work like they should. =D Next, add SLOPEFIX.BIN to the block-inserting tool of your choice. Assign it the following offsets: Mario below: -1 Mario above: -1 Mario sides: 0 Sprite U/D: -1 Sprite L/R: 0 Fireball: 0 Leave the rest at -1. Insert the block to your ROM when done. Finally, in Lunar Magic, set the custom block to act like 0x1D8. That's it! Just use the block as described in the above diagrams. I recommend you insert a single copy of this block, and simply assign its tile number to any future slope edge tiles you create. It works with both left and right slopes of any grade. Known bugs ---------- Sometimes, if you jump at exactly the right angle into the corner of the block, the collision detection will fail and Mario will either get stuck in the block (you can jump out, though) or even pass completely through. I recommend placing as many solid tiles as possible behind the slope so the player can jump back out if necessary. Note that it took me many tries to duplicate this behavior in an "ideal" setup, so it's very unlikely players will ever encounter it in a "normal" level. (The original SMW engine has far more noticeable bugs anyway, so I doubt this one will stand out. =P) Happy hacking! =D