Advertiser Content

Tutorial [Ruby] Adding New Moves

Started by destinedjagold October 11th, 2013 6:50 AM
  • 10921 views
  • 25 replies

destinedjagold

You Can Contact me in PC's Discord

Age 29
Male
Philippines
Seen October 16th, 2019
Posted May 6th, 2019
8,596 posts
12.5 Years
There are tutorials on how to add new attack moves without replacing older or already existing ones.
Yes, I am aware, but they're all for FireRed.
This tutorial will teach you on how to add new moves with Ruby, for the weird people like me who doesn't hack Emerald or FireRed. =/

Anyway, always remember the golden rule in hacking: always save a back-up.
Spoiler:


Now then...
These were my notes while I was doing it with my hack.
And I decided to share it~



Adding New Attacks In Ruby

(This Tutorial Will Add 157 New Attacks)

Step 1...
- Navigate to the attack data table.
--- Ruby = 1FB12C
- Select and copy 4,260 (hex = 10A4) bytes of data.
--- Ruby = 1FB12C to 1FC1D0
- Paste it on free space.
--- Example: Your offset: 800000 to 8010A4
- Repoint all references of the attack data to the new offset.
--- Ruby = 1FB12C => 2CB11F08
--- Example: Your offset: 800000 => 00008008
- Repoint the PP data to the new offset + 4 bytes.
--- Ruby = 1FB12C + 4 bytes = 1FB130 => 30B11F08
--- Example: Your offset: 800000 + 4 bytes = 800004 => 04008008

Step 2...
- Navigate back to the attack data table.
--- Ruby = 1FB12C
- Select and copy 1,884 (hex = 75C) bytes of data.
--- Ruby = 1FB12C to 1FB888
- Select and paste 1,884 (hex = 75C) bytes of free space data at the end of the attack data on the new offset.
--- Example: Your offset: 8010A4 to 801800

Step 3...
- Navigate to the attack name table.
--- Ruby = 1F8320
- Select and copy 4,615 (hex = 1207) bytes of data.
--- Ruby = 1F8320 to 1F9527
- Paste it on free space.
--- Example: Your offset: 802000 to 803207
- Repoint all references of the attack data to the new offset.
--- Ruby = 1F8320 => 20831F08
--- Example: Your offset: 802000 => 00208008

Step 4...
- Navigate back to the attack name table.
--- Ruby = 1F8320
- Select and copy 2,041 (hex = 7F9) bytes of data.
--- Ruby = 1F8320 to 1F8B19
- Select and paste 2,041 (hex = 7F9) bytes of free data at the end of the attack name data on the new offset.
--- Example: Your offset: 803207 to 803A00

Step 5...
- Navigate to the attack animation table.
--- Ruby = 1C7168
- Select and copy 1,420 (hex = 58C) bytes of data.
--- Ruby = 1C7168 to 1C76F4
- Select and paste it on free space that ends with a 0, 4, 8 or C.
--- Example: Your offset: 803A04 to 803F90
- Repoint all references of the attack data to the new offset.
--- Ruby = 1C7168 => 68711C08
--- Example: Your Offset: 803A04 => 043A8008

Step 6...
- Navigate back to the attack animation table.
--- Ruby = 1C7168
- Select and copy 628 (hex = 274) bytes of data.
--- Ruby = 1C7168 to 1C73DC
- Select and paste 628 (hex = 274) bytes of free space data at the end of the attack animation table on the new offset.
--- Example: Your offset: 803F90 to 804204

Optional Step...
- Navigate to the attack animation table...
--- Ruby = 3C09D8
- Select and copy 1,420 (hex = 58C) bytes of data.
--- Ruby = 3C09D8 to 3C0F64
- Paste it on free space.
--- Example: Your offset: 804500 to 804A8C
- Repoint all references of the attack data to the new offset.
--- Ruby = 3C09D8 - D8093C08
--- Example: Your offset: 804500 => 00458008
- Navigate back to the attack description table...
--- Ruby = 3C09D8
- Select and copy 628 (hex = 274) bytes of data.
--- Ruby = 3C09D8 to 3C0F64
- Select and paste 628 (hex = 274) bytes of free space data at the end of the attack animation table on the new offset.
--- Example: Your offset: 804A8C to 804D00

Step 7...
- Update the data on PGE's ini file.
--- NumberOfAttacks=511
--- AttackData=&H(new attack data table offset)
--- AttackNames=&H(new attack name table offset)
--- AttackAnimationTable=&H(new attack animation table offset)

Step 8...
- Disable the 6-byte limiter to 00 00 00 00 00 00.
--- Ruby = 120DF4 = B1 20 40 00 81 42 ==> 00 00 00 00 00 00



Repoint - “it means that you should replace this address to your new offset.”
Example...
- Repoint the PP data to the new offset + 4 bytes.
--- Ruby = 1FB12C + 4 bytes = 1FB130 => 30B11F08


The underlined reversed offset is the address you'll need to replace.
Example, your selected free offset is 0x820000.
820000 => 00008208
Swap the red ones and add 08 at the end.

So, in this example, search and replace 30B11F08 with your reversed offset, 00008208.

Spoiler:

Spoiler:

Spoiler:
Select Data - “highlight—or select—the required amount of bytes/data.”
Example...
- Select and copy 4,260 (hex = 10A4) bytes of data.
--- Ruby = 1FB12C to 1FC1D0


Start copying on the blue arrow...
Spoiler:

...and stop at one byte behind offset 1FC1D0 at the red arrow...
Spoiler:


Resource...


And that's it~
G'luck with your hacks, pipz~

LCCoolJ95

Limited Capacity

Age 24
Male
The World That Never Was
Seen 3 Days Ago
Posted October 12th, 2019
608 posts
10.5 Years
Hey congratulation and thank you very very much for this!!! now pokemon ruby on fire!!!


I have one question is that will it work for pokemon emerald...(i Hope it work)
I've done it already :)

Thank you DJG, I already knew how to do this, but it's nice to know that someone made a proper tutorial for this. Now, all we need to do now, is to find the move effects table.
"The greatest obstacle in life is Yourself. Overcome it, and you will achieve the greatest accomplishment of all." -Art Beins, 1982

Pokémon Theta Emerald EX: https://www.pokecommunity.com/showthread.php?t=386240

destinedjagold

You Can Contact me in PC's Discord

Age 29
Male
Philippines
Seen October 16th, 2019
Posted May 6th, 2019
8,596 posts
12.5 Years
i have a question:
how do you do the eight step?
Ah, that one...

Step 8...
- Disable the 6-byte limiter to 00 00 00 00 00 00.
--- Ruby = 120DF4 = B1 20 40 00 81 42 ==> 00 00 00 00 00 00[/INDENT]
With your ROM currently opened with a hex editor, search the bytes
B12040008142
which is found in the address 120DF4, and then replace them with zeros.
000000000000

destinedjagold

You Can Contact me in PC's Discord

Age 29
Male
Philippines
Seen October 16th, 2019
Posted May 6th, 2019
8,596 posts
12.5 Years
How to edit Contest data then?
EDIT: At least tell me how many bytes each move uses, I know the offset

You can easily edit the contest data thru PGE.
Attack data contains 12 bytes each attack.
Attack names contains 13 bytes each attack.

Germaniac

Victoria Concordia Crescit

Age 21
Male
Jakarta, Indonesia
Seen 1 Week Ago
Posted November 7th, 2018
566 posts
10.5 Years

You can easily edit the contest data thru PGE.
Attack data contains 12 bytes each attack.
Attack names contains 3 bytes each attack.
I always get an error editing the contest data of the new moves in PGE :/, btw pretty sure you mean 13 bytes for attack names, I was asking for the bytes used for contest data though

destinedjagold

You Can Contact me in PC's Discord

