• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Research: [Ruby] Changing a Pokemon's species without ruining the checksum

1,323
Posts
16
Years
  • Seen Dec 9, 2023
Okay, this is my first ASM-related thing. Basically, I have figured out how to alter a Pokemon's index number, while not letting it turn into a bad egg.

First of all, in a Ruby rom, place this routine somewhere. We'll call this "JPAN Routine 1":
Spoiler:
It is a modified version of JPAN's decryption routine, which I changed so that it works with Ruby.



Next, put this next code somewhere in the rom. It is also by JPAN, so we'll call it, "JPAN Routine 2":
Spoiler:
Both of the routines above were written by JPAN, I just modified it so that it works on Pokemon Ruby.




However, here is a custom routine made by me (and might I say, my first ASM routine ever). Insert this into free space:
Code:
.text
.align 2
.thumb
.thumb_func
.global newroutine

main:
 push {r0-r3, lr}
 ldr r0, .POOP
 ldr r0, [r0]
 ldr r1, .var_8005
 ldrh r3, [r1]
 mov r1, r3
 str r1, [r0]
 strh r1, [r0]
 pop {r0-r3,pc}

.align 2
.POOP:
	.word 0x0203f408
.var_8005:
	.word 0x0202E8CE
What this routine does is, is changes the first Pokemon of your party to whatever value you stored in 0x8005. It only works however, if you called JPAN's first routine before it, and if you call JPAN's second routine after my routine.

Now that you've inserted JPAN's routines and my own routine, here is how you apply them: In any script (like a signpost), place this:
Code:
callasm 0x(offset of JPAN Routine 1, +1)
setvar 0x8005 0x(index number of the Pokemon that it will change into)
callasm 0x(offset of my routine, +1)
callasm 0x(offset of JPAN Routine 2, +1)
end

Now you can easily alter the first Pokemon of your party to anything you want. For example, this is what my signpost looks like:
Spoiler:
This will change the first Pokemon of my party into Blastoise (0x9 is Blastoise's hex number). Let's try it out.

1.png
2.png
1-1.png
3.png
4.png

5.png
2-1.png



The reason why this might be useful is that I can now do form changes in my 649 Project, and I can "fake" more than 5 evolutions by having certain Pokemon switch into a different index number (but identical stat-wise), such as a second Eevee that can evolve into Leafeon or Glaceon. Hopefully this is useful to some other people as well.
 
Last edited:
150
Posts
15
Years
This is a bit of a noob question.
How do I input ASM code and stuff? Can you use a script editor like XSE?

You need an assembler. HackMew's got a tutorial on this here.


also, in order for this not to become irrelevant:

This is actually a pretty useful routine. I'll probably use it in my hack after changing it to fire-red, is that alright?

and this is just a suggestion, but why not do like JPAN did and assemble the routine yourself so people can insert it easier?
 
1,323
Posts
16
Years
  • Seen Dec 9, 2023
I'll probably use it in my hack after changing it to fire-red, is that alright?
There is absolutely no point in doing that, since I converted it from FireRed to Ruby. Meaning the original code was for FireRed. You could just use JPAN's original code (which I linked to), because it was for FireRed.

and this is just a suggestion, but why not do like JPAN did and assemble the routine yourself so people can insert it easier?
People need to learn how to insert ASM routines. ShinyDragonHunter is a perfect example of this.
 
150
Posts
15
Years
There is absolutely no point in doing that, since I converted it from FireRed to Ruby. Meaning the original code was for FireRed. You could just use JPAN's original code (which I linked to), because it was for FireRed.

lol no i meant changing the address for var 8005 in ur routine... i dont wanna write one for myself since u've already done it :)
 

Frosty~

Pancakes are a girl's BFF
42
Posts
14
Years
  • Seen Jan 10, 2021
How if, if I want Charizard not blastoise, how is that now?

Just change the index number. Blastoise's is 0x9, I'm pretty sure Charizard's is 0x6. There are lots of places with lists of a Pokemon's index number.
 
Last edited:

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
In what part of the Asm Ill edit?

I believe you'll only need to edit the script in the example.
In the first post, the example script is...
Code:
#dynamic 0x800000

#org @start
callasm 0x8C00001
setvar 0x8005 [COLOR="Red"]0x9[/COLOR]
callasm 0x8C001C1
callasm 0x8C00141
msgbox @talk 0x4
end

#org @talk
= I just changed the first Pokémon\nof your party into a Blastoise.\lDeal with it.

See the red part. That's Blastoise's hex number.
So if you want to have Charizard, just change that red part into 0x6, since that's Charizard's hex number in the game.
 
51
Posts
9
Years
  • Age 38
  • Seen Dec 20, 2022
I can see very many interesting uses coming from this.. I would just like to say, it would be nice if you could specify certain stat changes as well if you want. Then it could be used with formes?
 
57
Posts
9
Years
  • Age 26
  • Seen Jul 11, 2014
I can see very many interesting uses coming from this.. I would just like to say, it would be nice if you could specify certain stat changes as well if you want. Then it could be used with formes?

thanks then .........

Now Ill continue on ASMing
 
57
Posts
9
Years
  • Age 26
  • Seen Jul 11, 2014
I believe you'll only need to edit the script in the example.
In the first post, the example script is...
Code:
#dynamic 0x800000

#org @start
callasm 0x8C00001
setvar 0x8005 [COLOR="Red"]0x9[/COLOR]
callasm 0x8C001C1
callasm 0x8C00141
msgbox @talk 0x4
end

#org @talk
= I just changed the first Pokémon\nof your party into a Blastoise.\lDeal with it.

See the red part. That's Blastoise's hex number.
So if you want to have Charizard, just change that red part into 0x6, since that's Charizard's hex number in the game.

thanks then.
.

Ill start ASMing now ^_^
 
Back
Top