• 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

218
Posts
10
Years
  • Seen Nov 12, 2021
Imposter :
Spoiler:


Perhaps it's not the better way to do it, any suggestion is welcome.

3. New Switch-in Ability System

Shouldn't we edit the transform command too ? In the case you get intimidate or something
 
Last edited:

Trainer 781

Guest
0
Posts
Perhaps it's not the better way to do it, any suggestion is welcome.

Shouldn't we edit the transform command too ? In the case you get intimidate or something

I tried doing it myself before with the switch-in system but it froze. Maybe because of the fact that it is not a move execution script. The transform command did not froze but the attackanimation froze that script.
 
218
Posts
10
Years
  • Seen Nov 12, 2021
I tried doing it myself before with the switch-in system but it froze. Maybe because of the fact that it is not a move execution script. The transform command did not froze but the attackanimation froze that script.

Yeah, that´s why I used a little trick : I stored the index number of tranform in the current move location 0x020241EA
That way the engine believe we're executing the move transform, which is almost the case. So the animation of tranform is automatically played (this is the animation itself that allow the sprite to be updated)
Alternatively we could use playanimation and expand the table as I did for Delta Stream but my main problem was to load the good target/user and make the ability fail when it had to, so I did not take time to update with a cleaner way

EDIT : The alternative doesn't works for some reason, everything is copied (stats, buff stats, attacks etc..) but the target's sprite. The palette is indeed clearer than the target, but the sprite remains the same
 
Last edited:

javacola2.0

Banned
1
Posts
8
Years
  • Age 32
  • Seen Aug 23, 2015
Imposter :
Spoiler:


Perhaps it's not the better way to do it, any suggestion is welcome.



Shouldn't we edit the transform command too ? In the case you get intimidate or something

You're the man. I was giving up hope.

Edit: Ah crap I just realized it's for Emerald. Oh well, at least it'll be in the next FR base.
 
218
Posts
10
Years
  • Seen Nov 12, 2021
You're the man. I was giving up hope.

Edit: Ah crap I just realized it's for Emerald. Oh well, at least it'll be in the next FR base.

It is easily portable to FR, I'll update soon. It's just I never use FR so every time I do a routine I'm too lazy to seek for FR offset. But if someone ask I guess I can make an effort

I have also the -ate abilities done :
Spoiler:
 
Last edited:
199
Posts
12
Years
  • Seen Jul 18, 2016
Imposter :

Think I found some bugs/oversights.

When an enemy is digging (and also assume flying, diving, bouncing) and you switch in with Imposter Pokemon it will loop "But it Failed" Endlessly.

I may be wrong but even with Choice Scarf item held i cannot go before the opponent most times even though I have maxed speed for the Imposter Pokemon. I'm still playing with this so its probably just some stupid mistake I'm making.

Also in the asm for switch in check should it be like this if I don't use the mega weather?

Code:
CheckAirLock:
cmp r0, #0x4D
bne CheckImposter
 
218
Posts
10
Years
  • Seen Nov 12, 2021
Think I found some bugs/oversights.

When an enemy is digging (and also assume flying, diving, bouncing) and you switch in with Imposter Pokemon it will loop "But it Failed" Endlessly. Thanks for that, I stupidly forgot to check some other statuts

I may be wrong but even with Choice Scarf item held i cannot go before the opponent most times even though I have maxed speed for the Imposter Pokemon. I'm still playing with this so its probably just some stupid mistake I'm making. Did you test your scarf seperatly ? Perhaps it's the scarf routine that doesn't work

Also in the asm for switch in check should it be like this if I don't use the mega weather?

Code:
CheckAirLock:
cmp r0, #0x4D
bne CheckImposter
Yeah, I actually rewrote a part of the check switch-in system, it was not necessary but I found it just more readable, this part check for Air Lock, which is an existing ability in gen3 games.

Responses in bold, I'll look into fix the flying/bouncing/digging bug firstly.

EDIT: Fixed, including for the substitute thing. And the choice scarf works for me, I tried around 100 attack, with higher or lower level, I go first every time.
 
Last edited:
199
Posts
12
Years
  • Seen Jul 18, 2016
Responses in bold, I'll look into fix the flying/bouncing/digging bug firstly.

EDIT: Fixed, including for the substitute thing. And the choice scarf works for me, I tried around 100 attack, with higher or lower level, I go first every time.

Awesome, and yeah, I think I was doing something wrong when testing Choice Scarf w/Impsoter since I tested it again and it works like it should.
 
218
Posts
10
Years
  • Seen Nov 12, 2021
Multitype + Mega/Primal keep their stone + Giratina/Griseous and such:
Spoiler:
 
