• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Hidden Ability Capsule (v19.1)

Resource Hidden Ability Capsule (v19.1) 1.0.0

AiurJordan

twitch.tv/aiurjordan
Member
Joined
Aug 10, 2019
Posts
83

4AllNighterGrinder64

4 Sleepless nights to update to Teal Mask Part 1
Member
Joined
Nov 23, 2023
Posts
20
I tried this resource out and I was able to adapt it for 21.1 of Pokémon Essentials. I have just recently been able to pull it off, so I have not done extensive testing. This is what needs to be done if you want the Hidden Ability Capsule/Super Capsule to work for 21.1 (It is important to note that I have not tested this with the Bag Screen with interactable Party resource by DiegoWT. I'm using the stock Bag and Pokemon Party UI that comes with Essentials, alongside the Modular UI Scenes Plugin by Lucidious89. You are on your own if you want this to work with the Bag Screen with interactable Party Plugin)

In the Script Editor (The second icon to the left of the green play button), go to Item_Effects. You can press CTRL + SHIFT + F to bring up a Find in All Sections search feature. Type ABILITYPATCH into the search bar and press Start Search. Jump to Item_Effects, Line 1103.

Below the block of code for the Ability Patch, copy and paste the following line of code:

V21.1 Super Capsule Item Handler Code Block:
Expand Collapse Copy
ItemHandlers::UseOnPokemon.add(:SUPERCAPSULE, proc { |item, qty, pkmn, scene|
    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.pbRefresh
    scene.pbDisplay(_INTL("{1}'s ability changed to {2}!",pkmn.name,pkmn.ability.name))
  next true
})

The next step is to add in the resources the Super Capsule Needs. The Super Capsule needs an item sprite, an item index in the PBS files, and a Pokémon to have 2 Abilities and 2 Hidden Abilities. The official Pokémon games allow a Pokémon to have 2 Abilities and 1 Hidden Ability. Pokémon Essentials’ Ability Index system means a Pokémon can have multiple hidden abilities. But I recommend sticking to just 1 or 2 Hidden Abilities at most.

How to add the item sprite:

On AiurJordan’s Hidden Ability Capsule (v19.1) resource page, hover over the Super Capsule item sprite. Right-click and press Open Image in New Tab or Save Image As. (I prefer Open Image in New Tab, because it usually means you get just the image itself, and sometimes at its best quality) Save the SUPERCAPSULE.png into the Graphics/Items folder in the directory of your current or testing Pokemon Essentials project. I also shared the same png in this reply as well, for those who want to do fewer clicks and tab swapping.

In the PBS folder of your current or testing Pokemon Essentials project, open the items.txt file. Copy and paste the following block of code into a section of the item list that makes sense to you. I recommend listing the Super Capsule below the Ability Patch item like this:

items.txt Super Capsule Code Block:
Expand Collapse Copy
#-------------------------------
[SUPERCAPSULE]
Name = Super Capsule
NamePlural = Super Capsules
Pocket = 2
Price = 10000
BPPrice = 200
FieldUse = OnPokemon
Description = A capsule that allows a Pokémon to switch between all abilities they possess.
#-------------------------------

The last step is to give a Pokémon 2 Abilities and 2 Hidden Abilities. Or as many Hidden Abilities as you want. Go to the PBS folder of your current or testing Pokémon Essentials project and open the pokemon.txt file. For this example, I just gave Bulbasaur 2 Hidden Abilities.

2 Hidden Abilities for Hidden Ability Capsule Code Block:
Expand Collapse Copy
# These lines need to be below the Happiness line and the Moves line.
# I recommend that you don’t delete the original lines that are in pokemon.txt)

#Abilities = OVERGROW
#HiddenAbilities = CHLOROPHYLL
Abilities = CHLOROPHYLL,THICKFAT
HiddenAbilities = LEAFGUARD,OVERGROW

Once you have done these steps, follow the best practices when testing out new additions you are making yourself to Pokémon Essentials. Clear the PluginScripts.rxdata file when adding in new plugins or making or adding code additions to the core Pokémon Essentials script files, use the Windows Key + R and type %appdata% to go to the Roaming folder on a Windows PC and find the save folder location of the name of your Pokemon Essentials project, and delete Game.rxdata file, so you have as fresh a state as possible for testing out plugins and changes/additions to the Pokemon Essentials scripts.

Once you have followed the steps I did, you should have a Super Capsule item that makes it possible for a Pokémon to switch between 2 Abilities and 2 Hidden Abilities. And work as intended without causing problems. It's important to note that as of writing this, I just managed to get it working and I didn't see any issues with the Super Capsule item from my testing. So I have not extensively tested this, to make sure any ability-changing interactions don't cause problems with the Super Capsule item. Other ability-changing options exist, such as Jason Godwyn's Pokeditor that have a more concise player UX experience. But sadly, I wasn't smart enough to adapt the Pokeditor to allow a Pokemon to switch between 2 hidden abilities. So that's why I did the work to adapt this resource for 21.1. I hope this can help out those who want a Pokemon game where the Pokemon have 2 Abilities and 2 Hidden Abilities.
 

Attachments

  • SUPERCAPSULE.png
    SUPERCAPSULE.png
    499 bytes · Views: 13
  • Item_Effects Changes.PNG
    Item_Effects Changes.PNG
    74.1 KB · Views: 16
  • items.text changes.PNG
    items.text changes.PNG
    31 KB · Views: 15
  • pokemon.text changes.PNG
    pokemon.text changes.PNG
    12.9 KB · Views: 18
Back
Top