- Pokémon Essentials Version
- v20.1 ➖
Have you ever wanted to make wild Pokémon have their Hidden Ability, but not by event, or adding it in the PBS alongside their normal abilities? To have a chance of finding the ability naturally? Well, now you can!
To modify the percentage, increase the number in WildHiddenAbilityPercentage or GiftHiddenAbilityPercentage, located in the Main.rb file of the plugin's folder.
To modify the percentage, increase the number in WildHiddenAbilityPercentage or GiftHiddenAbilityPercentage, located in the Main.rb file of the plugin's folder.
All older versions have to be added directly to the scripts, where indicated.
Post the following code at the bottom of PokemonEncounterModifiers(in v15 and earlier) or PField_EncounterModifiers(v16.2 to v18):
Ruby:
# Make all wild Pokémon have a chance to have their hidden ability.
Events.onWildPokemonCreate+=proc {|sender,e|
pokemon=e[0]
if rand(20) < 1
pokemon.setAbility(2)
end
}
Post the following code at the bottom of Overworld_EncounterModifiers:
Ruby:
# Make all wild Pokémon have a chance to have their hidden ability.
Events.onWildPokemonCreate+=proc {|sender,e|
pkmn=e[0]
if rand(20) < 1
pkmn.ability_index = 2
end
}
In "PokemonUtilities", search for "pbSeenForm(pokemon) if seeform" (without quotes), then add the following lines immediately after the first result's line:
If you have Pokemon with more than 1 Hidden Ability, then you'll need to use this code instead:
Note that if any Pokemon has only 1, 2, or 3 Hidden Abilities, and it hits a number higher than that number, it will default to the first regular Ability, so be sure to fill all empty Hidden Ability slots with duplicates if possible to remedy this.
And then you're done!
Ruby:
if rand(20) < 1
pokemon.setAbility(2)
end
If you have Pokemon with more than 1 Hidden Ability, then you'll need to use this code instead:
Ruby:
if rand(20) < 1
pokemon.setAbility(rand(4)+2)
end
Note that if any Pokemon has only 1, 2, or 3 Hidden Abilities, and it hits a number higher than that number, it will default to the first regular Ability, so be sure to fill all empty Hidden Ability slots with duplicates if possible to remedy this.
And then you're done!
In "PSystem_PokemonUtilities", search for "pbSeenForm(pokemon) if seeform" (without quotes), then add the following lines immediately after the first result's line:
If you have Pokemon with more than 1 Hidden Ability, then you'll need to use this code instead:
Note that if any Pokemon has only 1, 2, or 3 Hidden Abilities, and it hits a number higher than that number, it will default to the first regular Ability, so be sure to fill all empty Hidden Ability slots with duplicates if possible to remedy this.
And then you're done!
Ruby:
if rand(20) < 1
pokemon.setAbility(2)
end
If you have Pokemon with more than 1 Hidden Ability, then you'll need to use this code instead:
Ruby:
if rand(20) < 1
pokemon.setAbility(rand(4)+2)
end
Note that if any Pokemon has only 1, 2, or 3 Hidden Abilities, and it hits a number higher than that number, it will default to the first regular Ability, so be sure to fill all empty Hidden Ability slots with duplicates if possible to remedy this.
And then you're done!
In Utilities_Pokemon, search for "register(pkmn) if see_form" (without quotes), then add the following lines immediately after the first result's line:
If you have Pokemon with more than 1 Hidden Ability, then you'll need to use this code instead:
Note that if any Pokemon has only 1, 2, or 3 Hidden Abilities, and it hits a number higher than that number, it will default to the first regular Ability, so be sure to fill all empty Hidden Ability slots with duplicates if possible to remedy this.
And then you're done!
Ruby:
if rand(20) < 1
pkmn.ability_index = 2
end
If you have Pokemon with more than 1 Hidden Ability, then you'll need to use this code instead:
Ruby:
if rand(20) < 1
pkmn.ability_index = rand(4)+2
end
Note that if any Pokemon has only 1, 2, or 3 Hidden Abilities, and it hits a number higher than that number, it will default to the first regular Ability, so be sure to fill all empty Hidden Ability slots with duplicates if possible to remedy this.
And then you're done!
- Credits
- Mashirosakura (me) for putting out the script?
Scyl, NettoHikari and Marin for help initially setting this up.
Maq47 for Gift Pokémon in older versions, and the base for the v20.1 version
StarWolff for his slight modifications for v20.1
Kotaro for his help making this a plugin with me.