• 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.
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Innate Abilities (Yet Another "All Abilities Mutation" mod)

Resource Innate Abilities (Yet Another "All Abilities Mutation" mod) 1.5.4

I enjoy this plugin a lot, but I recently noticed that it clashes with the Sub-Abilities plugin, both of which have a different function in my game. One unlocks flavorful abilities by level up, the other unlocks stronger abilities locked behind questlines.

Anyway, this plugin works perfectly if both are installed, but the Sub-Abilities method to draw abilities seems to be overwritten in the process. Do any of you have an idea how to get around this? I looked at both plugins but haven't arrived at an answer yet.
 
I enjoy this plugin a lot, but I recently noticed that it clashes with the Sub-Abilities plugin, both of which have a different function in my game. One unlocks flavorful abilities by level up, the other unlocks stronger abilities locked behind questlines.

Anyway, this plugin works perfectly if both are installed, but the Sub-Abilities method to draw abilities seems to be overwritten in the process. Do any of you have an idea how to get around this? I looked at both plugins but haven't arrived at an answer yet.
because neither were made to be used together, both serve the same function of providing more abilities for Pokémon, but Sub-abilitys is outdated. besides that you don't need 2 plugins to do the same thing, just 1 already does what the other would do but better.

and I don't think it's worth supporting an old plugin that is barely used nowadays, unlike the Summary from B/W that most still use. so your only option for now is to choose one or the other.
 
I enjoy this plugin a lot, but I recently noticed that it clashes with the Sub-Abilities plugin, both of which have a different function in my game. One unlocks flavorful abilities by level up, the other unlocks stronger abilities locked behind questlines.

Anyway, this plugin works perfectly if both are installed, but the Sub-Abilities method to draw abilities seems to be overwritten in the process. Do any of you have an idea how to get around this? I looked at both plugins but haven't arrived at an answer yet.
What Willow said I'm afraid. I did try and give the code a look when it was first released because I also wanted to use it on my project, but yeah, it clashes with a lot of what the Innate abilities needs to load them properly. And it appears somewhat abandoned (Kinda like this one at the moment... sorry about that, it is not I swear.) so I'm afraid I can't give it proper support. You'll have to choose for now.
 
Hi, ive been trying to use this plugin but when i switch to the summary page for the innates it doesnt display properly. https://imgur.com/a/JzQxaf3
This is a frersh project on rpg maker xp on the latest version of essentials and the only plugins installed are hotfixes, modular ui and innates. I havent edited anything except assigning pikachu from the demo party the innates of blaziken in the PBS innate sets
 
Hi, ive been trying to use this plugin but when i switch to the summary page for the innates it doesnt display properly. https://imgur.com/a/JzQxaf3
This is a frersh project on rpg maker xp on the latest version of essentials and the only plugins installed are hotfixes, modular ui and innates. I havent edited anything except assigning pikachu from the demo party the innates of blaziken in the PBS innate sets
You made sure to put the PNG file for the summary page in your graphics/summary folder?
 
Thanks for the reply. I ve been messing with both Modular UI and the Innates plugin to fix it but I havent been able to do it yet. Here is what I ve done up to now. Installed hotfixes -> installed modular UI -> install innates plugin -> move the 2 PNGs from the innate summary page folder into graphics -> assign innate sets to a few different pokemon to test. Right now i dont even get the weird summary page i was getting before and innates are not working since i dont see speedboost activating on pikachu in battle.
 
Thanks for the reply. I ve been messing with both Modular UI and the Innates plugin to fix it but I havent been able to do it yet. Here is what I ve done up to now. Installed hotfixes -> installed modular UI -> install innates plugin -> move the 2 PNGs from the innate summary page folder into graphics -> assign innate sets to a few different pokemon to test. Right now i dont even get the weird summary page i was getting before and innates are not working since i dont see speedboost activating on pikachu in battle.
Hmm, odd. Have you checked with any other ability? Maybe one that triggers on entry to see if the effect is active immediatly. Like the terrain surges for example.

Outside of that without a crash I don't see any issue. The moment your innates load in the summary they are loaded for the pokemon as well. I don't remember if I added it to this release but upon a Pokemon loading it's innates in your console command an array of all the abilities the pokemon has should appear.

Try changing it for another ability like an entry one and to see if the text appears in your console command. If nothing happens I'll give it a closer look. Sorry I can't give specific solutions for now, I'm in the middle of my shift
 
I tried with intimidate, sandstorm and psychic surge, i dont see anything on console and it doesnt activate in battle. Take your time tho, its probably something im doing wrong, i dont have much experience using plugins with essentials, although as stated above i dont see where i messed up at least as far as the installation of the plugins goes.
 
Hi, I found a conflict with the Gen 9 Pack, the error is the following:

