PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Generation I/II Hacking > Guides & Documentation

Guides & Documentation Have a tutorial or a document to share? Post it here.

User Tag List

Reply
 
Thread Tools Display Modes
Old 13th July 2013, 07:01 AM   #1
Mateo
Johto Region Champion
AdministratorPHO VIP
 
Mateo's Avatar
 
Join Date: Jul 2013
Location: Johto
Age: 28
Posts: 813
Mateo Mateo Mateo Mateo Mateo
Default [Gen II] "Useful Offsets Thread"

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, Coolboyman, or various other users on Skeetendo. Some of these are redundant, since there are tools that edit them more simply than doing it by hand in a hex editor. But its always good to know how things work.


Flight Data
0x15319

The format is [Map Bank] [Map Number] [X Position] [Y Position].

Tileset Animations

Ever wanted to change the way some of the animated tiles looked, 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 - Headbutt animation
8CC04 - Cut animation
FC348 - Water Animation
FC3A7 - Flower Animation
FC420 - Lava Animation
FC57D - Sprout Tower Pillar Animation
FC8AD - Whirlpool Animation?


Changing TMs

11A66-11A97 What TMs teach you
11A98-11AA3 What HMs teach you (Room for 1 free, according to Koolboyman)

Basically, it is just a list of hex values corresponding to the skill taught by each TM in order. Pretty straight forward.




Changing Pokemon's Menu Sprites

Gold-> 8E976
Silver -> 8E95B

This is a list, in Pokédex order, of which sprite is used by each Pokémon. The list of sprites and their values is as follows:

01-Poliwag
02-Jigglypuff
03-Diglett
04-Pikachu
05-Staryu-
06-Magikarp
07-Bird
08-Rhydon
09-Clefairy
0A-Oddish
0B-Scyther
0C-Gengar
0D-Lapras
0E-MrMime
0F-Eevee
10-Miltank
11-Shellder
12-Grimer
13-Ekans
14-Voltorb
15-Squirtle
16-Bulbasaur
17-Charmander
18-Weedle
19-Unown
1A-Geodude
1B-Machoke
1C-Egg
1D-Tentacool
1E-Butterfree
1F-Zubat
20-Snorlax
21-Ho-oh
22-Lugia
23-Gyrados
24-Slowpoke
25-Sudowoodo
26-Charizard




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, I think. I'm pretty sure this is part of how I made it always day in SaR.)

5FC2 - Oak Sprite (1st time) [Can be any trainer number]
6017 - Oak Sprite (2nd time) [Can be any trainer number]
5FDE - Pokemon sprite
6061 - Pokemon Cry
6037 - Player Sprite [Can be any trainer number]
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



Spritesheets

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 standard warpless connection. This is part of why the game uses Route gates. 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).






Sprites

x141A9 - Your default sprite [Can be any sprite number, even one of the Variable ones]
x141AB - Bicycling Sprite [Can be any sprite number, even one of the Variable ones]

x147DE-14A17 - Pointers to Sprites, format is as follows:
(all are 1 byte each unless otherwise specified)
[GFX Pointer (2byte)]
[Size?]
[Bank]
[Frames?]
[DefaultPallet]






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. Or you can be creative in whatever way you want.
Simply repoint the font to a stretch of blank space (Gen II uses 00 for blank space, NOT FF like Gen III), 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

Format for each entry is:
[Map Bank] [Map No] [Ram Address (2 bytes)]

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's entry to add them to your other map.




Trainers

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). Akwa has written a nice trainer editor that will let you alter all trainer rosters however you want, and it automatically fixes all the pointers so you don't have to worry about that. It doesn't handle the other things this describes however.

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)



Catching Pokemon

x23994-Pointer (2-Byte) to name to use for "how to catch Pokemon"

Ever wanted to change the name of the NPC who teaches you how to catch Pokémon, 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.





Lowercase me!

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.






New Pokedex

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 will eventually post a separate tutorial that talks about the Backsprite loading routine, and explains how to do nifty things like repointing these, as well as adding additional backsprite options (like I did for Christmas, since the girl needed her own backsprite obviously).




Killing Things

No start Menu Descriptor

x12C75-12C7B AND x12C7F-12C92 -> 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.


Editing Attacks

x41AFE = Start of attack data

Format for each attack is this:

[Attack Animation] [Effect] [Base Power] [Type] [Accuracy] [PP] [00]

0x347F3 - Moves with increased critical hit ratio. List ends with 0xFF.




Repointing Things

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).



Type Names

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 on PokéCommunity.




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. You can also repoint them with Pokémon Editor Ultimate.



Trade Table

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. I need to go in and check to see what the limit is for how many new trades you can add without causing problems. Add that to my todo list.




Beta Stuff

Pokeflute -

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.
__________________
mateo.





"I'm gonna, uh, demonstrate the hot moves..." - Flannery
Mateo is offline   Reply With Quote
Likes Rocket Grunt liked this post
Sponsored Links
Reply

Tags
gen, useful offsets thread, [Document]

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:53 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts