Thread: Research: Useful Emerald Stuff
View Single Post
  #9    
Old August 27th, 2010 (9:15 AM).
Gamer2020's Avatar
Gamer2020 Gamer2020 is offline
Accept no Imitations!
     
    Join Date: Jun 2008
    Location: Distant Land
    Gender: Male
    Nature: Bold
    Posts: 941
    Quote:
    Originally Posted by Chaos Rush View Post
    How to change the Ralts that Wally fights:
    Spoiler:


    Um, okay, not really much to say here, but mess with the bytes at 0xB0870. I really don't know how it works, but just change the bytes there, and you'll eventually get what you want. If someone can tell me how the data works, that would be great.

    To make Wally fight a Weedle, simply change the bytes at 0xB0870 to:
    0D 21 4A

    Doing that will give you this:


    Also, I don't think this really matters, but at 0xB088C, you can change that byte to change the battle intro, such as making the Team Aqua logo appear, making the Battle Frontier logo appear, make Kyogre's symbol appear, make Regice's symbol appear, etc.
    I think I can explain this. (If someone with better ASM knowledge sees a mistake please correct me. My knowledge is very basic :P)

    In BPEE this is what is originally at that offset.

    Code:
    080B0870 21C4     mov     r1,0xC4
    080B0872 0049     lsl     r1,r1,0x1
    080B0874 2205     mov     r2,0x5
    After your edit this is what it looks like.

    Code:
    080B0870 210D     mov     r1,0x0D
    080B0872 004A     lsl     r2,r1,0x1
    080B0874 2205     mov     r2,0x5
    Ok now let me start explaining. In this case the vaule for the Pokemon is the 0xC4.

    Code:
    080B0870 21C4     mov     r1,0xC4
    Now if you convert that to Decimal you get 196. Now you must be thinking, "That's not RALTS' hex value". Well it isn't.

    Code:
    080B0872 0049    lsl     r0,r1,0x1
    That makes it so it is. lsl = Logical Shift Left (If I remember correctly XD)

    So you take 0xC4 and convert it to binary. You get 11000100. (Use windows calclator.)

    You then multiply it by 10 so that the values "shift" 1 to the left. You get 110001000. Convert that back to hex and you get 188.

    That should be RALTS' value. I am to lazy to check.

    Lets take a look at this line.

    Code:
    080B0874 2205     mov     r2,0x5
    I'm pretty sure that 0x5 is the level :P

    Now let's look at your edit.

    Code:
    080B0870 210D     mov     r1,0x0D
    080B0872 004A     lsl     r2,r1,0x1
    080B0874 2205     mov     r2,0x5
    0x0D is WEEDLE's value. Looks good except for one thing.

    Code:
    080B0872 004A     lsl     r2,r1,0x1
    That can be done better.

    If you put the following you will have the same result :P Only do it for value 0xFF or lower. Otherwise use the lsl way.

    Code:
    080B0872 1C00     mov     r0,r0
    __________________

    The new home for ROM Hacking!
    Reply With Quote