Last edited:
218
Posts
10
Years
  • Seen Nov 12, 2021
Prankster in my rombase is glitched, but I've made a new bug free routine.



Interesting! Thanks for that feedback, I do actually know EXACTLY what the problem is. It's in the section add r1, r1, r3 in Natural Cure, however I was unsure about actually putting it in for Regenerator as I thought it was just a double index check, but it's actually making sure that you can get the second Pokemon in your double battle fixed.

I've updated that post, so it should be all fixed.

No Guard

Spoiler:

Fixes in bold. Also, the ability should be 0x64, not 0x7E

I think that post should be linked in the OP : http://www.pokecommunity.com/showpost.php?p=8712926&postcount=30 It contains the setword command, afaik there's no other place in the forum you can find it
 
Last edited:
91
Posts
14
Years
  • Seen Feb 22, 2023
Sometimes it seems that abilities posted in this thread were not even tested (like once) because when I tried to compile (tangled feet) I got compile time errors. Not that it would be hard to fix, but, uh, did you really not test this stuff?^^
Code:
.text
.align 2
.thumb
.global tangled_feet

tangled_feet:
    mov r0, r2
    mul r0, r7
    mov r3, r9
    add r1, r0, r3
    add r0, r1, #0x20 @out of range
    ldrb r0, [r0]
TangledFeetCheck:
    cmp r0, #ABILITY_TANGLED_FEET
    bne Return
    add r0, r1, #0x50 @like hell of a what totally out of range
    ldr r0, [r0]
    cmp r0, #0x0
    beq Return
EvasionBoost:
    lsl r0, r4, #0x2
    add r0, r0, r4
    lsl r0, r0, #0x4
    mov r1, #0x64
    bl Divide
    lsl r0, r0, #0x10
    lsr r4, r0, #0x10
Return:
    ldr r0, .Return
    bx r0
Divide:
    ldr r2, .DivideBL
    
.align 2

.Return: .word 0x0801E0E5
.DivideBL: .word 0x081E4019

~SBird
 
218
Posts
10
Years
  • Seen Nov 12, 2021
Sometimes it seems that abilities posted in this thread were not even tested (like once) because when I tried to compile (tangled feet) I got compile time errors. Not that it would be hard to fix, but, uh, did you really not test this stuff?^^
Code:
.text
.align 2
.thumb
.global tangled_feet

tangled_feet:
    mov r0, r2
    mul r0, r7
    mov r3, r9
    add r1, r0, r3
    add r0, r1, #0x20 @out of range
    ldrb r0, [r0]
TangledFeetCheck:
    cmp r0, #ABILITY_TANGLED_FEET
    bne Return
    add r0, r1, #0x50 @like hell of a what totally out of range
    ldr r0, [r0]
    cmp r0, #0x0
    beq Return
EvasionBoost:
    lsl r0, r4, #0x2
    add r0, r0, r4
    lsl r0, r0, #0x4
    mov r1, #0x64
    bl Divide
    lsl r0, r0, #0x10
    lsr r4, r0, #0x10
Return:
    ldr r0, .Return
    bx r0
Divide:
    ldr r2, .DivideBL
    
.align 2

.Return: .word 0x0801E0E5
.DivideBL: .word 0x081E4019

~SBird

That's the whole point of the thread : everyone can help/contribute. Of course the thread shouldn't be filled with buggy routines.
But I do think most of the routines work.
Also, you have to understand that MrDS is working on a base which is quite time-consuming. Since there's isn't many people that helps, it's the minority that does all the work. This can bring some mistake.

Also, thanks for the report, I'm sure it'll be fixed ASAP.

Finally, I saw you did pretty good hack (like the emerald expansion), feel free to contribute here !
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
Sometimes it seems that abilities posted in this thread were not even tested (like once) because when I tried to compile (tangled feet) I got compile time errors. Not that it would be hard to fix, but, uh, did you really not test this stuff?^^
Code:
.text
.align 2
.thumb
.global tangled_feet

tangled_feet:
    mov r0, r2
    mul r0, r7
    mov r3, r9
    add r1, r0, r3
    add r0, r1, #0x20 @out of range
    ldrb r0, [r0]
TangledFeetCheck:
    cmp r0, #ABILITY_TANGLED_FEET
    bne Return
    add r0, r1, #0x50 @like hell of a what totally out of range
    ldr r0, [r0]
    cmp r0, #0x0
    beq Return
EvasionBoost:
    lsl r0, r4, #0x2
    add r0, r0, r4
    lsl r0, r0, #0x4
    mov r1, #0x64
    bl Divide
    lsl r0, r0, #0x10
    lsr r4, r0, #0x10
