Creating a custom ability using the script section
The first step in creating an ability is of course adding your new ability to the Abilities.txt file in your PBS folder.
To add in your ability you open the abilities.txt file and scroll all the way to the bottom.
After that you add in your ability using the essentials format.
You start with the number, then internal name, display name and then the description.
Now depending on what type of ability you want to add you want to go to a different section of the scripts.
I'll be showing a few examples, if the kind of ability is not explained in this tutorial, feel free to ask in the discussion or feel free to dm me.
For most abilities
What you want to do is go to the script section and do CTRL+Shift+F and look up the internal name of a similar ability.
So if you want an ability like Blaze/Swarm but for Ice types you would type in BLAZE and click on the PokeBattler_Battle script that pops up.
If you got the correct corresponding script you would see something like in the image below
After that you would simply add in your own ability in between.
Don't forget to add in the || after each line. It means 'or' and is used for summing up these abilities.
So after adding in my own ability like this one:
It should look something like this:
if booting up the game gives you a syntax error, make sure you got the correct amount of brackets included and didn't forget the ||. Some abilities also have their own 'if/elsif statement'. Make sure you don't forget to also copy paste their 'end' statements at the end of them.
And if you get an 'Undefined ability' error, make sure you typed in the ability name correctly in both the script and the abilities.txt file.
For a multitype-like ability
Multitype is the signature ability of arceus, but what if we wanted to add in an ability like it? (just like RKS-System or Splice from Pokémon Splice)
Like with the general abilities you will have to look up Multitype in the script section, but you will quickly notice that multitype is instanced quite a few times in there.
So I will cover all of the instances in order.
The first step in creating an ability is of course adding your new ability to the Abilities.txt file in your PBS folder.
To add in your ability you open the abilities.txt file and scroll all the way to the bottom.
After that you add in your ability using the essentials format.
You start with the number, then internal name, display name and then the description.
NNN,INTERNALNAME,DisplayName,"Description"
1,STENCH,Stench,"The stench may cause the target to flinch."
Now depending on what type of ability you want to add you want to go to a different section of the scripts.
I'll be showing a few examples, if the kind of ability is not explained in this tutorial, feel free to ask in the discussion or feel free to dm me.
For most abilities
What you want to do is go to the script section and do CTRL+Shift+F and look up the internal name of a similar ability.
So if you want an ability like Blaze/Swarm but for Ice types you would type in BLAZE and click on the PokeBattler_Battle script that pops up.
If you got the correct corresponding script you would see something like in the image below
After that you would simply add in your own ability in between.
Don't forget to add in the || after each line. It means 'or' and is used for summing up these abilities.
So after adding in my own ability like this one:
(attacker.hasWorkingAbility(:FROST) && isConst?(type,PBTypes,:ICE))
It should look something like this:
if booting up the game gives you a syntax error, make sure you got the correct amount of brackets included and didn't forget the ||. Some abilities also have their own 'if/elsif statement'. Make sure you don't forget to also copy paste their 'end' statements at the end of them.
And if you get an 'Undefined ability' error, make sure you typed in the ability name correctly in both the script and the abilities.txt file.
For a multitype-like ability
Multitype is the signature ability of arceus, but what if we wanted to add in an ability like it? (just like RKS-System or Splice from Pokémon Splice)
Like with the general abilities you will have to look up Multitype in the script section, but you will quickly notice that multitype is instanced quite a few times in there.
So I will cover all of the instances in order.
For the PokeBattle_Battler (895) it changes the form of Arceus to be the corresponding form.
Depending on if you want your own Pokémon to also change form you either have to do nothing or you can copy paste the entire section and change the names to be your ability and your Pokémon.
For the PokeBattle_Battler (1049) it removes the ability of Pokémon with trace to copy the ability, you just have to add in another line to correspond for your own custom ability.
For the PokeBattle_Battler (1339) it removes the ability of Pokémon with mummy to overwrite the ability, you just have to add in another line to correspond for your own custom ability.
For the PokeBattle_MoveEffects (2472) it makes it so conversion fails when the target has the ability. Just add the following to the end of the statement: || isConst?(attacker.ability,PBAbilities,:YOURABILITY)
For the PokeBattle_MoveEffects (2508) it makes it so conversion-2 fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2554) it makes it so camouflage fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2609) it makes it so soak fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2637) it makes it so reflect type fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2670) it makes it so signal beam fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2704) it makes it so worry seed fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2739) (and 2745) it makes it so role play fails when the target/user has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2787) (and 2796) it makes it so entrainment fails when the target/user has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2829) (and 2830) it makes it so skill swap fails when the target/user has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2862) it makes it so gastro acid fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (8844) it makes it so trick-or-treat fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (8873) it makes it so forest's curse fails when the target has the ability. You can do the same thing here as for Conversion.
Depending on if you want your own Pokémon to also change form you either have to do nothing or you can copy paste the entire section and change the names to be your ability and your Pokémon.
For the PokeBattle_Battler (1049) it removes the ability of Pokémon with trace to copy the ability, you just have to add in another line to correspond for your own custom ability.
For the PokeBattle_Battler (1339) it removes the ability of Pokémon with mummy to overwrite the ability, you just have to add in another line to correspond for your own custom ability.
For the PokeBattle_MoveEffects (2472) it makes it so conversion fails when the target has the ability. Just add the following to the end of the statement: || isConst?(attacker.ability,PBAbilities,:YOURABILITY)
For the PokeBattle_MoveEffects (2508) it makes it so conversion-2 fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2554) it makes it so camouflage fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2609) it makes it so soak fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2637) it makes it so reflect type fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2670) it makes it so signal beam fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2704) it makes it so worry seed fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2739) (and 2745) it makes it so role play fails when the target/user has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2787) (and 2796) it makes it so entrainment fails when the target/user has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2829) (and 2830) it makes it so skill swap fails when the target/user has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (2862) it makes it so gastro acid fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (8844) it makes it so trick-or-treat fails when the target has the ability. You can do the same thing here as for Conversion.
For the PokeBattle_MoveEffects (8873) it makes it so forest's curse fails when the target has the ability. You can do the same thing here as for Conversion.