• 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.
Innate Abilities (Yet Another "All Abilities Mutation" mod)

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

Tsoukinator

Novice
Member
Joined
Mar 12, 2024
Posts
30
Hey man, so first, no worries about the late response. Secondly, I tried making the edit to the file to where you recommended as so:

Ruby:
Expand Collapse Copy
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
        if (!battler.pbOwnedByPlayer?)
            @abilityMutationList = pkmn.active_innates
            else
            @abilityMutationList = pkmn.set_innate_limits
        end
    end

But when getting into an encounter, the game crashes with this message:
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: NameError
Message: undefined local variable or method `battler' for #<Battle::Battler>

Backtrace:
[Innate Abilities] AAM Battler.rb:93:in `pbInitPokemon'
Battler_Initialize:61:in `pbInitialize'
[[DBK] Animated Pokémon System] [006] Battler Sprites.rb:395:in `pbInitialize'
Battle_StartAndEnd:117:in `pbCreateBattler'
Battle_StartAndEnd:153:in `block (3 levels) in pbSetUpSides'
Battle:411:in `block in eachInTeam'
Battle:411:in `each'
Battle:411:in `each_with_index'
Battle:411:in `eachInTeam'
Battle_StartAndEnd:150:in `block (2 levels) in pbSetUpSides'

To remedy this, I tried adding a 'battler' parameter to the pbInitPokemon function, like so:
Ruby:
Expand Collapse Copy
def pbInitPokemon(pkmn, idxParty) --> def pbInitPokemon(pkmn, idxParty, battler)

But now I get this error:
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

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

Backtrace:
[Innate Abilities] AAM Battler.rb:83:in `pbInitPokemon'
Battler_Initialize:61:in `pbInitialize'
[[DBK] Animated Pokémon System] [006] Battler Sprites.rb:395:in `pbInitialize'
Battle_StartAndEnd:117:in `pbCreateBattler'
Battle_StartAndEnd:153:in `block (3 levels) in pbSetUpSides'
Battle:411:in `block in eachInTeam'
Battle:411:in `each'
Battle:411:in `each_with_index'
Battle:411:in `eachInTeam'
Battle_StartAndEnd:150:in `block (2 levels) in pbSetUpSides'

Now I'm just lost. Obviously there must be something wrong with my conditional branch, I guess !battler.pbOwnedByPlayer? wasn't the right call.
I'm no expert, as I'm still getting into understanding the Pokemon Essentials code myself.

Though, with your original code, what happens if you remove the battler parameter from pbInitPokemon, and then instead of referencing if (!battler.pbOwnedByPlayer?) try using if (!pkmn.pbOwnedByPlayer?)
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
129
Hey man, so first, no worries about the late response. Secondly, I tried making the edit to the file to where you recommended as so:

Ruby:
Expand Collapse Copy
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
        if (!battler.pbOwnedByPlayer?)
            @abilityMutationList = pkmn.active_innates
            else
            @abilityMutationList = pkmn.set_innate_limits
        end
    end

But when getting into an encounter, the game crashes with this message:
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: NameError
Message: undefined local variable or method `battler' for #<Battle::Battler>

Backtrace:
[Innate Abilities] AAM Battler.rb:93:in `pbInitPokemon'
Battler_Initialize:61:in `pbInitialize'
[[DBK] Animated Pokémon System] [006] Battler Sprites.rb:395:in `pbInitialize'
Battle_StartAndEnd:117:in `pbCreateBattler'
Battle_StartAndEnd:153:in `block (3 levels) in pbSetUpSides'
Battle:411:in `block in eachInTeam'
Battle:411:in `each'
Battle:411:in `each_with_index'
Battle:411:in `eachInTeam'
Battle_StartAndEnd:150:in `block (2 levels) in pbSetUpSides'

To remedy this, I tried adding a 'battler' parameter to the pbInitPokemon function, like so:
Ruby:
Expand Collapse Copy
def pbInitPokemon(pkmn, idxParty) --> def pbInitPokemon(pkmn, idxParty, battler)

But now I get this error:
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

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

Backtrace:
[Innate Abilities] AAM Battler.rb:83:in `pbInitPokemon'
Battler_Initialize:61:in `pbInitialize'
[[DBK] Animated Pokémon System] [006] Battler Sprites.rb:395:in `pbInitialize'
Battle_StartAndEnd:117:in `pbCreateBattler'
Battle_StartAndEnd:153:in `block (3 levels) in pbSetUpSides'
Battle:411:in `block in eachInTeam'
Battle:411:in `each'
Battle:411:in `each_with_index'
Battle:411:in `eachInTeam'
Battle_StartAndEnd:150:in `block (2 levels) in pbSetUpSides'

Now I'm just lost. Obviously there must be something wrong with my conditional branch, I guess !battler.pbOwnedByPlayer? wasn't the right call.
You were on the right track but overshoot a bit. Since this code is defined in the Class Battle::Battler, theres no need to add the battler in if (!battler.pbOwnedByPlayer?), as the code is basically looking for another method defined battler in the battler class. A whole battleception, which is what the error is giving: undefined local variable or method `battler' for #<Battle::Battler>

Simply use if !pbOwnedByPlayer? and that should do the trick. If anything, use !self.pbOwnedByPlayer?
 

Bguy7

Pokémon Sol Version Creator
Member
Joined
Jul 1, 2024
Posts
21
Before we go any further: No, i'm not adding Hidden Innates.

No worries, hidden innates was not something I was considering.

That being said thats rather tricky to implement. Evolution remains consisten because of ability index, yes, so I'll have to re-writte some of the code to make the innate sets be considered indexes. Perhaps they can be considered each an index based on it's order, so if you have


Ruby:
Expand Collapse Copy
[POKEMON]
Innates1 = BLA,BLA,BLA #<- Index 1
Innates2 = HAMANA,HAMANA,HAMANA #<- Index 2
Innates3 = ABIL,ABIL,ABIL #<- Index 3

Instead of randomly pick one innate set it'll randomly pick one available innate index number and simply search upon evolving if the pokemon has that innate set.

However if I do it like that, if a pokemon has 2 innate sets and evolves into a pokemon with 3 sets, it will never pick the third set. That could be solved by adding a third innate set in the original pokemon but at that point you are messing with the odds. Idk, It'll require some messing around.
Interesting idea, I might add it after I release the first beta of my project.

Sounds like that could work to me. Do what you want and take your time. Thanks for giving it consideration.
 

SigMo

Rookie
Member
Joined
May 15, 2024
Posts
5
You were on the right track but overshoot a bit. Since this code is defined in the Class Battle::Battler, theres no need to add the battler in if (!battler.pbOwnedByPlayer?), as the code is basically looking for another method defined battler in the battler class. A whole battleception, which is what the error is giving: undefined local variable or method `battler' for #<Battle::Battler>

Simply use if !pbOwnedByPlayer? and that should do the trick. If anything, use !self.pbOwnedByPlayer?
So I got this error after applying 'if !pbOwnedByPlayer':

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

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

Backtrace:
[Innate Abilities] AAM Battler.rb:279:in `ability_triggered?'
Battle_AbilityEffects:3306: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'
Battle_ActionSwitching:307:in `pbOnAllBattlersEnteringBattle'

So I just removed the
Ruby:
Expand Collapse Copy
  def ability_triggered?(check_ability) # honestly, this method is not necessary
    return @battle.pbAbilityTriggered?(self, check_ability)
  end
