You are not logged in.
Here is a list of the location and format of several things in the ROM that would be handy to know about when it comes to hex editing. Some of these are found on my own, others I got from MeanMrMustad or Coolboyman.
EDIT: I renamed this thread to give the name we all actually refer to it by.
The format is [Map Bank] [Map Number] [X Position] [Y Position].
Ever wanted to change some of the animated tiles, or maybe the animation of the cut tree or the headbutt tree to match your new graphics? Now you can! Just go to these locations in TLP and edit them all you want! Note that on the flower animation, it appears to have 4 frames, but only 2 seem to be used. They are the frames that look to be in full colour.
8CB0B - Headbut animation
8CC04 - Cut animation
FC348 - Water Animation
FC3A7 - Flower Animation
FC420 - Lava Animation
FC57D - Sprout Tower Pillar Animation
FC8AD - Whirlpool Animation?
11A66-11A97 What TM's teach you
11A98-11AA3 What HM's teach you (Room for 1 free!!!)
Basically, they are a list of the attacks taught by each TM in order. Pretty straight forward.
Changing Pokemon's Menu Sprites
Silver -> 8E95B
This is a list, in Pokedex order, of which sprite is used by each Pokemon. The list of sprites and their values is as follows:
Changing the intro monologue
624e - Change to 00 to disable the intro movie (Lapras, Charizard breathing Fire, all that)
62bf - Change to 00 to disable the clouds scrolling on the title screen
5faa - Change to 00 to disable time set monologue
906ae - Initial Hour (If time setting is disabled, it will always register as being this hour, if I recall. This is how I made it always day in SaR.)
5FC2 - Oak Sprite (1st time)
6017 - Oak Sprite (2nd time)
5FDE - Pokemon sprite
6061 - Pokemon Cry
6037 - Player Sprite
60C0 - Player Sprite again (Only shown if you enter your own name)
0x15319 - Where the game starts [Map Bank][Map][X][Y]
0x5cea - How much money to start with
1468C-146BF - Pointer table to Spritesets
146C0-146CA - Spriteset (Pallet Town)
146CB-146D5 - Spriteset (Viridian City)
146D6-146E0 - Spriteset (Pewter City)
146E1-146EB - Spriteset (Cinnabar Island)
146EC-146F7 - Spriteset (Cerulean)
146F8-14701 - Spriteset (Saffron)
14702-1470C - Spriteset (Celadon)
1470D-14717 - Spriteset (Lavender)
14718-14722 - Spriteset (Vermilion)
14723-1472D - Spriteset (Fuchsia)
1472E-14738 - Spriteset (League)
14739-14745 - Spriteset (New Bark Town)
14746-1474E - Spriteset (Cherrygrove City)
1474F-14759 - Spriteset (Mt. Silver)
1475A-14764 - Spriteset (Violet)
14765-1476F - Spriteset (Ecruteak)
14770-1477A - Spriteset (Azalea)
1477B-14785 - Spriteset (Goldenrod)
14786-14790 - Spriteset (Cianwood City)
14791-1499B - Spriteset (Olivine)
1479C-147A6 - Spriteset (Lake of Rage)
147A7-147B1 - Spriteset (Mahogany)
147B2-147BC - Spriteset (Blackthorn)
147BD-147C7 - Spriteset (Caves)
147C8-147D2 - Spriteset (S.S. Aqua + Etc.)
147D3-147DD - Spriteset (Special)
This is just a list of which sprites will be available on those maps. If a sprite is used that is not in the list, it will show up as the player during normal gameplay. To add a sprite to a sheet, you will have to replace one already in the list. Also, spritesheets are only reloaded when you enter a map through a warp, not via a connection. This is part of why the game uses Routegates. You may need to place a sprite in more than one spritesheet to get it to always show up properly in the game. (for example, putting one in Cherrygrove or New Bark Town would require editing both, as there is no route gate between the two).
x141A9 - Your default sprite
x147DE-14A17 - Pointers to Sprites, format is as follows:
(all are 1 byte each unless otherwise specified)
[GFX Pointer (2byte)]
Editing the font
0xF8001 - 2byte pointer to Font Graphics
0xF8008 - Byte tells which bank font is in
0xF800A - 8D 1bpp 72 - 2Bpp
Ever wonder how Coolboyman made the font in Prism have a shadow behind it? Now you can too!
Simply repoint the font to a stretch of blank space, and insert it in TLP. You will want to change it to 2Bpp so the game will load it as a 4-colour graphic, instead of a 2-colour graphic as it does by default.
0xF8046 - 0x30 for 1bpp, 0x60 for 2bpp
0xF8049 - 2byte Pointer to Border styles
0xF8055 - Byte tells which bank borders are in
0xF8057 - 0x8D for 1bpp, 0x72 for 2Bpp
These are the same as the font, but can be done independently. ie- you can have a 4-colour font, but still keep the normal 2-colour borders, or vice-versa.
The Trigger table
x94000 - Start location
Map Bank, Map No, 2 Byte Pointer to Ram Address
Ever added a trigger event to a map that didn't have one to begin with, then wondered why they didn't work? For triggers to work, the map has to be listed in this table, so the game knows what trigger timing they are on. The easiest way to fix this is of course to replace one of the maps in the list that you don't plan on having triggers on anymore. Like say you didn't need the triggers on Route 29 anymore that show you how to catch Pokemon, you could easily overwrite that map to add them to your other map.
x518A6 - How many trainer groups
x80000 - Pointer table to trainer pictures
x3993E - Pointer table to where trainer data starts. 2 byte pointer for each trainer group in order, starting with Falkner
xE9027 - Table with which song plays when you are "seen" by a trainer
x27283 - Table that determines DVs for each trainer class. 2 bytes per trainer class.
With this, you can do a lot of neat things. You could repoint the trainer groups for gym leaders, allowing them to have multiple entries so you could script rematches with them, or if you wanted to change their name to be longer or give them more Pokemon than they had to begin with. Also handy for adding more trainers of a certain type, or if you wanted to give Professor Oak his own trainer data (by default, his data points to the same location as Elite Four Will)
x39562 - Table that determines how much money is given by each trainer
For calculating the given money of any battle, a value from that table is picked and is multiplied by (8 * [highest leveled pokemon of enemy]). For example, the third byte in the list (19) is used for given money for trainer group "Leader (Falkner)".
Following it are six bytes you don't have to worry about and another "19" used for given money for trainer group "Leader (Whitney)" and so on...
Basically, you can find the "given money" byte for each trainer with the following calculation:
0x39564 + ([Trainer Group] - 1) * 7
(Credit to Miksy91)
x23994-Pointer (2-Byte) to name to use for "how to catch Pokemon"
Ever wanted to change the name of the who teaches you how to catch Pokemon, like I did in SaR so it says "OLD MAN" instead of "DUDE"? Now you can! Just repoint it to a blank space in the same bank (there's plenty of room to write a new name) and type whatever name you wish, followed by x50. Simple as that.
x1150= Determines the characters used by the "POKé" code in the text table.
Ever wanted to change it so words aren't annoyingly in ALL CAPS for no reason, but couldn't fix all of it? This lets you change the letters used by the special character used to display "POKé". You can type over it and make it say "Poké" instead, like a normal person.
xEA = Hex Byte to use in text for "é"
Useful if you want to, idk, have an NPC say "They should have called the new gens 'Jokémon' since they are so ridiculous!" or something.
x40D60 - New Pokedex Order
This is just a list of bytes determining the order Pokemon will show up in for "New Pokedex" mode. Handy for those of you replacing Pokemon in your hack.
Trainer Back Sprites
Hiro's back pic offset = 3F9CB
48 x 48 pixels
Dude's Back Pic offset = 3FB5B
48 x 48 pixels
You can insert these with AgiXP if you uncheck the box for "Pokemon/Trainer inserting" and manually tell it the offset. Type "&h" (without the quotes) in front of the offset to tell it that you are giving it a hex location instead of decimal. Be careful and make a backup before doing this, since if the picture ends up being larger when compressed than the old one it may overwrite something. I haven't yet found the pointers to insert these properly, but I will update this when I do.
No start Menu Descriptor
and -> Change these all to 00 to disable the description box on the Start menu (gives it that classic Red version feel)
Killing Hiro's Bed and Town Map in your room (From Tauwasser)
181BE7 - change to 01 to prevent them from loading. Lets you edit the map of the player's room without having stairs and the bed magically show up where they normally would, has the downside of not letting you change them with the PC.
x41AFE = Start of attack data
Format for each attack is this:
[Attack Animation] [Effect] [Base Power] [Type] [Accuracy] [PP] 
0x347F3 - Moves with increased critical hit ratio. List ends with 0xFF.
Ho-oh on Title Screen
Pointer to Ho-oh graphics: x62D7
Bank for Ho-oh graphics: x62DD
Original Ho-oh graphic data: xE4260
The graphics are organized strangely due to the way he flaps his wings and such (graphics for his Face, then Body, then only the tiles for the wings that change. It doesn't have a full bird for each frame since most of him stays the same). You can export the original picture from the rom with AGIXP. Just De-Select the "Pokemon/Trainer Inserting" box, manually tell it the offset, and for X and Y leave the first box blank and put 48 in the second one (this still won't make it all look right, but parts of it will be).
x509AE = Pointer table to Type Names
Unused types point to "NORMAL", so you can make new types by having them point to a new name, and then adding their data in the type chart, which Coolboyman wrote a tutorial about.
Pokemon Moves/Evolution Data
427BD-429B2 Pointers to Pokemon Moves/Evolution Data
Want a Pokemon to learn more moves than they do, or have more evolutions than they do? Change that here! The pointers go in Pokedex order.
xFCB9C-Offset of Trade Table Pointer (2 Byte)
Want to add in some new in-game trades instead of just replacing old ones? Simply repoint the table, copy the old one, and start adding your new entries to the list.
If you open up an item editor, and change item number x38 to have a Use option, you will find that it is a working Pokeflute item. It won't play the song, and you will have to change it's name from Teru-Sama for it to look right, but it works.
I hope this helps answer some questions you all may have, and helps you all do things in hacks that you wanted to, but were unsure how to do.
Last edited by Mateo (2013-02-01 21:34:46)
Very useful tutorial !
You included a lot more stuff I thought you'd have :D
Yeah, I was originally just going to post the offsets of the spritesheets, but when I was looking them up I remembered that I had a lot of offsets lying around that hadn't been posted or made into tutorials here, so I thought I'd go ahead and get a lot of it out there.
Nice tut Mateo, this will help me greatly in my hack.
Do you mind if I use that "Jokemon" line in my hack? That's brilliant! You will be credited (though I think you're already credited for some other stuff).
Haha sure thing mate. By the way, I can't help but noticing the reference to "Berzerk" in your user name. Oh, Evil Otto. I've shouted countless profanities because of that little smily face. Nice, haha.
Thanks. My dad always called himself Evil Otto, I took on the name later, but I am familiar with the character.
Awesome post. Extremely valuable.
When messing with replacing the Text Borders, I was curious where I might find the data that says which order to draw which tiles in around the text to make it a box. I am trying to add new border graphics, but they are in a different format and use more tiles than the way Gold is set up.
Here are the original 1 bpp borders
and here is one I would like to replace it with
As you can see the new one uses a different format, where it doesn't recycle tiles for the middle across and down sections.
I looked at the bgmap in no$gmb and read that it was using tiles 79 (top left border tile) 7A (middle tile), thinking it might use a tilemap, I searched for 797A and found a few things and made changes but nothing happened. I thought maybe then it might be elsewhere since the borders are dynamically drawn depending on the size coordinates it's fed.
I'm aware on how to change the text borders to load 2bpp and how to repoint it to the proper gfx but, does anyone have any ideas on maybe where or how I might find the routine to modify it to draw the extra tiles needed?
I remember I've changed it before, but I can't remember where I saved the data at. Its in a file with some more notes from MeanMrMustard, I remember that much, but I can't recall which one. I'll see if I can find it in the morning and post it. The thing I've found is that since it loads different sets depending on which border you have chosen in the options menu, if you want it to have more tiles you would make them part of the font graphic and have it load them from there. The problem with that comes with since the border is drawn before the text tiles are loaded, your border will appear as a glitch for a second then correct itself when the tiles load. I was looking for the ASM routine to change the order on this, so it would load the font first and then draw the block, but ASM isn't my strong suit so I never got that part working.
But yeah long story short, I'll see what all I can dig up for you first thing and post it here. Also, hopefully IIMarckus or Tauwasser knows the routine in question well enough to point out a useful fix for us.
…since the borders are dynamically drawn depending on the size coordinates it's fed.
This is correct.
The last time I worked with textboxes was a long, long time ago. But I believe they were drawn by a routine that takes at least three parameters:
width of textbox
height of textbox
location of upper‐left corner on tilemap
"Tilemap" here refers to an area in RAM (Pokémon‐specific) that has one byte for each tile on the visible screen, in WRAM from $C3A0–$C507. Put in the code 0101A0C3 and open the start menu to see what I mean. To figure out where the code that draws the box is, figure out what address in the tilemap refers to the upper‐left corner and search for code that refers to it, probably something sort of like this:
ld bc,$HHWW ld hl,$C4XX call $AABB
Replace the call with nops, and if the borders disappear you know you've found the right one. Just follow the call to manipulate the box‐drawing code to your heart's content.
Again, this is completely from memory so take it with a grain of salt.
Do you want to change the tiles or the box drawing routine? If you only want to change the tiles, you will have to look at the respective routine that loads them at 00:0DAC. If you want to change the behavior (though that would be somewhat quirky) you will have to take a look at 0x0EEF.
Where is the TM/HM compatibility for Pokemon stored in Gold?
Where is the TM/HM compatibility for Pokemon stored in Gold?
In Pokémon stats, which begin at 0x51B0B in Gold and are 32 bytes per Pokémon. Bytes 25–32 represent TMs/HMs, so Bulbasaur’s (0x51B23–0x51B2A) 26 1E 3D C4 86 18 45 00 correspond to this list. E.g., $26 is %00100110, meaning TMs 2, 3, and 6.
Gah... this is going to be a pain then. Since I edited the data in an older version of my hack, and started over, I wanted to copy over the data since it was just ridiculously tedious (I used a tool, so it was less tedious than hex editing and calculating the binary and whatnot, but still, there were 12000 something total checkboxes...) However, I hadn't edited the stats so looks like I have to edit something like 12000 checkboxes again... Thanks anyway (gets to work) :)
Another question - I changed it so HM08 is Rock Smash, but it won't show up in the TM/HM pockets since it only has room there for 57 items (all 50 TMs and 7 HMs). How can I expand the pocket to fit one more HM?
EDIT: Never mind since I can't edit HM08's ASM pointer, meaning it won't work anyway. Disregard this unless you have a suggestion on course of action.
Last edited by EvilOttoJr (2011-01-26 20:47:01)
I got the extended border tiles to load properly now, along with a new font. Now how would one go about finding where the pallete for the border is set? I've poked around in xEF6 but didn't see anything, then again I wasn't really sure what I was looking for.
It looks as if it just uses the first bg palette.
Is it possible it's just using the first bg palette by default because none is assigned to it?
Honestly, I've never found a way to change it for the intro. In the main game, you can edit the pallet that it uses, but in places like the intro it does seem to just use the first bg pallete as you noticed. It also does this in Prism last time I checked, so idk honestly.
IIRC the intro uses its own routine to clear the tile palettes after the textbox is displayd. You would just have to fix that, I guess.
According to the spritesheets, I believe that it's possible to make the game load only 0xA sprites at the same time.
Has anyone tried if there is memory for more though ?
The maximum is 0x0B, where only 0x09 sprites are type 0x01 or 0x02 and 0x02 sprites of type 0x03. Crystal doesn't separate by sprite type and can load a maximum 0x1F sprites, where a maximum of 0x17 can be loaded via spritesets.
Very useful and help me alots. Thank you very much for the offsets.
Last edited by Cloud (2011-05-12 09:09:37)
how to change teru-sama to gs ball?
because i saw a gsball[printed as (GSball)in MartED] in the shop
editor by swampert tools when you
save it in pokemart it appeared
Last edited by dragonlordz (2011-05-13 15:21:24)
Well that is because in Crystal they replaced one of the Teru-Samas to make GS Ball. To do this in gold, you would want to:
1. Change the name to GS Ball
2. Change its item data to be the same as the other key items
3. Change its item description
4. Make an event to give it to you for doing something
5. Make an event that checks for it in order for it to happen.
mateo dis offsets might be usefull too
How to Change Tileset 1 in Pokemon Gold
First open up your Gold Rom in Tile Layer Pro (Comes with EliteMap). Then go Edit > Goto...(or Ctrl+G). The insert the offset 18942, then click Go to, then it should get you to the Tileset 1, somethings won't change because they either have an animation effect or they just won't change.
How to Change the Trainer Card in Pokemon Gold
First open up your Gold Rom in Tile Layer Pro. Then go Edit > Goto...(or Ctrl+G). The insert the offset 253FF, then click Go to. This should take you to the Trainer Card, you can edit badges and people on it.
How to Change the Overworld Sprites in Pokemon Gold
First open up your Gold Rom in Tile Layer Pro. Then go Edit > Goto...(or Ctrl+G). The insert the offset C0000, then click Go to. All the trainer sprites should be there.
How to Change the Text at the start in Pokemon Gold
First open up your Gold Rom in Tile Layer Pro. Then go Edit > Goto...(or Ctrl+G). The insert the offset E4000, then click Go to. You can edit the Nintendo and Gamefreak text at the start of the game.
I'll try to get some more up soon, but that is all I have for now.
Hey I found the sprites that appear after the Pokemon League(when you beat it)
In TLP It's 86D73
EDIT: Also Found Where you can change the way bag looks
In TLP It's 10F00 Fishing Sprites Male trainer overworld sprites = 50500
Pokemon overworld sprites = 8E9FE
Tile Animations = FC348
Font = F82F1- change the Format by going View > Format> 1BPP.