The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Other shiney wild encounter asm (https://www.pokecommunity.com/showthread.php?t=360700)

Shogun January 2nd, 2016 1:58 AM

shiney wild encounter asm
 
I've follow this http://www.pokecommunity.com/showpost.php?p=8547374&postcount=400
to insert Shiney in the wild with a ratio of 1/100.
I've done the requisited step before without any problem.
I don't have the item to increase the shiny encounter in the wild so my routine looks like this :
Spoiler:

.text
.align 2
.thumb
.thumb_func


main:
push {r0-r3}
mov r0, #0x64


calcChance:
ldr r1, =(0x20370B8)
strh r0, [r1]
ldr r2, .random
bl linker
cmp r0, #0xFF
bne end
ldr r1, =(0x20370BC)
strh r0, [r1]
ldr r1, =(0x20370B8)
mov r0, #0x0
strh r0, [r1]

end:
pop {r0-r3}
sub SP, SP, #0x20
mov r7, r0
ldr r4, [SP, #0x40]
ldr r4, [SP, #0x48]
mov r5, #0xE
ldr r6, =(0x803DAD8 +1)
bx r6

linker:
bx r2


.align 2

.random:
.word 0x8A15B01


but it doesn't works (I replaced the 0x64 with 0x2 during my test and I 've never encountered shiney in the wild)

PurpleOrange January 2nd, 2016 3:40 AM

Quote:

Originally Posted by maxcollet72 (Post 9059779)
I've follow this http://www.pokecommunity.com/showpost.php?p=8547374&postcount=400
to insert Shiney in the wild with a ratio of 1/100.
I've done the requisited step before without any problem.
I don't have the item to increase the shiny encounter in the wild so my routine looks like this :
Spoiler:

.text
.align 2
.thumb
.thumb_func


main:
push {r0-r3}
mov r0, #0x64


calcChance:
ldr r1, =(0x20370B8)
strh r0, [r1]
ldr r2, .random
bl linker
cmp r0, #0xFF
bne end
ldr r1, =(0x20370BC)
strh r0, [r1]
ldr r1, =(0x20370B8)
mov r0, #0x0
strh r0, [r1]

end:
pop {r0-r3}
sub SP, SP, #0x20
mov r7, r0
ldr r4, [SP, #0x40]
ldr r4, [SP, #0x48]
mov r5, #0xE
ldr r6, =(0x803DAD8 +1)
bx r6

linker:
bx r2


.align 2

.random:
.word 0x8A15B01


but it doesn't works (I replaced the 0x64 with 0x2 during my test and I 've never encountered shiney in the wild)

try adding lsl r0, r0, #0x0 after the move r0, #64

Shogun January 2nd, 2016 4:06 AM

Quote:

Originally Posted by PurpleOrange (Post 9059868)
try adding lsl r0, r0, #0x0 after the move r0, #64

For testing, I'm using a ratio of 1/2 like this but it doesn't works.
Spoiler:
.text
.align 2
.thumb
.thumb_func


main:
push {r0-r3}
mov r0, #0x2
lsl r0, r0, #0x0


calcChance:
ldr r1, =(0x20370B8)
strh r0, [r1]
ldr r2, .random
bl linker
cmp r0, #0xFF
bne end
ldr r1, =(0x20370BC)
strh r0, [r1]
ldr r1, =(0x20370B8)
mov r0, #0x0
strh r0, [r1]

end:
pop {r0-r3}
sub SP, SP, #0x20
mov r7, r0
ldr r4, [SP, #0x40]
ldr r4, [SP, #0x48]
mov r5, #0xE
ldr r6, =(0x803DAD8 +1)
bx r6

linker:
bx r2


.align 2

.random:
.word 0x8A15B01

Blah January 2nd, 2016 12:37 PM

Do you have http://www.pokecommunity.com/showthread.php?p=8531480#8531480 already inserted?


All times are GMT -8. The time now is 2:26 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.