Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tutorial] Hex Editing Learnable Attacks

Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.



Closed Thread
 
Thread Tools
  #1    
Old February 10th, 2007 (03:30 PM).
Glitchfinder's Avatar
Glitchfinder Glitchfinder is offline
Let's all get along, please?
Silver Tier
 
Join Date: Sep 2006
Location: The Twilight Zone
Age: 25
Gender: Male
Nature: Careful
Posts: 477
This tutorial was translated from the tutorial at the German site ROM Hacker's World.

Egg Moves

The attacks that are transferred by breeding, are found in a list according to the following pattern:
[Pokémon1][Attack1][Attack2]... [Pokémon2][Attack1]...
It puts the first digit in 3 or more digit references after the last two digits. (Thus having two bytes for every attack)

Example: Geodude

The data would look like this:
[ 6A4E][0500][9D00][4F01 ]

First word (at 20074 in the ROM) indicates that it concerns Geodude. On The following indicates the learnable attacks:
0500 - > 5 = Mega Punch
9D00 - > 9D = Rock Slide
4F01 - > 14F = Block


Learnable TMs/HMs

This actually does very little since Gold/Silver. The data is only accommodated through special means, not through Pokémon data.
8 bytes are assigned to each Pokémon:
[TMs 8-1][TMs 16-9][TMs 24-17][TMs 32-25][TMs 40-33][TMs 48-41][HMS 6-1 and TMs 50-49][6 zero-bytes and HMs 8-7 ]
Pay attention to the fact that the sequence is in descending order within the bytes. For example, byte 1 looks like this:

[ TM8, TM7, TM6, TM5, TM4, TM3, TM2, TM1 ]
If the bit is a 1, then the Pokémon can learn the TM/HM.

Example: Bulbasaur

The first byte of Bulbasaur is [00100000].
With this information, you can see that of the first 8 TMs, Bulbasaur only learns TM6, Toxic.
Attacks Learnable by Leveling Up

The level-up attacks that Pokémon learn are stored in an easily compressed form. (OK, it isn’t really compression, is only a little tightly squeezed)
Every attack has the level it was learned, in two bytes. Any one Pokémon has it’s attacks separated from those of others by two bytes that form FFFF, like this:
[Attack1][Attack2][Attack3]...[FFFF]
(There isn’t anything there that you can see about which Pokémon learns the attacks. The lists are in the order of the Pokémon within the ROM’s hexadecimal list.)
This is how you will see the attacks listed where you can edit them:
[byte2: L64, L32, L16, L8, L4, L2, L1, A256][byte1: A128, a64, a32, a16, a8, a4, a2, a1 ]
All L-bits show the level, all A-bits show the attack ID.

Example: Treecko

First word [ 0102 ] is turned and converted then into the following:
- > 0201 - > 0000001 000000001
The seven bits indicate the level, which, in this example, is level 1. The attack results from the nine following bits, where 1=Pound. Thus, Treecko learns Pound at level 1.
  #2    
Old February 11th, 2007 (08:46 AM).
w_rink_ly's Avatar
w_rink_ly w_rink_ly is offline
Novice Hacker
 
Join Date: Nov 2005
Location: Cape Town, South Africa
Gender:
Nature: Bold
Posts: 72
I'm a bit confused about converting binary to hex etc
__________________

"Simplicity is the ultimate sophistication".
- Leonardo da Vinci
  #3    
Old February 11th, 2007 (08:49 AM).
Pazuzu's Avatar
Pazuzu Pazuzu is offline
Flushing Meadows
Silver Tier
 
Join Date: Sep 2004
Location: Room 1202
Nature: Bold
Posts: 5,452
Quote originally posted by w_rink_ly:
I'm a bit confused about converting binary to hex etc
The Windows calculator can do that for you. Just switch to Scientific mode and you will see all those modes as options on the top left.
Enter your values and click one of the options, it will convert them.
__________________
This signature has been disabled.
Height well exceeds 350px.
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
  #4    
Old February 11th, 2007 (05:23 PM).
Glitchfinder's Avatar
Glitchfinder Glitchfinder is offline
Let's all get along, please?
Silver Tier
 
Join Date: Sep 2006
Location: The Twilight Zone
Age: 25
Gender: Male
Nature: Careful
Posts: 477
Quote originally posted by w_rink_ly:
I'm a bit confused about converting binary to hex etc
There is not binary in this tutorial. In fact, the ones and zeros are in hex, within the ROMs. It is just that they use the following format:

0="no"
1="yes"

The tutorial tells you which TM/HM each 0 or 1 represents, so it should be pretty straightforward from there.
  #5    
Old February 12th, 2007 (12:31 AM).
w_rink_ly's Avatar
w_rink_ly w_rink_ly is offline
Novice Hacker
 
Join Date: Nov 2005
Location: Cape Town, South Africa
Gender:
Nature: Bold
Posts: 72
Oh ok. Thanks to u both lol
__________________

"Simplicity is the ultimate sophistication".
- Leonardo da Vinci
Closed Thread
Quick Reply

Sponsored Links
Thread Tools

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 UTC -8. The time now is 07:34 AM.