The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary Hack Research & Development (https://www.pokecommunity.com/forumdisplay.php?f=195)
-   -   Code ASM Resource Thread (https://www.pokecommunity.com/showthread.php?t=339153)

MrDollSteak June 7th, 2015 4:19 AM

Quote:

Originally Posted by KDS (Post 8786554)
EV-enhancing items (Power Items)


Spoiler:

The routines assume that the Held Item Effect Bytes of the Power Items are in a particular order (same as that of Stat EVs in Pokemon Party Data Structure) and are consecutive.
For example, if Power Weight has Held Item Effect Byte 68, then Power Bracer will have 69, Power Belt 6A, Power Anklet 6B, Power Lens 6C and Power Band 6D.

So in the routines, you only need to specify the Held Item Effect Byte for Power Weight by replacing KK. The routine will automatically recognize other Power items.
Also I have not coded the Speed Drop, I might do it later and update the OP.
If you want to code the Speed Drop yourself, you can make a hook around the Macho Brace check for Speed Drop.

Fire Red:-
Spoiler:

Code:

.text
.align 2
.thumb
.thumb_func

    add r4, r0, #0x0 /*EV of a particular stat before checking pokerus and applying EV enhancers*/
    push {r2}  /*Store pokerus factor*/
    mov r0, r8  /*Load pokemon slot no*/
    mov r1, #0xC
    mov r2, #0x0
    bl Decrypter /* Load pokemon's item */
    lsl r0, r0, #0x10
    lsr r0, r0, #0x10
    bl GetItemEffect /* Get Held Item's Effect Byte*/
    lsl r0, r0, #0x18
    lsr r0, r0, #0x18
    mov r3, #0xKK
    add r1, r6, r3 /* Load Power Item's Effect Byte*/
    pop {r2}
    cmp r1, r0 /*Match items*/
    bne NoPowerItem /*No Power Item or No Match for that particular stat*/
    add r4, r4, #0x4 /* Add Bonus 4+ EV */
    mul r4, r2 /*Use pokerus multiplier*/
    ldr r3, =0x080439D9
    bx r3

NoPowerItem:
    mul r4, r2
    mov r0, r8
    mov r1, #0xC
    ldr r3, =0x08043981
    bx r3

Decrypter:
    ldr r3, =0x0803FBE9
    bx r3

GetItemEffect:
    ldr r1, =0x0809A925
    bx r1

/*At 43978:00 49 08 47 XX+1 XX XX 08*/




Emerald:-
Spoiler:

Code:

.text
.align 2
.thumb
.thumb_func

    add r4, r0, #0x0 /*EV of a particular stat before checking pokerus and applying EV enhancers*/
    push {r2}  /*Store pokerus factor*/
    mov r0, r8  /*Load pokemon slot no*/
    mov r1, #0xC
    mov r2, #0x0
    bl Decrypter /* Load pokemon's item */
    lsl r0, r0, #0x10
    lsr r0, r0, #0x10
    bl GetItemEffect /* Get Held Item's Effect Byte*/
    lsl r0, r0, #0x18
    lsr r0, r0, #0x18
    mov r3, #0xKK
    add r1, r6, r3 /* Load Power Item's Effect Byte*/
    pop {r2} /*Restore Pokerus Muliplier*/
    cmp r1, r0 /*Match items*/
    bne NoPowerItem /*No Power Item or No Match for that particular stat*/
    add r4, r4, #0x4 /* Add B Bonus 4+ EV */
    mul r4, r2 /*Use pokerus multiplier*/
    ldr r3, =0x0806DC25
    bx r3

NoPowerItem:
    mul r4, r2
    mov r0, r8
    mov r1, #0xC
    ldr r3, =0x0806DBCD
    bx r3

Decrypter:
    ldr r3, =0x0806A519
    bx r3

GetItemEffect:
    ldr r1, =0x080D74DD
    bx r1

/*At 6DBC4:00 49 08 47 XX+1 XX XX 08*/





KDS to make it easier, what you should do is have the same effect as the Macho Brace, and make the individual EV enhancing items use the secondary byte as 0x1, 0x2, 0x3, 0x4, 0x5, 0x6 etc.

That way you don't need to code the extra speed drop for each individual effect.

Trainer 781 June 7th, 2015 4:36 AM

Quote:

Originally Posted by MrDollSteak (Post 8786559)
KDS to make it easier, what you should do is have the same effect as the Macho Brace, and make the individual EV enhancing items use the secondary byte as 0x1, 0x2, 0x3, 0x4, 0x5, 0x6 etc.

That way you don't need to code the extra speed drop for each individual effect.

Hmm, this looks a great idea. Might need to add some bit of extra code for this.

EDIT: Now updated. :D

Xencleamas June 8th, 2015 9:46 PM

Quote:

Originally Posted by KDS (Post 8786554)
EV-enhancing items (Power Items)

Nice work there KDS! Your are truly an ASM Lord! Haha! Anyway, can you also implement this idea as well:

Quote:

Originally Posted by leyn09 (Post 8727097)
Is there a possibility to make sitrus berry work like on the later generations (increases 25% hp). If there is anyone knows how, please help me. Thanks!:D


Trainer 781 June 8th, 2015 10:35 PM

Quote:

Originally Posted by Sky High (Post 8789697)
Nice work there KDS! Your are truly an ASM Lord! Haha! Anyway, can you also implement this idea as well:

Thanks! My domain on ASM is only limited to Battle Mechanics though and I'm still learning new things.

Oran Berry would require some effort and some knowledge of regular scripting (which I haven't touched yet). I suppose it would require three routines:
1. One for pinch berry activation.
2. Second, when you use an Oran Berry on your Pokemon while battling.
3. Third, when you use an Oran Berry on your Pokemon in the Overworld.

BluRose June 9th, 2015 3:20 PM

I'd like to say that this thread has been really helpful for me as my ASM skills are far worse than sub-par and, also, the Chain-Fishing one in particular is really cool to me. (◕‿◕✿)

I'd also like to request something for Fire Red BPRE v1.0 (adding to the infinite list of requests...):
Stance Change.
Basically, where a Pokémon uses an offensive move and changes its form to a more offensive Pokémon (or, rather, just a different index-number Pokémon entirely). However, when it uses a certain move (or just a status move would be fine, too), it reverts back to the old form.
EDIT: Oh, and it would also have to revert to the other form outside of battle.
What I was thinking was two separate abilities in order to accomplish this, but if one is possible, then that's great too!
Thanks in advance!

God I sound so rude I am so sorry

EDIT: Also, should I go to DaniilS with this? I noticed that he had his own thread for form(e)s...

EDIT EDIT: Okay, I just noticed something while I was trying to get the Male-only and Female-only evolution methods working on Burmy.
But ALL of the Pokémon generated by your routine are Male unless if they have more of an 82 percent chance of being female, in which case they are, and the Pokémon already caught turn into females. This is also shown in you post showcasing it, as the Tyranitar are also all Male.
Just wanted to say this, haha...

Exodrake June 13th, 2015 4:18 PM

Quote:

Originally Posted by FBI agent (Post 8632913)
You need the random number routine and the shiny generator routine I made. The three of them work in conjunction to make this effect happen. I know it works, because my test ROM is only shinies :x

Can someone post links to those required routines? I've been driving myself up a wall searching for them to no avail.

Kenny1 June 13th, 2015 8:37 PM

Quote:

Originally Posted by Exodrake (Post 8796745)
Can someone post links to those required routines? I've been driving myself up a wall searching for them to no avail.

FBI kinda did in the post about the routine: http://www.pokecommunity.com/showpost.php?p=8547374&postcount=400
Anyways, just in case: Shiny and Random

Exodrake June 13th, 2015 10:19 PM

Quote:

Originally Posted by Kenny1 (Post 8797059)
FBI kinda did in the post about the routine: http://www.pokecommunity.com/showpost.php?p=8547374&postcount=400
Anyways, just in case: Shiny and Random

Gah I did not see those, were they not in the quoted version that I saved? I didn't see the original post, sorry about that! But thank you.

FamiliaWerneck June 16th, 2015 8:13 PM

Quote:

Originally Posted by FBI agent (Post 8516113)
Controling what breeds with what and what hatches from the result can be done with a Pokemon editor iirc.

Few simple questions on breeding, egg groups and all that. You said it's all doable via a Pokémon Editor. What I want, actually is that Charizard evolutionary line breeds only with its line and/or Ditto. No Dragon/Monster egg groups. Will I have to make an egg group for each evolutionary family?
Also, how can I make Ditto breeds with himself too, not only all other Pokémon? And genderless Pokémon, like Magnemite? How can I make them breed?
Finally, for Nidorans and Volbeat/Illumise, I wanna make the male breed with the female, but not breedable with Ditto. How can I do it?

Quote:

Originally Posted by FBI agent (Post 8516113)
Status update:
Today I've been working on breeding stat passing, particularly nature. I found that a Pokemon's nature in the gen iii games are determined rather randomly. It's done by PID % 25, = nature. In later games, you'll notice that nature is determined in otherways than PID. It's quite bad that FR uses this system because that means that the Pokemon's nature is going to be randomized quite well. I can't really modify the PID to match a certain nature because the PID is used to determine Pokemon IVs and all that good stuff, not to mention the checksum which turns a Pokemon into a badegg. What this means is that I would have to keep generating a new Pokemon UNTIL the PID generated from the game matches qualities of the PID I want. The process is rather complicated and I'm frankly debating whether or not it's worth the work. Honestly, does anyone actually breed farm in ROM hacks?

Here, I just want to know if I can make all Pokémon to be Docile as default or if I can change all natures' data, so all natures behave like Docile. Is either of these possible?
Thanks in advance!

Lance32497 June 16th, 2015 11:21 PM

Disabling "Gain money
" after defeating a trainer", it's useful for those who want to have a battle frontier

Trainer 781 June 17th, 2015 2:57 AM

Life Orb Recoil

Spoiler:

This only includes the Life Orb Recoil not the Life Orb Boost.
Credits to MrDollsteak for the Sheer Force Routine which I ripped from his Rombase.
Life Orb recoil is disabled for Volt Switch and U-turn in order to prevent damage to switched ally. (Special callasm in Battle Scripts of these Moves should be made in order to process Life Orb Recoil for them. Preferably before switching happens).
If you don't have Sheer Force, Magic Guard, U-turn or Volt Switch remove the bolded lines.
Replace KK with Held Effect Item Byte of Life Orb.

Bug/Oddity: It can trigger multiple times for multi-hit moves like Life Orb and multiple target moves like Earthquake in doubles. Fixed

Fire Red:-

Spoiler:


Routine at XXXXXX:
Code:

.text
.align 2
.thumb
.thumb_func
.global lifeorbrecoil

SheerForceCheck:
      ldr r1, .UserBank
      ldr r2, .BattleStruct
      ldrb r1, [r1, #0x0]
      mov r0, #0x58
      mul r0, r1
      add r0, r0, r2
      mov r2, #0x20
      add r2, r0, r2
      ldrb r2, [r2]
      cmp r2, #0x7E /*Sheer Force*/
      bne EffectCheck
      ldr r0, .CurrMove
      ldrh r3, [r0, #0x0]
      mov r0, #0x0
      ldr r1, .FEHalfWord
      ldr r2, .SheerForceTable

Loop:
      lsl r4, r0, #0x01
      add r4, r4, r2
      ldrh r4, [r4, #0x0]
      cmp r3, r4
      beq Exit
      cmp r4, r1
      beq EffectCheck
      add r0, #0x1
      b Loop

EffectCheck:
      mov r1, r8
      cmp r1, #0x3E
      beq ShellBell
      cmp r1, #0xKK
      bne Exit

CheckOutcome:
      ldr r0, .Outcome
      ldrb r0, [r0, #0x0]
      mov r5, #0x29
      and r5, r0
      cmp r5, #0x0
      bne Exit

CheckUturnVoltSwitch:
      ldr r0, .CurrMove
      ldrh r0, [r0]
      ldrh r1, .VoltSwitchID
      cmp r0, r1
      beq Exit
      ldrh r1, .UTurnID
      cmp r0, r1
      beq Exit

CheckIfMoveDamagedSomeTarget:
      ldr r1, .DamageStruct
      ldr r4, .TargetBank
      ldrb r2, [r4, #0x0]
      lsl r0, r2, #0x02
      add r0, r0, r2
      lsl r0, r0, #0x02
      add r6, r1, #0x4
      add r0, r0, r6
      ldr r1, [r0, #0x0]
      cmp r1, #0x0
      beq Exit
      ldr r0, .FFHalfWord
      cmp r1, r0
      beq Exit

CheckIfUserIsNotTheTarget:
      ldr r0, .UserBank
      ldrb r3, [r0, #0x0]
      cmp r3, r2
      beq Exit

CheckMagicGuard:
      ldr r2, .BattleStruct
      ldrb r1, [r0, #0x0]
      mov r0, #0x58
      mul r0, r1
      add r0, r0, r2
      mov r2, #0x20
      add r2, r0, r2
      ldrb r2, [r2]
      cmp r2, #0x63 /*Magic Guard*/
      beq Exit

HPCheck:
      ldrh r1, [r0, #0x28]
      cmp r1, #0x0
      beq Exit

SetLifeOrbRecoilBit:
      ldr r1, .LORBit
      mov r0, #0x1
      strb r0, [r1]

Exit:
      ldr r1, .Return2
      bx r1

ShellBell:
      ldr r1, .Return1
      bx r1

.align 2
.UserBank: .word 0x02023D6B
.TargetBank: .word 0x02023D6C
.BattleStruct: .word 0x02023BE4
.DamageStruct: .word 0x02023ECC
.CurrMove: .word 0x02023D4A
.SheerForceTable: .word 0x08XXXXXX
.Outcome: .word 0x02023DCC
.FEHalfWord: .word 0x0000FEFE
.FFHalfWord: .word 0x0000FFFF
.Return1: .word 0x0801CF11
.Return2: .word 0x0801CFA7
.LORBit: .word 0x0203C038
.UTurnID: .word 0x000001YY
.VoltSwitchID: .word 0x000001ZZ

/*At 1CE58: 00 48 00 47 XX+1 XX XX 08*/


Routine at YYYYYY:
Code:

.text
.align 2
.thumb
.thumb_func
.global endcommandwithlifeorbsupport

Main:
      ldr r1, .LORBit
      ldrb r0, [r1]
      cmp r0, #0x1
      bne EndCommand

LifeOrb:
      push {lr}
      push {r2-r7}
      mov r0, #0x0
      strb r0, [r1]
      ldr r0, .UserBank
      ldrb r3, [r0]
      mov r0, #0x58
      mul r0, r3
      ldr r2, .BattleStruct
      add r2, r2, r0
      ldrh r0, [r2, #0x28]
      cmp r0, #0x0
      beq Exit
      ldr r0, =0x02023D6F
      strb r3, [r0, #0x0]
      ldr r0, =0x02023DC4
      strb r3, [r0, #0x17]
      ldr r4, =0x02023D50
      ldrh r0, [r2, #0x2C]
      mov r1, #0xA
      bl Divider
      strh r0, [r4, #0x0]
      cmp r0, #0x0
      bne NotZero
      mov r0, #0x1

NotZero:
      strh r0, [r4, #0x0]
      bl ScriptPusher
      ldr r1, .ScriptPointer
      ldr r0, .LifeOrbDamageScript
      str r0, [r1, #0x0]
      pop {r2-r7}
      pop {r0}
      bx r0

Exit:
      pop {r2-r7}
      pop {r0}

EndCommand:
      ldr r0, =0x08022CCD @Replace this with the offset of the 4th Mold Breaker Routine if you are using Mold Breaker
      bx r0

Divider:
      ldr r2, =0x081E4019
      bx r2

ScriptPusher:
      ldr r0, =0x08017545
      bx r0

.align 2
.LifeOrbDamageScript: .word 0x08BBBBBB
.ScriptPointer: .word 0x02023D74
.UserBank: .word 0x02023D6B
.BattleStruct: .word 0x02023BE4
.LORBit: .word 0x0203C038

@Set YY+1 YY YY 08 as the 'End' Battle Script Command.


Battle Script at BBBBBB:
Code:

39 20 00 FA 20 C0 03 02 SS SS SS 08 10 84 01 12 40 00 35 D0 3D 02 02 00 01 00 00 0B 01 0C 01 19 01 00 00 00 00 00 3C


String at SSSSSS:
Code:

FD 0F 00 E0 E3 E7 E8 00 E7 E3 E1 D9 00 E3 DA 00 DD E8 E7 00 C2 CA AB FF





Squeetz June 17th, 2015 4:36 AM

I have a request.

A routine that copies the player's current pokemon in party (EVs IVs, moves, Abilities, held items, etc.) and pastes it on a trainerbattle (user gets to choose which trainer).
So, like a Battle With yourself. Would be cool as a final Battle or something.
Is this possible? Would be awesome if anyone made this.

Criminon June 18th, 2015 4:43 PM

Anyone want to try to make it so you can only use 4 items per battle so you're on equal footing with the trainers you're fighting?

Exodrake June 19th, 2015 4:28 PM

Can somebody post the code for the updated lightning rod/storm drain and sap sipper? I want to try modifying them to make my own abilities based on the same idea.

MrDollSteak June 19th, 2015 4:55 PM

Quote:

Originally Posted by KDS (Post 8802100)
Life Orb Recoil

Spoiler:

This only includes the Life Orb Recoil not the Life Orb Boost.
Credits to MrDollsteak for the Sheer Force Routine which I ripped from his Rombase.
Life Orb recoil is disabled for Volt Switch and U-turn in order to prevent damage to switched ally. (Special callasm in Battle Scripts of these Moves should be made in order to process Life Orb Recoil for them).
If you don't have Sheer Force, Magic Guard, U-turn or Volt Switch remove the bolded lines.
Replace KK with Held Effect Item Byte of Life Orb.

Bug/Oddity: It can trigger multiple times for multi-hit moves like Life Orb and multiple target moves like Earthquake in doubles. Fixed

Fire Red:-

Spoiler:


Routine at XXXXXX:
Code:

.text
.align 2
.thumb
.thumb_func
.global lifeorbrecoil

SheerForceCheck:
      ldr r1, .UserBank
      ldr r2, .BattleStruct
      ldrb r1, [r1, #0x0]
      mov r0, #0x58
      mul r0, r1
      add r0, r0, r2
      mov r2, #0x20
      add r2, r0, r2
      ldrb r2, [r2]
      cmp r2, #0x7E /*Sheer Force*/
      bne EffectCheck
      ldr r0, .CurrMove
      ldrh r3, [r0, #0x0]
      mov r0, #0x0
      ldr r1, .FEHalfWord
      ldr r2, .SheerForceTable

Loop:
      lsl r4, r0, #0x01
      add r4, r4, r2
      ldrh r4, [r4, #0x0]
      cmp r3, r4
      beq Exit
      cmp r4, r1
      beq EffectCheck
      add r0, #0x1
      b Loop

EffectCheck:
      mov r1, r8
      cmp r1, #0x3E
      beq ShellBell
      cmp r1, #0xKK
      bne Exit

CheckOutcome:
      ldr r0, .Outcome
      ldrb r0, [r0, #0x0]
      mov r5, #0x29
      and r5, r0
      cmp r5, #0x0
      bne Exit

CheckUturnVoltSwitch:
      ldr r0, .CurrMove
      ldrh r0, [r0]
      ldrh r1, .VoltSwitchID
      cmp r0, r1
      beq Exit
      ldrh r1, .UTurnID
      cmp r0, r1
      bew Exit

CheckIfMoveDamagedSomeTarget:
      ldr r1, .DamageStruct
      ldr r4, .TargetBank
      ldrb r2, [r4, #0x0]
      lsl r0, r2, #0x02
      add r0, r0, r2
      lsl r0, r0, #0x02
      add r6, r1, #0x4
      add r0, r0, r6
      ldr r1, [r0, #0x0]
      cmp r1, #0x0
      beq Exit
      ldr r0, .FFHalfWord
      cmp r1, r0
      beq Exit

CheckIfUserIsNotTheTarget:
      ldr r0, .UserBank
      ldrb r3, [r0, #0x0]
      cmp r3, r2
      beq Exit

CheckMagicGuard:
      ldr r2, .BattleStruct
      ldrb r1, [r0, #0x0]
      mov r0, #0x58
      mul r0, r1
      add r0, r0, r2
      mov r2, #0x20
      add r2, r0, r2
      ldrb r2, [r2]
      cmp r2, #0x63 /*Magic Guard*/
      beq Exit

HPCheck:
      ldrh r1, [r0, #0x28]
      cmp r1, #0x0
      beq Exit

SetLifeOrbRecoilBit:
      ldr r1, .LORBit
      mov r0, #0x1
      strb r0, [r1]

Exit:
      ldr r1, .Return2
      bx r1

ShellBell:
      ldr r1, .Return1
      bx r1

Divider:
      ldr r2, =0x081E4019
      bx r2

ScriptPusher:
      ldr r0, =0x08017545
      bx r0

.align 2
.UserBank: .word 0x02023D6B
.TargetBank: .word 0x02023D6C
.BattleStruct: .word 0x02023BE4
.DamageStruct: .word 0x02023ECC
.CurrMove: .word 0x02023D4A
.SheerForceTable: .word 0x08XXXXXX
.Outcome: .word 0x02023DCC
.FEHalfWord: .word 0x0000FEFE
.FFHalfWord: .word 0x0000FFFF
.Return1: .word 0x0801CF11
.Return2: .word 0x0801CFA7
.LORBit: .word 0x0203C038
.UTurnID: .word 0x000001YY
.VoltSwitchID: .word 0x000001ZZ

/*At 1CE58: 00 48 00 47 XX+1 XX XX 08*/


Routine at YYYYYY:
Code:

.text
.align 2
.thumb
.thumb_func
.global endcommandwithlifeorbsupport

Main:
      ldr r1, .LORBit
      ldrb r0, [r1]
      cmp r0, #0x1
      bne EndCommand

LifeOrb:
      push {lr}
      push {r2-r7}
      mov r0, #0x0
      strb r0, [r1]
      ldr r0, .UserBank
      ldrb r3, [r0]
      mov r0, #0x58
      mul r0, r3
      ldr r2, .BattleStruct
      add r2, r2, r0
      ldrh r0, [r2, #0x28]
      cmp r0, #0x0
      beq Exit
      ldr r0, =0x02023D6F
      strb r3, [r0, #0x0]
      ldr r0, =0x02023DC4
      strb r3, [r0, #0x17]
      ldr r4, =0x02023D50
      ldrh r0, [r2, #0x2C]
      mov r1, #0xA
      bl Divider
      strh r0, [r4, #0x0]
      cmp r0, #0x0
      bne NotZero
      mov r0, #0x1

NotZero:
      strh r0, [r4, #0x0]
      bl ScriptPusher
      ldr r1, .ScriptPointer
      ldr r0, .LifeOrbDamageScript
      str r0, [r1, #0x0]
      pop {r2-r7}
      pop {r0}
      bx r0

Exit:
      pop {r2-r7}
      pop {r0}

EndCommand:
      ldr r0, =0x08022CCD @Replace this with the offset of the 4th Mold Breaker Routine if you are using Mold Breaker
      bx r0

Divider:
      ldr r2, =0x081E4019
      bx r2

ScriptPusher:
      ldr r0, =0x08017545
      bx r0

.align 2
.LifeOrbDamageScript: .word 0x08BBBBBB
.ScriptPointer: .word 0x02023D74
.UserBank: .word 0x02023D6B
.BattleStruct: .word 0x02023BE4
.LORBit: .word 0x0203C038

@Set YY+1 YY YY 08 as the 'End' Battle Script Command.


Battle Script at BBBBBB:
Code:

39 20 FA 20 C0 03 02 SS SS SS 08 10 84 01 12 40 00 35 D0 3D 02 02 00 01 00 00 0B 01 0C 01 19 01 00 00 00 00 00 3C


String at SSSSSS:
Code:

FD 0F 00 E0 E3 E7 E8 00 E7 E3 E1 D9 00 E3 DA 00 DD E8 E7 00 C2 CA AB FF





I've noticed that this also prevents Sheer Force Pokemon getting any healing from the Shell Bell. This doesn't happen in the games I don't think. I'd probably do the Sheer Force Check after determining whether it has Shell Bell.

Great work! I'll have to link this post when I write up the rest of my Sheer Force routines on the Ability Resource Thread.

Quote:

Can somebody post the code for the updated lightning rod/storm drain and sap sipper? I want to try modifying them to make my own abilities based on the same idea.
These will be posted on the Ability Resource Thread eventually.

kleenexfeu June 19th, 2015 7:33 PM

Quote:

Originally Posted by KDS (Post 8802100)
Life Orb Recoil

Spoiler:

This only includes the Life Orb Recoil not the Life Orb Boost.
Credits to MrDollsteak for the Sheer Force Routine which I ripped from his Rombase.
Life Orb recoil is disabled for Volt Switch and U-turn in order to prevent damage to switched ally. (Special callasm in Battle Scripts of these Moves should be made in order to process Life Orb Recoil for them).
If you don't have Sheer Force, Magic Guard, U-turn or Volt Switch remove the bolded lines.
Replace KK with Held Effect Item Byte of Life Orb.

Bug/Oddity: It can trigger multiple times for multi-hit moves like Life Orb and multiple target moves like Earthquake in doubles. Fixed

Fire Red:-

Spoiler:


Routine at XXXXXX:
Code:

.text
.align 2
.thumb
.thumb_func
.global lifeorbrecoil

SheerForceCheck:
      ldr r1, .UserBank
      ldr r2, .BattleStruct
      ldrb r1, [r1, #0x0]
      mov r0, #0x58
      mul r0, r1
      add r0, r0, r2
      mov r2, #0x20
      add r2, r0, r2
      ldrb r2, [r2]
      cmp r2, #0x7E /*Sheer Force*/
      bne EffectCheck
      ldr r0, .CurrMove
      ldrh r3, [r0, #0x0]
      mov r0, #0x0
      ldr r1, .FEHalfWord
      ldr r2, .SheerForceTable

Loop:
      lsl r4, r0, #0x01
      add r4, r4, r2
      ldrh r4, [r4, #0x0]
      cmp r3, r4
      beq Exit
      cmp r4, r1
      beq EffectCheck
      add r0, #0x1
      b Loop

EffectCheck:
      mov r1, r8
      cmp r1, #0x3E
      beq ShellBell
      cmp r1, #0xKK
      bne Exit

CheckOutcome:
      ldr r0, .Outcome
      ldrb r0, [r0, #0x0]
      mov r5, #0x29
      and r5, r0
      cmp r5, #0x0
      bne Exit

CheckUturnVoltSwitch:
      ldr r0, .CurrMove
      ldrh r0, [r0]
      ldrh r1, .VoltSwitchID
      cmp r0, r1
      beq Exit
      ldrh r1, .UTurnID
      cmp r0, r1
      beq Exit

CheckIfMoveDamagedSomeTarget:
      ldr r1, .DamageStruct
      ldr r4, .TargetBank
      ldrb r2, [r4, #0x0]
      lsl r0, r2, #0x02
      add r0, r0, r2
      lsl r0, r0, #0x02
      add r6, r1, #0x4
      add r0, r0, r6
      ldr r1, [r0, #0x0]
      cmp r1, #0x0
      beq Exit
      ldr r0, .FFHalfWord
      cmp r1, r0
      beq Exit

CheckIfUserIsNotTheTarget:
      ldr r0, .UserBank
      ldrb r3, [r0, #0x0]
      cmp r3, r2
      beq Exit

CheckMagicGuard:
      ldr r2, .BattleStruct
      ldrb r1, [r0, #0x0]
      mov r0, #0x58
      mul r0, r1
      add r0, r0, r2
      mov r2, #0x20
      add r2, r0, r2
      ldrb r2, [r2]
      cmp r2, #0x63 /*Magic Guard*/
      beq Exit

HPCheck:
      ldrh r1, [r0, #0x28]
      cmp r1, #0x0
      beq Exit

SetLifeOrbRecoilBit:
      ldr r1, .LORBit
      mov r0, #0x1
      strb r0, [r1]

Exit:
      ldr r1, .Return2
      bx r1

ShellBell:
      ldr r1, .Return1
      bx r1

Divider:
      ldr r2, =0x081E4019
      bx r2

ScriptPusher:
      ldr r0, =0x08017545
      bx r0

.align 2
.UserBank: .word 0x02023D6B
.TargetBank: .word 0x02023D6C
.BattleStruct: .word 0x02023BE4
.DamageStruct: .word 0x02023ECC
.CurrMove: .word 0x02023D4A
.SheerForceTable: .word 0x08XXXXXX
.Outcome: .word 0x02023DCC
.FEHalfWord: .word 0x0000FEFE
.FFHalfWord: .word 0x0000FFFF
.Return1: .word 0x0801CF11
.Return2: .word 0x0801CFA7
.LORBit: .word 0x0203C038
.UTurnID: .word 0x000001YY
.VoltSwitchID: .word 0x000001ZZ

/*At 1CE58: 00 48 00 47 XX+1 XX XX 08*/


Routine at YYYYYY:
Code:

.text
.align 2
.thumb
.thumb_func
.global endcommandwithlifeorbsupport

Main:
      ldr r1, .LORBit
      ldrb r0, [r1]
      cmp r0, #0x1
      bne EndCommand

LifeOrb:
      push {lr}
      push {r2-r7}
      mov r0, #0x0
      strb r0, [r1]
      ldr r0, .UserBank
      ldrb r3, [r0]
      mov r0, #0x58
      mul r0, r3
      ldr r2, .BattleStruct
      add r2, r2, r0
      ldrh r0, [r2, #0x28]
      cmp r0, #0x0
      beq Exit
      ldr r0, =0x02023D6F
      strb r3, [r0, #0x0]
      ldr r0, =0x02023DC4
      strb r3, [r0, #0x17]
      ldr r4, =0x02023D50
      ldrh r0, [r2, #0x2C]
      mov r1, #0xA
      bl Divider
      strh r0, [r4, #0x0]
      cmp r0, #0x0
      bne NotZero
      mov r0, #0x1

NotZero:
      strh r0, [r4, #0x0]
      bl ScriptPusher
      ldr r1, .ScriptPointer
      ldr r0, .LifeOrbDamageScript
      str r0, [r1, #0x0]
      pop {r2-r7}
      pop {r0}
      bx r0

Exit:
      pop {r2-r7}
      pop {r0}

EndCommand:
      ldr r0, =0x08022CCD @Replace this with the offset of the 4th Mold Breaker Routine if you are using Mold Breaker
      bx r0

Divider:
      ldr r2, =0x081E4019
      bx r2

ScriptPusher:
      ldr r0, =0x08017545
      bx r0

.align 2
.LifeOrbDamageScript: .word 0x08BBBBBB
.ScriptPointer: .word 0x02023D74
.UserBank: .word 0x02023D6B
.BattleStruct: .word 0x02023BE4
.LORBit: .word 0x0203C038

@Set YY+1 YY YY 08 as the 'End' Battle Script Command.


Battle Script at BBBBBB:
Code:

39 20 FA 20 C0 03 02 SS SS SS 08 10 84 01 12 40 00 35 D0 3D 02 02 00 01 00 00 0B 01 0C 01 19 01 00 00 00 00 00 3C


String at SSSSSS:
Code:

FD 0F 00 E0 E3 E7 E8 00 E7 E3 E1 D9 00 E3 DA 00 DD E8 E7 00 C2 CA AB FF





Well done on that KDS !

Same routine with Emerald offset !

Here :
Spoiler:

Spoiler:

Routine at XXXXXX:
Code:

.text
.align 2
.thumb
.thumb_func
.global lifeorbrecoil

SheerForceCheck:
      ldr r1, .UserBank
      ldr r2, .BattleStruct
      ldrb r1, [r1, #0x0]
      mov r0, #0x58
      mul r0, r1
      add r0, r0, r2
      mov r2, #0x20
      add r2, r0, r2
      ldrb r2, [r2]
      cmp r2, #0x7E /*Sheer Force*/
      bne EffectCheck
      ldr r0, .CurrMove
      ldrh r3, [r0, #0x0]
      mov r0, #0x0
      ldr r1, .FEHalfWord
      ldr r2, .SheerForceTable

Loop:
      lsl r4, r0, #0x01
      add r4, r4, r2
      ldrh r4, [r4, #0x0]
      cmp r3, r4
      beq Exit
      cmp r4, r1
      beq EffectCheck
      add r0, #0x1
      b Loop

EffectCheck:
      mov r1, r8
      cmp r1, #0x1E
      beq KingsRock
      cmp r1, #0x3E
      beq ShellBell
      cmp r1, #0xKK    /*Life orb held item effect*/
      bne Exit

CheckOutcome:
      ldr r0, .Outcome
      ldrb r0, [r0, #0x0]
      mov r5, #0x29
      and r5, r0
      cmp r5, #0x0
      bne Exit

CheckUturnVoltSwitch:
      ldr r0, .CurrMove
      ldrh r0, [r0]
      ldrh r1, .VoltSwitchID
      cmp r0, r1
      beq Exit
      ldrh r1, .UTurnID
      cmp r0, r1
      beq Exit

CheckIfMoveDamagedSomeTarget:
      ldr r1, .DamageStruct
      ldr r4, .TargetBank
      ldrb r2, [r4, #0x0]
      lsl r0, r2, #0x02
      add r0, r0, r2
      lsl r0, r0, #0x02
      add r6, r1, #0x4
      add r0, r0, r6
      ldr r1, [r0, #0x0]
      cmp r1, #0x0
      beq Exit
      ldr r0, .FFHalfWord
      cmp r1, r0
      beq Exit

CheckIfUserIsNotTheTarget:
      ldr r0, .UserBank
      ldrb r3, [r0, #0x0]
      cmp r3, r2
      beq Exit

CheckMagicGuard:
      ldr r2, .BattleStruct
      ldrb r1, [r0, #0x0]
      mov r0, #0x58
      mul r0, r1
      add r0, r0, r2
      mov r2, #0x20
      add r2, r0, r2
      ldrb r2, [r2]
      cmp r2, #0x63 /*Magic Guard*/
      beq Exit

HPCheck:
      ldrh r1, [r0, #0x28]
      cmp r1, #0x0
      beq Exit

SetLifeOrbRecoilBit:
      ldr r1, .LORBit
      mov r0, #0x1
      strb r0, [r1]

Exit:
      ldr r1, .Return2
      bx r1

KingsRock:
      ldr r0, .Return3
      bx r0

ShellBell:
      ldr r1, .Return1
      bx r1

Divider:
      ldr r2, =0x082E7540+1
      bx r2

ScriptPusher:
      ldr r0, =0x0803FAFC+1
      bx r0

.align 2
.UserBank: .word 0x0202420B
.TargetBank: .word 0x0202420C
.BattleStruct: .word 0x02024084
.DamageStruct: .word 0x0202437C
.CurrMove: .word 0x020241EA
.SheerForceTable: .word 0x08XXXXXX
.Outcome: .word 0x0202427C
.FEHalfWord: .word 0x0000FEFE
.FFHalfWord: .word 0x0000FFFF
.Return1: .word 0x08045794+1
.Return2: .word 0x0804582A+1
.Return3: .word 0x080456EC+1
.LORBit: .word 0x0203E338        /*It's actually a FreeRam loc*/
.UTurnID: .word 0x00000YYY        /*ID number of U-Turn*/
.VoltSwitchID: .word 0x00000ZZZ        /*ID number of Volt Switch*/

/*At 080456DC: 00 48 00 47 XX+1 XX XX 08*/



Spoiler:

Routine at YYYYYY:
Code:

.text
.align 2
.thumb
.thumb_func
.global endcommandwithlifeorbsupport

Main:
      ldr r1, .LORBit
      ldrb r0, [r1]
      cmp r0, #0x1
      bne EndCommand

LifeOrb:
      push {lr}
      push {r2-r7}
      mov r0, #0x0
      strb r0, [r1]
      ldr r0, .UserBank
      ldrb r3, [r0]
      mov r0, #0x58
      mul r0, r3
      ldr r2, .BattleStruct
      add r2, r2, r0
      ldrh r0, [r2, #0x28]
      cmp r0, #0x0
      beq Exit
      ldr r0, =0x0202420F
      strb r3, [r0, #0x0]
      ldr r0, =0x02024274
      strb r3, [r0, #0x17]
      ldr r4, =0x020241F0
      ldrh r0, [r2, #0x2C]
      mov r1, #0xA
      bl Divider
      strh r0, [r4, #0x0]
      cmp r0, #0x0
      bne NotZero
      mov r0, #0x1

NotZero:
      strh r0, [r4, #0x0]
      bl ScriptPusher
      ldr r1, .ScriptPointer
      ldr r0, .LifeOrbDamageScript
      str r0, [r1, #0x0]
      pop {r2-r7}
      pop {r0}
      bx r0

Exit:
      pop {r2-r7}
      pop {r0}

EndCommand:
      ldr r0, =0x0804B664+1
      bx r0

Divider:
      ldr r2, =0x082E7540+1
      bx r2

ScriptPusher:
      ldr r0, =0x0803FAFC+1
      bx r0

.align 2
.LifeOrbDamageScript: .word 0x08BBBBBB
.ScriptPointer: .word 0x02024214
.UserBank: .word 0x0202420B
.BattleStruct: .word 0x02024084
.LORBit: .word 0x0203E338        /*Same as in previous routine*/

/*YY+1 YY YY 08 must replaces the "end" command pointer */



Spoiler:

Battle Script at BBBBBB:
Code:

39 20 00 FA 20 E3 03 02 SS SS SS 08 10 84 01 12 40 00 35 80 42 02 02 00 01 00

00 0B 01 0C 01 19 01 00 00 00 00 00 3C


String at SSSSSS:
Code:

FD 0F 00 E0 E3 E7 E8 00 E7 E3 E1 D9 00 E3 DA 00 DD E8 E7 00 C2 CA AB FF





Bonus:
-Life Orb boost
-Light ball updated
-Item that boost a certain type of attack for Emerald
-Timespace Orbs for Emerald

Note that for timespace orbs and new boost-type item, you can adjust the power added the same way than miracle seed and the like.

Spoiler:

Emerald:
Code:

CheckLifeOrb:
cmp r2, #0x43        /*Held item effect of life orb, I chose 0x43 (= 67 in decimal) because it's unused*/
beq Lifeorb

CheckNewItem:
cmp r2, #0x44        /*Held item effect of the boost item, I chose 0x44 (= 68 in decimal) because it's unused*/
beq NewItem

CheckAdamantOrb:
cmp r2, #0x45        /*Unused held item effect*/
bne CheckLustreous
ldrh r0, [r6]
mov r3, #0xFF        /*0xFF + 0xE4 = 0x1E3 = 483 = index number of Dialga*/
add r3, #0xE4
cmp r0, r3
beq AdamantOrb

CheckLustreous:
cmp r2, #0x46        /*Unused held item effect*/
bne CheckGriseous
ldrh r0, [r6]
mov r3, #0xFF        /*0xFF + 0xE5 = 0x1E4 = 484 = index number of Palkia*/
add r3, #0xE5
cmp r0, r3
beq LustreousOrb

CheckGriseous:
cmp r2, #0x47        /*Unused held item effect*/
bne CheckLightBall
ldrh r0, [r6]
mov r3, #0xFF        /*0xFF + 0xE8 = 0x1E7 = 487 = index number of Giratina*/
add r3, #0xE8
cmp r0, r3
beq GriseousOrb
b Back

AdamantOrb:
push {r0-r5}
mov r1, #8        /*Steel type*/
mov r2, #0x10        /*Dragon type*/
b CheckExceptionTypeAttack

LustreousOrb:
push {r0-r5}
mov r1, #0xB        /*Water type*/
mov r2, #0x10        /*Dragon type*/
b CheckExceptionTypeAttack

GriseousOrb:
push {r0-r5}
mov r1, #7        /*Ghost type*/
mov r2, #0x10        /*Dragon type*/
b CheckExceptionTypeAttack

NewItem:
push {r0-r5}
mov r1, #9        /*New type you want to boost*/
mov r2, #9        /*New type you want to boost, here I choose the same because I want it boost only one type*/

CheckExceptionTypeAttack:
ldr r4, CheckTypeLoc
ldr r4, [r4]
ldrb r4, [r4, #0x13]
cmp r4, #0
beq GetMoveType
mov r5, #0x3F
and r4, r5
cmp r4, r1
beq Boost
cmp r4, r2
beq Boost
b PopAndBack

Back:
ldr r0, Return
bx r0

PopAndBack:
pop {r0-r5}
b Back

CheckLightBall:
cmp r2, #0x2D
bne Back
ldrh r0, [r6]
cmp r0, #0x19
beq Lightball
b Back

GetMoveType:
ldr r3, CurMoveIndex
ldrh r3, [r3]
ldr r4, MoveData
mov r5, #0xC
mul r5, r3
add r4, r5
ldrb r4, [r4, #2]
cmp r4, r1
beq Boost
cmp r4, r2
bne PopAndBack

Boost:
pop {r0-r5}
ldrh r3, [r6, #0x2E]
lsl r0, r3, #4
push {r1}
mov r1, #6
mul r3, r1
pop {r1}
add r3, r0
lsl r3, #1
ldr r0, LocItems
add r3, r0
add r3, #0x13
ldrb r0, [r3]
mov r3, #0x52
mul r0, r3
lsr r0, #6
add r0, #0x7B
mul r7, r0
lsr r7, #7
mov r3, r8
mul r3, r0
lsr r3, #7
mov r8, r3
b Back

Lifeorb:
mov r0, r8
mov r3, #0xA7
mul r0, r3
lsr r0, #7
mov r8, r0
mul r7, r3
lsr r7, #7
b Back

Lightball:
mov r0, r8
lsl r0, r0, #0x1
mov r8, r0
lsl r7, r7, #0x1
b Back

.align 2
Return: .word 0x0806983E+1
LocItems: .word 0x085839A0          /*Location of your items Data*/
CurMoveIndex: .word 0x020241EA
MoveData: .word 0x0831C898          /*Location of your move data*/
CheckTypeLoc: .word 0x0202449C

/*00 48 00 47 XX XX XX 08 00 00 00 at 0x6982C*/


Fire Red:
Code:

cmp r2, #0x43  /*Held item effect, I chose 0x43 (=67 in dec) because it is unused in the game*/
beq Lifeorb
cmp r2, #0x2D
bne Back
ldrh r0, [r6]
cmp r0, #0x19
beq Lightball
b Back

Lifeorb:
mov r0, r8
mov r3, #0xA7
mul r0, r3
lsr r0, #7
mov r8, r0
mul r7, r3
lsr r7, #7
b Back

Lightball:
mov r0, r8
lsl r0, r0, #0x1
mov r8, r0
lsl r7, r7, #0x1

Back:
ldr r0, Return
bx r0

.align 2
Return: .word 0x0803F00A+1

/*00 48 00 47 XX XX XX 08 00 00 00 at 0803EFF8*/




Quote:

Originally Posted by leyn09 (Post 8813429)
Thanks! Oh, will the FR ver. be available soon? :D

Yep, it is now updated

Trainer 781 June 19th, 2015 9:20 PM

Quote:

Originally Posted by MrDollSteak (Post 8806198)
I've noticed that this also prevents Sheer Force Pokemon getting any healing from the Shell Bell. This doesn't happen in the games I don't think. I'd probably do the Sheer Force Check after determining whether it has Sheer Force. Otherwise great work! I'll have to link this post when I write up the rest of my Sheer Force routines on the Ability Resource Thread.

Thanks.
Well it does prevent according to Bulbapedia.
Also, I have already done the Sheer Force Check after checking the ability (literally copy pasted line-to-line your Sheer Force implementation xD).

Quote:

Originally Posted by kleenexfeu (Post 8806372)
Spoiler:

Well done on that KDS !
Thanks

Typo in the check Volt Switch/U-turn : bew exit instead of beq
I'll fix it, aha

Something else troubles me though. In that part :
EffectCheck:
mov r1, r8
cmp r1, #0x3E
beq ShellBell
cmp r1, #0xKK
bne Exit
Shouldn't you check King's Rock effect too ? There's cmp r1, #0x1E in the original routine.
You can. But there is no need, since the Battle Script for King Rock utilizes 'setbyte 0x2023E85' along with 'seteffecttargetwithchance' command which MrDS's Sheer Force implementation already handles. Choose whatever that looks more efficient to you.

Something else, I tried to port it to Emerald and failed. I think this is the part of the "end" command battle that causes problem.
I saw there's a difference beetwin Emerald and Fire Red Mold breaker routines regarding the part of the end command, so I tried to change a little bit that part of your routine but didn't managed to make it work.
Is there something obviously wrong ?
You have to insert the Routine at YYYYYY the same way as done in Fire Red. This involves, replacing the pointer to the 'end command' in the command table with the offset of this routine.
The 'EndCommand' label of Routine at YYYYYY should be this

Code:

EndCommand:
      ldr r1, =0x0804B666+1 @The pointer to the old 'end' command
      bx r1


Also in Emerald, you don't have to worry about whether Mold Breaker is there or not. The Pointer in the EndCommand label won't change unlike Fire Red.
Your routine was creating stack imbalance because it was not pushing and popping equal no of registers.



Responses in Bold.



Also, I might post a mini-documentation about the Battle Script Command 'cmd49' in the Quick R&D thread to provide insight of things that are happening at the End of a Move Execution.

And it will also help to create things like Weakness Policy, Rocky Helmet, Absorb Bulb etc.

Since I will be very busy doing College and Intern Projects, I don't have time to work on these for now. It would be better if some-one with free time will be able to work on these items.

leyn09 June 21st, 2015 4:11 AM

Quote:

Originally Posted by kleenexfeu (Post 8806372)
Well done on that KDS !

Bonus, Life Orb boost (lightball updated included) :

Spoiler:

Code:

cmp r2, #0x43
beq Lifeorb
cmp r2, #0x2D
bne Back
ldrh r0, [r6]
cmp r0, #19
beq Lightball
ldr r0, =(0x0806983F)
bx r0

Lifeorb:
mov r0, r8
mov r3, #0xA7
mul r0, r3
lsr r0, #7
mov r8, r0
mul r7, r3
lsr r7, #7
ldr r0, =(0x0806983F)
bx r0

Lightball:
mov r0, r8
lsl r0, r0, #0x1
mov r8, r0
lsl r7, r7, #0x1
ldr r0, =(0x0806983F)
bx r0

Back:
ldr r0, =0x0806983E+1
bx r0

/*00 48 00 47 XX XX XX 08 00 00 00 at 0x6982C*/



May I ask on how to incorporate the life orb recoil and boost?

kleenexfeu June 21st, 2015 1:02 PM

Quote:

Originally Posted by leyn09 (Post 8808440)
May I ask on how to incorporate the life orb recoil and boost?

The bunch of code you see here is ASM routine. If you don't know what is ASM, type on google or in this forum "ASM" and you'll see a lot of good tutorials.

If you know more or less what it is but don't know how to insert it, refer to that post because I can't explain it in a better way : http://www.pokecommunity.com/showpost.php?p=8526603&postcount=199

Btw you can simply read the tutorials on that thread, they're very good : http://www.pokecommunity.com/showthread.php?t=343871

For the rest, read the instruction put together with the routine.

If you still have problem (and you actually tried to make it work), you can PM me

Hope it'll help

leyn09 June 21st, 2015 3:48 PM

Quote:

Originally Posted by kleenexfeu (Post 8809042)
The bunch of code you see here is ASM routine. If you don't know what is ASM, type on google or in this forum "ASM" and you'll see a lot of good tutorials.

If you know more or less what it is but don't know how to insert it, refer to that post because I can't explain it in a better way : http://www.pokecommunity.com/showpost.php?p=8526603&postcount=199

Btw you can simply read the tutorials on that thread, they're very good : http://www.pokecommunity.com/showthread.php?t=343871

For the rest, read the instruction put together with the routine.

If you still have problem (and you actually tried to make it work), you can PM me

Hope it'll help

Oh sorry, my question was quite misleading. I know how to insert ASM. hehe. I was asking if the life orb will work if I just separately insert your LO boost and KDS' LO recoil? Or I should change a byte (the held item effect,maybe?) in your asm routine. Thanks!

kleenexfeu June 22nd, 2015 6:23 AM

Quote:

Originally Posted by leyn09 (Post 8809216)
Oh sorry, my question was quite misleading. I know how to insert ASM. hehe. I was asking if the life orb will work if I just separately insert your LO boost and KDS' LO recoil? Or I should change a byte (the held item effect,maybe?) in your asm routine. Thanks!

Oh ok. So yeah, they work seperatly, I edited my routine, the first "cmp 0x43" actually compare to held item effect of your life orb. I advice using an unused item effect.

Note that the boost power I post is only for Emerald though

leyn09 June 24th, 2015 3:30 AM

Quote:

Originally Posted by kleenexfeu (Post 8810143)
Oh ok. So yeah, they work seperatly, I edited my routine, the first "cmp 0x43" actually compare to held item effect of your life orb. I advice using an unused item effect.

Note that the boost power I post is only for Emerald though

Thanks! Oh, will the FR ver. be available soon? :D

Mr.Pkmn June 29th, 2015 10:19 AM

Can we have run-like speed for surf and mach bike speed in FR? Even better would be an arbitrary speed value!

Telemetius July 4th, 2015 2:06 AM

Hi FBI, first of all thanks for your work! You've been really helpful.
My question regards your battle routine http://www.pokecommunity.com/showthread.php?p=8527650#8527650 .
I've been trying it without success in my Ruby rom hack hoping it would work just like in Fire Red.
Is there any way to remove the whiteout after losing a battle in a Ruby hack rom?

leyn09 July 6th, 2015 7:57 PM

Quote:

Originally Posted by daniilS (Post 8532492)

Delete save and reset game after whiteout




I tried getting it to delete the save file and to return to the titlescreen afterwards, but I couldn't get a brief flash of the pokécenter to disappear. I might fix it later, but as for now, here's a much more simple version using SoftReset:
Code:

Type 5F F1 53 FC 00 DF at 0807F5B6 and F1 E7 at 0807F5D0.



Can its effectivity be toggled using flags?

Also, Is there any way how to disable the usage of bag during battle? Thanks!


All times are GMT -8. The time now is 8:46 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.