The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking > Binary Hack Research & Development
Reload this Page Code Ability Resource Thread

Notices
For all updates, view the main page.

Binary Hack Research & Development Got a well-founded knack with your binary Pokémon hacks? Love reverse-engineering them? For the traditional Pokémon ROM hacker, this is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

Ad Content
Reply
 
Thread Tools
  #226   Link to this post, but load the entire thread.  
Old January 10th, 2016 (5:41 AM).
MrDollSteak's Avatar
MrDollSteak MrDollSteak is offline
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 28
Gender: Male
Posts: 859
Quote:
Originally Posted by DizzyEgg View Post
Regenerator doesn't work for me in double battles or when AI switches out.(Fire Red) HP may not update, kill AI pokemon or break health bar depending on the position of a pokemon. I played with it for a while and it seems the problem lies in str r0, [sp]. This only works for user, changing it to str r0, [sp, #0x28] will work for AI but freeze the game if player switches out. Double battles won't work either way. I think it has to do with bank position of switching and aforementioned sp.

EDIT: So I did some tests and it turns out that AI switching statused Pokemon with Natural Care in double battles also doesn't work. It doesn't have to do with your routine though, it just doesn't work in vanilla FR. Nvm, vanilla natural care works fine with all Pokemon, so the problem is somewhere in your routine.
Hrm, I'll look into it. Might be before the str r0, I think it might be add r0, r0, r2 instead of r0, r0, r3.
__________________
Reply With Quote
  #227   Link to this post, but load the entire thread.  
Old January 11th, 2016 (11:32 AM).
LCCoolJ95's Avatar
LCCoolJ95 LCCoolJ95 is offline
Limited Capacity
 
Join Date: May 2009
Location: The World That Never Was
Age: 28
Gender: Male
Nature: Naive
Posts: 629
For some of the codes, some say "insert XX XX XX 08 at this offset", while others say "insert XX+1 XX XX 08 at this offset". Is it XX XX XX 08 or XX+1 XX XX 08?
__________________
"The greatest obstacle in life is Yourself. Overcome it, and you will achieve the greatest accomplishment of all." -Art Beins, 1982

Pokémon Theta Emerald EX: https://www.pokecommunity.com/showthread.php?t=386240
Reply With Quote
  #228   Link to this post, but load the entire thread.  
Old January 11th, 2016 (11:49 AM).
Trainer 781
Guest
 
Posts: n/a
Quote:
Originally Posted by LCCoolJ95 View Post
For some of the codes, some say "insert XX XX XX 08 at this offset", while others say "insert XX+1 XX XX 08 at this offset". Is it XX XX XX 08 or XX+1 XX XX 08?
When you are refering to a Battle Script, Table etc. you use XX XX XX 08.
For ASM code you use XX+1 XX XX 08.

Though there may be some exceptions, but usually this is the case.
Reply With Quote
  #229   Link to this post, but load the entire thread.  
Old January 11th, 2016 (12:17 PM).
kleenexfeu kleenexfeu is offline
 
Join Date: Aug 2013
Gender: Male
Posts: 218
Quote:
Originally Posted by KDS View Post
When you are refering to a Battle Script, Table etc. you use XX XX XX 08.
For ASM code you use XX+1 XX XX 08.

Though there may be some exceptions, but usually this is the case.
The only exception would be when usin the bl instruction, but usually when we use it the address is given, like "bl 0xD7500" or "bl some_routine"

Even when there's a switch statement, we can use the +1, because mov pc, rX automatically nuliffy the LSB and considers we're in thumb mode

So yeah, you can consider pointers for ASM always having this "+1"
__________________
Arceus and Giratina Forms
Dynamic Pokémon Data
Reply With Quote
  #230   Link to this post, but load the entire thread.  
Old January 19th, 2016 (9:50 AM).
mamamama mamamama is offline
 
Join Date: Feb 2014
Posts: 180
Quote:
Originally Posted by MrDollSteak View Post
Wonder Skin and Snow Cloak
I am unable to compile Wonder Skin and the 2nd Snow Cloak routine. Kleenex has posted a Snow Cloak no hail damage routine but I want the no hail damage for Overcoat etc. that was posted.

Is there a fix for this?

Thanks for all the hard work you put in!
Reply With Quote
  #231   Link to this post, but load the entire thread.  
Old January 19th, 2016 (12:47 PM).
pokefreak890's Avatar
pokefreak890 pokefreak890 is offline
The One that will make everything great
 
Join Date: Nov 2014
Gender: Male
Posts: 853
i got u mamamamama

snow cloak part 1
.text
.text
.align 2
.thumb
.thumb_func
.global snowcloak

BufferAbility:
ldr r0, .TargetBank
ldrb r0, [r0]
mul r0, r5
add r0, r0, r7
add r0, #0x20
ldrb r0, [r0]
SandVeilCheck:
cmp r0, #0x8
bne SnowCloakCheck
SandVeil:
ldr r0, .Return
bx r0
SnowCloakCheck:
cmp r0, #0x52
bne Return
SnowCloak:
ldr r0, .WeatherLoc
ldrh r1, [r0]
mov r0, #0x18
lsl r0, r0, #0x4
and r0, r1
cmp r0, #0x0
beq Return
ldr r1, .Return2
bx r1
Return:
ldr r0, .Return3
bx r0

.align 2

.TargetBank: .word 0x0202420C
.Return: .word 0x0804689D
.WeatherLoc: .word 0x020243CC
.Return2: .word 0x080468A9
.Return3: .word 0x080468B9

snow cloak part 2 (this one does compile)

.text
.align 2
.thumb
.thumb_func
.global preventfromhail

Start:
mov r0, r2
add r0, #0x20
ldrb r1, [r0]
cmp r1, #0x52
bne Return

Untouched:
ldr r1, UntouchedBack
bx r1

Return:
add r0, #1
ldrb r0, [r0]
cmp r0, #0xF
beq Untouched
ldr r1, Back
bx r1

.align 2
Back: .word 0x08051BFA+1
UntouchedBack: .word 0x08051C3C+1

wonderskin

.text
.text
.align 2
.thumb
.thumb_func
.global wonderskin

BufferAbility:
ldr r0, .TargetBank
ldrb r0, [r0]
mul r0, r2
add r0, r0, r3
add r0, #0x20
ldrb r0, [r0]
ldrb r3, [r7, #0x3]
CheckWonderSkin:
cmp r0, #0x94
bne Return
WonderSkin:
ldrb r0, [r7, #0xA]
cmp r0, #0x2
bne Return
cmp r3, #0x32
ble Return
mov r3, #0x32
Return:
mov r8, r3
mov r0, #0x0
str r0, [sp]
mov r0, #0x13
ldr r1, .Return
bx r2

.align 2

.TargetBank: .word 0x0202420C
.Return: .word 0x080467E5

sorry its like this but i dont know how to do spoilers
__________________
3DS FREIND CODE : 2724-3540-0898
Reply With Quote
  #232   Link to this post, but load the entire thread.  
Old January 19th, 2016 (6:37 PM).
mamamama mamamama is offline
 
Join Date: Feb 2014
Posts: 180
Quote:
Originally Posted by pokefreak890 View Post
i got u mamamamama
Thanks!

Wonder Skin compiles now, but the game freezes when I try to use Spore on a Pokemon with this ability. It seems to be related to the 01 48 00 47 00 00 XX+1 XX XX 08 bytes. Have you made any changes to them?

The Snow Cloak fix doesn't seem to contain the checks for future and current abilities such as Ice Body and Overcoat like the original posted by Mr. DollSteak did. It would be great if that routine was able to be corrected.

Quote:
Originally Posted by MrDollSteak View Post
No Guard
I can confirm that this routine, despite the fix by kleenexfeu, does not work. During my tests, Dynamicpunch still missed, did not hit flying types, and the opposing Pokemon still missed mine at times despite me having No Guard.
Reply With Quote
  #233   Link to this post, but load the entire thread.  
Old January 20th, 2016 (2:02 AM).
Trainer 781
Guest
 
Posts: n/a
Quote:
Originally Posted by mamamama View Post

I can confirm that this routine, despite the fix by kleenexfeu, does not work. During my tests, Dynamicpunch still missed, did not hit flying types, and the opposing Pokemon still missed mine at times despite me having No Guard.
There is a typo in the third line. Change ldr r0, [r0] to ldrb r0, [r0]
Reply With Quote
  #234   Link to this post, but load the entire thread.  
Old January 20th, 2016 (4:02 AM).
MrDollSteak's Avatar
MrDollSteak MrDollSteak is offline
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 28
Gender: Male
Posts: 859
Quote:
Originally Posted by mamamama View Post
Thanks!

Wonder Skin compiles now, but the game freezes when I try to use Spore on a Pokemon with this ability. It seems to be related to the 01 48 00 47 00 00 XX+1 XX XX 08 bytes. Have you made any changes to them?

The Snow Cloak fix doesn't seem to contain the checks for future and current abilities such as Ice Body and Overcoat like the original posted by Mr. DollSteak did. It would be great if that routine was able to be corrected.



I can confirm that this routine, despite the fix by kleenexfeu, does not work. During my tests, Dynamicpunch still missed, did not hit flying types, and the opposing Pokemon still missed mine at times despite me having No Guard.
The problem for all of these routines in typos I made. In Wonder Skin it should be bx r1 in the last line in both Fire Red and Emerald. I have fixed those now.

In Snow Cloak I had two Returns available for some reason, there should only be one, which is why the compiling error occurred. Also KDS is right, for some reason in the emerald no guard it was saying ldr instead of ldrb, whereas the fire red one had ldrb correctly. I obviously haven't been copying these routines from my rombase as accurately as I thought haha!

Weird no one's pointed these out before but thanks mamamama and KDS for pointing these out to me.
__________________
Reply With Quote
  #235   Link to this post, but load the entire thread.  
Old January 21st, 2016 (12:30 AM). Edited January 21st, 2016 by mamamama.
mamamama mamamama is offline
 
Join Date: Feb 2014
Posts: 180
Quote:
Originally Posted by MrDollSteak View Post
Toxic Boost
Small bug: Toxic Boost boosts when my Pokemon is poisoned, but not when it is badly poisoned.

EDIT: Solved other glitches, self-inflicted
Reply With Quote
  #236   Link to this post, but load the entire thread.  
Old January 21st, 2016 (3:32 AM).
MrDollSteak's Avatar
MrDollSteak MrDollSteak is offline
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 28
Gender: Male
Posts: 859
Quote:
Originally Posted by mamamama View Post
Small bug: Toxic Boost boosts when my Pokemon is poisoned, but not when it is badly poisoned.



Another small bug: Toxic always hits regardless of whether the user is poison type. For example: A Normal type can hit flyers with Toxic. I am using the original Toxic Script without any changes to it.

Another one: Blizzard always hits, even without hail. Using the original script here aswell

Would you be able to provide the full list of moves that are affected by the changes made to the accuracycheck(?) command?

EDIT: Overall, after implementing the accuracy abilities, it seems like moves just generally seem to miss a lot. I missed 3 100% accuracy pounds in a row for no reason when having Overgrow as ability attacking another Pokemon with Pick Up as ability. I will try to investigate which exact ability causes this issue.
Fixed the issue with Toxic always hitting, there was a ldr instead of the ldrb. Not sure what the issue with Toxic Boost is, because the check looks right.

Not sure about the others, might just be that bad bank command from earlier.
__________________
Reply With Quote
  #237   Link to this post, but load the entire thread.  
Old January 21st, 2016 (4:37 AM).
Trainer 781
Guest
 
Posts: n/a
Quote:
Originally Posted by MrDollSteak View Post
Fixed the issue with Toxic always hitting, there was a ldr instead of the ldrb. Not sure what the issue with Toxic Boost is, because the check looks right.

Not sure about the others, might just be that bad bank command from earlier.
In No Guard, make sure to call the Method BL in the AutoHit label too. That BL is for Protect check. Otherwise, No Guard will bypass new protection moves like King Shield.
Reply With Quote
  #238   Link to this post, but load the entire thread.  
Old January 25th, 2016 (8:47 PM).
mamamama mamamama is offline
 
Join Date: Feb 2014
Posts: 180
Quote:
Originally Posted by MrDollSteak View Post
Prankster, Gale Wings, Stall, Sand Rush, Slow Start and Quick Feet
1. I tried to implement this but the routine does not compile. I have tried changing the line mov r10, r1 to mov r0, r1, but it does not help (I also noticed it is written as just mov 10, r1 in the routine). Is it possible that there are any more typos?

2. I suppose the "Move Data" is supposed to be changed if you have expanded your move data table. But the fact that you use 31C198 makes me unsure. Is that just a typo for 31C898, which is the move data location in Emerald?

3. Kleenexfeu told me that the free RAM location in Emerald start at 0203E320, does that mean I can use say E320, E321, E322 etc. or do I need to have some space in-between each?
Reply With Quote
  #239   Link to this post, but load the entire thread.  
Old January 25th, 2016 (9:17 PM).
MrDollSteak's Avatar
MrDollSteak MrDollSteak is offline
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 28
Gender: Male
Posts: 859
Quote:
Originally Posted by mamamama View Post
1. I tried to implement this but the routine does not compile. I have tried changing the line mov r10, r1 to mov r0, r1, but it does not help (I also noticed it is written as just mov 10, r1 in the routine). Is it possible that there are any more typos?

2. I suppose the "Move Data" is supposed to be changed if you have expanded your move data table. But the fact that you use 31C198 makes me unsure. Is that just a typo for 31C898, which is the move data location in Emerald?

3. Kleenexfeu told me that the free RAM location in Emerald start at 0203E320, does that mean I can use say E320, E321, E322 etc. or do I need to have some space in-between each?
I have fixed that damn routine so many times haha, it definitely compiles now.

The ram locations I've been using are 203E324 and beyond. Most of them take 2 or 4 bytes. Trick room is one, and tailwind is two, the others are 4 I think.
__________________
Reply With Quote
  #240   Link to this post, but load the entire thread.  
Old January 26th, 2016 (7:28 AM).
FamiliaWerneck's Avatar
FamiliaWerneck FamiliaWerneck is offline
 
Join Date: May 2015
Location: São Paulo, Brasil
Gender: Male
Posts: 275
Just a quick question. Is there a limit for how many characteres I can use to make an ability description?
Because I was expanding an already expanded table, and all the descriptions that were there already took up 32 characters (the ones that didn't had FFs completing it until they were 32 bytes long).
But the very first ability I try to insert is longer than that (I'm reinserting it, actually, thus I know it's already in the game and it has more than 32 characters).
If they don't have a limit, why the first abilities I read had all FFs completing 32 bytes? Also, if I can use more than 32 characters, how can I do it? Just an FF between two abilities descriptions is enough?
__________________
My Main Team:


Reply With Quote
  #241   Link to this post, but load the entire thread.  
Old January 26th, 2016 (8:20 AM).
MrDollSteak's Avatar
MrDollSteak MrDollSteak is offline
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 28
Gender: Male
Posts: 859
Quote:
Originally Posted by FamiliaWerneck View Post
Just a quick question. Is there a limit for how many characteres I can use to make an ability description?
Because I was expanding an already expanded table, and all the descriptions that were there already took up 32 characters (the ones that didn't had FFs completing it until they were 32 bytes long).
But the very first ability I try to insert is longer than that (I'm reinserting it, actually, thus I know it's already in the game and it has more than 32 characters).
If they don't have a limit, why the first abilities I read had all FFs completing 32 bytes? Also, if I can use more than 32 characters, how can I do it? Just an FF between two abilities descriptions is enough?
Emerald you can't, but Fire Red you can probably push it to about 50-60?
__________________
Reply With Quote
  #242   Link to this post, but load the entire thread.  
Old January 26th, 2016 (4:39 PM).
FamiliaWerneck's Avatar
FamiliaWerneck FamiliaWerneck is offline
 
Join Date: May 2015
Location: São Paulo, Brasil
Gender: Male
Posts: 275
Quote:
Originally Posted by MrDollSteak View Post
Emerald you can't, but Fire Red you can probably push it to about 50-60?
Got it. I thought there was a limit, but I'll be more free to do stuff that way, then. Thanks MrDollSteak.
__________________
My Main Team:


Reply With Quote
  #243   Link to this post, but load the entire thread.  
Old January 27th, 2016 (5:05 PM).
Homerzilla2k Homerzilla2k is offline
 
Join Date: Oct 2015
Posts: 11
I'm trying to add Protean to my ROM, and I can't seem to get it right. I complied it and inserted it into the ROM (00954460, if that matters). Then I added the 00 49 08 47 60 44 95 08 at 1D7D8. When I used "Paste Insert" to add it Gen III suite freaked out and took my to the .ini restore thing. When I overwrote it 1D7D8 with the new code and opened it, Gen III Suite worked fine, but I couldn't find it in my abilities menu. Am I missing a step somewhere?

I'm also using Mr.DollSteak's ROM base. I read in the thread that I have to edit the move data when using the the ROM base, but I'm not sure exactly how or what I'm supposed to do in that regard.
Reply With Quote
  #244   Link to this post, but load the entire thread.  
Old January 27th, 2016 (6:08 PM).
LCCoolJ95's Avatar
LCCoolJ95 LCCoolJ95 is offline
Limited Capacity
 
Join Date: May 2009
Location: The World That Never Was
Age: 28
Gender: Male
Nature: Naive
Posts: 629
You're supposed to Paste Write, not Paste Insert.
__________________
"The greatest obstacle in life is Yourself. Overcome it, and you will achieve the greatest accomplishment of all." -Art Beins, 1982

Pokémon Theta Emerald EX: https://www.pokecommunity.com/showthread.php?t=386240
Reply With Quote
  #245   Link to this post, but load the entire thread.  
Old January 27th, 2016 (9:39 PM).
mamamama mamamama is offline
 
Join Date: Feb 2014
Posts: 180
Quote:
Originally Posted by MrDollSteak View Post
I have fixed that damn routine so many times haha, it definitely compiles now.
Prankster, Gale Wing etc.:The routine still wont compile for me. Thumb closes down too fast for me to have a look, but there seems to be two lines that creates the failure.

Overcoat: Works fine in Hail and Sandstorm. However, it doesn't stop Stun Spore/Effect Spore etc. from working (1st routine) and the game resets when an Overcoated 'mon uses an attack such as pound on an effect spore 'mon (2nd routine).

No Guard: The ability itself seems to work fine now. Still a problem with toxic though. Toxic now misses as if it were a non-poison 'mon using it even though the 'mon is a poison-type.
Reply With Quote
  #246   Link to this post, but load the entire thread.  
Old January 27th, 2016 (11:32 PM).
MrDollSteak's Avatar
MrDollSteak MrDollSteak is offline
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 28
Gender: Male
Posts: 859
Quote:
Originally Posted by mamamama View Post
Prankster, Gale Wing etc.:The routine still wont compile for me. Thumb closes down too fast for me to have a look, but there seems to be two lines that creates the failure.

Overcoat: Works fine in Hail and Sandstorm. However, it doesn't stop Stun Spore/Effect Spore etc. from working (1st routine) and the game resets when an Overcoated 'mon uses an attack such as pound on an effect spore 'mon (2nd routine).

No Guard: The ability itself seems to work fine now. Still a problem with toxic though. Toxic now misses as if it were a non-poison 'mon using it even though the 'mon is a poison-type.
Yeah they're all 100% fixed now. The issue with the first one was that in my rom I'm compiling the BLs with 08 at the front, but I'd removed them all except for one in the routine.

The others were all typos.

The only thing I couldn't replicate was the issue you found with the 1st routine. Are you sure you've set up the table correctly from the prerequisites? and pointed to the right tables?
__________________
Reply With Quote
  #247   Link to this post, but load the entire thread.  
Old January 28th, 2016 (4:11 AM).
Homerzilla2k Homerzilla2k is offline
 
Join Date: Oct 2015
Posts: 11
Quote:
Originally Posted by LCCoolJ95 View Post
You're supposed to Paste Write, not Paste Insert.
I tried that and Gen III Suite opened fine, but Protean is not in the abilities drop down menu.
Reply With Quote
  #248   Link to this post, but load the entire thread.  
Old February 22nd, 2016 (3:00 PM).
Reshiram white as snow Reshiram white as snow is offline
 
Join Date: Feb 2016
Location: New York
Gender: Other
Nature: Timid
Posts: 129
Can you make new abilities into a patch for emerald?
__________________

Welcome everybody to play 《Pokemon Eternal Snow》
website:
http://pan.baidu.com/s/1qY7p9bY
password:
4pqq
The website of Pokemon Eternal Snow pokecommunity:
http://www.pokecommunity.com/showthread.php?p=9200526
Reply With Quote
  #249   Link to this post, but load the entire thread.  
Old March 21st, 2016 (2:00 PM).
pokefreak890's Avatar
pokefreak890 pokefreak890 is offline
The One that will make everything great
 
Join Date: Nov 2014
Gender: Male
Posts: 853
Why did u delete the patch? I'm confused
__________________
3DS FREIND CODE : 2724-3540-0898
Reply With Quote
  #250   Link to this post, but load the entire thread.  
Old March 30th, 2016 (7:34 AM).
Xencleamas's Avatar
Xencleamas Xencleamas is offline
Suddenly lurking in the shadows...
 
Join Date: Feb 2014
Gender: Male
Nature: Adamant
Posts: 456
Quote:
Originally Posted by MrDollSteak View Post
Magic Guard, Overcoat
This isn't Ability-related but I wonder if Safety Goggles can be included there. The item's effect is to immune weather-related damage and powder moves.
__________________
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
Ad Content
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 8:52 AM.