• 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.

Ways to gain Hidden Ablities

87
Posts
8
Years
  • Hi,
    I'm wondering if you could make it so that you can have some sort of way that you could obtain a Pokémon with it's hidden ability either through these methods:

    • Having a small percentage of a wild pokemon having it's hidden ability when encountered in the wild.
    • Having a special tutor to change a Pokemon's ability to it's hidden ability.
    • Having a item similar to the ability capsule to give a Pokémon it's hidden ability.
    Thanks in advance!:)
     
    824
    Posts
    8
    Years
  • pokemon.setAbility(2) will change the Pokemon's ability to its Hidden Ability.

    You can use this in many ways. Using your examples:
    1.) Having a small percentage of wild Pokemon have their Hidden Ability when encountered in the wild
    In PField_EncounterModifiers, near the top, you should find the following code. Insert the red stuff.
    Code:
    # Make all wild Pokémon shiny while a certain Switch is ON (see Settings).
    Events.onWildPokemonCreate+=proc {|sender,e|
       pokemon=e[0]
       if $game_switches[SHINY_WILD_POKEMON_SWITCH]
         pokemon.makeShiny
       end[COLOR="Red"]
       abil=pokemon.getAbilityList
       bob=10 # set this number to the chance you want wild Pokemon to be shiny
       if abil.length>2 && rand(100)<bob
         pokemon.setAbility(2)
       end[/COLOR]
    }

    2.) Having a special tutor to change a Pokemon's ability to it's hidden ability.
    Create the event so that it allows you to choose a party member (examples of this in the example maps can be found in the Name Rater and the Day Care lady), then include the following script:
    Code:
    $Trainer.party[pbGet(1)].setAbility(2)

    3.) Having a item similar to the ability capsule to give a Pokémon it's hidden ability.
    Add the following code somewhere in PItem_ItemEffects:
    Code:
    ItemHandlers::UseOnPokemon.add(:DREAMCAPSULE,proc{|item,pokemon,scene|
      abil=pokemon.getAbilityList
      dream_abil=[]
      for i in 0...abil[0].length
        dream_abil.push(abil[0][i]) if abil[1][i]>1
      end
      if dream_abil.length >0
        if Kernel.pbConfirmMessage(_INTL("Do you want to change {1}'s ability to {2}?",
          pokemon.name,PBAbilities.getName(dream_abil[0])))
          pokemon.setAbility(2)
          scene.pbDisplay(_INTL("{1}'s ability was changed to {2}!",pokemon.name,PBAbilities.getName(pokemon.ability)))
          pokemon.calcStats
          next true
        else
          next false
        end
      else
        scene.pbDisplay(_INTL("It won't have any effect."))
        next false
      end
    })
    In order for this to work, you will need to go into your game's PBS files and add this line to items.txt:
    Code:
    597,DREAMCAPSULE,Dream Capsule,1,2000,"A capsule that allows a Pokémon with a Dream World Ability to switch to it when used.",1,0,0
     
    87
    Posts
    8
    Years
  • pokemon.setAbility(2) will change the Pokemon's ability to its Hidden Ability.

    You can use this in many ways. Using your examples:
    1.) Having a small percentage of wild Pokemon have their Hidden Ability when encountered in the wild
    In PField_EncounterModifiers, near the top, you should find the following code. Insert the red stuff.
    Code:
    # Make all wild Pokémon shiny while a certain Switch is ON (see Settings).
    Events.onWildPokemonCreate+=proc {|sender,e|
       pokemon=e[0]
       if $game_switches[SHINY_WILD_POKEMON_SWITCH]
         pokemon.makeShiny
       end[COLOR=Red]
       abil=pokemon.getAbilityList
       bob=10 # set this number to the chance you want wild Pokemon to be shiny
       if abil.length>2 && rand(100)<bob
         pokemon.setAbility(2)
       end[/COLOR]
    }
    2.) Having a special tutor to change a Pokemon's ability to it's hidden ability.
    Create the event so that it allows you to choose a party member (examples of this in the example maps can be found in the Name Rater and the Day Care lady), then include the following script:
    Code:
    $Trainer.party[pbGet(1)].setAbility(2)
    3.) Having a item similar to the ability capsule to give a Pokémon it's hidden ability.
    Add the following code somewhere in PItem_ItemEffects:
    Code:
    ItemHandlers::UseOnPokemon.add(:DREAMCAPSULE,proc{|item,pokemon,scene|
      abil=pokemon.getAbilityList
      dream_abil=[]
      for i in 0...abil[0].length
        dream_abil.push(abil[0][i]) if abil[1][i]>1
      end
      if dream_abil.length >0
        if Kernel.pbConfirmMessage(_INTL("Do you want to change {1}'s ability to {2}?",
          pokemon.name,PBAbilities.getName(dream_abil[0])))
          pokemon.setAbility(2)
          scene.pbDisplay(_INTL("{1}'s ability was changed to {2}!",pokemon.name,PBAbilities.getName(pokemon.ability)))
          pokemon.calcStats
          next true
        else
          next false
        end
      else
        scene.pbDisplay(_INTL("It won't have any effect."))
        next false
      end
    })
    In order for this to work, you will need to go into your game's PBS files and add this line to items.txt:
    Code:
    597,DREAMCAPSULE,Dream Capsule,1,2000,"A capsule that allows a Pokémon with a Dream World Ability to switch to it when used.",1,0,0
    So you would set the bob to be equal to the percentage that you would be able to find a pokemon with its hidden ablity in?
     
    824
    Posts
    8
    Years
  • So you would set the bob to be equal to the percentage that you would be able to find a pokemon with its hidden ablity in?

    If you're going for the first method, yes. My game has it at a 10% probability unless you're playing Randomizer mode, in which case it's 33% (which is the main reason bob is a separate variable rather than just rand(100)<10, I have a few things alter bob before that check)
     
    25
    Posts
    12
    Years
    • Seen Sep 9, 2023
    Sorry to necro old threads,but I really need a solution to this.

    The Dream World capsule code works fine,except for when the Pokemon has only 1 ability.

    When I try to use it on a Pokemon with only 1 ability(ex. Pheremosa), the game crashes with the error message NoMethodError occured: undefined method '[]' for nil:NilClass

    Can anyone fix this,please?
     
    277
    Posts
    15
    Years
  • Sorry to necro old threads,but I really need a solution to this.

    The Dream World capsule code works fine,except for when the Pokemon has only 1 ability.

    When I try to use it on a Pokemon with only 1 ability(ex. Pheremosa), the game crashes with the error message NoMethodError occured: undefined method '[]' for nil:NilClass

    Can anyone fix this,please?

    Couldn't you just give that same ability to those pokemon over again?
    EX: Pheremosa
    instead of being
    Ability 0=Beast Boost
    Ability 1=
    Ability 2=
    be
    Ability 0=Beast Boost
    Ability 1=Beast Boost
    Ability 2=Beast Boost
     
    12
    Posts
    1
    Years
    • Seen Apr 21, 2024
    I would like to know how to make the first method work in pokemon essentials v20?
     
    Back
    Top