Here's the error message:
While testing in debug mode the console shows:
This message appears in the console each time the error message pops up.
Here's the scenario:
2v2 trainer battle. Opponent is using Houndoom and Stantler which are both level 30. I don't think the player's Pokémon matters since I've been trying a few different combinations and the same message appears. I think the issue is that the game is trying to prioritize which move and/or target to use the move on, but the game ties somehow. I've also tried this in a very similar setup where the opponent trainer uses Houndoom alongside Girafarig and the same error occurs. The second error message is exactly the same as the first one. I put it into a text comparison site to check.
The moves used by all four participants in the battle are able to use their moves without issue. The error message pops up twice, which I think is once for the Houndoom and once for the Stantler since they're tied and both produce the error message. Once either of the opponent's Pokémon are knocked out the error message no longer pops up. Every turn that starts where both the Houndoom and Stantler are still in battle the error message pops up twice at the start of resolving the chosen actions for that turn.
The game doesn't crash after these pop-ups. If I click OK to get rid of the window and continue playing through the battle it continues normally.
All the Pokémon involved in this scenario have moves and abilities that resolve without issue. I don't think this is caused by one of my custom changes. Other trainer variants that don't use Houndoom alongside either Girafarig or Stantler don't cause any error message, so for now my solution to this strange error is to avoid having trainers use these combinations.
I'm also getting this error with Ninetales. I thought it might be a custom ability format since these two have a certain ability format, but when I replaced the Ninetales (and earlier the Houndoom) with different Pokémon that have abilities using the same format, I don't get any error message.
I checked my installation of the Deluxe Battle Kit plugin by Lucidious89 since it appears in the error message. I downloaded the latest version. No changes.
What else might be causing this problem? I tried changing the trainer battle to 3v3. The error message only pops up twice.
I think I figured out what's causing this error but not yet how to fix it.
First, a little detail on the custom ability that's associated with this error.I'll paste the code here later. These abilities have four parts: Part 1 affects damage calculation when an enemy deals damage to the ability-user if the enemy's move is a certain type. Part 2 affects damage calculation when an enemy deals damage to the ability user's ally if the enemy's move is the same type as part 1. Part 3 is the same as part 1, but for a different type. Part 4 is the same as part 2, but with the same type as part 3.
Here's the code:
I think this error message is caused by the trainer AI handling not knowing how to calculate damage when this kind of ability is on a Pokémon being used by the computer trainer, if the trainer class' skill level is high enough. The game is trying to take the ability into consideration but when it searches the the ability class tag and tries to search for what to do with that information, it doesn't find anything. When I test battle against a youngster trainer (skill level not set) the error message doesn't pop up, but if the same Pokémon are used by a Team Rocket M/F trainer (skill level = 32) or a similarly allocated trainer class the message appears.
I'm still testing whether the pop-up always occurs, if the game has to detect whether the opponent has any moves that would be affected by the ability, which parts of 1~4 are specifically causing the error message, and whether I can figure out how to simply make the error stop appearing without needing to rewrite/replace these abilities. For now my solution is to not use the Pokémon with these abilities on trainer classes with a skill level allocated. Youngsters and picnickers work fine with these abilities.
Ideally the trainer AI doesn't need to calculate and predict what the player will do when using a Pokémon with one of these abilities. Here's an example from the fangame project that started this post: Houndoom's ability Malice multiplies the power of foes' fighting and ghost type moves by 0.5. Mitigates Houndoom's weakness to fighting and makes Houndoom take only 25% damage from ghost instead of 50%. If the player currently has a fighting-type on the field, and the AI trainer using Houndoom isn't set to be smart enough to hard switch Houndoom off the field, what is the AI trainer trying to do with all this information? If you're not going to hard switch out at that point and the Houndoom set doesn't have any pivoting moves such as U-Turn then it's not going to switch out anyway. Maybe prioritize trying to KO the player's fighting-type Pokémon?
[Pokémon Essentials version 21.1][v21.1 Hotfixes 1.0.9]Exception: NoMethodErrorMessage: undefined method `battler' for #<Battle::Battler>Backtrace:AI_MoveEffects_MoveAttributes:118:in `block (2 levels) in <main>'AI_MoveEffects_MoveAttributes:117:in `each'AI_MoveEffects_MoveAttributes:117:in `block in <main>'Event_Handlers:139:in `trigger'Battle_AI:111:in `apply_move_effect_against_target_score'[Deluxe Battle Kit] [002] Misc Utilities.rb:529:in `pbGetMoveScoreAgainstTarget'AI_ChooseMove:250:in `block in pbGetMoveScore'AI_ChooseMove:247:in `each'AI_ChooseMove:247:in `pbGetMoveScore'[Deluxe Battle Kit] [003] Command Menu Refactor.rb:522:in `block (3 levels) in pbGetMoveScores'While testing in debug mode the console shows:
Exception `NoMethodError at Section214:118 - undefined method `battler' for #<Battle::Battler>This message appears in the console each time the error message pops up.
Here's the scenario:
2v2 trainer battle. Opponent is using Houndoom and Stantler which are both level 30. I don't think the player's Pokémon matters since I've been trying a few different combinations and the same message appears. I think the issue is that the game is trying to prioritize which move and/or target to use the move on, but the game ties somehow. I've also tried this in a very similar setup where the opponent trainer uses Houndoom alongside Girafarig and the same error occurs. The second error message is exactly the same as the first one. I put it into a text comparison site to check.
The moves used by all four participants in the battle are able to use their moves without issue. The error message pops up twice, which I think is once for the Houndoom and once for the Stantler since they're tied and both produce the error message. Once either of the opponent's Pokémon are knocked out the error message no longer pops up. Every turn that starts where both the Houndoom and Stantler are still in battle the error message pops up twice at the start of resolving the chosen actions for that turn.
The game doesn't crash after these pop-ups. If I click OK to get rid of the window and continue playing through the battle it continues normally.
All the Pokémon involved in this scenario have moves and abilities that resolve without issue. I don't think this is caused by one of my custom changes. Other trainer variants that don't use Houndoom alongside either Girafarig or Stantler don't cause any error message, so for now my solution to this strange error is to avoid having trainers use these combinations.
I'm also getting this error with Ninetales. I thought it might be a custom ability format since these two have a certain ability format, but when I replaced the Ninetales (and earlier the Houndoom) with different Pokémon that have abilities using the same format, I don't get any error message.
I checked my installation of the Deluxe Battle Kit plugin by Lucidious89 since it appears in the error message. I downloaded the latest version. No changes.
What else might be causing this problem? I tried changing the trainer battle to 3v3. The error message only pops up twice.
I think I figured out what's causing this error but not yet how to fix it.
First, a little detail on the custom ability that's associated with this error.
Here's the code:
Battle::AbilityEffects::DamageCalcFromTarget.add(:MALICE, proc { |ability, user, target, move, mults, power, type| mults[:power_multiplier] /= 2 if type == :FIGHTING })Battle::AbilityEffects::DamageCalcFromTargetAlly.add(:MALICE, proc { |ability, user, target, move, mults, power, type| mults[:power_multiplier] /= 2 if type == :FIGHTING })Battle::AbilityEffects::DamageCalcFromTarget.add(:MALICE, proc { |ability, user, target, move, mults, power, type| mults[:power_multiplier] /= 2 if type == :GHOST })Battle::AbilityEffects::DamageCalcFromTargetAlly.add(:MALICE, proc { |ability, user, target, move, mults, power, type| mults[:power_multiplier] /= 2 if type == :GHOST })I think this error message is caused by the trainer AI handling not knowing how to calculate damage when this kind of ability is on a Pokémon being used by the computer trainer, if the trainer class' skill level is high enough. The game is trying to take the ability into consideration but when it searches the the ability class tag and tries to search for what to do with that information, it doesn't find anything. When I test battle against a youngster trainer (skill level not set) the error message doesn't pop up, but if the same Pokémon are used by a Team Rocket M/F trainer (skill level = 32) or a similarly allocated trainer class the message appears.
I'm still testing whether the pop-up always occurs, if the game has to detect whether the opponent has any moves that would be affected by the ability, which parts of 1~4 are specifically causing the error message, and whether I can figure out how to simply make the error stop appearing without needing to rewrite/replace these abilities. For now my solution is to not use the Pokémon with these abilities on trainer classes with a skill level allocated. Youngsters and picnickers work fine with these abilities.
Ideally the trainer AI doesn't need to calculate and predict what the player will do when using a Pokémon with one of these abilities. Here's an example from the fangame project that started this post: Houndoom's ability Malice multiplies the power of foes' fighting and ghost type moves by 0.5. Mitigates Houndoom's weakness to fighting and makes Houndoom take only 25% damage from ghost instead of 50%. If the player currently has a fighting-type on the field, and the AI trainer using Houndoom isn't set to be smart enough to hard switch Houndoom off the field, what is the AI trainer trying to do with all this information? If you're not going to hard switch out at that point and the Houndoom set doesn't have any pivoting moves such as U-Turn then it's not going to switch out anyway. Maybe prioritize trying to KO the player's fighting-type Pokémon?
Last edited: