Celadon Mansion
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[Tutorial]Creating a Working (But Slightly Buggy) Town Map Item in Silver

Go down

[Tutorial]Creating a Working (But Slightly Buggy) Town Map Item in Silver Empty [Tutorial]Creating a Working (But Slightly Buggy) Town Map Item in Silver

Post by Mateo Mon Jul 01, 2013 2:27 am

Creating a "Town Map" tutorial

Ever wanted to do away with the Pokegear and go back to a simpler time, when we carried around a map? Now you can! In this tutorial, I will explain how I set up the Town Map item in Pokemon Secrets and Rumours. The item works almost perfectly, although there is a very minor pallet bug when you return to the bag. When I fix the bug, I'll update the code in this tutorial.

What you will need:
-Pokemon Silver Rom
-Hex Editor
-Item Editor GSC

Before getting started:
The first thing you want to do is decide which item you will be replacing to create your new item. The best route is to replace one of the Teru-Sama items. In SaR, I replaced item number x32, but you can use any item you want. The existing(non functional) beta town map item is the Teru-Sama x06, if you want to replace that one.

Getting Started- The Easy part:
Now let's open up our rom in the Item Editor and load the item we decided on. The first thing we will want to do is get its item data set up appropriately.

As the Town Map is a key item, we'll set the price to 0. All key items have it set to 0, because you can't buy or sell them anyway.

For the "Effect" and "Var." bytes, we will set these both to "00". As the item has no effect in the typcial sense, and no supporting variable for this effect, we set these to 00.

For the Pocket, we will choose "Key". This tells the game that it goes in the Key Items pocket with our other Key Items.

For Use, we will type "C0". This gives us the "Use" and "Quit" options in the pack, and only the "Quit" option when in battle. This is what we want.

For the Type, we will put "50". This makes it behave the way we want it to when it runs the item's ASM script.


For ASM Pointer, type in "1844". This should tell it to load the data for the Town Map when you access it. This will make the item function like the Town Map you find on the wall of almost every NPC house in the game.

The only bug with this is that the colours will look a little off when you return to the menu after viewing the map, because it will load the map pallets instead of the menu pallets. I'm working on a fix for this. My plan for fixing this will be to write a small code which will call the Town Map code, then draw the correct pallets to the screen after returning. I'll be taking a look through the thread we've all read a hundred times from Acmlm's board. (HyperHacker vs Tauwasser in Battle Tileset Hack)

Also please note, this code has been tested on Silver only, the offset in Gold is different, but I will post the pointer to use in Gold Version once I find it.
Mateo
Mateo
Administrator
Administrator

Posts : 89
Join date : 2013-02-07
Age : 35
Location : Celadon City, Kanto

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum