PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Other Generations Hacking > Guides & Documentation

Guides & Documentation Learn how to make your own Pokémon game through the process of ROM Hacking, or help out the community by sharing your information.

Reply
 
Thread Tools Display Modes
Old 26th December 2014, 06:29 AM   #1
Sky High
Disturbing...
 
Sky High's Avatar
 
Join Date: Nov 2014
Posts: 5
Sky High
Default Adding New Moves in Emerald (and New Move Effects)

Since there is no thread for an adding/extending moves for Emerald, I just made one. Haha! XD
Every instruction for adding/extending moves of Emerald is similar to Ruby and FireRed but using different offsets depending on the version of the game. In this tutorial, it 100% works, no bugs, no glitches, and no errors. If have, reply. I think this is fine without screenshots but I might post a video tutorial soon. Again, this tutorial is for Emerald. Alright! Let's begin...

Tools:
Spoiler:
- An Emerald rom
- Any Game Boy Advance emulator (I'm using VBA) for testing
- Any hex editor (I'm using HxD) for editing
- Gamer2020's Pokemon Game Editor (GBAPGE) for editing moves and editing Pokemon's moves OR karatekid's Pokemon Gen III Rom Hacking Suite (G3HS) but only for editing Pokemon's moves
- Hack Mew's Free Space Finder (FSF) for looking for free spaces


List of every data needed:
Spoiler:
Code:
- Emerald Attack Data Table: 31C898
- Emerald Attack Name Table: 31977C
- Emerald Attack Animation Table: 2C8D6C
- Emerald Attack Description Table: 61C524
- Emerald Contest Data: 58C2B4
- Emerald 6-byte Limiter: 14E504
- Emerald Move Effects Table: 2D86A8


Prerequiste: Repoint
Spoiler:
Before to get started, you need to understand Repoint first. Repoint means that you should replace this address to your new offset. This is how you should do it. Example: the current data is at offset 123456 and the new data is at offset ABCDEF. Pointers of the current data is everywhere and written in hex values as 56 34 12 08 (little endian "12 34 56" and reversed "56 34 12" then add 08 or 09 at the end "56 34 12 08"). So then, replace those 56 34 12 08 all with EF CD AB 08 (little endian "AB CD EF" and reversed "EF CD AB" then add 08 or 09 at the end "EF CD AB"). Another reminder, offsets should end with 0, 4, 8 and C only or you're screwed up. Example: offset 123458 and ABCDEC. In some ASM situation, the offset is added by 1 for the pointer. Example: ASM is at offset 123458 and the pointer is 59 34 12 08. Almost forgot, there is a different way in repointing with offsets 1000000+ (higher than FFFFFF). Instead of using 08 at the end, use 09. Example: you have 1A2B3C0 or 01A2B3C0 as the new data. Mind little endian to it that makes "01 A2 B3 C0", reverse it so that makes "C0 B3 A2 01", and then replace 01 with 09 so that makes "C0 B3 A2 09" (obviously 08 + 01 = 09). That's it for those who are working with 32MB ROM.


Part 1: Adding New Moves
Spoiler:
Alright! Let's begin first with Adding New Moves.

Step 1: Attack Data table
Spoiler:
- The current Attack Data table is at 31C898.
- The Attack Data Table has 12 bytes (HEX: C bytes) each move.
- Navigate to 31C898 to the Attack Data table.
- Select and copy 4260 bytes (HEX: 10A4 bytes) of data.
- Paste it on free space that ends with a 0, 4, 8 or C (example: you have offset F00300 as the new desired Attack data table).
- Then, navigate back to 31C898 to the Attack Data table.
- This time, select and copy 1884 bytes (HEX: 75C bytes) of data.
- Then, navigate back to the new Attack data table (example: your new table is at F00300).
- Scroll down until you find a bunch of FF-s. To where the bunch of FF-s starts at the end of the new table, paste it there (example: your table is at F00300 and the bunch of FF-s starts at F013A4).
- Last for this step is to repoint all references of the attack data to the new offset. Replace all 98C83108 to the pointer of your new table (example: your new table is at F00300 then your pointer should be 0003F008).


Step 2: PP Data
Spoiler:
- The PP Data is above 4 bytes from the Attack Data table (31C898) so that makes 31C89C.
- Repoint all references of the PP Data to the new offset. Replace all 9CC83108 to the pointer of your new table (example: the table is at F00300 then the PP Data is 4 bytes away so that makes F00304 then your pointer should be 0403F008).


Step 3: Attack Name Table
Spoiler:
- The current Attack Name table is at 31977C.
- The Attack Data Table has 13 bytes (HEX: D bytes) each move. Each end with FF.
- Navigate to 31977C to the Attack Name table.
- Select and copy 4615 bytes (HEX: 1207 bytes) of data.
- Paste it on free space that ends with a 0, 4, 8 or C (example: you have offset F01B00 as the new desired Attack Name table).
- Then, navigate back to 31977C to the Attack Name table.
- This time, select and copy 2041 bytes (HEX: 7F9 bytes) of data.
- Then, navigate back to the new Attack data table (example: your new table is at F01B00).
- Scroll down until you find a bunch of FF-s. To where the bunch of FF-s starts at the end of the new table, but before that, the first FF is the end of the 354th move name. So, the another FF next to it, paste it there (example: your table is at F01B00 and the bunch of FF-s starts at F02D06).
- Last for this step is to repoint all references of the Attack Name table to the new offset. Replace all 7C973108 to the pointer of your new table (example: your new table is at F01B00 then your pointer should be 001BF008).


Step 4: Attack Animation Table
Spoiler:
- The current Attack Animation table is at 2C8D6C.
- The Attack Data Table has 4 bytes each move. They are bunch of pointers.
- Navigate to 2C8D6C to the Attack Animation table.
- Select and copy 1420 bytes (HEX: 58C bytes) of data.
- Paste it on free space that ends with a 0, 4, 8 or C (example: you have offset F03500 as the new desired Attack Animation table).
- Then, navigate back to 2C8D6C to the Attack Animation table.
- This time, select and copy 628 bytes (HEX: 274 bytes) of data.
- Then, navigate back to the new Attack Animation table (example: your new table is at F03500).
- Scroll down until you find a bunch of FF-s. To where the bunch of FF-s starts at the end of the new table, paste it there (example: your table is at F03500 and the bunch of FF-s starts at F03A8C).
- Last for this step is to repoint all references of the Attack Animation table to the new offset. Replace all 6C8D2C08 to the pointer of your new table (example: your new table is at F03500 then your pointer should be 0035F008).


Step 5: Attack Description Table
Spoiler:
- The current Attack Description table is at 61C524.
- The Attack Data Table has 4 bytes each move. They are bunch of pointers.
- Navigate to 61C524 to the Attack Description table.
- Select and copy 1420 bytes (HEX: 58C bytes) of data.
- Paste it on free space that ends with a 0, 4, 8 or C (example: you have offset F03D00 as the new desired Attack Description table).
- Then, navigate back to 61C524 to the Attack Description table.
- This time, select and copy 628 bytes (HEX: 274 bytes) of data.
- Then, navigate back to the new Attack Description table (example: your new table is at F03D00).
- Scroll down until you find a bunch of FF-s. To where the bunch of FF-s starts at the end of the new table, paste it there (example: your table is at F03D00 and the bunch of FF-s starts at F0428C).
- Last for this step is to repoint all references of the Attack Description to the new offset. Replace all 24C56108 to the pointer of your new table (example: your new table is at F03D00 then your pointer should be 003DF008).


Step 6: Contest Data
Spoiler:
- The current Contest Data table is at 58C2B4.
- The Attack Data Table has 8 bytes each move.
- Navigate to 58C2B4 to the Contest Data table.
- Select and copy 2840 bytes (HEX: B18 bytes) of data.
- Paste it on free space that ends with a 0, 4, 8 or C (example: you have offset F04500 as the new desired Contest Data table).
- Then, navigate back to 58C2B4 to the Contest Data table.
- This time, select and copy 1256 bytes (HEX: 4E8 bytes) of data.
- Then, navigate back to the new Contest Data table (example: your new table is at F04500).
- Scroll down until you find a bunch of FF-s. To where the bunch of FF-s starts at the end of the new table, paste it there (example: your table is at F04500 and the bunch of FF-s starts at F05018).
- Last for this step is to repoint all references of the Contest Data table to the new offset. Replace all B4C25808 to the pointer of your new table (example: your new table is at F04500 then your pointer should be 0045F008).


Step 7: The 6-Byte Limiter
Spoiler:
- The 6-byte limiter is at 14E504.
- Replace B1 20 40 00 81 42 with 00 00 00 00 00 00 to disable the limiter.


Step 8: Update the INIs
Spoiler:
- All that is left is to edit data on INIs of GBAPGE or G3HS.
- For changing and editing the INI of GBAPGE (must be in Emerald section):
Code:
AttackAnimationTable=&H(your new Attack Animation table offset)
AttackAnimationPointer=&H(your new Attack Animation table offset)
AttackData=&H(your new Attack Data table offset)
AttackDescriptionTable=&H(your new Attack Description table offset)
AttackNames=&H(your new Attack Names table offset)
ContestMoveData=&H(your new Contest Data table offset)
NumberOfAttacks=511 (change 354 to 511)
NOTE: I noticed in GBAPGE's ini, there is no AttackAnimationTable and AttackAnimationPointer in the Emerald section. So, add them along. It errors if not.

- For changing and the INI of G3HS (must be in Emerald section):
Code:
attacknames = 0x(your new Attack Names table offset)
numberofattacks = 0x1FF (change 163 to 1FF)
NOTE: Since that the current version of G3HS is only for editing Pokemon's moves.

- Examples of new data for this step:
Spoiler:
New Attack Data Table: 1F00300
New Attack Name Table: 1F01B00
New Attack Animation Table: 1F03500
New Attack Description Table: 1F03D00
New Contest Data: 1F04500

- Example for GBAPGE:
Code:
AttackAnimationTable=&H1F03500
AttackAnimationPointer=&H1F03500
AttackData=&H1F00300
AttackDescriptionTable=&H1F03D00
AttackNames=&H1F01B00
ContestMoveData=&H1F04500
NumberOfAttacks=511
-Example for G3HS:
Code:
attacknames = 0x1F01B00
numberofattacks = 0x1FF



Part 2: Adding New Move Effects
Spoiler:

Steps:
Spoiler:
- The current Move Effects Table is at 2D86A8.
- The Move Effects Table has 4 bytes each move. They are bunch of pointers.
- Navigate to 2D86A8 to the Move Effects table.
- Select and copy 856 bytes (HEX: 358 bytes) of data.
- Paste it on free space that ends with a 0, 4, 8 or C (example: you have offset F10000 as the new desired Contest Data table).
- Repoint all references of the Move Effects to the new offset. Replace all A8862D08 to the pointer of your new table (example: your new table is at F10000 then your pointer should be 0000F108).
- Your new Move Effects has 214 effects (being 213 the last one as viewed in GBAPGE). The last pointer "95 A7 2D 08" is actually marking the end of the table. So the pointer before that (which is 31 A7 2D 08) is actually the last effect in the table (#213).
- To add a new effect next to 213 is to overwrite the last pointer "95 A7 2D 08" with the new pointer of your new effect.
- To add effects from 214 to 255, go to the next bunch of FF-s after the 95 A7 2D 08 part, paste and overwrite this:
Code:
FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 FE FE FE 08 95 A7 2D 08
- Just replace FE FE FE 08 with the pointers of your new move effects. You can have 42 new move effects (214th is included). The 256th, which again is "95 A7 2D 08", is the mark of the of your new table and isn't select-able in GBAPGE.


DONE!

Every procedure just copy and paste so just replace data from the Pound after the "-" after Psycho Boost. Noted that you can only have 511 moves. I have recklessly tried 1000 new moves but the 512th to 1000th don't work, even at the learnset of each mon. Alright! That's it for Adding New Moves for Emerald. Just a reminder for pasting hex values: since I am using HxD, I paste it with CTRL+B (paste write) not CTRL+V (paste insert). I hope this helps a lot for Emerald hackers. Good luck!
Sky High is offline   Reply With Quote
Sponsored Links
Reply

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 12:06 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