• 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?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
Lunos
Reaction score
597

Profile posts Latest activity Postings About

  • if it's just a gender change you're after, just look for the gender swap routine. It'll change the OW and such as well.

    Alternatively, Touched recently posted a quick Hero change hack (though he did mention it's untested).
    I'm glad it worked.
    Be sure to set 0x40ff to 1 before using "custom givepokemon" and "custom setwildbattle" and set 0x40ff to 0 after using them.
    .text
    .align 2
    .thumb
    .thumb_func

    main:
    push {r2, r3}
    ldr r0, =0x40ff
    ldr r1, =0x806E569
    bl linkerOne
    pop {r2, r3}
    cmp r0, #0
    beq backer
    ldr r5, .VAR
    mov r4, #0x0

    loop:
    mov r1, r5 @check if attacks are set
    ldrb r1, [r1]
    cmp r1, #0x0
    beq defaultMoves
    mov r1, #0x2 @calculate location of next attack
    mul r1, r1, r4
    add r1, r1, r5
    ldrh r1, [r1]
    mov r0, r8
    ldr r3, =(0x803E8B0 +1)
    bl linkerTwo
    add r4, r4, #0x1
    cmp r4, #0x4
    bne loop


    noCrash:
    lsl r0, r0, #0x10
    mov r1, r9
    lsr r5, r1, #0x10
    ldr r3, [sp]
    ldr r1, = (0x803EA60 +1)
    cmp r0, r9
    bne linkerOne
    ldr r1, = (0x803EA56 +1)
    bx r1

    defaultMoves:
    ldr r3, =(0x803E8B0 +1)
    bl linkerTwo
    b noCrash

    linkerOne:
    bx r1
    backer:
    mov r0, r8
    mov r1, r4
    str r3, [sp]
    push {r4}
    ldr r4, =0x803E8B1
    bl caller4
    pop {r4}
    lsl r0, r0, #0x10
    mov r1, r9
    lsr r5, r1, #0x10
    ldr r3, =0x803ea51

    linkerTwo:
    bx r3

    caller4: bx r4
    .align 2
    .VAR:
    .word 0x020370BE

    Compile it and repoint the routine at 0x8800000 with it in ur ROM and I think it will work :/
    Now the moves will be the default moves unless you changed var_40ff to a non-zero value. (you can change it to any stable var in the code)

    (Compile it and write it to some free space, then goto 0x3ea46 and write 01 48 00 47 00 00 XX XX XX 08, XX XX XX 08 (+1) points to the routine above)
    wild pokemon's move?
    I think they share the same routine written by FBI and modified by me.
    Have you changed 0x8003 ~ 0x8006 to non zero values?
    I modified your script and I think it worked perfectly:
    //---------------
    #org 0x800050
    lock
    faceplayer
    msgbox 0x88000B5 0x6 //"Hey [player]!\nTake this Pikachu!"
    setvar 0x8000 0x19 //pika
    setvar 0x8001 0x5 //level
    setvar 0x8002 0xD7 //item
    setvar 0x8003 0x54 //move1
    setvar 0x8004 0x2D //2
    setvar 0x8005 0x55 //3
    setvar 0x8006 0x56 //4
    setvar 0x8007 0x1F //iv1
    setvar 0x8008 0x1F //2
    setvar 0x8009 0x1F //3
    setvar 0x800A 0x1F //4
    setvar 0x800B 0x1F //5
    setvar 0x800D 0x1F //6
    setvar 0x800F 0x1 //a shiny pikachu
    setvar 0x8014 0x4 //pokeball
    callasm 0x873A351
    fadescreen 0x1
    hidesprite 0x7
    setflag 0x8D3
    release
    end


    //---------
    // Strings
    //---------
    #org 0x8000B5
    = Hey [player]!\nTake this Pikachu!
    As you can see, I've inherited FBI's routine about custom moves and I only changed the variables used to fit my hack. Do you use the "compiled code" in my post? Using the code in FBI's post won't work.
    If you did it right, I think there might be something wrong as I've never tested the custom moves and I will take a look at it then. (If you don't want the custom moves, simply don't do the byte changes and don't insert the compiled code in the post)
    The offset + 1 of the following function which I posted it there:
    .thumb
    /*EWRAM:020370B8 var_8000: species
    EWRAM:020370BA var_8001: level
    EWRAM:020370BC var_8002: held item
    EWRAM:020370BE var_8003: attack 1
    EWRAM:020370C0 var_8004: attack 2
    EWRAM:020370C2 var_8005: attack 3
    EWRAM:020370C4 var_8006: attack 4
    EWRAM:020370C6 var_8007: HP IV
    EWRAM:020370C8 var_8008: attack IV
    EWRAM:020370CA var_8009: defence IV
    EWRAM:020370CC var_800A: speed IV
    EWRAM:020370CE var_800B: sp. attack IV
    EWRAM:020370D0 var_800D: sp. defence IV
    EWRAM:020370D2 var_800F: shiny?
    EWRAM:020370DE var_8014: ball*/

    main_func:
    push {r4-r7, lr}
    sub sp, sp, #0x20
    mov r0, #0x64
    ldr r1, .malloc
    bl jump_r1
    mov r8, r0
    ldr r1, .clear
    bl jump_r1
    mov r0, r8
    ldr r1, .clear2
    bl jump_r1
    ldr r1, .random
    bl jump_r1
    mov r4, r0
    ldr r0, .saveblockptr
    ldr r2, [r0]
    add r2, #0xA @OTID_loc
    add r6, r2, #0
    ldrh r1, [r2]
    ldrh r5, [r2, #2]
    eor r5, r1 @TID xor SID
    ldr r3, .var
    ldrh r3, [r3, #0x1A]
    ldr r1, .random
    bl jump_r1
    bl shinycheck
    /*r0 = PID1, r4 = PID2*/
    lsl r0, r0, #0x10
    ldr r2, .var
    add r2, #0x20
    strh r4, [r2]
    orr r0, r4 @PID
    mov r1, #0
    ldr r2, .var
    add r2, #0x1C
    str r0, [r2]
    mov r0, r8
    ldr r3, .setter1
    bl jump_r3
    mov r0, r8
    ldr r3, .setter1
    mov r1, #1
    add r2, r6, #0
    bl jump_r3
    mov r0, r8
    ldr r1, .checksum
    bl jump_r1
    ldr r2, .var
    add r2, #0x1C
    strh r0, [r2]
    mov r0, r8
    mov r1, #9
    ldr r3, .setter1
    bl jump_r3
    mov r0, r8
    ldr r1, .encrypt
    bl jump_r1
    mov r0, sp
    ldr r1, .var
    ldrh r1, [r1]
    ldr r3, .loadname
    bl jump_r3
    mov r0, r8
    mov r1, #2
    mov r2, sp
    ldr r3, .setter1
    bl jump_r3
    ldr r2, .language
    mov r0, r8
    mov r1, #3
    ldr r3, .setter1
    bl jump_r3
    mov r0, r8
    ldr r5, .saveblockptr
    ldr r2, [r5]
    mov r1, #7
    ldr r3, .setter1
    bl jump_r3
    mov r0, r8
    mov r1, #0xb
    ldr r2, .var
    ldr r3, .setter1
    bl jump_r3
    ldr r4, .stat
    ldr r2, .var
    ldrh r1, [r2]
    lsl r0, r1, #3
    sub r0, r0, r1
    lsl r0, r0, #2
    add r0, r0, r4
    ldrb r1, [r0, #0x13]
    mov r0, #0xCA
    lsl r0, r0, #1
    add r2, r1, #0
    mul r2, r0
    ldr r0, .var
    ldrb r0, [r0, #2]
    lsl r0, r0, #2
    ldr r1, .exp
    add r0, r0, r1
    add r2, r2, r0
    mov r0, r8
    mov r1, #0x19
    ldr r3, .setter1
    bl jump_r3
    ldr r1, .var
    ldrh r0, [r1]
    lsl r2, r0, #3
    sub r2, r2, r0
    lsl r2, r2, #2
    add r4, #0x12
    add r2, r2, r4
    mov r0, r8
    mov r1, #0x20
    ldr r3, .setter1
    bl jump_r3
    ldr r1, .catchlocation
    bl jump_r1
    lsl r0, r0, #0x18
    lsr r0, r0, #0x18
    mov r1, #0x23
    ldr r2, .var
    add r2, #0x1C
    str r0, [r2]
    mov r0, r8
    ldr r3, .setter1
    bl jump_r3
    mov r0, r8
    mov r1, #0x24
    ldr r2, .var
    add r2, r2, #2
    ldr r3, .setter1
    bl jump_r3
    mov r0, r8
    ldr r2, .version
    mov r1, #0x25
    ldr r3, .setter1
    bl jump_r3
    ldr r2, .var
    add r2, #0x26
    mov r1, #0x26
    mov r0, r8
    ldr r3, .setter1
    bl jump_r3
    ldr r2, [r5]
    add r2, #8
    mov r0, r8
    mov r1, #0x31
    ldr r3, .setter1
    bl jump_r3
    bl iv_encrypt
    ldr r2, .stat
    ldr r3, .var
    ldrh r1, [r3]
    lsl r0, r1, #3
    sub r0, r0, r1
    lsl r0, r0, #2
    add r0, r0, r2
    ldrb r0, [r0, #0x17]
    cmp r0, #0
    beq end
    ldr r2, .var
    add r2, #0x1C
    ldrh r0, [r2, #4]
    mov r1, #1
    and r0, r1
    str r0, [r2]
    mov r0, r8
    mov r1, #0x2E
    ldr r3, .setter1
    bl jump_r3

    end:
    mov r0, r8
    ldr r1, .sub_803E9E0
    bl jump_r1
    mov r0, r8
    mov r1, #0x38
    ldr r2, .var
    add r2, r2, #2
    ldr r3, .setter2
    bl jump_r3
    mov r0, r8
    mov r1, #0x40
    ldr r2, .var
    add r2, #0x1C
    mov r3, #0xFF
    str r3, [r2]
    ldr r3, .setter2
    bl jump_r3
    mov r0, r8
    ldr r1, .recalculation
    bl jump_r1
    mov r0, r8
    mov r1, #0xC
    ldr r2, .var
    add r2, #4
    ldr r3, .setter2
    bl jump_r3
    mov r0, r8
    ldr r1, .catch
    bl jump_r1
    lsl r0, r0, #0x18
    lsr r4, r0, #0x18
    ldr r0, .var
    ldrh r0, [r0]
    ldr r1, .convert
    bl jump_r1
    lsl r0, r0, #0x10
    lsr r5, r0, #0x10
    cmp r4, #1
    bgt back
    cmp r4, #0
    blt back
    add r0, r5, #0
    mov r1, #2
    ldr r3, .dexcheck
    bl jump_r3
    add r0, r5, #0
    mov r1, #3
    ldr r3, .dexcheck
    bl jump_r3

    back:
    mov r0, r8
    ldr r1, .free
    bl jump_r1
    add r0, r4, #0
    ldr r4, .var
    strh r0, [r4, #0x18]
    add sp, sp, #0x20
    mov r0, #0
    pop {r4-r7, pc}

    shinycheck:
    push {lr}
    cmp r3, #0
    beq jump_pc
    ldr r1, .random
    bl jump_r1
    mov r1, #7
    and r0, r1
    eor r0, r5
    eor r0, r4

    jump_pc:
    pop {pc}

    iv_encrypt:
    push {lr}
    mov r7, #0
    loop_iv:
    ldr r2, .var
    add r2, #0xE
    mov r0, r8
    ldr r3, .setter1
    add r1, r7, #0
    add r1, #0x27
    lsl r6, r7, #1
    add r2, r2, r6
    bl jump_r3
    add r7, r7, #1
    cmp r7, #6
    bne loop_iv
    pop {pc}

    jump_r1:
    bx r1

    jump_r3:
    bx r3

    .align 2
    .malloc: .word 0x08002BB1
    .clear: .word 0x0803D995
    .clear2: .word 0x0803D97D
    .random: .word 0x8044EC9
    .setter1: .word 0x080404D1
    .saveblockptr: .word 0x300500C
    .var: .word 0x020370B8
    .checksum: .word 0x0803E3E9
    .encrypt: .word 0x0803F8F9
    .loadname: .word 0x08040FD1
    .language: .word 0x081E9F11
    .stat: .word 0x08254784
    .exp: .word 0x08253AE4
    .catchlocation: .word 0x08056261
    .version: .word 0x081E9F10
    .sub_803E9E0: .word 0x0803E9E1
    .setter2: .word 0x0804037D
    .recalculation: .word 0x0803E47D
    .catch: .word 0x08040B15
    .convert: .word 0x08043299
    .dexcheck: .word 0x08088E75
    .free: .word 0x08002BC5
    1. There's no need for 'dogivepokemon'.
    2. change this:

    compare 0x800D 0x1
    if 0x1 goto @snippet1
    if 0x0 goto @snippet2
    release
    end

    to

    compare 0x800D 1
    if1 1 @snippet1
    goto @snippet2

    3. the most serious problem:
    You should use callasm to call my "givepokemon" routine instead of FBI's routine :)
    FBI's routine will be called automatically in game as you've done the byte changes so there's no need to use callasm to call it.
    I actually can't, since I'm a mod for the Video Games forum.

    That said, all you have to do is contact Spherical Ice or Christos or, if you want, just report the thread and tell them you want it closed that way.
    Thanks a looot mate.. :D Just changing the movement type didn' solve it so I changed the grass blocks with road tiles and finally it worked! :) :D Thanks a bunch.
    Hello.. :) How's ya doing friend? Um here actually to ask you something.. :3 I'm playing adventure red beta 10c but couldn't find earthquake tm anywhere.. I managed to come across your post giving a screenshot of the location and mentioning of modifying the block type to c rather than 1.. How do I do this?? Could you please help? TIA. :) Have a good day or night whichever um not sure.. :3 :D
  • Loading…
  • Loading…
  • Loading…
Back
Top