function, and then I get this crash:
[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?'
Battle_AbilityEffects:3306: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'

In the AAM Battle file this seems to be the function that is crashing the program:
Ruby:
Expand Collapse Copy
  def pbAbilityTriggered?(battler, check_ability)
    return @abils_triggered[battler.index & 1][battler.pokemonIndex].include?(check_ability)
  end

So I went back to AAM Battler and put back the function I deleted and tried using !self.pbOwnedByPlayer? as my flag for the if statement. It just gives the same results. Thoughts?
 

Penelope

Trainer
Member
Joined
Sep 15, 2023
Posts
86
So I got this error after applying 'if !pbOwnedByPlayer':

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

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

Backtrace:
[Innate Abilities] AAM Battler.rb:279:in `ability_triggered?'
Battle_AbilityEffects:3306: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'
Battle_ActionSwitching:307:in `pbOnAllBattlersEnteringBattle'

So I just removed the
Ruby:
Expand Collapse Copy
  def ability_triggered?(check_ability) # honestly, this method is not necessary
    return @battle.pbAbilityTriggered?(self, check_ability)
  end
function, and then I get this crash:
[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?'
Battle_AbilityEffects:3306: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'

In the AAM Battle file this seems to be the function that is crashing the program:
Ruby:
Expand Collapse Copy
  def pbAbilityTriggered?(battler, check_ability)
    return @abils_triggered[battler.index & 1][battler.pokemonIndex].include?(check_ability)
  end

So I went back to AAM Battler and put back the function I deleted and tried using !self.pbOwnedByPlayer? as my flag for the if statement. It just gives the same results. Thoughts?
it is because that you did not pass argument, look at the error it said "Message: wrong number of arguments (given 0, expected 1)".
tbh, i havent see the code of this plugin, so i dont know what these methods are using for, but these two methods i wrote originally is using for some abilities that should be limited triggering times in battle, so basically you dont need to touch these.
 

Thomwell

Trainer
Member
Joined
Mar 8, 2024
Posts
63
Exception: NoMethodError
Message: undefined method `empty?' for nil:NilClass***Full script:
TrainerBattle.start(:LEADER_RUBY,"Ruby") Backtrace:
[Innate Abilities]AAM Battler.rb:87:in `pblnitPokemon' Battler Initialize:61:in`pblnitialize'
Battle StartAndEnd:117:in`pbCreateBattler'
Battle_StartAndEnd:208:in`block (3 levels) in pbSetUpSides' Battle:416:in`block in eachlnTeam' Battle:416:in`each'
Battle:416:in `each with index' Battle:416:in `eachlnTeam'
Battle_StartAndEnd:205:in`block (2 levels) in pbSetUpSides' Battle StartAndEnd:203:in`each'



Hello teacher, what's going on?
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
129
Exception: NoMethodError
Message: undefined method `empty?' for nil:NilClass***Full script:
TrainerBattle.start(:LEADER_RUBY,"Ruby") Backtrace:
[Innate Abilities]AAM Battler.rb:87:in `pblnitPokemon' Battler Initialize:61:in`pblnitialize'
Battle StartAndEnd:117:in`pbCreateBattler'
Battle_StartAndEnd:208:in`block (3 levels) in pbSetUpSides' Battle:416:in`block in eachlnTeam' Battle:416:in`each'
Battle:416:in `each with index' Battle:416:in `eachlnTeam'
Battle_StartAndEnd:205:in`block (2 levels) in pbSetUpSides' Battle StartAndEnd:203:in`each'



Hello teacher, what's going on?
Any context in how did you got this error?
 

Bguy7

Pokémon Sol Version Creator
Member
Joined
Jul 1, 2024
Posts
21
Had a glitch to report. It seems that the function to stop a Pokémon from having the same innate ability as its regular ability doesn't function as intended and it is possible for them to be the same.

Since I try to debug my own code using ChatGPT as tool to help find errors, I figured I'd try that on your code to see if I can find the error. This is what ChatGPT said about the script contained in "Innate Abilities - Pokémon":

The line 'available_innates.reject! { |innate| innate == [self.ability_id] }' attempts to remove the Pokémon's regular ability from the list of available innate abilities. However, there is a small mistake in this line:

available_innates.reject! { |innate| innate == [self.ability_id] }

The expression '[self.ability_id]' creates an array containing the regular ability, but innate is a symbol, so this condition will never be true. Instead, it should be:

available_innates.reject! { |innate| innate == self.ability_id }

This corrects the comparison so that it properly excludes the regular ability from the available innate abilities.

It's hard to test for sure whether the fix worked or not, since we're talking about a thing with random probability, but the logic looks correct to me, and everything seems to be working right.
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
129
So I got this error after applying 'if !pbOwnedByPlayer':

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

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

Backtrace:
[Innate Abilities] AAM Battler.rb:279:in `ability_triggered?'
Battle_AbilityEffects:3306: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'
Battle_ActionSwitching:307:in `pbOnAllBattlersEnteringBattle'

So I just removed the
Ruby:
Expand Collapse Copy
  def ability_triggered?(check_ability) # honestly, this method is not necessary
    return @battle.pbAbilityTriggered?(self, check_ability)
  end
function, and then I get this crash:
[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?'
Battle_AbilityEffects:3306: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'

In the AAM Battle file this seems to be the function that is crashing the program:
Ruby:
Expand Collapse Copy
  def pbAbilityTriggered?(battler, check_ability)
    return @abils_triggered[battler.index & 1][battler.pokemonIndex].include?(check_ability)
  end

So I went back to AAM Battler and put back the function I deleted and tried using !self.pbOwnedByPlayer? as my flag for the if statement. It just gives the same results. Thoughts?
Depends on how did you integrate the code. But after giving it a shot myelf it's better to define it in Pokemon as a method to be called if !pbOwnedbyPlayer, since it's during the pokemon class that the Innate sets gets mixed with the ability set. But yeah, the wrong arguments error it's because you gave an unproper amount of properties to a method called
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
129
Had a glitch to report. It seems that the function to stop a Pokémon from having the same innate ability as its regular ability doesn't function as intended and it is possible for them to be the same.

Since I try to debug my own code using ChatGPT as tool to help find errors, I figured I'd try that on your code to see if I can find the error. This is what ChatGPT said about the script contained in "Innate Abilities - Pokémon":



It's hard to test for sure whether the fix worked or not, since we're talking about a thing with random probability, but the logic looks correct to me, and everything seems to be working right.
Seems like an oversight on my part, since the abilities were stored as an array but changed to be stored as a symbol after I made the transition to the innate_sets.txt file. Thanks for the repport! I'll update it tomorrow
 

DemICE

QoL junkie
Member
Joined
Jan 12, 2018
Posts
97
Just saw this, and im glad that it's inspired someone to take it a step further. Also because I wasn't feeling motivated to deal with Essentials v21...
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
129
Just saw this, and im glad that it's inspired someone to take it a step further. Also because I wasn't feeling motivated to deal with Essentials v21...
The legend himself. I just wanted to say thank you for the amazing script that let this one even exist.
I hope you update your AAM plugin to v21 and gen 9 someday. I'll love to see how it's handled by someone that actually knows what it's doing lol.
 

DemICE

QoL junkie
Member
Joined
Jan 12, 2018
Posts
97
wait what does gen 9 have to do with it? i dont remember having any compatibility issues with the gen 9 plugin back in v20.1
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
129
wait what does gen 9 have to do with it? i dont remember having any compatibility issues with the gen 9 plugin back in v20.1
Compatibility wise? Nothing, it works like a charm

Is just I can't figure out how to add handlers for the opportunist ability, and the check for guard dog. It's driving me crazy, specially opportunist since it uses a new handler and I cant properly add it to the AAM
 

DemICE

QoL junkie
Member
Joined
Jan 12, 2018
Posts
97
when loading plugins:
Exception `NameError' at [Innate summary page] Innate Summary Handlers.rb:4 - uninitialized constant UIHandlers

seems like UIHandlers is a foreign thing. Which plugin adds it?

EDIT: i found it by actually reaching the end of the OP this time
 
Last edited:

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
129
when loading plugins:
Exception `NameError' at [Innate summary page] Innate Summary Handlers.rb:4 - uninitialized constant UIHandlers

seems like UIHandlers is a foreign thing. Which plugin adds it?
Modular UI Scenes, its a dependency only if you try to see the innates in the summary page
 

DemICE

QoL junkie
Member
Joined
Jan 12, 2018
Posts
97
Modular UI Scenes, its a dependency only if you try to see the innates in the summary page
yea i got it and it kept crashing until i added this line in Innate Summary's meta.txt
Requires = Modular UI Scenes,2.0
it appears the innaet summary plugin was trying to load before this

might wanna do that to prevent other people from wondering why they cant make this work. the system will straight up tell em which plugin to look for
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
129
yea i got it and it kept crashing until i added this line in Innate Summary's meta.txt
Requires = Modular UI Scenes,2.0
it appears the innaet summary plugin was trying to load before this

might wanna do that to prevent other people from wondering why they cant make this work. the system will straight up tell em which plugin to look for
Odd that I haven't got that error nor any reports about it. But on the other hand yes I should have add it as a dependency. Can't belive I forgot about that line in the meta lol.
I'll update it later when I get home
 

Bguy7

Pokémon Sol Version Creator
Member
Joined
Jul 1, 2024
Posts
21
Came across a strange bug today while working with Mega Evolution. When the Pokémon Mega Evolves and changes its innate ability, that part works fine. What gets strange is when it changes back. Functionally, it will have its original ability, but if you check its summary page, it will say it still has the ability of the Mega Evolution. What's really strange about this is that if you view the summary in battle, nothing happens except for an incorrect ability being displayed. But if you check it out of battle, then that seems to change things so that the regular Pokémon's ability actually becomes the Mega Evolved ability instead.

For example:
Gyarados has Intimidate as its innate and Mega Evolves so that its innate becomes Mold Breaker.
In the next battle, before Mega Evolving, Gyarados' Intimidate will activate as normal.
If you check Gyarados' summary during the battle, it will say it has Mold Breaker as an innate, even though it just activated Intimidate.
After the battle, if you check its summary through the pause menu, then it will still say it has Mold Breaker, even though it's not Mega Evolved.
In the next battle after checking the pause menu summary screen, Gyarados will now activate Mold Breaker instead of Intimidate without Mega Evolving.
This change persists for all future battles.

I couldn't find a fix for this one myself.

Odd that I haven't got that error nor any reports about it. But on the other hand yes I should have add it as a dependency. Can't belive I forgot about that line in the meta lol.
I'll update it later when I get home

You know, I actually did encounter that one, but I figured out how to fix it fast, and it was before I had an account on this website, so I never mentioned it. Oops.
 

Sonicover

Cooltrainer
Member
Joined
Jan 14, 2022
Posts
129
Came across a strange bug today while working with Mega Evolution. When the Pokémon Mega Evolves and changes its innate ability, that part works fine. What gets strange is when it changes back. Functionally, it will have its original ability, but if you check its summary page, it will say it still has the ability of the Mega Evolution. What's really strange about this is that if you view the summary in battle, nothing happens except for an incorrect ability being displayed. But if you check it out of battle, then that seems to change things so that the regular Pokémon's ability actually becomes the Mega Evolved ability instead.

For example:
Gyarados has Intimidate as its innate and Mega Evolves so that its innate becomes Mold Breaker.
In the next battle, before Mega Evolving, Gyarados' Intimidate will activate as normal.
If you check Gyarados' summary during the battle, it will say it has Mold Breaker as an innate, even though it just activated Intimidate.
After the battle, if you check its summary through the pause menu, then it will still say it has Mold Breaker, even though it's not Mega Evolved.
In the next battle after checking the pause menu summary screen, Gyarados will now activate Mold Breaker instead of Intimidate without Mega Evolving.
This change persists for all future battles.

I couldn't find a fix for this one myself.



You know, I actually did encounter that one, but I figured out how to fix it fast, and it was before I had an account on this website, so I never mentioned it. Oops.
That's annoying. But I think I also know exactly what to modify since I use twice the instance of original_innates in the code so perhaps that's modifying things that it shouldn't. And since I made the code to revert Mega innates before the one that reverts all form changes maybe it's messing things. Specially since the summary loads things back again.
Thanks for the report
 
Back
Top