• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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.

[Scripting Question] How to make Hidden Abilities a 5% chance

  • 37
    Posts
    8
    Years
    • Seen Jan 21, 2021
    Was trying to implement this from an thread using v17 here: (broken link removed)


    Thinking this may work in PField_EncounterModifiers:


    Code:
     # 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
    }


    Or should I swap "Ability" or "2" with "HiddenAbil"? Also wondering what ways to test that it works are other than catching ~20 Pokemon until finding one with it.
     
    Back
    Top