• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Resource icon

v20.1 Hidden Abilities by Percentage 2.1

This resource pertains to version 20.1 of Pokémon Essentials.
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.

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:

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:

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:

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.
Author
Mashirosakura
Downloads
800
Views
6,497
First release
Last update
Rating
5.00 star(s) 5 ratings

More resources from Mashirosakura

Latest updates

  1. Added check for 20.1 in shell

    Stops the annoying little pop up in the shell saying it may not work for v20.1
  2. Updated for v20.1, as a Plugin

    After much thinking, I've decided to update this as a plugin. It now includes gift Pokémon!
  3. Updated for v19.1

    Added a v19.1 (and beyond) version.

Latest reviews

Took 5 minutes to plug and play. This is perfect to give players ability to get rare Pokémon early on with excellent abilities. I wish that there could be some way to edit percentages for each Pokémon, but it's still excellent regardless. Thanks!
Works well on PE v15. Requires the same step on the 'PokemonEncounterModifiers' script instead of the 'PField_EncounterModifiers' script, however.
Works well, and works on 16.2. Thanks for the resource Mashi :)
Back
Top