• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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 do I make it so that starters have a chance of having Hidden Abilities?

  • 6
    Posts
    4
    Years
    • Seen Feb 17, 2021
    Hi there, I'm trying to make this work, but I am not really sure what to do to make this a possibility.

    I'm using the Starter Selection Script by Shiney570 currently, but if I need to go for a different way to select starters, then I am willing to do that:

    Thank you for the help!
     
    Hey! So, there are multiple ways to go about this.

    1) Just for the starters, you can go to your pokemon.txt PBS file & add the hidden ability name to the normal ability.
    Example in bold below:
    Spoiler:


    You'll have to do the same for its evolutions as well. This results in a 50% chance for the hidden ability, and can be changed with an ability capsule.

    2) You can also implement this: (broken link removed)

    Hope this helps :)
     
    I've already got scripts that do wild pokemon with hidden abilities set up, but it just didn't end up working for the starters, so I'll probably just do the first one and make their hidden abilities regular ones for now.
     
    I think what you want is this:

    pkmn = pbGenPkmn(:BULBASAUR,5)
    pkmn.setAbility(2)
    pbAddPokemon(pkmn)

    "setAbility" function uses an index into the possible abilities, with 0 = normal ability #1, 1 = normal ability #2, 2 = hidden ability #1, etc

    If you want a random chance of it instead of being guaranteed, you could do:

    pkmn = pbGenPkmn(:BULBASAUR,5)
    hiddenChance = 50.0
    if rand() < (hiddenChance/100.0)
    pkmn.setAbility(2)
    end
    pbAddPokemon(pkmn)

    Where "hiddenChance" is the % chance for it to get the hidden ability
     
    Last edited:
    Back
    Top