Age 29
Male
Philippines
Seen October 16th, 2019
Posted May 6th, 2019
8,596 posts
12.5 Years
I always get an error editing the contest data of the new moves in PGE :/, btw pretty sure you mean 13 bytes for attack names, I was asking for the bytes used for contest data though
If you mean this error...
Spoiler:

Then I just hit [Continue] and continue making changes, and then hit Save.
My changes to the Contest data were saved no problem, however, just save some back-up in case some unknown things might occur. =/

And yesh, I meant 13 bytes for attack names.
My stupid keyboard was just being stupid. >.>

Germaniac

Victoria Concordia Crescit

Age 21
Male
Jakarta, Indonesia
Seen 1 Week Ago
Posted November 7th, 2018
566 posts
10.5 Years
If you mean this error...
Spoiler:

Then I just hit [Continue] and continue making changes, and then hit Save.
My changes to the Contest data were saved no problem, however, just save some back-up in case some unknown things might occur. =/

And yesh, I meant 13 bytes for attack names.
My stupid keyboard was just being stupid. >.>
No, it's different error, also, when I change the contest data (move effect section is the bugged one) of the new moves, some old moves also changed along with the new ones, maybe they have the same pointer?
Spoiler:

I inserted 160 appeal (the error happens with any appeal), when I go to check the move again, this happened

Also, if you look at PGE's ini, you'll find this:
ContestMoveData=&H3CF594
ContestMoveEffectData=&H3D00AC

Gamer2020

Accept no Imitations!

Male
Distant Land
Seen 1 Week Ago
Posted January 6th, 2019
942 posts
11.5 Years
If you mean this error...
Spoiler:

Then I just hit [Continue] and continue making changes, and then hit Save.
My changes to the Contest data were saved no problem, however, just save some back-up in case some unknown things might occur. =/

And yesh, I meant 13 bytes for attack names.
My stupid keyboard was just being stupid. >.>
No, it's different error, also, when I change the contest data (move effect section is the bugged one) of the new moves, some old moves also changed along with the new ones, maybe they have the same pointer?
Spoiler:

I inserted 160 appeal (the error happens with any appeal), when I go to check the move again, this happened

Also, if you look at PGE's ini, you'll find this:
ContestMoveData=&H3CF594
ContestMoveEffectData=&H3D00AC

I can't remember if I have fixed this yet. Try the new version of PGE in my signature. If the error still happens send me a PM and I'll fix it.

AtecainCorp.

Rejishan awake...

Age 26
Male
Takoabe Town (Region Thonsu)
Seen 2 Weeks Ago
Posted 2 Weeks Ago
1,349 posts
11.5 Years
I found one glitch after using this method. I use your method destinedjagold in my hack <Which trailer was in my signature> And I have strange failure with display Pokemon Nature names. Some of them become glitchy text <It was not freezing game.>
- My new Project comming Soon

Xencleamas

Suddenly lurking in the shadows...

Male
Asgard
Seen January 21st, 2019
Posted August 7th, 2018
460 posts
5.8 Years
Alright! I have figured out the problem for contest data. Everytime when you open PGE with the added moves, there are errors for viewing or editing contest data. The reason why it errors is because the contest data is not expanded. Here goes! Just add this to your tutorial:

Spoiler:

Step #...
- Navigate to the contest data table.
--- Ruby = 3CF594
- Select and copy 2,840 (hex = B18) bytes of data.
--- Ruby = 3CF594 to 3D00AC
- Select and paste it on free space that ends with a 0, 4, 8 or C.
--- Example: Your offset: 804D00 to 805818
- Repoint all references of the attack data to the new offset.
--- Ruby = 3CF594 => 94F53C08
--- Example: Your Offset: 804D00 => 004D8008

Step #...
- Navigate back to the contest data table.
--- Ruby = 3CF594
- Select and copy 1,256 (hex = 4E8) bytes of data.
--- Ruby = 3CF594 to 3CFA7C
- Select and paste 1,256 (hex = 4E8) bytes of free data at the end of the attack name data on the new offset.
--- Example: Your offset: 805818 to 805D00

