Friday, May 14, 2010

Warps - Yes, More About Them!

Good news everyone! I've completely cracked the data format for warps, and found out why rooms with working stairs in dungeons don't have real warp data. You see, to save space (And let's thank Capcom for this wonderful space-saving yet hack-friendly method), dungeon rooms without warp data will take whatever the room you're in and the position of the warping tile and add or subtract 64 (Depending on the tile. For example, if it's a staircase leading up, it will add 64) from the current room. This is great because hackers won't have to worry about space, and if they DO want to make the staircase lead somewhere special, a simple warp can be added.

Side rooms seem to be different, though. They use a separate loading procedure, which means their format is different. However, its format was how I predicted. The data only contains the 4 bytes. One byte is for... well, it seems to have something to do with data at 0xF8, another for the warp-containing map group (With some special formatting, that I'll leave up to the user to figure out. Trial and error is small price to pay, as it's pretty simple), one for the destined map, and then finally a nybble-based byte controlling the destination group and entrance type. So you may be wondering: How does the game know where to place you? Well, to save about 20 bytes total of space (Damn Capcom...), it loops through the level data until it finds a stair tile (Regardless of the direction). If it can't find one, it finds an entrance. If it can't find one of those, well, I haven't gotten there yet, but I'd imagine it finds some other warp spot.

So this blog was kind of crowded. All-in-all, I've figured out warps completely and should start, if not finish, the warp editor by tonight.

No comments:

Post a Comment