- 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.
in items.txt add the following
I have included a hue-shifted icon for the SUPERCAPSULE but feel free to use your own.
Known Issues: none yet.
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:
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:
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.
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.