Step #...
- Update the data on PGE's ini file.
--- NumberOfAttacks=511
--- AttackData=&H(new attack data table offset)
--- AttackNames=&H(new attack name table offset)
--- AttackAnimationTable=&H(new attack animation table offset)
--- AttackDescriptionTable=&H(new attack description table offset)
--- ContestMoveData=&H(new contest data table offset)


If anyone follows these steps, when you open GBAPGE, there will be no error for viewing contest data. I hope this helps. I'm not actually a Ruby hacker but I just researched for helping. BY THE WAY, THE OPTIONAL STEP (the Attack Description Table) ISN'T OPTIONAL AT ALL. IT IS REQUIRED TOO. Good luck with this!

Xencleamas Untitled Pokémon Fan Game (Coming Soon!) Untitled Region (Coming Soon!)
Age 23
Male
Seen July 6th, 2019
Posted October 26th, 2016
253 posts
6.6 Years
I found one glitch after using this method. I use your method destinedjagold in my hack <Which trailer was in my signature> And I have strange failure with display Pokemon Nature names. Some of them become glitchy text <It was not freezing game.>
Again, your move description table is probably why you're getting glitchy natures. Look at this: http://www.pokecommunity.com/showpost.php?p=8087194&postcount=168

RuFF

Hope you're having a RuFF day!

Age 21
Male
Philippines
Seen July 15th, 2019
Posted December 19th, 2017
360 posts
7.3 Years
There are tutorials on how to add new attack moves without replacing older or already existing ones.
Yes, I am aware, but they're all for FireRed.
This tutorial will teach you on how to add new moves with Ruby, for the weird people like me who doesn't hack Emerald or FireRed. =/

Anyway, always remember the golden rule in hacking: always save a back-up.
Spoiler:


Now then...
These were my notes while I was doing it with my hack.
And I decided to share it~



Adding New Attacks In Ruby

(This Tutorial Will Add 157 New Attacks)

Step 1...
- Navigate to the attack data table.
--- Ruby = 1FB12C
- Select and copy 4,260 (hex = 10A4) bytes of data.
--- Ruby = 1FB12C to 1FC1D0
- Paste it on free space.
--- Example: Your offset: 800000 to 8010A4
- Repoint all references of the attack data to the new offset.
--- Ruby = 1FB12C => 2CB11F08
--- Example: Your offset: 800000 => 00008008
- Repoint the PP data to the new offset + 4 bytes.
--- Ruby = 1FB12C + 4 bytes = 1FB130 => 30B11F08
--- Example: Your offset: 800000 + 4 bytes = 800004 => 04008008

Step 2...
- Navigate back to the attack data table.
--- Ruby = 1FB12C
- Select and copy 1,884 (hex = 75C) bytes of data.
--- Ruby = 1FB12C to 1FB888
- Select and paste 1,884 (hex = 75C) bytes of free space data at the end of the attack data on the new offset.
--- Example: Your offset: 8010A4 to 801800

Step 3...
- Navigate to the attack name table.
--- Ruby = 1F8320
- Select and copy 4,615 (hex = 1207) bytes of data.
--- Ruby = 1F8320 to 1F9527
- Paste it on free space.
--- Example: Your offset: 802000 to 803207
- Repoint all references of the attack data to the new offset.
--- Ruby = 1F8320 => 20831F08
--- Example: Your offset: 802000 => 00208008

Step 4...
- Navigate back to the attack name table.
--- Ruby = 1F8320
- Select and copy 2,041 (hex = 7F9) bytes of data.
--- Ruby = 1F8320 to 1F8B19
- Select and paste 2,041 (hex = 7F9) bytes of free data at the end of the attack name data on the new offset.
--- Example: Your offset: 803207 to 803A00

Step 5...
- Navigate to the attack animation table.
--- Ruby = 1C7168
- Select and copy 1,420 (hex = 58C) bytes of data.
--- Ruby = 1C7168 to 1C76F4
- Select and paste it on free space that ends with a 0, 4, 8 or C.
--- Example: Your offset: 803A04 to 803F90
- Repoint all references of the attack data to the new offset.
--- Ruby = 1C7168 => 68711C08
--- Example: Your Offset: 803A04 => 043A8008

