• 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] Is it possible to give a pokemon a second ability?

  • 7
    Posts
    7
    Years
    • Seen Jul 1, 2023
    The idea is basically that there are some "poke-gurus", all over the region, and they are capable of teaching some abilities pokemon, depending on their types.

    They give the player some sort of quest, when the player gets all of the requirements the poke-guru gives a pokemon another ability, but can do so only once...

    For example: the players find a poke-guru and it says that can "teach how to fly" to any pokemon of the water type; and after gathering some items the player can give the levitation ability to a water type pokemon...

    Another thing I'd like to ask is if it's possible to do the same with the natures, because in the game I'd like to put in some places some "poke-tamers" that kinda train the pokemon for some time and return the pokemon with another nature...

    I hope you could help me and my friends, we are relatively new to essentials and really don't know very much about it...

    Sorry for my english, not my first language...
     
    Last edited by a moderator:
  • 226
    Posts
    8
    Years
    • Seen Jul 19, 2023
    Well the answer to your question is "yes".
    You can do all that by using events:

    they are capable of teaching some abilities pokemon, depending on their types.
    That could be done using conditional branches.

    when the player gets all of the requirements the poke-guru gives a pokemon another ability, but can do so only once...
    That could be done using conditional branches & switches.

    Another thing I'd like to ask is if it's possible to do the same with the natures
    Yes, you can edit the nature of a Pokemon with a simple script, check the wiki for that ("Editing a Pokemon").
     
  • 220
    Posts
    14
    Years
    • Seen Nov 29, 2021
    A fuller answer would be "Yes, but not without much effort."
    You'll have to edit every single ability check to account for two active abilities. Not necessarily hard (especially if, unlike me, you know what you're doing), but tedious.
     
  • 1,224
    Posts
    10
    Years
    A fuller answer would be "Yes, but not without much effort."
    You'll have to edit every single ability check to account for two active abilities. Not necessarily hard (especially if, unlike me, you know what you're doing), but tedious.

    Actually, most ability checks run through pbHasWorkingAbility? , so you could just modify that method and cover most.
     
  • 220
    Posts
    14
    Years
    • Seen Nov 29, 2021
    Actually, most ability checks run through pbHasWorkingAbility? , so you could just modify that method and cover most.

    Bit of a bump, but where is pbHasWorkingAbility located? I've been searching for it, but the closest I found was pbHasAbility.
     

    sonicfan7895

    Just a dude, I guess
  • 122
    Posts
    13
    Years
    Kind of a bump. Very interested in this...

    So if one wanted to add the functionality of having two abilities active at once, how would the check of hasWorkingAbility? need to be edited?

    This seems to have piqued my interest and have intentions of adding it to my team's game.

    But there again lies some potential issues. How would two abilities with added effects and messages work, like Primordial Sea or Unnerve? Would one activate after the other? There are some questions and nuances that need to be answered and explained, respectively.
     
    Back
    Top