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

[Scripting Question] Problemen updating a Pokemon Ability

12
Posts
8
Years
    • Seen Oct 13, 2021
    Hi there,

    I was trying to change the logic of the Ability Capsule item, but I ran into an issue I couldn't seem to fix.
    To exclude things I restored to logic back to the original and the problem still occurred.

    The problem: when updating a Pokemon Ability using:
    Code:
    pkmn.ability_index = newabil
    The Ability doesn't actually seem to update.

    Steps to reproduce:
    Give yourself an Arbok with Intimidate.
    Change the Ability using the Ability Capsule item.
    Go to Arbok's Summary and you will still see Intimate.
    Also, when you go into battle Intimidate will still happen.

    Anyone know the proper way to update a Pokemon's Ability?
    Thanks in advance.
     
    12
    Posts
    8
    Years
    • Seen Oct 13, 2021
    Now that I think about it, I'm not sure if the Ability Capsule item is Pokemon Essentials 19.1 or Golisopod User's Generation 8 Project.
    Probaly the latter 😅
    If so, I'd just like to know the propper way to update a Pokemon's Ability.
     
    12
    Posts
    8
    Years
    • Seen Oct 13, 2021
    The wiki also show
    Code:
    pkmn.ability = :INTIMIDATE
    as a possibilty. Gonna try that now.

    Also just realised I'm just talking to myself here 😬

    UPDATE: problem still occurs.
     
    Last edited:
    12
    Posts
    8
    Years
    • Seen Oct 13, 2021
    I fixed the problem by also updating the Pokemon's Ability with the new Ability's internal name (e.g. INTIMIDATE):
    Code:
    pkmn.ability = newAbility[0]
    Not sure if I understood the Wiki incorrectly, or if this is a problem with implementing Golisopod User's Generation 8 Project, or if this is an oversight.
    Either way I'm happy I fixed my problem and maybe someone else will find this solution helpful! 😄
     
    12
    Posts
    8
    Years
    • Seen Oct 13, 2021
    No worries Golisopod User! Good debugging/problem solving exercise for me 😉
    I made a custom function to update a Pokemon's Ability. If anyone's interested, let me know!
     
    Back
    Top