Hello all,
I have been working on creating a script for MissingNo and its form changes based on the players name.
The problem I have is the players name is at 0x0300500C-F which is dynamic ram.
I know that the pointer to the 8byte Player name is 4bytes and has to be fetched in this sequence 0x0300500F-C.
Ergo:
0x0300500F=
??1byte
0x0300500E=
??1byte
0x0300500D=
??1byte
0x0300500C=
??1byte
[LEFT] Total =
?? ?? ?? ?? 4byte = Pointer to 8byte Player name with 8th-byte being
FF padding
0x0300500?= F E D C
After getting the pointer then it comes to checking the 3rd, 5th and 7th slot characters and comparing them to the values of "W = D1, w = EB, X = D2, x = EC, Y = D3, y = ED". (which I got from the
Character encoding in GenIII).
As in Red&Blue MissingNo will always come in its base form and others are determined by these: W/w= Kabutops Fossil, X/x= Aerodactyl Fossil and Y/y= Ghost.
At the moment I'm simply trying to get it to work with a "green-script" in A-map and hook it all into a Wild battle.
Might do a custom basic "old man" script to have it set a flag, then have this script check it.
I was able to get to the 0x0300500F-C but couldn't figure out how to take those bytes align them into a pointer again an then go to where the players name is being held...
Any help or advice would be appreciated.
Update:
So I went about trying to use ASM rather than trying to compile at run time.
After looking at Hackmew's tut again I made my own routine to place the players name on vars 0x8000-0x8003 respectively.
Code:
.text
.align 2
.thumb
.thumb_func
.global
main:
push {r0-r3, lr}
ldr r0, .PLAYER_DATA
ldr r0, [r0] //load the pointer stored at r0 into r0
ldr r1, .VAR //var 0x8000
ldm r0!, {r2-r3} //load 2 words from given pointer at r0 into r2-r3 = 8bytes
stm r1!, {r2-r3} //store 2 words from r2-r3 onto vars 0x8000-0x8003
pop {r0-r3, pc}
.align 2
.PLAYER_DATA:
.word 0x0300500C
.VAR:
.word 0x020370B8
This might be useful for something else as well.
I'm still not sure how to go about checking the 3rd, 5th and 7th slot;
Then changing the Wild chance rate based off the six possible characters,
Not to mention the unaccounted possible combinations of the 3 name character slots and the six usable characters....
I figure ASM might be the best way to go about it.
If that's the case then tossing in the ability to multiply the 6th item in the bag by 128(decimal) and giving
not only MissingNo but all its forms some kind of special custom ability... But this first hahaha
Will keep this post updated as I see it gets views, just need some more help with ideas on how to go about it.