- 11
- Posts
- 7
- Years
- Seen Oct 25, 2018
I am working on making a script and a Thumb routine to let you trade your own Pokemon back to yourself.
It doesn't work for post-Gen-1 evolutions. I am looking for some help with this. Gen I evolutions work just fine (Kadabra, Haunter, etc.)
Below I will explain my findings, and what I did.
So here are my scripts and Thumb routine:
Thumb routine
XSE script
And this is a video of it at work:
For your reference, I also attached:
I wonder what went wrong. My only suspicion left is the removal of held item during the trade. But that would not make any sense.
Original sad post:
It doesn't work for post-Gen-1 evolutions. I am looking for some help with this. Gen I evolutions work just fine (Kadabra, Haunter, etc.)
Below I will explain my findings, and what I did.
- From JPAN's special script research and this RAM map, I guessed that special 0xfe is just going to trade you whichever Pokemon stored at the Opponent Pokemon Slot #1 RAM space. An experiment shows that this is the case.
- Therefore I wrote a Thumb routine that simply copy the Pokemon in Party Slot #1 to Opponent Party Slot #1. This did enable me to trade to myself the same Pokemon at Party Slot #1.
(Thank HackMew for the detailed tutorials, and Univ. of Waterloo for the Thumb instruction set!)
- But the Pokemon taken from your party to trade is the one whose slot number is stored in variable 0x8009 before the trade. So, I set 0x8009 to 0x00.
- At this point, the script and the routine effectively trade the first Pokemon in the party for itself. This is enough to evolve Gen 1 Pokemons.
- kalarie later points out that I would need National Dex to ever evolve anything into Gen 2 and above Pokemons, so I used PKHex to enable that in my test save file. I also threw in special 0x16f into my script just to be sure.
So here are my scripts and Thumb routine:
Thumb routine
Spoiler:
Code:
.text
.align 2
.thumb
.thumb_func
.global test_180528
main:
push {r0-r3, lr}
ldr r0, .PARTY_SLOT_0
ldr r1, .OPPENENT_SLOT_0
mov r2, #0x00
copy_loop:
ldr r3, [r0, r2]
str r3, [r1, r2]
add r2, #0x04
cmp r2, #0x64
bcc copy_loop
pop {r0-r3, pc}
.align 2
.PARTY_SLOT_0:
.word 0x02024284
.OPPENENT_SLOT_0:
.word 0x0202402C
XSE script
Spoiler:
Code:
#dynamic 0x800000
#org @main
lock
special 0x16F
setvar 0x8009 0x00
callasm 0x800001
special 0xFE
waitstate
msgbox @finish 0x06
end
#org @finish
= Something is horribly wrong.
release
end
And this is a video of it at work:
For your reference, I also attached:
- Thumb routine
- Compiled routine binary
- XSE Script
- A save file with some handy test cases
I wonder what went wrong. My only suspicion left is the removal of held item during the trade. But that would not make any sense.
Original sad post:
Spoiler:
Long story short, I tried to write a script and a Thumb routine to make an in-game trade that trade your Pokemon back at you.
It didn't work so well. Pokemon that evolves through trades without needing items evolve just fine. However, the ones that require items fail to evolve.
If someone could point out what I was missing, that would be awesome.
Attached are the ASM routines, its compiled binary and scripts that I used. Obviously, the parameter for "callasm" in the script must be adjust to where you inject the binary.
And here is my sad result:
Turns out I cannot yet post links so please visit YouTube, video 5LoNk_rrtSM. Still uploading at the time this post is made (Sorry).
I am really sorry for the curt tone. I don't mean to be rude. I am just upset at the moment.
After getting the concept, grand ideas and plan figured out more than a week ago; multiple evenings/weekend days preparing, this failure of a mere critical test bummed me out.
Especially as I was already tired when I decided to just write the short ASM routine and script. The excitement evaporates in mere seconds and all that was left was the exhaustion.
And it is 23:57 :(
After thoughts/questions:
- I wonder if there is any difference in the link-trade script that cause those Pokemon to evolve.
- Simply changing a Pokemon's evolution method (via PGE) cannot make anything evolve into Evolved-to-by-trade-holding-item Pokemon (e.g. Scizor, Steelix). (Side note, same for Deoxys, yet Mewtwo and Mew works fine).
- Locksmith Army was able to make Pokemon evolves into such Pokemon just fine. I wonder what they did differently?
Part of my mentioned grand plan was to credit the awesome people whose tutorials lead me so far, and also explained what I do for future reader; but I am bummed out, and this remains 50% failure, so allow me to postpone that for a bit.
It didn't work so well. Pokemon that evolves through trades without needing items evolve just fine. However, the ones that require items fail to evolve.
If someone could point out what I was missing, that would be awesome.
Attached are the ASM routines, its compiled binary and scripts that I used. Obviously, the parameter for "callasm" in the script must be adjust to where you inject the binary.
And here is my sad result:
Turns out I cannot yet post links so please visit YouTube, video 5LoNk_rrtSM. Still uploading at the time this post is made (Sorry).
I am really sorry for the curt tone. I don't mean to be rude. I am just upset at the moment.
After getting the concept, grand ideas and plan figured out more than a week ago; multiple evenings/weekend days preparing, this failure of a mere critical test bummed me out.
Especially as I was already tired when I decided to just write the short ASM routine and script. The excitement evaporates in mere seconds and all that was left was the exhaustion.
And it is 23:57 :(
After thoughts/questions:
- I wonder if there is any difference in the link-trade script that cause those Pokemon to evolve.
- Simply changing a Pokemon's evolution method (via PGE) cannot make anything evolve into Evolved-to-by-trade-holding-item Pokemon (e.g. Scizor, Steelix). (Side note, same for Deoxys, yet Mewtwo and Mew works fine).
- Locksmith Army was able to make Pokemon evolves into such Pokemon just fine. I wonder what they did differently?
Part of my mentioned grand plan was to credit the awesome people whose tutorials lead me so far, and also explained what I do for future reader; but I am bummed out, and this remains 50% failure, so allow me to postpone that for a bit.
Attachments
Last edited: