• 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

5,256
Posts
16
Years
Sphice made a routine/battle script for close combat which took 3 battle script, V-create took 7, it's factorial. Anc power would take 5!+1 battle script, which means 121. I'm sorry but I'm not gonna do that.

It's worth noting the system I used is actually very inefficient and I did it when I wasn't very familiar with battle scripting as a whole, so that isn't necessarily the case.
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
I'm not sure we can do it the same way with ancpower since it's the byte 02024335 that control the changing stats. if I refer to the move resource thread, Sphice made a routine/battle script for close combat which took 3 battle script, V-create took 7, it's factorial. Anc power would take 5!+1 battle script, which means 121. I'm sorry but I'm not gonna do that.

I think I found a solution. In the routine that check damaging move, we can put a check in the user part for shield dust/clear body, a check for 0xF1, and if these two conditions are presents, branch to a battle script that force the attspe to be lowered. It could work, but too lazy to try it for now

Dude there are far too many problems with this. Rather than creating heaps of errors and trying different ratchet ways to fix it, the best thing to do is redo the routine.

Anyway, with that out of the way here is Unburden!

Unburden

Spoiler:
 
Last edited:
457
Posts
10
Years
  • Age 28
  • Seen Apr 9, 2024
Would it be possible to use the same place for Unaware ? Check user : if it has unaware, load boost of the target, store them in FreeRam, deal the damage, restore the boost after the damages are done.

Unaware is already done. It is only for FireRed for a while but it will be easily to be ported to Emerald just by looking and changing the offsets used in the original routines and scripts.

2. Unaware (+ Sacred Sword Effect)
Spoiler:
 

Trainer 781

Guest
0
Posts
Yeah I know but KDS said it would actually takes 6 routines, so perhaps different hook, different operations. I wanted to find a more simple way. And since that ability need many test, I wanted to know if someone already tested it since it will be a tedious task.

Actually, the 6 routine method is more AI friendly and should be done that way. The locations to hook are already in my notes. Just a matter of time to implement it.

You can directly port the accuracy ones to emerald.

I did mold breaker the short way because there are 50+ abilities it negates. And even if you put that amount of Mold Breaker checks for each ability affected by Mold Breaker, the AI would only be able to recognize the damage calc ones (there also a cheap way to accomodate that) plus few others but not things like Clear Body Growl etc.
 

Trainer 781

Guest
0
Posts
Tinted Lens, Solid Rock, Filter (+ Expert Belt)

Spoiler:


I have slightly updated Mold Breaker using MrDS's Emerald Ports for this routine. The old routines also work perfectly fine but the new one's are optimized and more understandable.
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
Tinted Lens, Solid Rock, Filter (+ Expert Belt)

Spoiler:
Spoiler:
 

Trainer 781

Guest
0
Posts
Awesome man! I was actually working on this one. Does yours take multitypes into account? I'd actually had it elsewhere and was struggling with that problem.

Yes, it actually checks the outcome 2023DCC first, then manipulates the damage.
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
I've actually been working on these for awhile (and I'll have to update this post a few times in the future once everything is complete and optimised). They require a few pre-requisites that will be addressed in the relevant spoilers, but here are:

Leaf Guard, Aroma Veil, Flower Veil and Sweet Veil

Spoiler:
 
Last edited:

Trainer 781

Guest
0
Posts
I dunno if this bug exists on you but when anyone gets a super effective damage, the player's exp gain is only at the second one in the party (if you're alone, you don't gain exp).

I don't think this has to do anything with the ability. I have not tested the Emerald ones though.
 

Starmytes

Fabulous Fruit
21
Posts
8
Years
Is there a way to create new ability effects without using a battle script editor?

/can you do the same steps for adding new move effects without replacing old ones?
1. Copy a table of data into free space (ability effects table?)
2. Repoint
3. At the end of the effects table 'after the last effect and before the code that ends the table' add your new pointer(s) where your new effect(s) would be.
4. At those pointers add your hex coding for the new ability effects.
5. Change the ini of the program you'll be using so you can apply your effects etc

If there is a way to do this it would be great, I have a basic understanding of hex coding. Would anyone have a tutorial on hex coding ability effects?
I only want to add the abilities Refrigerate and Strong Jaw. (maybe Snow Warning also)
 
218
Posts
10
Years
  • Seen Nov 12, 2021
Is there a way to create new ability effects without using a battle script editor?

/can you do the same steps for adding new move effects without replacing old ones?
1. Copy a table of data into free space (ability effects table?)
2. Repoint
3. At the end of the effects table 'after the last effect and before the code that ends the table' add your new pointer(s) where your new effect(s) would be.
4. At those pointers add your hex coding for the new ability effects.
5. Change the ini of the program you'll be using so you can apply your effects etc

If there is a way to do this it would be great, I have a basic understanding of hex coding. Would anyone have a tutorial on hex coding ability effects?
I only want to add the abilities Refrigerate and Strong Jaw. (maybe Snow Warning also)

Actually most of the abilities are done with ASM rather than battle script.

There's no "table effect of abilities". Basically, you can see abilities like that :

There's a lonng a complicated routine in the rom (several routines actually), that handle how the battles work.
Calculate damage, buffering stats, switch, display something, gain exp, whiteout... etc

It's code mostly in a language called "ASM" for assembler(bly?).

Imagine the code :
Spoiler:


And that's how it works most of the time. We're actually using that big code, and alter it to add new effects, that's why there's no easier way to do that.

If you still have question you can read some ASM tutorial, this one is very useful.
 

Starmytes

Fabulous Fruit
21
Posts
8
Years
Actually most of the abilities are done with ASM rather than battle script.

There's no "table effect of abilities". Basically, you can see abilities like that :

There's a lonng a complicated routine in the rom (several routines actually), that handle how the battles work.
Calculate damage, buffering stats, switch, display something, gain exp, whiteout... etc

It's code mostly in a language called "ASM" for assembler(bly?).

Imagine the code :
Spoiler:


And that's how it works most of the time. We're actually using that big code, and alter it to add new effects, that's why there's no easier way to do that.

If you still have question you can read some ASM tutorial, this one is very useful.
Ah thank you very much, this all makes more sense now xD
I'll begin reading this tutorial <3
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
Ah thank you very much, this all makes more sense now xD
I'll begin reading this tutorial <3

I will actually be including all the abilities you want in the future, though I can't say when.

As Kleenex said, there is no effects table, just the move names and descriptions which Sky High has written a tutorial about (linked in the first post).

But you will need a Battle Script Editor (get BSP), a Hex Editor, and some sort of Ability Name and Description editor if you aren't comfortable in writing names and descriptions in Hex.

Reserving this post for the absorb Type damage abilities such as Dry Skin, Sap Sipper etc.
 
275
Posts
8
Years
1 - Is it possible to give two abilities to Pokémon, instead of only one in Fire Red?

2 - Also, I wanted to make Ghost Pokémon not affected by any Physical attacks, not just Normal's. Also, even Normal's special attacks can hit them, like Hyper Beam.
I asked this once as a type effectiveness question, but since that was unlikely to work alright, I remembered of Levitate and how it makes Pokémon with it not to be affected by Ground attacks. If it is possible to make it not be affected by Physical attacks, instead, it would be great!
Is it possible to make an ability where Physical attacks do not work on the Pokémon with this ability?
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
1 - Is it possible to give two abilities to Pokémon, instead of only one in Fire Red?

2 - Also, I wanted to make Ghost Pokémon not affected by any Physical attacks, not just Normal's. Also, even Normal's special attacks can hit them, like Hyper Beam.
I asked this once as a type effectiveness question, but since that was unlikely to work alright, I remembered of Levitate and how it makes Pokémon with it not to be affected by Ground attacks. If it is possible to make it not be affected by Physical attacks, instead, it would be great!
Is it possible to make an ability where Physical attacks do not work on the Pokémon with this ability?

To your first question - No.

To your second question, this isn't actually all that relevant to the ability resource thread as this is for making existing abilities not custom abilities. You'd have to branch in the attack canceler routine and do a check for Physical / Contact moves, whichever you want and branch to attack cancel if that's the case. However this would be an EXTREMELY broken ability / type if that is the case.
 
