• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Hidden Ability Capsule (v19.1)

Hidden Ability Capsule (v19.1) 1.0.0

Pokémon Essentials Version
v19.1 ➖
Rewrite/update of Hidden Ability Capsule for v19.1

This allows you to swap a Pokémon's ability to any ability in it's pokemon.txt entry, including hidden abilities.

Basically I took Kirik's resource and slapped Maruno's debug code for changing a Pokémon's ability into it and made it work from the item menu. Crediting me is optional, but please credit the originals.

Go to your 002_Item_Effects and add the following code at the bottom.
ItemHandler:
Expand Collapse Copy
ItemHandlers::UseOnPokemon.add(:SUPERCAPSULE,proc{|item,pkmn,scene,pkmnid|
        abils = pkmn.getAbilityList
        ability_commands = []
        abil_cmd = 0
        cmd = 0
        for i in abils
          ability_commands.push(((i[1] < 2) ? "" : "(H) ") + GameData::Ability.get(i[0]).name)
          abil_cmd = ability_commands.length - 1 if pkmn.ability_id == i[0]
          break if cmd < 0
        end
        abil_cmd = scene.pbShowCommands(_INTL("Choose an ability."), ability_commands, abil_cmd)
        next if abil_cmd < 0
        pkmn.ability_index = abils[abil_cmd][1]
        pkmn.ability = nil
        scene.pbRefreshSingle(pkmnid)
        scene.pbDisplay(_INTL("{1}'s ability changed to {2}!",pkmn.name,pkmn.ability.name))
      next true
})

in items.txt add the following
items.txt:
Expand Collapse Copy
XXX,SUPERCAPSULE,Super Capsule,Super Capsule,2,10000,"A capsule that allows a Pokémon with switch between all abilities they possess.",1,0,0,

I have included a hue-shifted icon for the SUPERCAPSULE but feel free to use your own.
SUPERCAPSULE.png


Known Issues: none yet.
Credits
Kirik - For the edits into making this code.
Marin - For getting parts of the code to function correctly.
Maruno - Debug code for ability index

Optional:
AiurJordan - Adapt to v19.1
ThatWelshOne_ - Helpful in debugging this script.
  • Wow
Reactions: Leondrea
Author
AiurJordan
Views
2,458
First release
Last update

Ratings

5.00 star(s) 2 ratings

More resources from AiurJordan

Latest reviews

I was able to adapt this resource for V21.1, and it was exactly what I needed for my project. I want Pokemon for my project's needs to have 2 Abilities and 2 Hidden Abilities. It can cycle through a Pokemon's ability index and not cause problems, compared to other solutions, where it's more tricky to adapt them to allow Pokemon to have 2 Hidden Abilities.

I recommend this resource if you need a Pokemon game that has a no-nonsense and flexible way of cycling through a Pokemon's abilities, that properly shows the player what abilities the Pokemon can learn.
I just installed this script, and it works perfectly as it's supposed to.
Thank you for this useful script!
Back
Top