• 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.

Code: Ability Resource Thread

UPDATE : 100% working afaik, here is :

Stance Change:
Spoiler:

Look great.And i have A problem You use the 1C animation make image change And when i change pokemon Will the image change?And when battle end?
 
Look great.And i have A problem You use the 1C animation make image change And when i change pokemon Will the image change?And when battle end?

With the 0x1C animation the sprite will automatically update.
With the transform animation too, though the palette of your poke will be slightly brighter (because of how transform animation works). Fixed bright problem !
 
Last edited:
UPDATE : 100% working afaik, here is :

Stance Change:
Spoiler:

Sorry where have You are documentation on the battle script commands for the "nop3"
 
okay so the upgraded sturdy worked and now im trying to do no guard so i got to the point where i had to insert 00 49 08 47 xx xx xx 08 00 00 at 046754 and i did that and my offset is A0A1A8 but i did it reverse so it should be A9A1A0 so when i test it i miss but when i put 00 instead of 08 i dont miss but the game freezes plz help
 
UPDATE : 100% working afaik, here is :

Stance Change:

Brilliant work on this! It is functioning properly.
You missed one case though - reversion during user faint.

I will port this to FR after you are able to do this case.
 
so i changed for no guard the cmp r 0x64 both of them to 82 in hex number of course and machamp is still missing plz help
 
Brilliant work on this! It is functioning properly.
You missed one case though - reversion during user faint.

I will port this to FR after you are able to do this case.

Yeah I have to hook in the faintpokemon command, I'll include that in the future along with the primal/mega weathers

Thanks for pointing me that out though as I already had forgot that point
 
Defiant/Competitive:

Spoiler:
 
Last edited:
Defiant/Competitive:

Spoiler:

Wow thanks for that ! I struggled and failed so many times to do that, I really appreciate you've done this in a clean way !
 
For sturdy, the problem is the same than for defiant/competitive : display a message.
Display that message stop the multi hit move, and somehow makes the pokémon unbeatable for that turn, even if you don't use the 0x0202427C location

So I used the same way than protean to display the message :

Sturdy
Spoiler:
I've somewhat successfully ported this to FireRed (it only needed two routines), but I can't get it to display the message string.

Spoiler:

Any ideas?
 
I've somewhat successfully ported this to FireRed (it only needed two routines), but I can't get it to display the message string.

Spoiler:

Any ideas?

I can't check right now, but it could be a problem with the banks you're using.

Also, are you sure you're using the good string ? Some of them are blank for some reason, like the one use by earthquake, so that also might be the problem.

Last thing, did you test sturdy with moves like dragon rage/seismic toss ? That would be surprising that FR doesn't need the second routine since EM and FR use the same battle engine
 
I can't check right now, but it could be a problem with the banks you're using.
Oh, you might be right because I used the user's bank there, but even after I changed it to be the target's bank, it still doesn't display the message.

Also, are you sure you're using the good string ? Some of them are blank for some reason, like the one use by earthquake, so that also might be the problem.
I'm pretty sure the string I'm using is the endure one, yeah. I even changed it to one I know is a "correct" string and it didn't display, unfortunately.

Last thing, did you test sturdy with moves like dragon rage/seismic toss ? That would be surprising that FR doesn't need the second routine since EM and FR use the same battle engine
Yeah, Sturdy works with things like Dragon Rage and Seismic Toss. Note that it is branched to at two places, it just didn't need a unique routine.
 
Can someone plz show me what I'm doing wrong I still can't get no guard to work this is my code this is emerald btw

.text
.align 2
.thumb
.thumb_func
.global noguard

AbilityBufferUser:
push {r0}
ldr r0, .Bank
ldrb r0, [r0]
mov r1, #0x58
ldr r2, .BattleData
mul r0, r1
add r0, r0, r2
ldrb r0, [r0]
NoGuardCheckUser:
cmp r0, #0x54 ( the place I'm putting my no guard)
beq AutoHit
AbilityBufferTarget:
ldr r0, .Bank
add r0, #0x1
ldrb r0, [r0]
mul r0, r1
add r0, r0, r2
ldrb r0, [r0]
NoGuardCheckTarget:
cmp r0, #0x54 ( same as above mentioned)
beq AutoHit
ToxicCheck:
ldr r0, .MoveLoc
ldrh r0, [r0]
cmp r0, #0x5C
bne InvulnerableCheck
PoisonCheck:
ldr r0, .Bank
ldr r0, [r0]
mov r1, #0x58
ldr r2, .BattleData
mul r0, r1
add r2, r0, r2
ldrb r1, [r0, #1]
ldrb r0, [r0, #2]
cmp r0, #0x3
beq AutoHit
cmp r1, #0x3
beq AutoHit
InvulnerableCheck:
pop {r0}
bl Method
lsl r0, r0, #0x18
cmp r0, #0x0
bne Miss
Return:
ldr r1, .Return
bx r1
AutoHit:
pop {r0}
ldr r1, .Return2
bx r1
Miss:
ldr r1, .Return3
bx r1
Method:
ldr r1, .MethodLoc
bx r1


.align 2

.Bank: .word 0x0202420B
.BattleData: .word 0x020240A4
.MoveLoc: .word 0x020241EA
.Return: .word 0x08046761
.Return2: .word 0x080469CB
.Return3: .word 0x080469D3
.MethodLoc: .word 0x080464AD
 
Oh, you might be right because I used the user's bank there, but even after I changed it to be the target's bank, it still doesn't display the message.

I'm pretty sure the string I'm using is the endure one, yeah. I even changed it to one I know is a "correct" string and it didn't display, unfortunately.

Yeah, Sturdy works with things like Dragon Rage and Seismic Toss. Note that it is branched to at two places, it just didn't need a unique routine.

Return2: .word 0x801F216+1 should be 0x801F294+1, though I doubt it would solve the problem

Also I have a little update for Protean, it's a bit tricky but now the message lasts longer :

Update:
Spoiler:
 
Last edited:
Return2: .word 0x801F216+1 should be 0x801F294+1, though I doubt it would solve the problem

I don't think that's right, when I change it to that Sturdy doesn't work at all (moves that would inflict damage greater than the target's HP, which should trigger the endure BS, just faint it).
 
Last edited:
Defiant/Competitive:

Spoiler:

I think you're overwriting 0x801FE6E with your hook, which is pointed by a conditionnal branch at 0x801FE38, perhaps this should be corrected
 
Posting to have this routine checked. It's a modified version of MrDS's Toxic Boost + Flare Boost routine for Emerald. Since only Toxic Boost is the ability in the routine planned to be added in SE, I've made attempts to change it so that Flare Boost and anything that relates to it in the code is gone. Index number(s) have been changed accordingly:
Code:
.text
.align 2
.thumb
.thumb_func
.global statusboostabilities
 
Main:
    ldrb r0, [r1]
    cmp r0, #0x81
    beq ToxicBoost
    cmp r0, #0x3E
    bne MarvelScaleCheck
Guts:
CheckStatus:
    ldr r0, [r6, #0x4C]
    cmp r0, #0x0
    beq MarvelScaleCheck
GutsReturn:
    ldr r0, .Return
    bx r0
ToxicBoost:
    ldr r0, [r6, #0x4C]
CheckPoison:
    cmp r0, #0x8
    beq AttackBoost
    cmp r0, #0x80
    bne MarvelScaleCheck
AttackBoost:
    lsr r0, r7, #0x1
    add r7, r0, r7
    b MarvelScaleCheck
CheckBurn:
    cmp r0, #0x10
    bne MarvelScaleCheck
MarvelScaleCheck:
    ldr r0, .Return2
    bx r0
 
.align 2
.Return: .word 0x08069909
.Return2: .word 0x08069917
 
Posting to have this routine checked. It's a modified version of MrDS's Toxic Boost + Flare Boost routine for Emerald. Since only Toxic Boost is the ability in the routine planned to be added in SE, I've made attempts to change it so that Flare Boost and anything that relates to it in the code is gone. Index number(s) have been changed accordingly:
Code:
.text
.align 2
.thumb
.thumb_func
.global statusboostabilities
 
Main:
    ldrb r0, [r1]
    cmp r0, #0x81
    beq ToxicBoost
    cmp r0, #0x3E
    bne MarvelScaleCheck
Guts:
CheckStatus:
    ldr r0, [r6, #0x4C]
    cmp r0, #0x0
    beq MarvelScaleCheck
GutsReturn:
    ldr r0, .Return
    bx r0
ToxicBoost:
    ldr r0, [r6, #0x4C]
CheckPoison:
    cmp r0, #0x8
    beq AttackBoost
    cmp r0, #0x80
    bne MarvelScaleCheck
AttackBoost:
    lsr r0, r7, #0x1
    add r7, r0, r7
    b MarvelScaleCheck
CheckBurn:
    cmp r0, #0x10
    bne MarvelScaleCheck
MarvelScaleCheck:
    ldr r0, .Return2
    bx r0
 
.align 2
.Return: .word 0x08069909
.Return2: .word 0x08069917

It'd be better just to PM me that. You can also get rid of check burn. But yeah not the best place for it because it can confuse people.
 
Back
Top