132
Posts
9
Years
  • Age 23
  • Seen yesterday
1 - Is it possible to give two abilities to Pokémon, instead of only one in Fire Red?

2 - Also, I wanted to make Ghost Pokémon not affected by any Physical attacks, not just Normal's. Also, even Normal's special attacks can hit them, like Hyper Beam.
I asked this once as a type effectiveness question, but since that was unlikely to work alright, I remembered of Levitate and how it makes Pokémon with it not to be affected by Ground attacks. If it is possible to make it not be affected by Physical attacks, instead, it would be great!
Is it possible to make an ability where Physical attacks do not work on the Pokémon with this ability?

1. It would probably be possible, but you'd basically need to rewrite the entire way the game reads Pokemon data, and anyway, most Pokemon are fine with just one ability.

2. Again, strictly speaking, it's likely somebody could do it, because there's very little you can't do with enough expertise. However, not only would it be quite complex to achieve (type and physical/special are two very different things), it would also be incredibly overpowered. Most Ghosts have low Defense as their weak point, and a lot of the best moves against them (Crunch, Pursuit, Sucker Punch, etc.) are physical attacks. Giving every Ghost (or any Pokemon at all, really) a flat-out immunity to all physical attacks would throw balance out the window so hard it would land on Jupiter. And that's not even considering how there are Pokemon like Gengar, who are already terrific, and giving them free reign to do whatever they want against any physical attacker would just be ridiculous. I see where you're coming from, I really do, but with all due respect, this is not a good idea.
 
275
Posts
8
Years
To your first question - No.

To your second question, this isn't actually all that relevant to the ability resource thread as this is for making existing abilities not custom abilities. You'd have to branch in the attack canceler routine and do a check for Physical / Contact moves, whichever you want and branch to attack cancel if that's the case. However this would be an EXTREMELY broken ability / type if that is the case.

I didn't know it existed, thought it would be something new. And why EXTREMELY broken?

1. It would probably be possible, but you'd basically need to rewrite the entire way the game reads Pokemon data, and anyway, most Pokemon are fine with just one ability.

2. Again, strictly speaking, it's likely somebody could do it, because there's very little you can't do with enough expertise. However, not only would it be quite complex to achieve (type and physical/special are two very different things), it would also be incredibly overpowered. Most Ghosts have low Defense as their weak point, and a lot of the best moves against them (Crunch, Pursuit, Sucker Punch, etc.) are physical attacks. Giving every Ghost (or any Pokemon at all, really) a flat-out immunity to all physical attacks would throw balance out the window so hard it would land on Jupiter. And that's not even considering how there are Pokemon like Gengar, who are already terrific, and giving them free reign to do whatever they want against any physical attacker would just be ridiculous. I see where you're coming from, I really do, but with all due respect, this is not a good idea.

I believe you got the idea I take some ideas from the anime.
I was actually thinking about Gengar from start. Whenever they appear in the anime, they are able to dodge any physical attacks by just letting them pass through their bodies. And it makes a lot of sense, as they are ghosts.
I believe some limitations could be added, for example, for Dark-type attacks, as they are its weakeness.
But I'm not thinking my ROM for other people to play. I'm planning it, according to what I think makes sense, even though it could very much overpower Ghost-type Pokémon. That's just how they are.
It's like Beedrill, Flygon, Garchomp or Scizor not being flying type. No matter how much overpowered they might get, they do fly.
I know how that can sound stupid, but that's how I think this stuff should be. =P
 

Trainer 781

Guest
0
Posts
What makes Protean hard to replicate? There's this GBC hack with Protean already

It is not hard. Just requires the knowledge of playing a 'Custom Battle Script' from an existing Battle Script Command.
Doesntknowhowtoplay has implemented it, but the source is not available.
 

Germaniac

Victoria Concordia Crescit
539
Posts
14
Years
It is not hard. Just requires the knowledge of playing a 'Custom Battle Script' from an existing Battle Script Command.
Doesntknowhowtoplay has implemented it, but the source is not available.

Eh, why not? Any way to test it? A patch? YAFRH?
 
Back
Top