• 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!
Resource icon

v20.1 Randomize Abilities (v20.1) 1.0.0

This resource pertains to version 20.1 of Pokémon Essentials.
Pokémon Essentials Version
v20.1 ➖
Required to have the latest Hotfixes for v20.1
I don't know if this works for v21


Originally meant to be released with Pokémon Dungeon Exploration's Update, I decided to release this earlier.
Do you enjoy randomizing Abilities? I bet you do, because you clicked this!
This randomizer comes with 3 different ways to randomize Abilities, and you can exclude Abilities to your liking!
1. All Random
2. Throughout Evolution
3. Ability Swap (This one is a bit buggy)
(All explained in more detail in the resource)


How to Activate (Recommended to have these as optional)

The Switches are currently assigned to 59, 60, and 61 in the order listed above.
1. To turn this on activate Switch 59 (All Random)
2. To activate Throughout Evolution or Ability Swap Switch 59 must be on and either 60 or 61 must also be turned on
3. That's it, enjoy randomized Abilities!
------------------------------------------------------------------------------
Recommended to replace Ability Capsule and Ability Patch with these to tell the player what the changed Ability will be

Ability Capsule + Patch Changes:
ItemHandlers::UseOnPokemon.add(:ABILITYCAPSULE, proc { |item, qty, pkmn, scene|
abils = pkmn.getAbilityList
    abil1 = nil
    abil2 = nil
    abils.each do |i|
      abil1 = i[0] if i[1] == 0
      abil2 = i[0] if i[1] == 1
    end  
    newabil = (pkmn.ability_index + 1) % 2
    newabilname = GameData::Ability.get((newabil == 0) ? abil1 : abil2).name
if scene.pbConfirm(_INTL("Do you want to change {1}'s Ability to {2}?", pkmn.name, newabilname))
    if abil1.nil? || abil2.nil? || pkmn.hasHiddenAbility? || pkmn.isSpecies?(:ZYGARDE)
      scene.pbDisplay(_INTL("It won't have any effect."))
      next false
    end
    pkmn.ability_index = newabil
    pkmn.ability = nil
    scene.pbRefresh
    scene.pbDisplay(_INTL("{1}'s Ability changed! Its Ability is now {2}!", pkmn.name, newabilname))
    next true
  end
  next false
})

ItemHandlers::UseOnPokemon.add(:ABILITYPATCH, proc { |item, qty, pkmn, scene|
      abils = pkmn.getAbilityList 
      new_ability_id = nil
      abils.each { |a| new_ability_id = a[0] if a[1] == 2 }
    new_ability_name = GameData::Ability.get(new_ability_id).name
      if scene.pbConfirm(_INTL("Do you want to change {1}'s Ability to {2}?", pkmn.name, new_ability_name))
    if !new_ability_id || pkmn.hasHiddenAbility? || pkmn.isSpecies?(:ZYGARDE)
      scene.pbDisplay(_INTL("It won't have any effect."))
      next false
    end
    pkmn.ability_index = 2
    pkmn.ability = nil
    scene.pbRefresh
    scene.pbDisplay(_INTL("{1}'s Ability changed! Its Ability is now {2}!",
       pkmn.name, new_ability_name))
    next true
  end
  next false
})

If you have the Gen 9 Project go to Updated Moves and Abilities and replace the Ability Patch code with this
Gen 9 Ability Patch:
ItemHandlers::UseOnPokemon.add(:ABILITYPATCH, proc { |item, qty, pkmn, scene|
current_abi = pkmn.ability_index
    abils = pkmn.getAbilityList
    new_ability_id = nil
    abils.each { |a| new_ability_id = a[0] if (current_abi < 2 && a[1] == 2) || (current_abi == 2 && a[1] == 0) }
    new_ability_name = GameData::Ability.get(new_ability_id).name
if scene.pbConfirm(_INTL("Do you want to change {1}'s Ability to {2}?", pkmn.name, new_ability_name))
    if !new_ability_id || pkmn.isSpecies?(:ZYGARDE)
      scene.pbDisplay(_INTL("It won't have any effect."))
      next false
    end
    pkmn.ability_index = current_abi < 2 ? 2 : 0
    pkmn.ability = nil
    scene.pbRefresh
    scene.pbDisplay(_INTL("{1}'s Ability changed! Its Ability is now {2}!",
       pkmn.name, new_ability_name))
    next true
  end
  next false
})

Note: I don't know if this works for v21
Credits
Golisopod User, CrimsonTy, and Luka SJ
Author
CrimsonTy
Downloads
245
Views
1,021
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from CrimsonTy

Back
Top