Return:
    ldr r0, .Return
    bx r0
Divide:
    ldr r2, .DivideBL
    
.align 2

.Return: .word 0x0801E0E5
.DivideBL: .word 0x081E4019

~SBird

Thank you for identifying this problem in a constructive and polite manner.

You are completely right, I never test any of my routines because I deliberately wanted to inconvenience you specifically.

But in all seriousness, I didn't test this routine because I rewrote the existing code from my rombase and to my mind was optimising it, but looking at it now I made a mistake. Being rude doesn't make me fix the errors any more easily.

I look forward to you contributing your own abilities in the future, because currently there's only three of us working on all 100+ and you can clearly do ASM better than all of us.
 

Deokishisu

Mr. Magius
990
Posts
18
Years
Thank you for identifying this problem in a constructive and polite manner.

You are completely right, I never test any of my routines because I deliberately wanted to inconvenience you specifically.

Way to overreact to what is clearly playful prodding.

I look forward to you contributing your own abilities in the future, because currently there's only three of us working on all 100+ and you can clearly do ASM better than all of us.

Unnecessary. We all, as a community, appreciate the work that you three are putting into this (and damn, it's definitely hard work!), but that doesn't give you the right to be so hostile. The routine was broken, Sbird pointed it out with a little teasing on the side.

On a more on topic note, I hear that expanding the Pokedex breaks Forecast/Castform in some way. I was wondering if anyone had taken a look into Forecast and see if it's the ability itself that's breaking?
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
Way to overreact to what is clearly playful prodding.

Unnecessary. We all, as a community, appreciate the work that you three are putting into this (and damn, it's definitely hard work!), but that doesn't give you the right to be so hostile. The routine was broken, Sbird pointed it out with a little teasing on the side.

On a more on topic note, I hear that expanding the Pokedex breaks Forecast/Castform in some way. I was wondering if anyone had taken a look into Forecast and see if it's the ability itself that's breaking?

I was just being playful too. Sure it looks a bit grumpy, but the initial teasing wasn't necessary in the first place, so I'm just responding to it in the same manner.
I do actually want more help from people, and my last statement was meant in a genuine way even with some additional banter.

Forecast is just a total mess of code, it's really confusing to look at and its spread over quite a few locations. I wish I could help more with it.

I'm also going to take the time to reserve this post for the end of turn abilities. I have a lot of them stored up.
 
91
Posts
14
Years
  • Seen Feb 22, 2023
Hey no need in getting offensive in any matter, it was not my purpose to provoke anyone here I just wanted to point out a thingy that could probably / or most likely be a problem for hackers who are not that confident with ASM hacking...

It is not that I want to insult someone personally, or shame his work, but exactly that.

And yes, of course I will contribute some stuff, spite I don't have any, I came here to look for abilities which were already implemented and working in order to have less work in the first place and I came here to look for some ideas for future abilities which I can then implement and of course I will post them here, once I am finished...

Yeah, so that, if anyone felt insulted it was not my purpose, still I see a problem in posting untested code you have to admit that this might not be the wisest choice. (I had to correct some logical errors too, like the common ARM != THUMB stuff, you know that stuff that happens a lot, at least to me...)

Also be sure that I will, once I am finished, post working snippets of code with reference to the original, once I am finished with my work, I am not a prick...

~SBird

EDIT: For the forecast / castform stuff: I think there is an hardcoded index in the rom, 0x00000181 - when expanding the pokedex just make sure not to change the castform entries for that (You have to change those thingies because they also represent the number of pokémon I suppose at least in HOEEN) - I do not know if I really fixed this bug once when I did the emerald expansion, but if I did it should be somewhere in Chaos Rush's tutorial, for BPRE you just want to do the same, either by research or trial n' error, there are only ten orwhat entries for that index.
 
Last edited:
218
Posts
10
Years
  • Seen Nov 12, 2021

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:
 
Last edited:
5
Posts
8
Years
  • Age 26
  • Seen Apr 19, 2016
Does anyone have a link to this tool it is desperately needed and i cant find a link.
 
218
Posts
10
Years
  • Seen Nov 12, 2021
UPDATE : 100% working afaik, here is :

Stance Change:
Spoiler:
 
Last edited:

GOLDstandard

Eclectic
51
Posts
10
Years
So I have been trying to learn ASM to help out in this thread, and I've been trying to implement the ability Frisk. I think my code is okay so far but I have gotten to the point where I need to store the opponent's held item name as text and the name is 14 bytes long. How can I store this text and then later print it out?
Spoiler:
 
Back
Top