I've been trying to find a way to give Pokémon more ability options but I can't figure it out. Right now I can give them 2 abilities and 4 hidden abilities, can someone please help me out !!?
Wooow you're in for a long run.
It's easy to change the compiler so that it registers more abilities. Go to the file Misc_Data, find the module:
Code:
module PokemonSpeciesData
and find the function:
Code:
def self.optionalValues(compilingForms = false)
Inside that function, find the line:
Code:
"Abilities" => [SpeciesAbilities, "eE", :PBAbilities, :PBAbilities],
and replace it with this:
Code:
"Abilities" => [SpeciesAbilities, "eEEE", :PBAbilities, :PBAbilities, :PBAbilities, :PBAbilities],
The encoding is as follows. The first "e" says that it requires a ability ("e" means it requires a constant, of the type PBAbilities). The triple "EEE" say that you can add up to three more abilities ("E" means it takes an optional constant, of the type given in the rest of the list, here PBAbilities).
Now, I wouldn't recommend you change the number of abilities. Because the WHOLE Essentials framework is based on having at most TWO natural abilities (I don't know why they allow four hidden abilities though). It requires more study, but at least look for all instances of SpeciesAbilities (this is the way to access the abilities of the Pokémon as stored in the PBS file), and you see that loops or indices refer to the hard-coded number 2. Or look at the function abilityIndex, which converts the personal ID f the Pokémon into an ability number, you'll have to change that too.
What I mean is, you're going to have a looot of things to change, and you will likely break stuff. Unless you're very confident and know exactly where to look, I suggest you do an alternative.
My alternative is the following (it's the one that I used in my game, it's probably not perfect but still something to consider in my opinion).
Depending on the Pokémon, I would do one of these:
- If the Pokémon has an ability that I find useless (e.g. Run Away for Raticate), I would plainly replace it with my new ability.
- If the Pokémon has three good abilities, or an ability that seems "tied" to them (e.g. Levitate for Hydreigon), I would make a new form for that Pokémon. Maybe just a recolor (cause I'm no artist), so that the player knows that the current Hydreigon they're seeing is not the same Hydreigon they are used to, and maybe this difference lies in their ability.