• 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?".
  • Staff applications for our PokéCommunity Daily and Social Media team are now open! Interested in joining staff? Then click here for more info!
  • 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
    9
    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!:)
     
    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
     
    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?
     
    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)
     
    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?
     
    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
     
    I would like to know how to make the first method work in pokemon essentials v20?
     
    Back
    Top