Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tutorial] Emerald: Adding New Evolution Methods

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.



Reply
 
Thread Tools
  #1    
Old November 3rd, 2014 (03:09 AM). Edited February 17th, 2015 by anonyboy.
anonyboy's Avatar
anonyboy anonyboy is offline
Pokemon Aerial Emerald Creator&Pokemon Hybrid Co-Creator
 
Join Date: Sep 2013
Location: Israel
Gender: Male
Nature: Adamant
Posts: 228
Step 1 (Extending the table and limiters)
Spoiler:
First, fire up your ROM in a hex editor and navigate to 0x6D198. Select 0x3C bytes and copy them to some free space.
Next, we must change the pointers to our new location,Search 98D10608.
There is only one pointer at 0x6D194.

Next the game has a limit on the number of evolutions. This is at 0x6D180. Change this to the new number of evolutions (in hex)


Step 2 (Porting routines from FireRed to Emerald)
Spoiler:
Well,Since all methods existing for FireRed, We Don't need to make new ones for Emerald.
1. Here are some offsets needed for porting:
levelcheckloc: .word 0x0806D32F
noevo: .word 0x0806D333
decryptpoke: .word 0x0806A519
encryptpoke: .word 0x0806ACAD
firstpoke: .word 0x020244EC
mapbank: .word 0x020322E4
map: .word 0x0203732C
basestatstable: .word 0x083203CC (If you have expanded the number of pokemon in the game, change this to the Base Stats Table in your game)

2. Changing Offsets in routines:
Example:
Here is FR's Male Lvl Evolution:
Spoiler:
main:
push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrb r2, [r3, #0x2]
mov r0, r8
bl decrypt2
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r1, r2
blt exit
mov r0, r8
mov r1, #0xFF
ldr r0, [r0, #0x0]
and r1, r0
mov r0, r8
bl decrypt
mov r11, r0
pop {r0-r7}
mov r5, r11
ldr r2, pokemondata
mov r4, #0x1C
mul r5, r4
add r5, r5, r2
ldrb r5, [r5, #0x10]
cmp r1, r5
blt exit
mov r10, r3
pop {r0-r7}
mov r1, r10
ldr r0, levelcheckloc
bx r0
exit: pop {r0-r7}
ldr r0, noevo
bx r0
decrypt: push {r0-r7}
mov r1, #0xB
ldr r2, decryptpoke
bx r2
decrypt2: push {r0-r7}
mov r1, #0x38
ldr r2, decryptpoke
bx r2
.align
levelcheckloc: .word 0x0804310D
noevo: .word 0x08043111
decryptpoke: .word 0x0803FBE9
pokemondata: .word 0x08254784


Changed to Emerald:
Spoiler:
main:
push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrb r2, [r3, #0x2]
mov r0, r8
bl decrypt2
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r1, r2
blt exit
mov r0, r8
mov r1, #0xFF
ldr r0, [r0, #0x0]
and r1, r0
mov r0, r8
bl decrypt
mov r11, r0
pop {r0-r7}
mov r5, r11
ldr r2, pokemondata
mov r4, #0x1C
mul r5, r4
add r5, r5, r2
ldrb r5, [r5, #0x10]
cmp r1, r5
blt exit
mov r10, r3
pop {r0-r7}
mov r1, r10
ldr r0, levelcheckloc
bx r0
exit: pop {r0-r7}
ldr r0, noevo
bx r0
decrypt: push {r0-r7}
mov r1, #0xB
ldr r2, decryptpoke
bx r2
decrypt2: push {r0-r7}
mov r1, #0x38
ldr r2, decryptpoke
bx r2
.align
levelcheckloc: .word 0x0806D32F
noevo: .word 0x0806D333
decryptpoke: .word 0x0806A519
pokemondata: .word 0x083203CC


Step 3 (Making the routine work in the game)
Spoiler:
To make this compatible with G3HS open up the .ini file and navigate to these lines:
Quote:
evolutionmethods =
evomethodsproperties =
Add in a name for your method, and for properties add either Level, Item, None, Move, Pokemon, Location
Note: Follow KK552's syntax for the ini file.
Finally open your ROM and in G3HS and work add the evolution and test it!!!
Spoiler:



Here Are The currently ported routines:
Spoiler:

Male Evolutions:
Spoiler:
main:
push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrb r2, [r3, #0x2]
mov r0, r8
bl decrypt2
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r1, r2
blt exit
mov r0, r8
mov r1, #0xFF
ldr r0, [r0, #0x0]
and r1, r0
mov r0, r8
bl decrypt
mov r11, r0
pop {r0-r7}
mov r5, r11
ldr r2, pokemondata
mov r4, #0x1C
mul r5, r4
add r5, r5, r2
ldrb r5, [r5, #0x10]
cmp r1, r5
blt exit
mov r10, r3
pop {r0-r7}
mov r1, r10
ldr r0, levelcheckloc
bx r0
exit: pop {r0-r7}
ldr r0, noevo
bx r0
decrypt: push {r0-r7}
mov r1, #0xB
ldr r2, decryptpoke
bx r2
decrypt2: push {r0-r7}
mov r1, #0x38
ldr r2, decryptpoke
bx r2
.align
levelcheckloc: .word 0x0806D32F
noevo: .word 0x0806D333
decryptpoke: .word 0x0806A519
pokemondata: .word 0x083203CC

Female Evolutions:
Spoiler:
main:
push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrb r2, [r3, #0x2]
mov r0, r8
bl decrypt2
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r1, r2
blt exit
mov r0, r8
mov r1, #0xFF
ldr r0, [r0, #0x0]
and r1, r0
mov r0, r8
bl decrypt
mov r11, r0
pop {r0-r7}
mov r5, r11
ldr r2, pokemondata
mov r4, #0x1C
mul r5, r4
add r5, r5, r2
ldrb r5, [r5, #0x10]
cmp r1, r5
bge exit
mov r10, r3
pop {r0-r7}
mov r1, r10
ldr r0, levelcheckloc
bx r0
exit: pop {r0-r7}
ldr r0, noevo
bx r0
decrypt: push {r0-r7}
mov r1, #0xB
ldr r2, decryptpoke
bx r2
decrypt2: push {r0-r7}
mov r1, #0x38
ldr r2, decryptpoke
bx r2
.align
levelcheckloc: .word 0x0806D32F
noevo: .word 0x0806D333
decryptpoke: .word 0x0806A519
pokemondata: .word 0x083203CC


By Move
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global Evomove

main:
push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrh r2, [r3, #0x2]
mov r0, r8
mov r5, #0x0
loop:
mov r1, #0xD
add r1, r1, r5
bl decrypt
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r1, r2
beq true
cmp r5, #0x3
beq exit
add r5, #0x1
b loop

decrypt:
push {r0-r7}
ldr r2, decryptpoke
bx r2
true:
mov r9, r3
pop {r0-r7}
mov r1, r9
ldr r0, levelcheckloc
bx r0
exit:
pop {r0-r7}
ldr r0, noevo
bx r0

.align
levelcheckloc: .word 0x0806D32F
noevo: .word 0x0806D333
decryptpoke: .word 0x0806A519

With Other PKMN in Party:
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global mantykeevo

main:
push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrh r2, [r3, #0x2]
mov r5, #0x0
loop: ldr r0, firstpoke
mov r1, #0xB
mov r6, #0x64
add r4, r5, #0x0
mul r4, r6
add r0, r0, r4
bl decrypt
mov r9, r0
pop {r0-r7}
mov r1, r9
cmp r1, r2
beq levelcheck
cmp r5, #0x5
beq exit
add r5, #0x1
b loop
levelcheck: mov r10, r3
pop {r0-r7}
mov r1, r10
ldr r0, levelcheckloc
bx r0
exit: pop {r0-r7}
ldr r0, noevo
bx r0
decrypt: push {r0-r7}
ldr r2, decryptpoke
bx r2
.align
firstpoke: .word 0x020244EC
levelcheckloc: .word 0x0806D32F
noevo: .word 0x0806D333
decryptpoke: .word 0x0806A519

Specific Map Evolution (Not in G3HS Yet, only hex edit):
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global mapbankANDnapnumber

main:
push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrh r2, [r3, #0x2]
mov r0, r8
ldr r6, mapbank
ldrh r6, [r6, #0x0]
cmp r6, r2
bne exit
mov r10, r3
pop {r0-r7}
mov r1, r10
ldr r0, levelcheckloc
bx r0
exit:
pop {r0-r7}
ldr r0, noevo
bx r0

.align
levelcheckloc: .word 0x0806D32F
noevo: .word 0x0806D333
mapbank: .word 0x020322E4

Specific Map name Evolution
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global mapevo

main:
push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrb r2, [r3, #0x2]
mov r0, r8
ldr r6, map
ldrb r6, [r6, #0x0]
cmp r6, r2
bne exit
mov r10, r3
pop {r0-r7}
mov r1, r10
ldr r0, levelcheckloc
bx r0
exit:
pop {r0-r7}
ldr r0, noevo
bx r0

.align
levelcheckloc: .word 0x0806D32F
noevo: .word 0x0806D333
map: .word 0x0203732C

Pancham Evolution/Dark type pkmn in party. (KDS Credit,type could be changed)
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global Pancham

main:
push {r0-r7}
mov r5, #0x0
loop:
ldr r0, firstpoke
mov r1, #0xB
mov r6, #0x64
add r4, r5, #0x0
mul r4, r6
add r0, r0, r4
bl decrypt
mov r9, r0
pop {r0-r7}
mov r1, r9
ldr r3, basestattable
mov r4, #0x1C
mul r4, r1
add r3, r3, r4
ldrb r6, [r3, #0x6]
ldrb r7, [r3, #0x7]
cmp r6, #0x11 (This is able to be changed to any type you want.)
beq levelcheck
cmp r7, #0x11 (This is able to be changed to any type you want.)
beq levelcheck
cmp r5, #0x5
beq exit
add r5, #0x1
b loop

levelcheck:
pop {r0-r7}
ldr r0, levelcheckloc
bx r0

exit:
pop {r0-r7}
ldr r0, noevo
bx r0

decrypt:
push {r0-r7}
ldr r2, decryptpoke
bx r2

.align
basestatstable: .word 0x083203CC
firstpoke: .word 0x020244EC
levelcheckloc: .word 0x0806D32F
noevo: .word 0x0806D333
decryptpoke: .word 0x0806A519

Evolve with a fairy type move/any type you want:
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global sylveon

main:
push {r0-r7}
add r0, r6, r7
lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrh r2, [r3, #0x2]
mov r0, r8
mov r5, #0x0
loop:
mov r1, #0xD
add r1, r1, r5
bl decrypt
mov r11, r0
pop {r0-r7}
mov r1, r11
ldr r4, movedata
mov r6, #0xC
mul r6, r1
add r4, r4, r6
ldrb r4, [r4, #0x2]
cmp r4, #0xXX @replace XX with 09 if you use a fairy type patch that replaces the ??? type.if you have extended types use the type you assigned as fairy,basically you can change this to any type
beq true
cmp r5, #0x3
beq exit
add r5, #0x1
b loop

decrypt:
push {r0-r7}
ldr r2, decryptpoke
bx r2
true:
mov r9, r3
pop {r0-r7}
mov r1, r9
ldr r0, levelcheckloc
bx r0
exit:
pop {r0-r7}
ldr r0, noevo
bx r0

.align
movedata: .word 0x0831C898 @if you have repointed the moves table this needs to be changed as well.
levelcheckloc: .word 0x0806D32F
noevo: .word 0x0806D333
decryptpoke: .word 0x0806A519


Final Notes
Spoiler:
If you have used the "Changed Number of Evolutions per MON'" button on G3HS, these routines ain't going to work.
Assemble them anyway and change the .bin file accordingly.
Quote:
8 evolutions per mon: Change F0 19 to 70 00
16 evolutions per mon: Change F0 19 to B0 00
32 evolutions per mon: Change F0 19 to F0 00


Credits: kearnseyboy6 for the tut in FireRed and everyone credited in his thread
jirachiwishmaker for the emerald offsets i currently have
PurpleOrange for finding the table's location in emerald

I Still Need more offset so if anybody finds some, post here!
Reply With Quote
  #2    
Old November 7th, 2014 (10:25 PM).
AkimotoBubble AkimotoBubble is offline
 
Join Date: Aug 2014
Gender: Male
Posts: 15
oh ya ,it is beautiful.we can learn more from to
__________________
i am bubble,and sorry my english is not good ......
Reply With Quote
  #3    
Old November 12th, 2014 (09:57 PM).
RaileysXerilyasRX's Avatar
RaileysXerilyasRX RaileysXerilyasRX is offline
Impressive. Most impressive.
 
Join Date: Feb 2014
Location: Philippines
Gender: Male
Nature: Adamant
Posts: 128
Send a message via Skype™ to RaileysXerilyasRX
Do you have the ASM code for the Gender-based Dawn Stone evolution for Emerald? I have implemented Dawn Stone for my Emerald hack (example any free item index number) that will evolve a male Kirlia and a female Snorunt into Gallade and Froslass respectively.
__________________
Reply With Quote
  #4    
Old November 13th, 2014 (04:46 AM).
anonyboy's Avatar
anonyboy anonyboy is offline
Pokemon Aerial Emerald Creator&Pokemon Hybrid Co-Creator
 
Join Date: Sep 2013
Location: Israel
Gender: Male
Nature: Adamant
Posts: 228
Quote originally posted by RaileysXerilyasRX:
Do you have the ASM code for the Gender-based Dawn Stone evolution for Emerald? I have implemented Dawn Stone for my Emerald hack (example any free item index number) that will evolve a male Kirlia and a female Snorunt into Gallade and Froslass respectively.
The Code for dawn stone isn't inserted like normal evo methods... Pretty much only Gogo has a dawn stone code but it's for fire red and not public. Soory bro,

Btw, if anybody knows the offset that checks time in EM? I need it for time based evolutions.
__________________



Reply With Quote
  #5    
Old November 14th, 2014 (07:38 PM).
joexv's Avatar
joexv joexv is offline
The True XV
Silver Tier
 
Join Date: Oct 2012
Location: Oregon
Age: 17
Gender: Male
Nature: Quiet
Posts: 598
Send a message via Skype™ to joexv
Quote originally posted by anonyboy:
The Code for dawn stone isn't inserted like normal evo methods... Pretty much only Gogo has a dawn stone code but it's for fire red and not public. Soory bro,

Btw, if anybody knows the offset that checks time in EM? I need it for time based evolutions.
But you could just create a new item as use that as an evolution stone. So really there is no secret code for doing so.
And just a theory but to creat a gender based evolution stone what you could do is take the base evolution stone asm copy it and edit it so it adds an additional check for the gender. Idk if it would work but still.
__________________
Jesus Christ is my Savior
Bros with Percy
My Rom hacks
Blackened Night
Holiday Hacks


Hacks I support:
Resolute Version
Victory Fire
Pokemon Yellow Chapter
Fluorite
Hybrid

Find me @
Poketch
Thepokemonnation
Instagram(Personal)
Instagram(Rom hack)
Snapchat @j03xv
Skype @Chao5cow
Reply With Quote
  #6    
Old March 1st, 2015 (04:02 PM).
LCCoolJ95's Avatar
LCCoolJ95 LCCoolJ95 is offline
Limited Capacity
 
Join Date: May 2009
Location: The World That Never Was
Age: 19
Gender: Male
Nature: Naive
Posts: 247
I'm sorry about bumping this thread, but it has to be known. Okay, so checking this with expanded mons, even changing offsets to the new offsets (base stats and move data), I can confirm that the new evolution methods will NOT work.
__________________
"The greatest obstacle in life is Yourself. Overcome it, and you will achieve the greatest accomplishment of all." -Art Beins, 1982

Pokémon Emerald 650 (Resource Patch): http://www.pokecommunity.com/showthread.php?t=346694
Pokémon Emerald 650 (FULL GAME: Coming soon!
Reply With Quote
Reply
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 09:19 PM.