[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: ArgumentError
Message: wrong number of arguments (given 1, expected 2)

Backtrace:
[Innate Abilities] AAM Battle.rb:52:in `pbAbilityTriggered?'
[Generation 9 Pack] [002] Battle_Battler.rb:44:in `ability_triggered?'
[Generation 9 Pack] [000] Ability Handlers.rb:529:in `block in <main>'
Event_Handlers:195:in `trigger'
[Innate Abilities] AAM Ability Effects.rb:519:in `block in triggerOnSwitchIn'
[Innate Abilities] AAM Ability Effects.rb:517:in `each'
[Innate Abilities] AAM Ability Effects.rb:517:in `triggerOnSwitchIn'
Battle_ActionSwitching:353:in `block in pbOnBattlerEnteringBattle'
Battle_ActionSwitching:332:in `each'
Battle_ActionSwitching:332:in `pbOnBattlerEnteringBattle'

It happens because both Gen 9 Pack and Innate Abilities define a mehtod pbAbilityTriggered? in the Battle class, (with different arguments, which causes the error). Any suggestions on how to fix this?

Thank you in advance, and also thank you for the awesome Plugin!
 
Hi, I found a conflict with the Gen 9 Pack, the error is the following:

[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: ArgumentError
Message: wrong number of arguments (given 1, expected 2)

Backtrace:
[Innate Abilities] AAM Battle.rb:52:in `pbAbilityTriggered?'
[Generation 9 Pack] [002] Battle_Battler.rb:44:in `ability_triggered?'
[Generation 9 Pack] [000] Ability Handlers.rb:529:in `block in <main>'
Event_Handlers:195:in `trigger'
[Innate Abilities] AAM Ability Effects.rb:519:in `block in triggerOnSwitchIn'
[Innate Abilities] AAM Ability Effects.rb:517:in `each'
[Innate Abilities] AAM Ability Effects.rb:517:in `triggerOnSwitchIn'
Battle_ActionSwitching:353:in `block in pbOnBattlerEnteringBattle'
Battle_ActionSwitching:332:in `each'
Battle_ActionSwitching:332:in `pbOnBattlerEnteringBattle'

It happens because both Gen 9 Pack and Innate Abilities define a mehtod pbAbilityTriggered? in the Battle class, (with different arguments, which causes the error). Any suggestions on how to fix this?

Thank you in advance, and also thank you for the awesome Plugin!
I really need to do an update to this plugin uh?

Go to AAM Battle, and replace both def pbAbilityTriggered? and def pbSetAbilityTrigger

With this


Ruby:
Expand Collapse Copy
  def pbAbilityTriggered?(battler, check_ability = battler.ability)
    return @abils_triggered[battler.index & 1][battler.pokemonIndex].include?(check_ability)
  end

  def pbSetAbilityTrigger(battler, check_ability = battler.ability)
    @abils_triggered[battler.index & 1][battler.pokemonIndex].push(check_ability)
  end

Compile and test again. The error happens by the way the gen 9 abilities are stored once per switch.
 
Thank you very much, did I alredy tell you your work is awesome?
I did a quick fix yesterday with a default parameter too, setting check_ability = nil (for lack of knowledge) and saw that at least it stopped the crash, I'm going to apply your fix and do a bunch of tests :)

Unrelated, but I was trying to fix a minor bug with Worry Seed, since it kept triggering the same mane ability the target had (e.g. if it had Triage, both ability splash showed Triage) and since for my project it was ok to just replace the main ability instead of adding Insomnia to the list of abilities of the target, I changed the method ability=(value) in AAM Battler to just set @abilityMutationList[0]=@ability_id regardless of self.hasAbilityMutation? value (so removing the unshift of the abilities array but keeping the duplicates removal).

It seems to be working correctly, but I'm keeping an eye on this edit I made to be sure I didn't break anything. At least I have everything under Version Control.

Thank you again, enjoy your holidays!
 
I enjoy so much using this plugin in other people games but i'm trying to make my own and my project basically doesn't read the files from "innate summary page"... I put both that and innate abilities files into my plugins an the bps and graphics in the respective folders but then in game when i go to see a pokemon innate abilities the background or the icon in the top (the two image files in the summary folder) don't show, instead they are trasparent, showing the party underneath...

Screenshot
 
Last edited:
I enjoy so much using this plugin in other people games but i'm trying to make my own and my project basically doesn't read the files from "innate summary page"... I put both that and innate abilities files into my plugins an the bps and graphics in the respective folders but then in game when i go to see a pokemon innate abilities the background or the icon in the top (the two image files in the summary folder) don't show, instead they are trasparent, showing the party underneath...

Screenshot
Inside of the Innate Summary Page folder there are 2 files, called bg_innates and page_inantes. Make sure to place those inside of your Graphics/UI/Summary folder (And of course to have the Modular UI Scenes installed)
 
thank you! That solved the problem!
Inside of the Innate Summary Page folder there are 2 files, called bg_innates and page_inantes. Make sure to place those inside of your Graphics/UI/Summary folder (And of course to have the Modular UI Scenes installed)
 
got this when wild pomemon tries to attack me result in no attack
=================

[2026-01-12 00:29:31 +0100]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: RuntimeError
Message: Unknown ID PRACTICAL.

Backtrace:
GameData:103:in `get'
[Innate Abilities] AAM Ability Effects.rb:81:in `block in triggerSpeedCalc'
[Innate Abilities] AAM Ability Effects.rb:80:in `each'
[Innate Abilities] AAM Ability Effects.rb:80:in `triggerSpeedCalc'
Battle_Battler:255:in `pbSpeed'
Battle_ActionAttacksPriority:187:in `block in pbCalculatePriority'
Battle_ActionAttacksPriority:183:in `each'
Battle_ActionAttacksPriority:183:in `pbCalculatePriority'
Battle_EndOfRoundPhase:602:in `pbEndOfRoundPhase'
Battle_Clauses:41:in `pbEndOfRoundPhase'

and this when palafin hero form tries to switch in (meaning palafin zero form did switch out succesfully)


[2026-01-12 00:22:54 +0100]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: RuntimeError
Message: Unknown ID PRACTICAL.

Backtrace:
GameData:103:in `get'
[Innate Abilities] AAM Ability Effects.rb:490:in `block in triggerCertainSwitching'
[Innate Abilities] AAM Ability Effects.rb:489:in `each'
[Innate Abilities] AAM Ability Effects.rb:489:in `triggerCertainSwitching'
Battle_ActionSwitching:42:in `pbCanSwitchOut?'
Battle_ActionSwitching:89:in `pbCanSwitch?'
[Generation 9 Pack] [001] Battle.rb:69:in `pbCanSwitch?'
[Innate Abilities] AAM Battle.rb:7:in `pbCanSwitch?'
Battle_ActionSwitching:118:in `block in pbPartyScreen'
[Generation 9 Pack] [001] Battle.rb:424:in `block in pbPartyScreen'

i also couldn't attack.. also ending the battle made the game crash (by runaway from wild encounter)
 
got this when wild pomemon tries to attack me result in no attack
=================

[2026-01-12 00:29:31 +0100]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: RuntimeError
Message: Unknown ID PRACTICAL.

Backtrace:
GameData:103:in `get'
[Innate Abilities] AAM Ability Effects.rb:81:in `block in triggerSpeedCalc'
[Innate Abilities] AAM Ability Effects.rb:80:in `each'
[Innate Abilities] AAM Ability Effects.rb:80:in `triggerSpeedCalc'
Battle_Battler:255:in `pbSpeed'
Battle_ActionAttacksPriority:187:in `block in pbCalculatePriority'
Battle_ActionAttacksPriority:183:in `each'
Battle_ActionAttacksPriority:183:in `pbCalculatePriority'
Battle_EndOfRoundPhase:602:in `pbEndOfRoundPhase'
Battle_Clauses:41:in `pbEndOfRoundPhase'

and this when palafin hero form tries to switch in (meaning palafin zero form did switch out succesfully)


[2026-01-12 00:22:54 +0100]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: RuntimeError
Message: Unknown ID PRACTICAL.

Backtrace:
GameData:103:in `get'
[Innate Abilities] AAM Ability Effects.rb:490:in `block in triggerCertainSwitching'
[Innate Abilities] AAM Ability Effects.rb:489:in `each'
[Innate Abilities] AAM Ability Effects.rb:489:in `triggerCertainSwitching'
Battle_ActionSwitching:42:in `pbCanSwitchOut?'
Battle_ActionSwitching:89:in `pbCanSwitch?'
[Generation 9 Pack] [001] Battle.rb:69:in `pbCanSwitch?'
[Innate Abilities] AAM Battle.rb:7:in `pbCanSwitch?'
Battle_ActionSwitching:118:in `block in pbPartyScreen'
[Generation 9 Pack] [001] Battle.rb:424:in `block in pbPartyScreen'

i also couldn't attack.. also ending the battle made the game crash (by runaway from wild encounter)
The error says it tried to find an ability with the ID PRACTICAL, but find nothing

Does the ability exist on your pbs?
 
The error says it tried to find an ability with the ID PRACTICAL, but find nothing

Does the ability exist on your pbs?
yeah... it's part of the community pack of a bilities from Loven.. i could take it out from my innates but does that mean none of them work with it?
Edit: nvm i know what happened! I got distracted and didn't put the txt file from the plugin into bps thank you for the help!

edit 2 im still getting this error, it didn't stop from playing but i think it stopped my opponent from attacking skipping its attack


[2026-01-12 09:47:53 +0100]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: ArgumentError
Message: wrong number of arguments (given 1, expected 2)

Backtrace:
[Innate Abilities] AAM Battle.rb:52:in `pbAbilityTriggered?'
[Generation 9 Pack] [002] Battle_Battler.rb:44:in `ability_triggered?'
[Generation 9 Pack] [001] New Ability Handlers.rb:332:in `block in <main>'
Event_Handlers:195:in `trigger'
[Innate Abilities] AAM Ability Effects.rb:519:in `block in triggerOnSwitchIn'
[Innate Abilities] AAM Ability Effects.rb:517:in `each'
[Innate Abilities] AAM Ability Effects.rb:517:in `triggerOnSwitchIn'
Battle_ActionSwitching:353:in `block in pbOnBattlerEnteringBattle'
Battle_ActionSwitching:332:in `each'
Battle_ActionSwitching:332:in `pbOnBattlerEnteringBattle'

this error triggers when i switch in palafin hero form, in that turn the opponent doesn't get to attack. (in the others it does)
 
Last edited:
yeah... it's part of the community pack of a bilities from Loven.. i could take it out from my innates but does that mean none of them work with it?
Edit: nvm i know what happened! I got distracted and didn't put the txt file from the plugin into bps thank you for the help!

edit 2 im still getting this error, it didn't stop from playing but i think it stopped my opponent from attacking skipping its attack


[2026-01-12 09:47:53 +0100]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: ArgumentError
Message: wrong number of arguments (given 1, expected 2)

Backtrace:
[Innate Abilities] AAM Battle.rb:52:in `pbAbilityTriggered?'
[Generation 9 Pack] [002] Battle_Battler.rb:44:in `ability_triggered?'
[Generation 9 Pack] [001] New Ability Handlers.rb:332:in `block in <main>'
Event_Handlers:195:in `trigger'
[Innate Abilities] AAM Ability Effects.rb:519:in `block in triggerOnSwitchIn'
[Innate Abilities] AAM Ability Effects.rb:517:in `each'
[Innate Abilities] AAM Ability Effects.rb:517:in `triggerOnSwitchIn'
Battle_ActionSwitching:353:in `block in pbOnBattlerEnteringBattle'
Battle_ActionSwitching:332:in `each'
Battle_ActionSwitching:332:in `pbOnBattlerEnteringBattle'

this error triggers when i switch in palafin hero form, in that turn the opponent doesn't get to attack. (in the others it does)
Go to AAM Battler and replace pbAbilityTriggered? and pbSetAbilityTriggered

With this


Ruby:
Expand Collapse Copy
  def pbAbilityTriggered?(battler, check_ability = battler.ability)
    return @abils_triggered[battler.index & 1][battler.pokemonIndex].include?(check_ability)
  end

  def pbSetAbilityTrigger(battler, check_ability = battler.ability)
    @abils_triggered[battler.index & 1][battler.pokemonIndex].push(check_ability)
  end

Re-compile and give it a shot
 
Go to AAM Battler and replace pbAbilityTriggered? and pbSetAbilityTriggered

With this


Ruby:
Expand Collapse Copy
  def pbAbilityTriggered?(battler, check_ability = battler.ability)
    return @abils_triggered[battler.index & 1][battler.pokemonIndex].include?(check_ability)
  end

  def pbSetAbilityTrigger(battler, check_ability = battler.ability)
    @abils_triggered[battler.index & 1][battler.pokemonIndex].push(check_ability)
  end

Re-compile and give it a shot
wait you said replace but i searched for those lines and i don't see them in the file you mentioned... this is my aam battler


module PBEffects
#===========================================================================
# These effects apply to a battler
#===========================================================================
#IMPORTANT: Set Trace to an unused Effect ID in your game.
############################################################################
Trace = 1000
end


class Battle::Battler
attr_accessor :abilityMutationList

def hasAbilityMutation?
return (@pokemon) ? @pokemon.hasAbilityMutation? : false
end

# Gen 9 Pack Compatibility
def affectedByMoldBreaker?
return @battle.moldBreaker && !hasActiveItem?(:ABILITYSHIELD)
end

def ability=(value)
new_ability = GameData::Ability.try_get(value)
@ability_id = (new_ability) ? new_ability.id : nil
if @ability_id
if self.hasAbilityMutation?
@abilityMutationList.unshift(@ability_id)
@abilityMutationList = @abilityMutationList|[]
else
@abilityMutationList[0]=@ability_id
end
end
end
=begin
alias abilityMutations_pbInitPokemon pbInitPokemon
def pbInitPokemon(pkmn, idxParty)
abilityMutations_pbInitPokemon(pkmn, idxParty)

# Assuming @ability_id is already set for the Pokémon
speciesAbilities = [@ability_id].compact

# Initialize the innate abilities
pkmn.assign_innate_abilities if pkmn.active_innates.nil?

# Get the active innates and process them based on the settings
active_innates = pkmn.active_innates

if pkmn.hasAbilityMutation?
if Settings::INNATE_PROGRESS_WITH_VARIABLE && !Settings::INNATE_PROGRESS_WITH_LEVEL
push_ability_count = case $game_variables[Settings::INNATE_PROGRESS_VARIABLE]
when 1 then 1
when 2 then 2
when 3 then active_innates.size
else 0
end
active_innates.each_with_index do |ability, index|
speciesAbilities.push(ability)
break if index + 1 >= push_ability_count
end
elsif Settings::INNATE_PROGRESS_WITH_LEVEL && !Settings::INNATE_PROGRESS_WITH_VARIABLE
levels_to_unlock = Settings::LEVELS_TO_UNLOCK.find { |entry| entry.first == pkmn.species }&.drop(1) || Settings::LEVELS_TO_UNLOCK.last
levels_to_unlock.each_with_index do |min_level, index|
if pkmn.level >= min_level && active_innates.size > index
speciesAbilities.push(active_innates[index])
end
end
else
active_innates.each { |ability| speciesAbilities.push(ability) }
end
end

# Ensure there's at least one ability
speciesAbilities.push(:NOABILITY) if speciesAbilities.empty?

# Assign the list of abilities to the Pokémon's ability mutation list
@abilityMutationList = speciesAbilities
end
=end

alias abilityMutations_pbInitPokemon pbInitPokemon
def pbInitPokemon(pkmn, idxParty)
abilityMutations_pbInitPokemon(pkmn, idxParty)

# Initialize the innate abilities if not already set
pkmn.assign_innate_abilities if pkmn.active_innates.empty?

# Set the original innates of the pokemon
#pkmn.save_original_innates

# Set the ability mutation list using the new method
@abilityMutationList = pkmn.set_innate_limits
end

alias abilityMutations_pbInitEffects pbInitEffects
def pbInitEffects(batonPass)
abilityMutations_pbInitEffects(batonPass)
@effects[PBEffects::Trace] = false #DemICE AAM edit
end

#=============================================================================
# Refreshing a battler's properties
#=============================================================================
alias abilityMutations_pbUpdate pbUpdate
def pbUpdate(fullChange = false)
return if !@pokemon
abilityMutations_pbUpdate(fullChange)
if !@effects[PBEffects::Transform] && fullChange
if !@abilityMutationList.include?(@ability_id)
if self.hasAbilityMutation?
@abilityMutationList.unshift(@ability_id)
@abilityMutationList=@abilityMutationList|[]
else
@abilityMutationList[0]=@ability_id
end
#print @abilityMutationList
end
end
end

def hasActiveAbility?(check_ability, ignore_fainted = false)
return false if !abilityActive?(ignore_fainted, check_ability)
if self.hasAbilityMutation?
=begin
if check_ability.is_a?(Array)
for i in check_ability
$aamName2=GameData::Ability.get(i).name
return @abilityMutationList.include?(i)
end
=end

if check_ability.is_a?(Array)
common_element = (check_ability & @abilityMutationList).first
$aamName2 = GameData::Ability.get(common_element).name if common_element
return (check_ability & @abilityMutationList).any?
else
$aamName2=GameData::Ability.get(check_ability).name
return @abilityMutationList.include?(check_ability)
end
end
return check_ability.include?(@ability_id) if check_ability.is_a?(Array)
$aamName2=GameData::Ability.get(check_ability).name
return self.ability == check_ability
print chek_ability
end
alias hasWorkingAbility hasActiveAbility?


=begin
def hasActiveAbility?(check_ability, ignore_fainted = false)
return false if !abilityActive?(ignore_fainted, check_ability)

if self.hasAbilityMutation?
if check_ability.is_a?(Array)
for i in check_ability
ability_name = GameData::Ability.get(i).name
$aamName2 = ability_name
$aamName = ability_name
puts "First set of [imath]aamName and[/imath]aamName2 to #{ability_name} (Mutation)"
return true if @abilityMutationList.include?(i)
end
else
ability_name = GameData::Ability.get(check_ability).name
$aamName2 = ability_name
$aamName = ability_name
puts "Else set of [imath]aamName and[/imath]aamName2 to #{ability_name} (Mutation)"
return true if @abilityMutationList.include?(check_ability)
end
end

if check_ability.is_a?(Array)
return check_ability.include?(@ability_id)
end

ability_name = GameData::Ability.get(check_ability).name
$aamName2 = ability_name
$aamName = ability_name
puts "Final set [imath]aamName and[/imath]aamName2 to #{ability_name}"
return self.ability == check_ability
end
alias hasWorkingAbility hasActiveAbility?
=end

=begin
# Called when a Pokémon (self) enters battle, at the end of each move used,
# and at the end of each round.
def pbContinualAbilityChecks(onSwitchIn = false)
# Check for end of primordial weather
@battle.pbEndPrimordialWeather
# Trace
if hasActiveAbility?(:TRACE) && (self.effects[PBEffects::Trace] || onSwitchIn)
# NOTE: In Gen 5 only, Trace only triggers upon the Trace bearer switching
# in and not at any later times, even if a traceable ability turns
# up later. Essentials ignores this, and allows Trace to trigger
# whenever it can even in Gen 5 battle mechanics.
choices = @battle.allOtherSideBattlers(@index).select { |b|
next !b.ungainableAbility? &&
![:POWEROFALCHEMY, :RECEIVER, :TRACE].include?(b.ability_id) &&
!self.abilityMutationList.include?(b.ability_id)
}
if choices.length == 0
effects[PBEffects::Trace] = true
else
choice = choices[@battle.pbRandom(choices.length)]
$aamName = "Trace"
@battle.pbShowAbilitySplash(self, true)
if self.hasAbilityMutation?
self.abilityMutationList.push(choice.ability.id)
else
self.ability = choice.ability
end
$aamName = choice.abilityName
#puts "Conditional set of $aamName to #{choice.abilityName} due to Trace"
battle.pbReplaceAbilitySplash(self)
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!", pbThis, choice.pbThis(true), choice.abilityName))
@battle.pbHideAbilitySplash(self)
if !onSwitchIn && (unstoppableAbility? || abilityActive?)
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
end
self.effects[PBEffects::Trace] = false
end
end
end

=end

def pbContinualAbilityChecks(onSwitchIn = false)
@battle.pbEndPrimordialWeather
# Handle Commander Ability
if hasActiveAbility?(:COMMANDER)
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
end
@proteanTrigger = false
plateType = pbGetJudgmentType(@legendPlateType)
@legendPlateType = plateType
# Handle Trace Ability
if hasActiveAbility?(:TRACE)
if hasActiveItem?(:ABILITYSHIELD) # Trace failed by its own Ability Shield
if onSwitchIn
@battle.pbShowAbilitySplash(self)
@battle.pbDisplay(_INTL("{1}'s Ability is protected by the effects of its Ability Shield!", pbThis))
@battle.pbHideAbilitySplash(self)
end
else
choices = @battle.allOtherSideBattlers(@index).select do |b|
next !b.hasActiveItem?(:ABILITYSHIELD) && (b.ability_id == :WONDERGUARD || !b.uncopyableAbility?) &&
![:POWEROFALCHEMY, :RECEIVER, :TRACE].include?(b.ability_id) &&
!self.abilityMutationList.include?(b.ability_id)
end
if choices.length > 0
choice = choices[@battle.pbRandom(choices.length)]
# Update $aamName and show ability splash
$aamName = "Trace"
@battle.pbShowAbilitySplash(self, true)
# Handle ability mutation
if self.hasAbilityMutation?
self.abilityMutationList.push(choice.ability.id)
else
self.ability = choice.ability
end
$aamName = choice.abilityName
@battle.pbReplaceAbilitySplash(self)
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!", pbThis, choice.pbThis(true), choice.abilityName))
@battle.pbHideAbilitySplash(self)
# Trigger ability effects if applicable
if !onSwitchIn && (unstoppableAbility? || abilityActive?)
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
end
end
end
end
pbMirrorStatUpsOpposing
end

alias aam_pbCanInflictStatus? pbCanInflictStatus?
def pbCanInflictStatus?(newStatus, user, showMessages, move = nil, ignoreStatus = false)
$aam_StatusImmunityFromAlly=[]
aam_pbCanInflictStatus?(newStatus, user, showMessages, move, ignoreStatus)
end
=begin
def abilityName # May have problem on some situations, lazy
abil = self.ability
abilitytext = abil.name
if self.hasAbilityMutation?
aamNames=[]
for i in self.abilityMutationList
aamNames.push(GameData::Ability.get(i).name)
end
abilitytext=[imath]aamName if aamNames.include?([/imath]aamName)
abilitytext=[imath]aamName2 if aamNames.include?([/imath]aamName2)
end
return abilitytext
end
=end
def abilityName
abil = self.ability
abilitytext = abil ? abil.name : GameData::Ability.get(:NOABILITY).name
#puts "[abilityName] Initial ability: #{abil.inspect}, Name: #{abilitytext}"

if self.hasAbilityMutation?
aamNames = @abilityMutationList.map { |ability| GameData::Ability.get(ability).name }
#puts "[abilityName] Ability mutation list names: #{aamNames.inspect}"
#puts "[abilityName] Current [imath]aamName: #{[/imath]aamName}, [imath]aamName2: #{[/imath]aamName2}"

if aamNames.include?($aamName2)
abilitytext = $aamName2
#puts "[abilityName] Setting abilitytext to $aamName2: #{abilitytext}"
elsif aamNames.include?($aamName)
abilitytext = $aamName
#puts "[abilityName] Setting abilitytext to $aamName: #{abilitytext}"
end
end

puts "[abilityName] Final abilitytext: #{abilitytext}"
abilitytext
end
=begin
#-----------------------------------------------------------------------------
# Gen 9 pack Guard Dog fix
#-----------------------------------------------------------------------------
alias paldea_pbLowerStatStageByAbility pbLowerStatStageByAbility
def pbLowerStatStageByAbility(stat, increment, user, splashAnim = true, checkContact = false)
if hasActiveAbility?(:GUARDDOG) && user.hasActiveAbility?(:INTIMIDATE)#user.ability == :INTIMIDATE
return pbRaiseStatStageByAbility(stat, increment, self, true)
end
return paldea_pbLowerStatStageByAbility(stat, increment, user, splashAnim)
end
=end
end

# Safari Zone Fix
class Battle::FakeBattler
attr_accessor :abilityMutationList

alias aam_initialize initialize
def initialize(*args)
aam_initialize(*args)
@abilityMutationList=[]
end

def hasAbilityMutation?
return (@pokemon) ? @pokemon.hasAbilityMutation? : false
end
end
=begin
class Battle::Scene::AbilitySplashBar < Sprite

def refresh
self.bitmap.clear
return if !@battler
textPos = []
textX = (@side == 0) ? 10 : self.bitmap.width - 8
# Draw Pokémon's name
textPos.push([_INTL("{1}'s", @battler.name), textX, 8, @side == 1,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true])
# Draw Pokémon's ability
abilitytext=@battler.abilityName
if @battler.hasAbilityMutation?
aamNames=[]
for i in @battler.abilityMutationList
aamNames.push(GameData::Ability.get(i).name)
end
#
abilitytext=[imath]aamName2 if aamNames.include?([/imath]aamName2)
abilitytext=[imath]aamName if aamNames.include?([/imath]aamName)
end
textPos.push([abilitytext, textX, 38, @side == 1,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true])
pbDrawTextPositions(self.bitmap, textPos)
end

end
=end
 
wait you said replace but i searched for those lines and i don't see them in the file you mentioned... this is my aam battler


module PBEffects
#===========================================================================
# These effects apply to a battler
#===========================================================================
#IMPORTANT: Set Trace to an unused Effect ID in your game.
############################################################################
Trace = 1000
end


class Battle::Battler
attr_accessor :abilityMutationList

def hasAbilityMutation?
return (@pokemon) ? @pokemon.hasAbilityMutation? : false
end

# Gen 9 Pack Compatibility
def affectedByMoldBreaker?
return @battle.moldBreaker && !hasActiveItem?(:ABILITYSHIELD)
end

def ability=(value)
new_ability = GameData::Ability.try_get(value)
@ability_id = (new_ability) ? new_ability.id : nil
if @ability_id
if self.hasAbilityMutation?
@abilityMutationList.unshift(@ability_id)
@abilityMutationList = @abilityMutationList|[]
else
@abilityMutationList[0]=@ability_id
end
end
end
=begin
alias abilityMutations_pbInitPokemon pbInitPokemon
def pbInitPokemon(pkmn, idxParty)
abilityMutations_pbInitPokemon(pkmn, idxParty)

# Assuming @ability_id is already set for the Pokémon
speciesAbilities = [@ability_id].compact

# Initialize the innate abilities
pkmn.assign_innate_abilities if pkmn.active_innates.nil?

# Get the active innates and process them based on the settings
active_innates = pkmn.active_innates

if pkmn.hasAbilityMutation?
if Settings::INNATE_PROGRESS_WITH_VARIABLE && !Settings::INNATE_PROGRESS_WITH_LEVEL
push_ability_count = case $game_variables[Settings::INNATE_PROGRESS_VARIABLE]
when 1 then 1
when 2 then 2
when 3 then active_innates.size
else 0
end
active_innates.each_with_index do |ability, index|
speciesAbilities.push(ability)
break if index + 1 >= push_ability_count
end
elsif Settings::INNATE_PROGRESS_WITH_LEVEL && !Settings::INNATE_PROGRESS_WITH_VARIABLE
levels_to_unlock = Settings::LEVELS_TO_UNLOCK.find { |entry| entry.first == pkmn.species }&.drop(1) || Settings::LEVELS_TO_UNLOCK.last
levels_to_unlock.each_with_index do |min_level, index|
if pkmn.level >= min_level && active_innates.size > index
speciesAbilities.push(active_innates[index])
end
end
else
active_innates.each { |ability| speciesAbilities.push(ability) }
end
end

# Ensure there's at least one ability
speciesAbilities.push(:NOABILITY) if speciesAbilities.empty?

# Assign the list of abilities to the Pokémon's ability mutation list
@abilityMutationList = speciesAbilities
end
=end

alias abilityMutations_pbInitPokemon pbInitPokemon
def pbInitPokemon(pkmn, idxParty)
abilityMutations_pbInitPokemon(pkmn, idxParty)

# Initialize the innate abilities if not already set
pkmn.assign_innate_abilities if pkmn.active_innates.empty?

# Set the original innates of the pokemon
#pkmn.save_original_innates

# Set the ability mutation list using the new method
@abilityMutationList = pkmn.set_innate_limits
end

alias abilityMutations_pbInitEffects pbInitEffects
def pbInitEffects(batonPass)
abilityMutations_pbInitEffects(batonPass)
@effects[PBEffects::Trace] = false #DemICE AAM edit
end

#=============================================================================
# Refreshing a battler's properties
#=============================================================================
alias abilityMutations_pbUpdate pbUpdate
def pbUpdate(fullChange = false)
return if !@pokemon
abilityMutations_pbUpdate(fullChange)
if !@effects[PBEffects::Transform] && fullChange
if !@abilityMutationList.include?(@ability_id)
if self.hasAbilityMutation?
@abilityMutationList.unshift(@ability_id)
@abilityMutationList=@abilityMutationList|[]
else
@abilityMutationList[0]=@ability_id
end
#print @abilityMutationList
end
end
end

def hasActiveAbility?(check_ability, ignore_fainted = false)
return false if !abilityActive?(ignore_fainted, check_ability)
if self.hasAbilityMutation?
=begin
if check_ability.is_a?(Array)
for i in check_ability
$aamName2=GameData::Ability.get(i).name
return @abilityMutationList.include?(i)
end
=end

if check_ability.is_a?(Array)
common_element = (check_ability & @abilityMutationList).first
$aamName2 = GameData::Ability.get(common_element).name if common_element
return (check_ability & @abilityMutationList).any?
else
$aamName2=GameData::Ability.get(check_ability).name
return @abilityMutationList.include?(check_ability)
end
end
return check_ability.include?(@ability_id) if check_ability.is_a?(Array)
$aamName2=GameData::Ability.get(check_ability).name
return self.ability == check_ability
print chek_ability
end
alias hasWorkingAbility hasActiveAbility?


=begin
def hasActiveAbility?(check_ability, ignore_fainted = false)
return false if !abilityActive?(ignore_fainted, check_ability)

if self.hasAbilityMutation?
if check_ability.is_a?(Array)
for i in check_ability
ability_name = GameData::Ability.get(i).name
$aamName2 = ability_name
$aamName = ability_name
puts "First set of [imath]aamName and[/imath]aamName2 to #{ability_name} (Mutation)"
return true if @abilityMutationList.include?(i)
end
else
ability_name = GameData::Ability.get(check_ability).name
$aamName2 = ability_name
$aamName = ability_name
puts "Else set of [imath]aamName and[/imath]aamName2 to #{ability_name} (Mutation)"
return true if @abilityMutationList.include?(check_ability)
end
end

if check_ability.is_a?(Array)
return check_ability.include?(@ability_id)
end

ability_name = GameData::Ability.get(check_ability).name
$aamName2 = ability_name
$aamName = ability_name
puts "Final set [imath]aamName and[/imath]aamName2 to #{ability_name}"
return self.ability == check_ability
end
alias hasWorkingAbility hasActiveAbility?
=end

=begin
# Called when a Pokémon (self) enters battle, at the end of each move used,
# and at the end of each round.
def pbContinualAbilityChecks(onSwitchIn = false)
# Check for end of primordial weather
@battle.pbEndPrimordialWeather
# Trace
if hasActiveAbility?(:TRACE) && (self.effects[PBEffects::Trace] || onSwitchIn)
# NOTE: In Gen 5 only, Trace only triggers upon the Trace bearer switching
# in and not at any later times, even if a traceable ability turns
# up later. Essentials ignores this, and allows Trace to trigger
# whenever it can even in Gen 5 battle mechanics.
choices = @battle.allOtherSideBattlers(@index).select { |b|
next !b.ungainableAbility? &&
![:POWEROFALCHEMY, :RECEIVER, :TRACE].include?(b.ability_id) &&
!self.abilityMutationList.include?(b.ability_id)
}
if choices.length == 0
effects[PBEffects::Trace] = true
else
choice = choices[@battle.pbRandom(choices.length)]
$aamName = "Trace"
@battle.pbShowAbilitySplash(self, true)
if self.hasAbilityMutation?
self.abilityMutationList.push(choice.ability.id)
else
self.ability = choice.ability
end
$aamName = choice.abilityName
#puts "Conditional set of $aamName to #{choice.abilityName} due to Trace"
battle.pbReplaceAbilitySplash(self)
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!", pbThis, choice.pbThis(true), choice.abilityName))
@battle.pbHideAbilitySplash(self)
if !onSwitchIn && (unstoppableAbility? || abilityActive?)
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
end
self.effects[PBEffects::Trace] = false
end
end
end

=end

def pbContinualAbilityChecks(onSwitchIn = false)
@battle.pbEndPrimordialWeather
# Handle Commander Ability
if hasActiveAbility?(:COMMANDER)
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
end
@proteanTrigger = false
plateType = pbGetJudgmentType(@legendPlateType)
@legendPlateType = plateType
# Handle Trace Ability
if hasActiveAbility?(:TRACE)
if hasActiveItem?(:ABILITYSHIELD) # Trace failed by its own Ability Shield
if onSwitchIn
@battle.pbShowAbilitySplash(self)
@battle.pbDisplay(_INTL("{1}'s Ability is protected by the effects of its Ability Shield!", pbThis))
@battle.pbHideAbilitySplash(self)
end
else
choices = @battle.allOtherSideBattlers(@index).select do |b|
next !b.hasActiveItem?(:ABILITYSHIELD) && (b.ability_id == :WONDERGUARD || !b.uncopyableAbility?) &&
![:POWEROFALCHEMY, :RECEIVER, :TRACE].include?(b.ability_id) &&
!self.abilityMutationList.include?(b.ability_id)
end
if choices.length > 0
choice = choices[@battle.pbRandom(choices.length)]
# Update $aamName and show ability splash
$aamName = "Trace"
@battle.pbShowAbilitySplash(self, true)
# Handle ability mutation
if self.hasAbilityMutation?
self.abilityMutationList.push(choice.ability.id)
else
self.ability = choice.ability
end
$aamName = choice.abilityName
@battle.pbReplaceAbilitySplash(self)
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!", pbThis, choice.pbThis(true), choice.abilityName))
@battle.pbHideAbilitySplash(self)
# Trigger ability effects if applicable
if !onSwitchIn && (unstoppableAbility? || abilityActive?)
Battle::AbilityEffects.triggerOnSwitchIn(self.ability, self, @battle)
end
end
end
end
pbMirrorStatUpsOpposing
end

alias aam_pbCanInflictStatus? pbCanInflictStatus?
def pbCanInflictStatus?(newStatus, user, showMessages, move = nil, ignoreStatus = false)
$aam_StatusImmunityFromAlly=[]
aam_pbCanInflictStatus?(newStatus, user, showMessages, move, ignoreStatus)
end
=begin
def abilityName # May have problem on some situations, lazy
abil = self.ability
abilitytext = abil.name
if self.hasAbilityMutation?
aamNames=[]
for i in self.abilityMutationList
aamNames.push(GameData::Ability.get(i).name)
end
abilitytext=[imath]aamName if aamNames.include?([/imath]aamName)
abilitytext=[imath]aamName2 if aamNames.include?([/imath]aamName2)
end
return abilitytext
end
=end
def abilityName
abil = self.ability
abilitytext = abil ? abil.name : GameData::Ability.get(:NOABILITY).name
#puts "[abilityName] Initial ability: #{abil.inspect}, Name: #{abilitytext}"

if self.hasAbilityMutation?
aamNames = @abilityMutationList.map { |ability| GameData::Ability.get(ability).name }
#puts "[abilityName] Ability mutation list names: #{aamNames.inspect}"
#puts "[abilityName] Current [imath]aamName: #{[/imath]aamName}, [imath]aamName2: #{[/imath]aamName2}"

if aamNames.include?($aamName2)
abilitytext = $aamName2
#puts "[abilityName] Setting abilitytext to $aamName2: #{abilitytext}"
elsif aamNames.include?($aamName)
abilitytext = $aamName
#puts "[abilityName] Setting abilitytext to $aamName: #{abilitytext}"
end
end

puts "[abilityName] Final abilitytext: #{abilitytext}"
abilitytext
end
=begin
#-----------------------------------------------------------------------------
# Gen 9 pack Guard Dog fix
#-----------------------------------------------------------------------------
alias paldea_pbLowerStatStageByAbility pbLowerStatStageByAbility
def pbLowerStatStageByAbility(stat, increment, user, splashAnim = true, checkContact = false)
if hasActiveAbility?(:GUARDDOG) && user.hasActiveAbility?(:INTIMIDATE)#user.ability == :INTIMIDATE
return pbRaiseStatStageByAbility(stat, increment, self, true)
end
return paldea_pbLowerStatStageByAbility(stat, increment, user, splashAnim)
end
=end
end

# Safari Zone Fix
class Battle::FakeBattler
attr_accessor :abilityMutationList

alias aam_initialize initialize
def initialize(*args)
aam_initialize(*args)
@abilityMutationList=[]
end

def hasAbilityMutation?
return (@pokemon) ? @pokemon.hasAbilityMutation? : false
end
end
=begin
class Battle::Scene::AbilitySplashBar < Sprite

def refresh
self.bitmap.clear
return if !@battler
textPos = []
textX = (@side == 0) ? 10 : self.bitmap.width - 8
# Draw Pokémon's name
textPos.push([_INTL("{1}'s", @battler.name), textX, 8, @side == 1,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true])
# Draw Pokémon's ability
abilitytext=@battler.abilityName
if @battler.hasAbilityMutation?
aamNames=[]
for i in @battler.abilityMutationList
aamNames.push(GameData::Ability.get(i).name)
end
#
abilitytext=[imath]aamName2 if aamNames.include?([/imath]aamName2)
abilitytext=[imath]aamName if aamNames.include?([/imath]aamName)
end
textPos.push([abilitytext, textX, 38, @side == 1,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true])
pbDrawTextPositions(self.bitmap, textPos)
end

end
=end
Sorry, I meant AAM Battle, line 52. The same one your error Points to
 
Back
Top