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

Need help to set ANY ability to a Pokémon

17
Posts
8
Years
  • Age 26
  • Seen today
Hello, fellow Trainers!

Over the past few days, I have been looking into ways of giving a Pokémon ANY ability. Currently, Essentials only allows you to set a Pokémon's ability as any of its legal abilities - that is, the ones defined in the PBS File for that Pokémon. So basically, I want it to be possible that a Pokémon's ability can be set to ANY ability (aside from the regular ones which it can already have) - be it via a script in an event or a function similar to setAbility().
I personally think that if Essentials allows you to have any move on a Pokémon (regardless of legality) then it should allow this for abilities as well.

So far, I have tried creating a separate function setHackedAbility(). It opens up the list of all abilities and the player picks one (pbChooseAbilityList). I must have done something wrong however, cause this doesn't seem to work, the Pokémon still shows up with one of its regular abilities in its Summary Screen as well as in Battle.
Another way I tried is the simple way of changing abilities - looking at what moves like Worry Seed and Entrainment do & replicate the same (pokemon.ability=getConst(PBAbilities,:ABILITYNAME). I put this in a script session to modify the Pokémon's ability before starting the battle & then fronted that Pokémon with my Trace Ralts so that I can know it's ability immediately. And of course, it wasn't changed. It showed up one of the regular abilities again.

So, could anyone help out here? I think it's just some legality check that is disallowing illegal abilities or I could be wrong.
I can provide the code of what I did if anybody wants.
All help is much appreciated, thanks in advance!
 
Last edited:

Ego13

hollow_ego
311
Posts
6
Years
Hello, fellow Trainers!

Over the past few days, I have been looking into ways of giving a Pokémon ANY ability. Currently, Essentials only allows you to set a Pokémon's ability as any of its legal abilities - that is, the ones defined in the PBS File for that Pokémon. So basically, I want it to be possible that a Pokémon's ability can be set to ANY ability (aside from the regular ones which it can already have) - be it via a script in an event or a function similar to setAbility().
I personally think that if Essentials allows you to have any move on a Pokémon (regardless of legality) then it should allow this for abilities as well.

So far, I have tried creating a separate function setHackedAbility(). It opens up the list of all abilities and the player picks one (pbChooseAbilityList). I must have done something wrong however, cause this doesn't seem to work, the Pokémon still shows up with one of its regular abilities in its Summary Screen as well as in Battle.
Another way I tried is the simple way of changing abilities - looking at what moves like Worry Seed and Entrainment do & replicate the same (pokemon.ability=getConst(PBAbilities,:ABILITYNAME). I put this in a script session to modify the Pokémon's ability before starting the battle & then fronted that Pokémon with my Trace Ralts so that I can know it's ability immediately. And of course, it wasn't changed. It showed up one of the regular abilities again.

So, could anyone help out here? I think it's just some legality check that is disallowing illegal abilities or I could be wrong.
I can provide the code of what I did if anybody wants.
All help is much appreciated, thanks in advance!

It would help to see your setHackedAbility() script and how you use it
 
17
Posts
8
Years
  • Age 26
  • Seen today
It would help to see your setHackedAbility() script and how you use it

Alright, here goes. Sorry for the late reply though, was kinds stuck up.

This is what I've put up in Debug _Pokemon for now (yes, I have set up the command "sethackedability" properly)
Code:
when "sethackedability"
      abil=pbChooseAbilityList(pkmn.ability)
      pkmn.setHackedAbility(abil)
      #pkmn.ability=abil
      pbRefreshSingle(pkmnid)
In the above code, I tried both setHackedAbility as well as pkmn.ability=abil and neither of them worked so I just commented either of them for 2 separate tests and neither of them worked there too.

and setHackedAbility is defined in PokeBattle_Pokemon as follows:
Code:
# Sets this Pokémon's ability to any ability
  def setHackedAbility(value)
    if value.is_a?(String) || value.is_a?(Symbol)
      value=getID(PBAbilities,value)
    end
    @ability=value
  end
 
Last edited:

Ego13

hollow_ego
311
Posts
6
Years
I think this needs a little workaround as the implemented ability set methods seem to use an index number of the ability for that certain species. I'm thinking of first writing a new hidden abillity to a pokemon and then set it as the one to use. But it could get weird with saving the data...
 
Back
Top