Step 6...
- Navigate back to the attack animation table.
--- Ruby = 1C7168
- Select and copy 628 (hex = 274) bytes of data.
--- Ruby = 1C7168 to 1C73DC
- Select and paste 628 (hex = 274) bytes of free space data at the end of the attack animation table on the new offset.
--- Example: Your offset: 803F90 to 804204

Optional Step...
- Navigate to the attack animation table...
--- Ruby = 3C09D8
- Select and copy 1,420 (hex = 58C) bytes of data.
--- Ruby = 3C09D8 to 3C0F64
- Paste it on free space.
--- Example: Your offset: 804500 to 804A8C
- Repoint all references of the attack data to the new offset.
--- Ruby = 3C09D8 - D8093C08
--- Example: Your offset: 804500 => 00458008
- Navigate back to the attack description table...
--- Ruby = 3C09D8
- Select and copy 628 (hex = 274) bytes of data.
--- Ruby = 3C09D8 to 3C0F64
- Select and paste 628 (hex = 274) bytes of free space data at the end of the attack animation table on the new offset.
--- Example: Your offset: 804A8C to 804D00

Step 7...
- Update the data on PGE's ini file.
--- NumberOfAttacks=511
--- AttackData=&H(new attack data table offset)
--- AttackNames=&H(new attack name table offset)
--- AttackAnimationTable=&H(new attack animation table offset)

Step 8...
- Disable the 6-byte limiter to 00 00 00 00 00 00.
--- Ruby = 120DF4 = B1 20 40 00 81 42 ==> 00 00 00 00 00 00



Repoint - “it means that you should replace this address to your new offset.”


Select Data - “highlight—or select—the required amount of bytes/data.”




Resource...


And that's it~
G'luck with your hacks, pipz~
Hi! I followed you tutorial and it works awesome!
But I got a problem with the pokemon natures when I did this


And one more thing, I don't know which to follow and which is not
- Select and copy 4,260 (hex = 10A4) bytes of data.
--- Ruby = 1FB12C to 1FC1D0
when In selecting block
if i followed this
- Select and copy 4,260 (hex = 10A4) bytes of data.
it select blocks
from 1FB12C to 1FC1CF
but if I followed this
--- Ruby = 1FB12C to 1FC1D0
from 1FB12C to 1FC1D1 (In other words it selects 4,261 (hex = 10A5) bytes of data)

by the way I use HxD

EDIT: I didn't follow the optional step.
My Hack:

destinedjagold

You Can Contact me in PC's Discord

Age 29
Male
Philippines
Seen October 16th, 2019
Posted May 6th, 2019
8,596 posts
12.5 Years
Hi! I followed you tutorial and it works awesome!
But I got a problem with the pokemon natures when I did this
I cannot see the image. :/

And one more thing, I don't know which to follow and which is not

when In selecting block
if i followed this

it select blocks

but if I followed this

from 1FB12C to 1FC1D1 (In other words it selects 4,261 (hex = 10A5) bytes of data)

by the way I use HxD
Only select 10A4 hex of data. And no, it does not select up to 1FC1D1, but only up to 1FC1D0.

EDIT: I didn't follow the optional step.
You need to follow it, as someone pointed out that the Optional Step is not really optional. :/

RuFF

Hope you're having a RuFF day!

Age 21
Male
Philippines
Seen July 15th, 2019
Posted December 19th, 2017
360 posts
7.3 Years
I cannot see the image. :/



Only select 10A4 hex of data. And no, it does not select up to 1FC1D1, but only up to 1FC1D0.



You need to follow it, as someone pointed out that the Optional Step is not really optional. :/
Thanks. The Image shows the destroyed Nature Names don't why that happened
EDIT here are the images don't know if you can see this now
My Hack:
Advertiser Content