Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

Draconius GO
Reply
 
Thread Tools
  #1    
Old June 20th, 2014 (1:51 AM). Edited October 20th, 2014 by kearnseyboy6.
kearnseyboy6's Avatar
kearnseyboy6 kearnseyboy6 is offline
Aussie's Toughest Mudder
     
    Join Date: Dec 2008
    Posts: 300
    Hi everyone,

    Today I am going to show you how to add more evolution methods.

    Step 1 (Extending the table and limiters)
    Spoiler:
    First, fire up your ROM in a hex editor and navigate to 0x42FC4. Select 0x3C bytes and copy them to some free space.

    Spoiler:


    Next, we must change the pointers to our new location (0x900000 in my case). Search C42F0408.
    There is only one pointer at 0x42FC0.

    Next the game has a limit on the number of evolutions. This is at 0x42FAA. Change this to the new number of evolutions (in hex)


    Step 2 (Creating evolution routines; ASM needed)
    Spoiler:
    That table we pointed to contains the pointers to each evolution method, so if we write our own we can have a new evolution.

    However writing a method can be quite difficult to explain. I'll try my best. Here is a working* script I wrote for Goodra's evolution (raining in the overworld)
    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global weatherevo

    main:
    push {r0-r7}
    add r0, r6, r7
    lsl r0, r0, #0x3
    add r0, r2, r0
    add r3, r0, r3
    ldrb r2, [r3, #0x2]
    mov r0, r8

    ldr r6, currentweather
    ldrb r6, [r6, #0x0]
    cmp r6, #0x3
    beq rain
    cmp r6, #0x5
    beq rain
    cmp r6, #0xD
    beq rain
    pop {r0-r7}
    ldr r0, noevo
    bx r0
    rain:
    mov r10, r3
    pop {r0-r7}
    mov r1, r10
    add r1, #0x2
    ldr r0, levelcheckloc
    bx r0

    .align
    levelcheckloc: .word 0x08043017
    noevo: .word 0x08043111
    currentweather: .word 0x02036E12


    Now the bolded section must always be included in the start, it is consistent mostly with all evolution routines. So put that in your code. Notice the red word (ldrb). This loads the argument in the evolution (item or level). An item uses a half word and a level uses a byte. This matters and affects the size of r2

    Quote:
    Check for appropriate level: levelcheckloc: .word 0x08043017
    Go straight to the evolution (no levelcheck): evolutionloc: .word 0x0804310D
    This leads to R2... This register contains the Argument, so if you need to check for a specific item... compare the item with R2. You cannot compare items and levels at the same time.

    You also might see R3 -> R10 then R10 -> R1. This is necessary because you pop R0-R7.

    Finally you will need this routine: Located HERE!!
    TO use it in your script you need a bl instruction
    Quote:
    bl decrypt

    decrypt: push {r0-r7}
    mov r1, #0x##
    ldr r2, decryptpoke
    bx r2

    decryptpoke: .word 0x0803FBE9
    This should be enough to get you started. I recommend using Knizz' dis-assembly for further routines. I also will update this post when I become more knowledgeable as well.

    Once you are done assemble the .asm file and place it in your ROM somewhere. Now go to your table and add another entry pointing to the assembled code (you do NOT need +1). Now


    Step 3 (Making the routine work in the game)
    Spoiler:
    To make this compatible with G3HS open up the .ini file and navigate to these lines:

    Quote:
    evolutionmethods =
    evomethodsproperties =
    Add in a name for your method, and for properties add either Level, Item, None.
    Note: Follow KK552's syntax for the ini file.

    Finally open your ROM and in G3HS and work add the evolution and test it!!!
    Spoiler:



    Final notes, I am a bit vague on the structure of the routine musts because I am still learning it. However finally all evolutions will be open-sourced and available below in the spoiler (will add more over time).

    Spoiler:
    Evolutions

    NOTE:
    If you have used the "Changed Number of Evolutions per MON'" button on G3HS, these routines ain't going to work.

    Assemble them anyway and change the .bin file accordingly.

    Quote:
    8 evolutions per mon: Change F0 19 to 70 00
    16 evolutions per mon: Change F0 19 to B0 00
    32 evolutions per mon: Change F0 19 to F0 00


    Evolve with a Fairy type move (KDS Credits)

    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global sylveon

    main:
    push {r0-r7}
    add r0, r6, r7
    lsl r0, r0, #0x3
    add r0, r2, r0
    add r3, r0, r3
    ldrh r2, [r3, #0x2]
    mov r0, r8
    mov r5, #0x0
    loop:
    mov r1, #0xD
    add r1, r1, r5
    bl decrypt
    mov r11, r0
    pop {r0-r7}
    mov r1, r11
    ldr r4, movedata
    mov r6, #0xC
    mul r6, r1
    add r4, r4, r6
    ldrb r4, [r4, #0x2]
    cmp r4, #0xXX @replace XX with 16 if you are using MrDollSteak's rombase, otherwise keep the index that you have set while adding fairy type
    beq true
    cmp r5, #0x3
    beq exit
    add r5, #0x1
    b loop

    decrypt:
    push {r0-r7}
    ldr r2, decryptpoke
    bx r2
    true:
    mov r9, r3
    pop {r0-r7}
    mov r1, r9
    ldr r0, levelcheckloc
    bx r0
    exit:
    pop {r0-r7}
    ldr r0, noevo
    bx r0

    .align
    movedata: .word 0x08250C04 @if you have repointed the moves table this needs to be changed as well, for MrDollSteak's rombase set to 0x08900000
    levelcheckloc: .word 0x0804310D
    noevo: .word 0x08043111
    decryptpoke: .word 0x0803FBE9

    Pancham Evolution (KDS Credits)


    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global Pancham

    main:
    push {r0-r7}
    mov r5, #0x0
    loop:
    ldr r0, firstpoke
    mov r1, #0xB
    mov r6, #0x64
    add r4, r5, #0x0
    mul r4, r6
    add r0, r0, r4
    bl decrypt
    mov r9, r0
    pop {r0-r7}
    mov r1, r9
    ldr r3, basestattable
    mov r4, #0x1C
    mul r4, r1
    add r3, r3, r4
    ldrb r6, [r3, #0x6]
    ldrb r7, [r3, #0x7]
    cmp r6, #0x11
    beq levelcheck
    cmp r7, #0x11
    beq levelcheck
    cmp r5, #0x5
    beq exit
    add r5, #0x1
    b loop

    levelcheck:
    pop {r0-r7}
    ldr r0, levelcheckloc
    bx r0

    exit:
    pop {r0-r7}
    ldr r0, noevo
    bx r0

    decrypt:
    push {r0-r7}
    ldr r2, decryptpoke
    bx r2

    .align
    basestattable: .word 0x08254784
    firstpoke: .word 0x02024284
    levelcheckloc: .word 0x08043017
    noevo: .word 0x08043111
    decryptpoke: .word 0x0803FBE9


    Specific Map Evolution (Not available in G3HS yet, hex edit only)

    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global mapbankANDnapnumber

    main:
    push {r0-r7}
    add r0, r6, r7
    lsl r0, r0, #0x3
    add r0, r2, r0
    add r3, r0, r3
    ldrh r2, [r3, #0x2]
    mov r0, r8
    ldr r6, mapbank
    ldrh r6, [r6, #0x0]
    cmp r6, r2
    bne exit
    mov r10, r3
    pop {r0-r7}
    mov r1, r10
    ldr r0, levelcheckloc
    bx r0
    exit:
    pop {r0-r7}
    ldr r0, noevo
    bx r0

    .align
    levelcheckloc: .word 0x0804310D
    noevo: .word 0x08043111
    mapbank: .word 0x02031DBC


    Male Evolutions (please don't forget to update your pokemon base stats table...)
    Spoiler:
    main:
    push {r0-r7}
    add r0, r6, r7
    lsl r0, r0, #0x3
    add r0, r2, r0
    add r3, r0, r3
    ldrb r2, [r3, #0x2]
    mov r0, r8
    bl decrypt2
    mov r11, r0
    pop {r0-r7}
    mov r1, r11
    cmp r1, r2
    blt exit
    mov r0, r8
    mov r1, #0xFF
    ldr r0, [r0, #0x0]
    and r1, r0
    mov r0, r8
    bl decrypt
    mov r11, r0
    pop {r0-r7}
    mov r5, r11
    ldr r2, pokemondata
    mov r4, #0x1C
    mul r5, r4
    add r5, r5, r2
    ldrb r5, [r5, #0x10]
    cmp r1, r5
    blt exit
    mov r10, r3
    pop {r0-r7}
    mov r1, r10
    ldr r0, levelcheckloc
    bx r0
    exit: pop {r0-r7}
    ldr r0, noevo
    bx r0
    decrypt: push {r0-r7}
    mov r1, #0xB
    ldr r2, decryptpoke
    bx r2
    decrypt2: push {r0-r7}
    mov r1, #0x38
    ldr r2, decryptpoke
    bx r2
    .align
    levelcheckloc: .word 0x0804310D
    noevo: .word 0x08043111
    decryptpoke: .word 0x0803FBE9
    pokemondata: .word 0x08254784


    Female Evolutions (please don't forget to update your pokemon base stats table...)
    Spoiler:
    main:
    push {r0-r7}
    add r0, r6, r7
    lsl r0, r0, #0x3
    add r0, r2, r0
    add r3, r0, r3
    ldrb r2, [r3, #0x2]
    mov r0, r8
    bl decrypt2
    mov r11, r0
    pop {r0-r7}
    mov r1, r11
    cmp r1, r2
    blt exit
    mov r0, r8
    mov r1, #0xFF
    ldr r0, [r0, #0x0]
    and r1, r0
    mov r0, r8
    bl decrypt
    mov r11, r0
    pop {r0-r7}
    mov r5, r11
    ldr r2, pokemondata
    mov r4, #0x1C
    mul r5, r4
    add r5, r5, r2
    ldrb r5, [r5, #0x10]
    cmp r1, r5
    bge exit
    mov r10, r3
    pop {r0-r7}
    mov r1, r10
    ldr r0, levelcheckloc
    bx r0
    exit: pop {r0-r7}
    ldr r0, noevo
    bx r0
    decrypt: push {r0-r7}
    mov r1, #0xB
    ldr r2, decryptpoke
    bx r2
    decrypt2: push {r0-r7}
    mov r1, #0x38
    ldr r2, decryptpoke
    bx r2
    .align
    levelcheckloc: .word 0x0804310D
    noevo: .word 0x08043111
    decryptpoke: .word 0x0803FBE9
    pokemondata: .word 0x08254784


    Raining in the Overworld (Goodra)
    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global weatherevo

    main:
    push {r0-r7}
    ldr r6, currentweather
    ldrb r6, [r6, #0x0]
    cmp r6, #0x3
    beq rain
    cmp r6, #0x5
    beq rain
    cmp r6, #0xD
    beq rain
    pop {r0-r7}
    ldr r0, noevo
    bx r0
    rain:
    pop {r0-r7}
    ldr r0, levelcheckloc
    bx r0

    .align
    levelcheckloc: .word 0x08043017
    noevo: .word 0x08043111
    currentweather: .word 0x02036E12


    Night Time Level Up (KDS credits)

    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global nightlevelup
    main:
    push {r0-r7}
    ldr r5, time
    ldrb r5, [r5, #0x0]
    cmp r5, #0x15
    bge level
    cmp r5, #0x6
    blt level
    b exit
    level:
    pop {r0-r7}
    ldr r0, levelcheckloc
    bx r0
    exit:
    pop {r0-r7}
    ldr r0, noevo
    bx r0

    .align
    levelcheckloc: .word 0x08043017
    noevo: .word 0x08043111
    time: .word 0x03005542


    Day Time Level Induced Tyruant (KDS credits)

    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global dayLevel
    main:
    push {r0-r7}
    ldr r5, time
    ldrb r5, [r5, #0x0]
    cmp r5, #0x15
    bge exit
    cmp r5, #0x6
    bge level
    exit:
    pop {r0-r7}
    ldr r0, noevo
    bx r0
    level:
    pop {r0-r7}
    ldr r0, levelcheckloc
    bx r0

    .align
    levelcheckloc: .word 0x08043017
    noevo: .word 0x08043111
    time: .word 0x03005542


    Night time Item Hold Induced Evolution
    (if you edited the Pokemon data structure table in the RAM the item clearing will not work)
    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global nightevoitemhold

    main:
    push {r0-r7}
    ldr r5, time
    ldrb r5, [r5, #0x0]
    cmp r5, #0x15
    bge test
    cmp r5, #0x6
    blt test
    b exit
    test:
    add r0, r6, r7
    lsl r0, r0, #0x3
    add r0, r2, r0
    add r3, r0, r3
    ldrh r2, [r3, #0x2]
    mov r0, r8
    mov r1, #0xC
    bl decrypt
    mov r11, r0
    pop {r0-r7}
    mov r1, r11
    cmp r1, r2
    bne exit
    mov r1, #0xC
    mov r0, r8
    bl encrypt
    pop {r0-r7}
    mov r9, r3
    pop {r0-r7}
    mov r1, r9
    ldr r0, levelcheckloc
    bx r0
    decrypt:
    push {r0-r7}
    ldr r2, decryptpoke
    bx r2
    encrypt:
    push {r0-r7}
    ldr r2, blank
    ldr r5, encryptpoke
    bx r5
    exit:
    pop {r0-r7}
    ldr r0, noevo
    bx r0

    .align
    levelcheckloc: .word 0x0804310D
    noevo: .word 0x08043111
    time: .word 0x03005542
    blank: .word 0x020242A2
    decryptpoke: .word 0x0803FBE9
    encryptpoke: .word 0x0804037D

    Day time Item Hold Induced Evolution (if you edited the Pokemon data structure table in the RAM the item clearing will not work)
    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global dayevoitemhold

    main:
    push {r0-r7}
    ldr r5, time
    ldrb r5, [r5, #0x0]
    cmp r5, #0x15
    bge exit
    cmp r5, #0x6
    blt exit
    add r0, r6, r7
    lsl r0, r0, #0x3
    add r0, r2, r0
    add r3, r0, r3
    ldrh r2, [r3, #0x2]
    mov r0, r8
    mov r1, #0xC
    bl decrypt
    mov r11, r0
    pop {r0-r7}
    mov r1, r11
    cmp r1, r2
    bne exit
    mov r1, #0xC
    mov r0, r8
    bl encrypt
    pop {r0-r7}
    mov r9, r3
    pop {r0-r7}
    mov r1, r9
    ldr r0, levelcheckloc
    bx r0
    decrypt:
    push {r0-r7}
    ldr r2, decryptpoke
    bx r2
    encrypt:
    push {r0-r7}
    ldr r2, blank
    ldr r5, encryptpoke
    bx r5
    exit:
    pop {r0-r7}
    ldr r0, noevo
    bx r0

    .align
    levelcheckloc: .word 0x0804310D
    noevo: .word 0x08043111
    time: .word 0x03005542
    blank: .word 0x020242A2
    decryptpoke: .word 0x0803FBE9
    encryptpoke: .word 0x0804037D


    Night Friendship (You can edit the routine in the table already because they don't work in FR)
    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global dayFriendship
    main:
    push {r0-r7}
    ldr r5, time
    ldrb r5, [r5, #0x0]
    cmp r5, #0x15
    bge friendshipevo
    cmp r5, #0x6
    blt friendshipevo
    pop {r0-r7}
    ldr r0, noevo
    bx r0

    .align
    friendshipevo: .word 0x08043001
    noevo: .word 0x08043111
    time: .word 0x03005542


    Day Friendship (You can edit the routine in the table already because they don't work in FR)
    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global dayFriendship
    main:
    push {r0-r7}
    ldr r5, time
    ldrb r5, [r5, #0x0]
    cmp r5, #0x15
    bge exit
    cmp r5, #0x6
    bge friendshipevo
    exit:
    pop {r0-r7}
    ldr r0, noevo
    bx r0

    .align
    friendshipevo: .word 0x08043001
    noevo: .word 0x08043111
    time: .word 0x03005542


    Evolution by Move induced
    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global Evomove

    main:
    push {r0-r7}
    add r0, r6, r7
    lsl r0, r0, #0x3
    add r0, r2, r0
    add r3, r0, r3
    ldrh r2, [r3, #0x2]
    mov r0, r8
    mov r5, #0x0
    loop:
    mov r1, #0xD
    add r1, r1, r5
    bl decrypt
    mov r11, r0
    pop {r0-r7}
    mov r1, r11
    cmp r1, r2
    beq true
    cmp r5, #0x3
    beq exit
    add r5, #0x1
    b loop

    decrypt:
    push {r0-r7}
    ldr r2, decryptpoke
    bx r2
    true:
    mov r9, r3
    pop {r0-r7}
    mov r1, r9
    ldr r0, levelcheckloc
    bx r0
    exit:
    pop {r0-r7}
    ldr r0, noevo
    bx r0

    .align
    levelcheckloc: .word 0x0804310D
    noevo: .word 0x08043111
    decryptpoke: .word 0x0803FBE9


    Evolve with other Pokemon in Party
    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global mantykeevo

    main:
    push {r0-r7}
    add r0, r6, r7
    lsl r0, r0, #0x3
    add r0, r2, r0
    add r3, r0, r3
    ldrh r2, [r3, #0x2]
    mov r5, #0x0
    loop: ldr r0, firstpoke
    mov r1, #0xB
    mov r6, #0x64
    add r4, r5, #0x0
    mul r4, r6
    add r0, r0, r4
    bl decrypt
    mov r9, r0
    pop {r0-r7}
    mov r1, r9
    cmp r1, r2
    beq levelcheck
    cmp r5, #0x5
    beq exit
    add r5, #0x1
    b loop
    levelcheck: mov r10, r3
    pop {r0-r7}
    mov r1, r10
    ldr r0, levelcheckloc
    bx r0
    exit: pop {r0-r7}
    ldr r0, noevo
    bx r0
    decrypt: push {r0-r7}
    ldr r2, decryptpoke
    bx r2
    .align
    firstpoke: .word 0x02024284
    levelcheckloc: .word 0x0804310D
    noevo: .word 0x08043111
    decryptpoke: .word 0x0803FBE9


    Secific Map Name evolution (Joexv Credits)
    Spoiler:
    .text
    .align 2
    .thumb
    .thumb_func
    .global mapevo

    main:
    push {r0-r7}
    add r0, r6, r7
    lsl r0, r0, #0x3
    add r0, r2, r0
    add r3, r0, r3
    ldrb r2, [r3, #0x2]
    mov r0, r8
    ldr r6, map
    ldrb r6, [r6, #0x0]
    cmp r6, r2
    bne exit
    mov r10, r3
    pop {r0-r7}
    mov r1, r10
    ldr r0, levelcheckloc
    bx r0
    exit:
    pop {r0-r7}
    ldr r0, noevo
    bx r0

    .align
    levelcheckloc: .word 0x0804310D
    noevo: .word 0x08043111
    map: .word 0x02036E10
    More to come... Send in your evolutions


    Lastly, acknowledgements go to Daniils and Jambo for their guidance and locations for everything.

    ~ Thank you and good luck
    __________________
    HOLIDAYING CURRENTLY!!
    Reply With Quote

    Relevant Advertising!

      #2    
    Old June 20th, 2014 (11:02 AM).
    Superjub's Avatar
    Superjub Superjub is offline
    Pokémon Aureolin
    • Crystal Tier
     
    Join Date: Sep 2007
    Location: Hoenn
    Age: 22
    Gender: Male
    Nature: Timid
    Posts: 2,289
    Definitely going to keep an eye on this thread, this will be extremely helpful! :D Thanks for posting this.
    __________________
    Reply With Quote
      #3    
    Old June 20th, 2014 (3:30 PM).
    Joexv's Avatar
    Joexv Joexv is offline
    WHO ARE YOU PEOPLE
    • Silver Tier
     
    Join Date: Oct 2012
    Location: Oregon
    Age: 20
    Gender: Male
    Nature: Sassy
    Posts: 1,024
    So in theory this could be used to make a similar asm routine that could make a pokemon evolve when levling up in a certain map? Kinda like diamond and pearl where some pokemon needed to level up in mt cornet to evolve.
    __________________
    I'm bored
    Jesus Christ is my Savior
    Bros with Percy

    My Rom hacks
    A New Dawn---Gentlemon
    Not in Production:
    Blackened Night---Holiday Hacks
    Reply With Quote
      #4    
    Old June 20th, 2014 (4:05 PM).
    kearnseyboy6's Avatar
    kearnseyboy6 kearnseyboy6 is offline
    Aussie's Toughest Mudder
       
      Join Date: Dec 2008
      Posts: 300
      Quote:
      Originally Posted by joexv View Post
      So in theory this could be used to make a similar asm routine that could make a pokemon evolve when levling up in a certain map? Kinda like diamond and pearl where some pokemon needed to level up in mt cornet to evolve.
      Yeh exactly. The routine for that will be similar to the raining in overworld routine.
      The map is number is stored at 0x02036E10 (0x2 behind weather byte). All you need to do is compare that byte to the map number (eg: Pallet Town = 0x58 I think). There's a list around the site.
      __________________
      HOLIDAYING CURRENTLY!!
      Reply With Quote
        #5    
      Old June 21st, 2014 (3:24 PM).
      Joexv's Avatar
      Joexv Joexv is offline
      WHO ARE YOU PEOPLE
      • Silver Tier
       
      Join Date: Oct 2012
      Location: Oregon
      Age: 20
      Gender: Male
      Nature: Sassy
      Posts: 1,024
      So this would make a pokemon evolve if leveled up in pallet town.(i dont know too much about asm so hopefully this works) I used you rain routine like you said and then changed the offset it calls and the number it is compared to.
      Spoiler:
      Code:
      .text
      .align 2
      .thumb
      .thumb_func
      .global townevo
      
      main:
      push {r0-r7}
      add r0, r6, r7
      lsl r0, r0, #0x3
      add r0, r2, r0
      add r3, r0, r3
      ldrb r2, [r3, #0x2]
      mov r0, r8
      ldr r6, currenttown
      ldrb r6, [r6, #0x0]
      cmp r6, #0x56
      beq town
      exit:
      pop {r0-r7}
      ldr r0, noevo
      bx r0
      town:
      mov r1, #0x38
      bl decrypt
      mov r11, r0
      pop {r0-r7}
      mov r1, r11
      cmp r1, r2
      blt exit
      mov r10, r3
      pop {r0-r7}
      mov r1, r10
      add r1, #0x2
      ldr r0, levelcheckloc
      bx r0
      decrypt: 
      push {r0-r7}
      ldr r2, decryptpoke
      bx r2
      
      .align
      levelcheckloc: .word 0x08043017
      noevo: .word 0x08043111
      currenttown: .word 0x02036E10
      __________________
      I'm bored
      Jesus Christ is my Savior
      Bros with Percy

      My Rom hacks
      A New Dawn---Gentlemon
      Not in Production:
      Blackened Night---Holiday Hacks
      Reply With Quote
        #6    
      Old June 21st, 2014 (4:23 PM).
      SBird SBird is offline
         
        Join Date: Aug 2009
        Gender: Male
        Posts: 83
        Instead of checking for a specific map I would take a variable and check it's value, simply because you can have multiple maps asigned to the same evolution with this. (e.g. "evolves in a desert"), also you can excatly specify the place by setting the variable via non-mapscripts.

        ~SBird
        Reply With Quote
          #7    
        Old June 21st, 2014 (4:29 PM).
        Joexv's Avatar
        Joexv Joexv is offline
        WHO ARE YOU PEOPLE
        • Silver Tier
         
        Join Date: Oct 2012
        Location: Oregon
        Age: 20
        Gender: Male
        Nature: Sassy
        Posts: 1,024
        Yea but wouldnt that be a whole lot more work? Since you would have to set the var everytime you enter and leave one of those maps. And you can set more than just one map with the same evolution, it would just need another line of asm right after
        Code:
        cmp r6, #0x56
        beq town
        so you could just have it say
        Code:
        cmp r6, #0x56
        beq town
        cmp r6, #0x57
        beq town
        Like in the rain evolution script it is comparing multiple numbers to apply for more than just one type of rain.
        __________________
        I'm bored
        Jesus Christ is my Savior
        Bros with Percy

        My Rom hacks
        A New Dawn---Gentlemon
        Not in Production:
        Blackened Night---Holiday Hacks
        Reply With Quote
          #8    
        Old June 21st, 2014 (8:19 PM). Edited June 23rd, 2014 by Christos.
        kearnseyboy6's Avatar
        kearnseyboy6 kearnseyboy6 is offline
        Aussie's Toughest Mudder
           
          Join Date: Dec 2008
          Posts: 300
          Quote:
          Originally Posted by joexv View Post
          So this would make a pokemon evolve if leveled up in pallet town.(i dont know too much about asm so hopefully this works) I used you rain routine like you said and then changed the offset it calls and the number it is compared to.
          Spoiler:
          Code:
          .text
          .align 2
          .thumb
          .thumb_func
          .global townevo
          
          main:
          push {r0-r7}
          add r0, r6, r7
          lsl r0, r0, #0x3
          add r0, r2, r0
          add r3, r0, r3
          ldrb r2, [r3, #0x2]
          mov r0, r8
          ldr r6, currenttown
          ldrb r6, [r6, #0x0]
          cmp r6, #0x56
          beq town
          exit:
          pop {r0-r7}
          ldr r0, noevo
          bx r0
          town:
          mov r1, #0x38
          bl decrypt
          mov r11, r0
          pop {r0-r7}
          mov r1, r11
          cmp r1, r2
          blt exit
          mov r10, r3
          pop {r0-r7}
          mov r1, r10
          add r1, #0x2
          ldr r0, levelcheckloc
          bx r0
          decrypt: 
          push {r0-r7}
          ldr r2, decryptpoke
          bx r2
          
          .align
          levelcheckloc: .word 0x08043017
          noevo: .word 0x08043111
          currenttown: .word 0x02036E10
          Pretty nice. It would work in theory, Pallet Town is 0x58 I think, but to make it dynamic like SBird said we need to take advantage of the 'argument' that G3HS has. Since the maps are a byte long you would keep the start. You would compare your r6 with r2 (the argument).

          Unfortunately in G3HS at the moment it only features level and item, so for this to work, you would be limited to 100 levels or maps that have values 0x64 and less. The good news is KK552 will be working on the list if the list is provided to him. I have FR but none else.

          So here is how I would do the map name check:

          Spoiler:
          .text
          .align 2
          .thumb
          .thumb_func
          .global weatherevo

          main:
          push {r0-r7}
          add r0, r6, r7
          lsl r0, r0, #0x3
          add r0, r2, r0
          add r3, r0, r3
          ldrb r2, [r3, #0x2]
          mov r0, r8
          ldr r6, map
          ldrb r6, [r6, #0x0]
          cmp r6, r2
          bne exit
          mov r10, r3
          pop {r0-r7}
          mov r1, r10
          ldr r0, levelcheckloc
          bx r0
          exit:
          pop {r0-r7}
          ldr r0, noevo
          bx r0

          .align
          levelcheckloc: .word 0x0804310D
          noevo: .word 0x08043111
          map: .word 0x02036E10


          It strips the ability for a level check however... but leafeon and glaceon don't have required levels do they? Just the map?

          Sorry for the double post but anyone who has used these routines with expanded evolutions read the new instructions or they will not work.

          They are now compatible with DoesntKnowHowToPlay's feature
          __________________
          HOLIDAYING CURRENTLY!!
          Reply With Quote
            #9    
          Old June 21st, 2014 (9:37 PM).
          jirachiwishmaker's Avatar
          jirachiwishmaker jirachiwishmaker is offline
             
            Join Date: Jul 2007
            Location: Forina
            Gender: Male
            Nature: Lonely
            Posts: 75
            Could you please do research for Emerald, too?
            Reply With Quote
              #10    
            Old June 22nd, 2014 (7:05 AM).
            Avara's Avatar
            Avara Avara is offline
            Author Of Tales
            • Moderator
             
            Join Date: Dec 2011
            Location: Avlar
            Gender: Female
            Nature: Adamant
            Posts: 649
            Thank you so much for sharing this, this is amazing! =)
            __________________
            x
            Luna <3
            Reply With Quote
              #11    
            Old June 24th, 2014 (11:59 PM).
            Ollie11 Ollie11 is offline
               
              Join Date: May 2014
              Gender: Male
              Posts: 34
              This is great tutorial, finally I can include new evolution methods. But is it possible to make Pokemon forms with similar method? I made eighteen different-types Arceus as separate Pokemon, and now I want when Arceus is holding a Plate, it changes form (technically evolves) to another form, but when there is no Plate, it reverts back to regular form. But I don't want to see evolution screen, simplify, you give Plate to Arceus and it changes form.
              Reply With Quote
                #12    
              Old June 25th, 2014 (4:11 AM).
              kearnseyboy6's Avatar
              kearnseyboy6 kearnseyboy6 is offline
              Aussie's Toughest Mudder
                 
                Join Date: Dec 2008
                Posts: 300
                Quote:
                Originally Posted by Ollie11 View Post
                This is great tutorial, finally I can include new evolution methods. But is it possible to make Pokemon forms with similar method? I made eighteen different-types Arceus as separate Pokemon, and now I want when Arceus is holding a Plate, it changes form (technically evolves) to another form, but when there is no Plate, it reverts back to regular form. But I don't want to see evolution screen, simplify, you give Plate to Arceus and it changes form.
                Yes forms are possible on the todo list. I am still thinking of a good method; I'm leaning towards making each form a different index. But we will see. Don't expect in the next month though, I'm on a break now sorry.
                __________________
                HOLIDAYING CURRENTLY!!
                Reply With Quote
                  #13    
                Old July 2nd, 2014 (10:49 PM).
                Phenom2122's Avatar
                Phenom2122 Phenom2122 is offline
                   
                  Join Date: Jun 2014
                  Gender: Male
                  Nature: Quiet
                  Posts: 45
                  For anyone interested in doing this for Emerald (I'm not sure if this info is already around), the evolution table that needs repointing is at 0x06D198
                  Its one and only pointer is also right behind it at 0x06D194
                  And it appears there are an extra two bytes in whatever code runs there in Emerald so the spacing is not identical to Fire Red (it is out by two) but I am pretty sure the limit on evolutions is at 0x06D180.

                  I haven't tested this out for myself yet (I'm too busy on too many things and not in a position to test yet) but I am 99% sure this is correct.
                  Reply With Quote
                    #14    
                  Old July 4th, 2014 (12:49 AM). Edited July 4th, 2014 by jirachiwishmaker.
                  jirachiwishmaker's Avatar
                  jirachiwishmaker jirachiwishmaker is offline
                     
                    Join Date: Jul 2007
                    Location: Forina
                    Gender: Male
                    Nature: Lonely
                    Posts: 75
                    I used your routines and change a few pointers to match with Emerald. It showed me this warning while I am assembling the routine:


                    The bin file after assembled:


                    The routine which I using:
                    Spoiler:
                    .text
                    .align 2
                    .thumb
                    .thumb_func
                    .global Evomove

                    main:
                    push {r0-r7}
                    add r0, r6, r7
                    lsl r0, r0, #0x3
                    add r0, r2, r0
                    add r3, r0, r3
                    ldrh r2, [r3, #0x2]
                    mov r0, r8
                    mov r5, #0x0
                    loop:
                    mov r1, #0xD
                    add r1, r1, r5
                    bl decrypt
                    mov r11, r0
                    pop {r0-r7}
                    mov r1, r11
                    cmp r1, r2
                    beq true
                    cmp r5, #0x3
                    beq exit
                    add r5, #0x1
                    b loop

                    decrypt:
                    push {r0-r7}
                    ldr r2, decryptpoke
                    bx r2
                    true:
                    mov r9, r3
                    pop {r0-r7}
                    mov r1, r9
                    ldr r0, levelcheckloc
                    bx r0
                    exit:
                    pop {r0-r7}
                    ldr r0, noevo
                    bx r0

                    .align
                    levelcheckloc: .word 0x0806D32F
                    noevo: .word 0x0806D333
                    decryptpoke: .word 0x0806A519


                    After finished all steps, I tested and realized that the pokemon won't evolute anymore. Is this problem caused by the warning? If not, what happened?
                    Attached Images
                    File Type: jpg ASM.JPG‎ (62.1 KB, 1870 views) (Save to Dropbox)
                    File Type: jpg ASM2.JPG‎ (27.2 KB, 1860 views) (Save to Dropbox)
                    Reply With Quote
                      #15    
                    Old July 4th, 2014 (4:07 AM). Edited July 4th, 2014 by Phenom2122.
                    Phenom2122's Avatar
                    Phenom2122 Phenom2122 is offline
                       
                      Join Date: Jun 2014
                      Gender: Male
                      Nature: Quiet
                      Posts: 45
                      I'm afraid I'm no ASM expert so I cannot say what is wrong with the script. I just did a quick test with my repointed 255 evolution methods and a normal evolution went absolutely fine, no issues. I will try now assigning that poke the 255th evolution (they all point to the same places for now) and if that works I will try one of these routines.
                      I have never has an error like that compiling ASM so I'm really not sure
                      Edit: I just did the stupidest thing and wasted good time lol. I wanted to test evolving my Pokémon from somewhere around the 244th slot (a duplicate of level up). Then I saw that it did not evolve at all :O Then I sweated like crazy because I thought I had the wrong limiter byte. Tried a few things, nothing worked, then I realised I forgot to click 'save tab' in G3HS lol.
                      SoSo after a proper test, expanding the amount of evolutions definitely works.
                      Sorry I can't help you with your routine, perhaps OP can help you when they see this. (I've noticed other people aren't very quick to help around here)
                      Reply With Quote
                        #16    
                      Old July 4th, 2014 (7:26 PM).
                      jirachiwishmaker's Avatar
                      jirachiwishmaker jirachiwishmaker is offline
                         
                        Join Date: Jul 2007
                        Location: Forina
                        Gender: Male
                        Nature: Lonely
                        Posts: 75
                        Quote:
                        Originally Posted by Phenom2122 View Post
                        I'm afraid I'm no ASM expert so I cannot say what is wrong with the script. I just did a quick test with my repointed 255 evolution methods and a normal evolution went absolutely fine, no issues. I will try now assigning that poke the 255th evolution (they all point to the same places for now) and if that works I will try one of these routines.
                        I have never has an error like that compiling ASM so I'm really not sure
                        Edit: I just did the stupidest thing and wasted good time lol. I wanted to test evolving my Pokémon from somewhere around the 244th slot (a duplicate of level up). Then I saw that it did not evolve at all :O Then I sweated like crazy because I thought I had the wrong limiter byte. Tried a few things, nothing worked, then I realised I forgot to click 'save tab' in G3HS lol.
                        SoSo after a proper test, expanding the amount of evolutions definitely works.
                        Sorry I can't help you with your routine, perhaps OP can help you when they see this. (I've noticed other people aren't very quick to help around here)
                        Thanks a lot for your attention and testing. The new evolutions won't work because I have had expanded the number of evolution by G3HS. Kearnseyboy6 had been mentioned early but I missed it out.
                        Reply With Quote
                          #17    
                        Old July 5th, 2014 (2:04 PM).
                        mrtienduc1999's Avatar
                        mrtienduc1999 mrtienduc1999 is offline
                           
                          Join Date: Jan 2013
                          Location: Pokemoner.com
                          Gender: Male
                          Posts: 32
                          Oh, good tut! I give you a ideal ) check gender to evolution. I think it needs 2 asm code: 1 male and 1 female. And check level to evolution. In gen 4, it has a pokemon evolution check gender...
                          __________________
                          My Webside: http://www.pokemoner.com/
                          Reply With Quote
                            #18    
                          Old July 6th, 2014 (1:49 AM). Edited July 6th, 2014 by Ollie11.
                          Ollie11 Ollie11 is offline
                             
                            Join Date: May 2014
                            Gender: Male
                            Posts: 34
                            Quote:
                            Originally Posted by mrtienduc1999 View Post
                            Oh, good tut! I give you a ideal ) check gender to evolution. I think it needs 2 asm code: 1 male and 1 female. And check level to evolution. In gen 4, it has a pokemon evolution check gender...
                            For gender it might check Pokemon ID. There is 1 third gen Pokemon that have evolution with low or high PID on level 7. It's Wurmple! So, only left to find Wurmple evolution routines and edit it, so it checks not PID's 2 last bytes, but only one (last byte means gender of Pokemon). I don't have much ASM skills, so I can't do it by myself, but if anyone can, use this method.
                            Reply With Quote
                              #19    
                            Old July 6th, 2014 (3:51 AM).
                            mrtienduc1999's Avatar
                            mrtienduc1999 mrtienduc1999 is offline
                               
                              Join Date: Jan 2013
                              Location: Pokemoner.com
                              Gender: Male
                              Posts: 32
                              I dont understand personality value, but i think it has PID < 4 and it's a male or female. So if we use PID, we will have some problems with logic lol :D i hope you understand!
                              __________________
                              My Webside: http://www.pokemoner.com/
                              Reply With Quote
                                #20    
                              Old July 6th, 2014 (11:59 AM).
                              Doctis Doctis is offline
                                 
                                Join Date: Jul 2014
                                Gender: Male
                                Posts: 1
                                Is there any way to disable evolution unless the player has an item in their inventory? All evolutions would proceed normally once the item is obtained.
                                Reply With Quote
                                  #21    
                                Old July 8th, 2014 (1:18 AM). Edited July 8th, 2014 by stephenbrook.
                                stephenbrook stephenbrook is offline
                                   
                                  Join Date: Jul 2014
                                  Posts: 16
                                  So how would I go about adding the item held item ones into a rom then? I can't really do much with regards to hex but if there is an editor out there that includes this or even if all of the ones so far were put into a base rom?
                                  Reply With Quote
                                    #22    
                                  Old July 8th, 2014 (11:57 AM).
                                  Ollie11 Ollie11 is offline
                                     
                                    Join Date: May 2014
                                    Gender: Male
                                    Posts: 34
                                    Quote:
                                    Originally Posted by stephenbrook View Post
                                    So how would I go about adding the item held item ones into a rom then? I can't really do much with regards to hex but if there is an editor out there that includes this or even if all of the ones so far were put into a base rom?
                                    You mean held items? You can use any item editor to replace "?????????" items with held item. Follow this tutorial but not the last part (doing item to do something), we don't need it. Then open G3HS, and set held item evolution method on Pokemon that you want to evolve with it, and also choose your newly created item.
                                    Reply With Quote
                                      #23    
                                    Old July 8th, 2014 (10:13 PM).
                                    mrtienduc1999's Avatar
                                    mrtienduc1999 mrtienduc1999 is offline
                                       
                                      Join Date: Jan 2013
                                      Location: Pokemoner.com
                                      Gender: Male
                                      Posts: 32
                                      Uk... I think we can write a asm code to replace evolution stones into evolution items. I viewed a topic, it show to me how to create a new evolution stones, but i dont understand it. If we create a method: evolution items: items use out of battle: potions, stones, ..etc..., we will not create a new stone. I Think it's simpler.
                                      __________________
                                      My Webside: http://www.pokemoner.com/
                                      Reply With Quote
                                        #24    
                                      Old July 9th, 2014 (5:18 AM).
                                      kearnseyboy6's Avatar
                                      kearnseyboy6 kearnseyboy6 is offline
                                      Aussie's Toughest Mudder
                                         
                                        Join Date: Dec 2008
                                        Posts: 300
                                        Quote:
                                        Originally Posted by jirachiwishmaker View Post
                                        Thanks a lot for your attention and testing. The new evolutions won't work because I have had expanded the number of evolution by G3HS. Kearnseyboy6 had been mentioned early but I missed it out.
                                        I updated this before you posted but maybe you missed it, this wasn't in the OP until I while ago:

                                        NOTE: If you have used the "Changed Number of Evolutions per MON'" button on G3HS, these routines ain't going to work.

                                        Assemble them anyway and change the .bin file accordingly.

                                        Quote:
                                        8 evolutions per mon: Change F0 19 to 70 00
                                        16 evolutions per mon: Change F0 19 to B0 00
                                        32 evolutions per mon: Change F0 19 to F0 00
                                        Try that
                                        __________________
                                        HOLIDAYING CURRENTLY!!
                                        Reply With Quote
                                          #25    
                                        Old July 9th, 2014 (5:24 AM).
                                        kearnseyboy6's Avatar
                                        kearnseyboy6 kearnseyboy6 is offline
                                        Aussie's Toughest Mudder
                                           
                                          Join Date: Dec 2008
                                          Posts: 300
                                          Quote:
                                          Originally Posted by mrtienduc1999 View Post
                                          I dont understand personality value, but i think it has PID < 4 and it's a male or female. So if we use PID, we will have some problems with logic lol :D i hope you understand!
                                          Nearly, if the PID has a value less than the gender value in the pokemon stats table, then it's female or male I think. So doing a compare is quite achievable and I'll have it written up in a day or so.
                                          __________________
                                          HOLIDAYING CURRENTLY!!
                                          Reply With Quote
                                          Reply

                                          Quick Reply

                                          Join the conversation!

                                          Create an account to post a reply in this thread, participate in other discussions, and more!

                                          Create a PokéCommunity Account

                                          Sponsored Links
                                          Thread Tools

                                          Posting Rules
                                          You may not post new threads
                                          You may not post replies
                                          You may not post attachments
                                          You may not edit your posts

                                          BB code is On
                                          Smilies are On
                                          [IMG] code is On
                                          HTML code is Off

                                          Forum Jump


                                          All times are GMT -8. The time now is 1:31 AM.