[Resource]G/S Useful Offsets Thread

View previous topic View next topic Go down

[Resource]G/S Useful Offsets Thread

Post by Mateo on Mon Jul 01, 2013 2:18 am

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.

Flight Data
0x15319

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

Tileset Animations

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?


Changing TM's

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

  Gold-> 8E976
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:

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, 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



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






Sprites

x141A9 - Your default sprite

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




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)

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





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 haven't yet found the pointers to insert these properly, but I will update this when I do.




Killing Things

No start Menu Descriptor

x12C75-12C7B
and                    -> Change these all to 00 to disable the description box on the Start menu (gives it that classic Red version feel)
x12C7F-12C92



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.




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.



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.




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.

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

My Hacks:

Skeetendo Thread

Skeetendo Thread - Celadon Mansion Thread - PC Thread


avatar
Mateo
Administrator
Administrator

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

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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