by GuyInSummers
Start by opening your Map Editor. Open your ROM, and go to the area at which you want the event to occur. In the case of my Mobile Sprout challenge, I want it to occur when you travel down the path to Peaceful Rest Valley. Keep in mind that a hotspot is defined as a rectangular area where stuff happens upon Ness entering it. Now, to tell the game where our hotspot rectangle is, we’re going to give it the location of the top-left corner and the bottom-right corner. One important thing to note is that hotspots use “8-Pixel Coordinate Notation” – a system in which one unit is defined as eight pixels. A tile (one of the squares formed by the gridlines in the Map Editor) is 32 x 32 pixels. So, if you do the math, you hopefully see that in 8-Pixel coordinate notation, each tile is four units by four units. So, to get the location of our two points, just take the X and Y location listed in the Map Editor, multiply by four, convert to hex and reverse. Does that make sense? No? That’s fine, just hold my hand, we’ll do it together. Step 1) Identify the two corners of your rectangular hotspots. Step 2) Scroll the map so that your upper-left corner is in the most upper-left corner of the Map Editor window. Write down the X and Y values. In this case, they're 104 and 222. Step 3) Scroll the map so that your bottom-right corner is in the most upper-left corner of the Map Editor window. Write down the X and Y values. In this case, they're 105 and 225. Step 4) Multiply your first set (for us, 104 and 222) by four. Remember why? We want the number of 8-pixel units, and tiles are 32 square pixels. This gives us 416 and 888. Step 5) Use Windows Calculator to convert your numbers to hexidecimal, or hex. Now, we have 1A0 and 378. Step 5) No matter what numbers you got, make them four-digit numbers by adding zeroes. That gives us 01A0 and 0378. Step 6) Flip the first two digits of the numbers with their last two digits. Giving us A0 01 and 78 03. Step 7) Now, repeat steps 4, 5, and 6 for your second set of numbers. (In our case, 105 and 225.) If you're following along with my example, you hopefully got A4 01 and 84 03. Try it. Did you get it? Good, good! Step 8) Put it all together. Like this: A0 01 78 03 A4 01 84 03. See those eight numbers? (Or bytes, as we hackers call them.) They describe the exact rectangle your hotspot is, in 8-pixel notation. Now, write down those 8 bytes. You're going to need them. Some last notes for this part: if you want to get really exact with your hotspots, you don't have to go only by tiles. Remember, since tiles are 32 pixels and each one unit in 8-pixel coordinate notation is 8 pixels, you can position your hotspot corners by half-tiles and even quarter-tiles. It's completely elementary: if you want your hotspot corner to be between X = 123 and X = 124, simply use an X value of 123.5. After all, after multiplying by four, it'll obviously still come out even. In a Nutshell: Take the X and Y coordinates of the top-left and bottom-right corners of your hotspot rectange, multiply by four, convert to hex, flip the digits and write it all down. Now, we have our hotspot's bytes, but how and where do we put them in the ROM? Well, for starters, we need a Hex Editor. I'm going to assume, right now, that you already have one. If you don't, you might not even qualify as a monkey yet. Now, open your hex editor, and open your ROM in it. Look through the menus in your hex editor for something called 'Goto', or 'Go to address', or something of that sort. I promise you it's in there somewhere. If it isn't, get a new hex editor. Now, in the Goto box that pops up, somewhere, there's going to be a text box where you can write an address. It might say "Address: " next to it, or have a dollar sign in it, but it'll be there. Now, in that box, write exactly this: 15F4F3. For me, this looks like this. But keep in mind - you and I may be using different hex editors, so don't be alarmed if that isn't what you're seeing. Go ahead and hit OK or whatever your Goto box says. Now, hopefully you know this (though it's okay if you don't), but '15F4F3' is a place in the EarthBound ROM. This particular place has a whole bunch of those 8-byte things describing all the hotspots in the game. In the following picture, I've highlighted all of the hotspots. (Click here, the pic is too big) You'll note there are also some zeroes at the beginning. Those are just there. Seriously. There have no purpose, and you need not mess with them. But the first actual hotspot you'll come to is 6C 02 DB 01 73 02 DD 01. Yup, eight bytes, just like the one we made. Every eight bytes denotes a new hotspot. But where do you get to put your hotspot? Well, you're going to have to replace one of the hotspots already in the game. Which ones can you safely write over? Well, it would definately help to consult a little file called Hotspots.txt. Open that file in another window now. You'll see a list of entries like this: #1 - (Triggers Poo's meditation) 620 x 475 = Meditation point 627 x 477 = Meditation point Look out: big scary paragraph ahead. It's important though, so bear with me. The first thing - the number - is actually pretty important. It's sensible and easy, though - the first entry is entry #1, the second #2. Just remember - it goes by hexidecimal. So the eleventh entry is #B. You should understand hex, but even if you don't, you can still just consult the list to see any hotspot's number. After the number, I may have jotted a little note indicating what the hotspot is used for in EarthBound. If there's a ~, it means I didn't bother to look if it was important or not. For example, entry 2C is listed as "Magicant". I couldn't tell by looking what that's supposed to be, so I marked it with a ~. You might not want to write over one of the entries with a ~, 'cuz it may or not be important. If you're %100 completely changing the game, however, you can obviously rewrite any of them. If you're not, choose an entry which I either didn't write a note for or an entry you know you won't be using in your game otherwise. For my hotspot, I'll be writing over entry #21, 'cuz if you ask me, it looks absolutely pointless. Now, 21 in normal decimal numbers is 33. So, I'm going to count over 32 8-byte groups, or 256 bytes. That puts me at the beginning of the 33rd (21st in hex) group, 2C 03 D6 02 2D 03 E1 02. Just to make sure I have the right group, I took those bytes, wrote them like 2C03 D602 2D03 E102, flipped the digits back around to 032C 02D6 032D 02E1, removed the zeroes for 32C, 2D6, 32D and 2E1, and then used Windows Calculator to convert those from hex to decimal - and lucky me, I got 812 by 726 and 813 by 737, the exact coordinates listed for entry #21 in Hotspots.txt. Now, take a deep breath, and replace the 8-byte group in the ROM with the 8-byte group you made in Part 1. In my case, I replaced 2C 03 D6 02 2D 03 E1 02 with A0 01 78 03 A4 01 84 03. Now, save your changes, and close your hex editor. Congratulations, your hotspot is now a recognized hotspot in the EarthBound ROM! But there still remains one thing to do - telling the game what to do when you walk into the hotspot. So, let's go at it! In a Nutshell: Go to 15F4F3 in your ROM. Consult Hotspots.txt to find a hotspot you won't be using. Remember the number, go to the entry, and overwrite the 8 bytes there with your eight bytes. Okay, so you have your hotspot in the ROM. But right now, it isn't going to do anything. We have to tell the game what to do when you march through your happy hotspot rectangle. To do so, we have to use some control codes. Now, in the following section, it would seriously help a lot if you were familiar with control codes and the EarthBound Text Editor. If you aren't, you'll still be able to continue, but things might just be a little over your head. When it comes to hotspots, there are two control codes involved: [1F 66 XX YY ZZ ZZ ZZ 00] and [1F 67]. Let's take a look at each of those. [1F 66 XX YY ZZ ZZ ZZ 00] This code is used to activate a hotspot. That means that until this code gets used in the game, touching your hotspot won't do anything. Once this code comes up, the next time you touch the hotspot, it'll work. So, let's break this apart. XX: This'll be a little scary, but... we don't actually know what this byte does. But we do know that it's either 01 or 02. So you can do this pretty simply: use 01, and if your hotspot doesn't work, try using 02. YY: This is the number of the hotspot you're activating. Remember? The number of the entry in Hotspots.txt? Well, this is where you put that number. ZZ ZZ ZZ: This is a pointer. When you touch your hotspot, this is the place in the ROM that you go. If you don't understand pointers, go to the Getting Started section of our site. I'm going to use the first block in the Expanded Meg, $F00000. You can use whatever you want. Just make sure you know what you're doing. So, for my demonstration, my completed control code is [1F 66 01 21 00 00 F0 00]. If that doesn't work for me, I'm going to try [1F 66 02 21 00 00 F0 00] instead. [1F 67 XX] This code simply deactivates the currently activated hotspot. As in, touching it will no longer do anything. XX: Once again, we're unsure what this byte does. However, it seems to correspond to the unknown XX byte in [1F 66]. So I'll try [1F 66 01] first, and if that fails, [1F 66 02]. So, where do we stick our codes? Well, our deactivator can be placed pretty simply: put it in the text at which [1F 66] points. So, once you touch the hotspot, the text you're pointed to immediately deactivates it. Our activator is a little trickier to place. If you want it so that the first time you pass through the hotspot, you WILL trigger it, then you need to place the code somewhere where it will undoubtably be activated. If you want the hotspot to only be triggered under a circumstance, like if you talked to a certain character, give that character the code. I'd like the hotspot to be triggered no matter what, so I'm going to put the code somewhere I know it's going to be triggered. Can you think of any place to put a control code so that it absolutely, positively will be activated when you get to our hotspot? I can't say I can, so I'm going to take the easy (and probably best) way out - put the code in the block which the nearest door points to. So get your Map Editor out. Switch to Door editing mode, and browse around for the nearest door to your hotspot. The nearest door that Ness would HAVE to go through to go to the hotspot. In our case, that would be the path from Onett to Twoson. So go to Onett and find the path to Twoson. Double-click the door there, and click Edit Destination. ![]() Now, isn't that cool? See where it says "Pointer: "? That's exactly what you think it is. Every door can have, if you choose, a pointer to text triggered when you walk through it. Perfect, we can use this to place our control code! Uh-oh, but wait. This door already has something in the Pointer space. Since no text appears when you walk through that door, we can only assume that that pointer points to some important control codes. So, let's follow the pointer and find out. Open your Hex Editor again, and crack open Windows Calculator. As you'll see, the pointer already in this destination is C99C31. That is an SNES address, not a hex address. So take Calculator and convert it to a hex address. You know how to do that, don't you? If not, you should really read the Getting Started section, and start smaller. And if you're just forgetful, here it is again: subtract C00000, and add 200. That gives us 99E1C. So let's go there in the Hex Editor and see what's up. Remember using Goto? Good. Now, once you're at 99E1C, jot down all the bytes from 99E1C to the first 02 you encounter. 'cuz 02 signifies the end of a text block. But hopefully you knew that. So, we get [04 D2 00 06 34 01 2F 99 C9 00 04 1F 00 05 20 00 05 21 00 05 32 01 05 33 01]. Important Note: This is where some CC knowledge seriously pays off. You have to make sure that the 02 you go to is actually an End Text Block 02, not an argument for another code. For example, if the first bytes you encountered were 04 02 00, you would NOT stop at that 02, since you should know [04 XX XX] is a Control Code. The 02 there is part of the [04 XX XX] control code, not a 02 standing on its own. If you aren't familiar with Control Codes at all, you may want to consult help at this point. Okay, now. For the Pointer in Door Destination 30, change it to a block you're going to replace. I'm going to use more of the Expanded Meg. Just for the sake of being easy and efficient, let's use $F00100. That's what I wrote in that box. And then I applied changes. See where I'm going with this? Now, close your Map Editor (but make sure to save!), say a few prayers, and open the Text Editor. This is where the end begins. Open your ROM. Now, go to the location where you had your door point. (Unless you have a person activating your hotspot, in which case you should just find their text, make it short enough to fit your activation code, and go for it.) Remember, we had ours point to $F00100. So go to that location in the Expanded Meg. First, type in the [1F 66...] activation code you made earlier. Next, if you had to salvage pre-existing code for this door from the Hex Editor, paste in that block. This way, the door will still work the way it used to (in addition to activating your hotspot. Finish it all up with an 02. Shake well and serve chilled. For me, this is looking like this: ![]() Go ahead, click Apply Changes and hope for the best. There you have it - your Hotspot will be activated when you walk through that cave. Now, we just have to make our hotspot DO something when we touch it. So, follow the pointer you used for ZZ ZZ ZZ in your activation code. We used $F00000. This is where you put the text and codes for whatever you want to happen. If you remember, for our example, we're making a Mobile Sprout fight you. Keep in mind, you can do anything here. I did this: [18 01 01]@(Hey, fatso!)[03 00] (Yeah, up there!)[03 00]@(Why don't you watch where you're stepping?)[03 00]@(It really makes me mad when people step on me.)[03 00] (So mad, I want to pound you right now.)[03 00]@(So I will!)[10 10 18 04 1F 23 9E 01 18 01 01]@(Big fat meanie!)[13 18 04 1F 67 01 02] And just for the sake of being absolutely complete, I'll even describe what each code in that block is for. 18 01 01: This opens a window for text. 03: This shows an arrow and waits for the player to press A. 00: This moves to the next line. 10 0A: This pauses for about one second. 18 04: This closes the text window. 1F 23 9E 01: This initiates the battle. 13: This waits for the player to press A, with no prompt. 1F 67 01: This deactivates the hotspot. 02: This ends the text block. There, that shows EXACTLY what I put in there. So there's no confusion. And I applied changes. And, guess what? THAT'S ALL! You've done it! You've successfully made a useable hotspot! CONGRATULATIONS YOU PWN! Now, that may have seemed like a long and painful process, but really, here's everything you had to do: Everything in a Nutshell: Take the X and Y coordinates of the top-left and bottom-right corners of your hotspot rectange, multiply by four, convert to hex, flip the digits and write it all down. Go to 15F4F3 in your ROM. Consult Hotspots.txt to find a hotspot you won't be using. Remember the number, go to the entry, and overwrite the 8 bytes there with your eight bytes. Find a good place for the activation code and place it there; the preferred spot being in a Door - making sure to keep the Door's original code should it have any. Finally, write the block of text to be called when you walk in the hotspot, making sure to include the Hotspot deactivator. A winner is you! So, officially consider yourself l33t. Now, there is one last thing to cover, but it's the supereasy part. In other words, this is the part where you get to play your game, watch in amazement as your hotspot works, and dance all happy around your room. And, of course, fix anything that goes wrong. So, I opened up ZSNES, said a quick prayer, and marched into Twoson. And here's how it went! ![]() Well, I got through our door without blowing up. That's a great sign! ![]() I'm so nervous... (And so horribly distorted. Stupid picture quality.) ![]() HOT SEXY MONKEYS! I works! It actually works! ![]() This is almost too cool to believe. And there you have it. You made a working hotspot. Way to go! There is just one small issue to note: since the hotspot is activated every time you pass through the door from Onett to Twoson, if you walk back to Onett and back to Twoson, you can trigger the battle again. This can be remedied by a simple Event Flag check system - I just didn't want to get TOO complicated. And now, I leave you. I wish you luck on the road to being a true l33t hacker! ~GuyInSummers |