• 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!
Deluxe Battle Kit [v21.1]

Resource Deluxe Battle Kit [v21.1] v1.2

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,189
Hello, this problem occurs when ditto uses transformation. (I don't have the tera script, only dynamax)

[2024-09-04 07:08:53 -0300]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]
[SKY BASE version 1.0.7]
Exception: NoMethodError
Message: undefined method `tera_pbMoveFailed?' for #<Battle::Move::TransformUserIntoTarget>

Trace:
[Deluxe Battle Kit] [005] Updated Effects.rb:590:in `pbMoveFailed?'
Battler_UseMove:295:in `pbUseMove'
[[DBK] Dynamax] [012] Battle_Battler.rb:92:in `pbUseMove'
[[DBK] Animated Pokémon System] [007] Substitute Doll.rb:82:in `pbUseMove'
[Deluxe Battle Kit] [001] Animation Utilities.rb:265:in `block in pbProcessTurn'
PBDebug:6:in `logonerr'
[Deluxe Battle Kit] [001] Animation Utilities.rb:265:in `pbProcessTurn'
Battle_AttackPhase:128:in `block (2 levels) in pbAttackPhaseMoves'
Battle_AttackPhase:124:in `each'
Battle_AttackPhase:124:in `block in pbAttackPhaseMoves'
This has already been fixed a while ago. Even if you think you're on the latest version, reinstall the plugin anyway.
 

E4Artemy

Novice
Member
Joined
Dec 3, 2023
Posts
17
My game just crashes when I try to recompile to use the plugin, without a single error message, it simply closes. I guess it may be a incompatibility with another plugin. My bets are Visible Overworld Wild Encounters, Automatic Level Scaling or Following Pokemon EX. I don't use any other relevant plugins and I rly wanted to add DBK :<
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,189
My game just crashes when I try to recompile to use the plugin, without a single error message, it simply closes. I guess it may be a incompatibility with another plugin. My bets are Visible Overworld Wild Encounters, Automatic Level Scaling or Following Pokemon EX. I don't use any other relevant plugins and I rly wanted to add DBK :<
Ive never used any of those, so idk. Have you tested on a clean copy? Or removed the other plugins one by one to detect the issue?
 

E4Artemy

Novice
Member
Joined
Dec 3, 2023
Posts
17
Ive never used any of those, so idk. Have you tested on a clean copy? Or removed the other plugins one by one to detect the issue?
So... I was using an older version of Modular UI Scene 🤡 It was a lot of time to finally find the problem. Thanks for your reply!
 

E4Artemy

Novice
Member
Joined
Dec 3, 2023
Posts
17
Sorry for the double post, but here comes a new problem. I read Safari Zone had an issue, so I download and reinstalled the plugin twice, but I have this message:
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Script error in event 4 (coords 22,21), map 68 (Safari Zone)
Exception: NoMethodError
Message: undefined method `visible' for nil:NilClass

***Full script:
$PokemonGlobal.battlingSpawnedPokemon = true
pbSingleOrDoubleWildBattle( [imath]map_factory.getMap(68).events[4].map.map_id,[/imath]map_factory.getMap(68).events[4].x, [imath]map_factory.getMap(68).events[4].y,[/imath]map_factory.getMap(68).events[4].pokemon )
$PokemonGlobal.battlingSpawnedPokemon = false
pbResetTempAfterBattle()
$map_factory.getMap(68).removeThisEventfromMap(4)

Backtrace:
[[DBK] Enhanced Battle UI] [002] Selection Menu.rb:277:in `block in pbCommandMenuEx'
[[DBK] Enhanced Battle UI] [002] Selection Menu.rb:274:in `loop'
[[DBK] Enhanced Battle UI] [002] Selection Menu.rb:274:in `pbCommandMenuEx'
SafariBattle:233:in `pbSafariCommandMenu'
[Deluxe Battle Kit] [001] Animation Utilities.rb:293:in `block in pbStartBattle'
[Deluxe Battle Kit] [001] Animation Utilities.rb:292:in `loop'
[Deluxe Battle Kit] [001] Animation Utilities.rb:292:in `pbStartBattle'
SafariZone:133:in `block (2 levels) in pbSafariBattle'
Overworld_BattleIntroAnim:55:in `pbSceneStandby'
SafariZone:133:in `block in pbSafariBattle'
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,189
Sorry for the double post, but here comes a new problem. I read Safari Zone had an issue, so I download and reinstalled the plugin twice, but I have this message:
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Script error in event 4 (coords 22,21), map 68 (Safari Zone)
Exception: NoMethodError
Message: undefined method `visible' for nil:NilClass

***Full script:
$PokemonGlobal.battlingSpawnedPokemon = true
pbSingleOrDoubleWildBattle( [imath]map_factory.getMap(68).events[4].map.map_id,[/imath]map_factory.getMap(68).events[4].x, [imath]map_factory.getMap(68).events[4].y,[/imath]map_factory.getMap(68).events[4].pokemon )
$PokemonGlobal.battlingSpawnedPokemon = false
pbResetTempAfterBattle()
$map_factory.getMap(68).removeThisEventfromMap(4)

Backtrace:
[[DBK] Enhanced Battle UI] [002] Selection Menu.rb:277:in `block in pbCommandMenuEx'
[[DBK] Enhanced Battle UI] [002] Selection Menu.rb:274:in `loop'
[[DBK] Enhanced Battle UI] [002] Selection Menu.rb:274:in `pbCommandMenuEx'
SafariBattle:233:in `pbSafariCommandMenu'
[Deluxe Battle Kit] [001] Animation Utilities.rb:293:in `block in pbStartBattle'
[Deluxe Battle Kit] [001] Animation Utilities.rb:292:in `loop'
[Deluxe Battle Kit] [001] Animation Utilities.rb:292:in `pbStartBattle'
SafariZone:133:in `block (2 levels) in pbSafariBattle'
Overworld_BattleIntroAnim:55:in `pbSceneStandby'
SafariZone:133:in `block in pbSafariBattle'
I know. The Safari Zone being bugged is practically a meme with how regularly it happens with literally everything I make. Ill get around to releasing a fix at some point, when im not feeling lazy.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,189
Lucidious89 updated Deluxe Battle Kit [v21.1] with a new update entry:

v1.2 Update

  • Fixed an error that would occur when the AI attempted to use a Self-KO move.
  • Fixed an error that would occur when a wild boss Pokemon was given immunity to indirect damage.
  • Added a new audio file for the correct item sound effect when a trainer uses items from the inventory on a battler.
  • Made it so that both the AI and player can now Terastallize and/or Dynamax their Pokemon in battle in more situations.

Read the rest of this update entry...
 

komeiji514

Elite Trainer
Member
Joined
Oct 28, 2023
Posts
259
A minor overlook in Damage Calc Refactor. Function code of Psyblade("IncreasePowerInElectricTerrain") is still "IncreasePowerWhileElectricTerrain" there.
 

LPS1983

Rookie
Member
Joined
May 20, 2024
Posts
2
Lucidious89 submitted a new resource:

Deluxe Battle Kit [v21.1] - A battle expansion kit which allows you to completely customize your battles!



Read more about this resource...
Hi! I'm making a fangame and I wanted to make super shinies have different sprites than normal ones. I saw that the essentials deluxe plugin for v20.1 had this option. So, does this one have it too? If not, is it possible to add it by copying the files from the previous version and pasting them into this plugin? Thank you in advance.
 

komeiji514

Elite Trainer
Member
Joined
Oct 28, 2023
Posts
259
Hi! I'm making a fangame and I wanted to make super shinies have different sprites than normal ones. I saw that the essentials deluxe plugin for v20.1 had this option. So, does this one have it too? If not, is it possible to add it by copying the files from the previous version and pasting them into this plugin? Thank you in advance.
That function is in Animated Pokemon System now. Though you may not use any of animated sprites, the new mechanics can still be applied.
 

Airgetfrog

Rookie
Member
Joined
Jun 26, 2024
Posts
1
After some time puzzling over a bug in my game, I've realized that the overwrites for Pokemon included in Deluxe Battle Rules.rb break clone functionality. Because the various setters all clear values rather than reinitializing an empty object, the cloned Pokemon retains references to the values in the original Pokemon (the intial values are retained from Pokemon.clone, which uses Kernel.clone before attempting to set them with a new object). This also has the side effect of immediately clearing all stats on the original copy. I assume this also breaks Shedinja.

Would be nice to see this fixed

EDIT: On further investigation, the EV limit calculation in the same method is also bugged for arrays and hashes, resulting in fewer EVs being allocated than intended (values are added to the EV total before being checked against it, resulting in unnecessary clamping).
 
Last edited:

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,189
A minor overlook in Damage Calc Refactor. Function code of Psyblade("IncreasePowerInElectricTerrain") is still "IncreasePowerWhileElectricTerrain" there.
Gotcha.

Hi! I'm making a fangame and I wanted to make super shinies have different sprites than normal ones. I saw that the essentials deluxe plugin for v20.1 had this option. So, does this one have it too? If not, is it possible to add it by copying the files from the previous version and pasting them into this plugin? Thank you in advance.
That function is in Animated Pokemon System now. Though you may not use any of animated sprites, the new mechanics can still be applied.
The Animated Pokemon System plugin allows for Super Shiny sprites to be given a different hue to differentiate them from normal shinies. It does not allow for Super Shinys to have their own independent sprites. Neither that plugin or this one provides that feature. A raw copy/paste from Essentials Deluxe would not suffice, because it is deeply tied into G-Max sprites, which the new version of Dynamax no longer uses.

The only reason that feature existed in Essentials Deluxe was because I already had to jump through hoops to allow for G-Max Pokemon to have their own sprites (G-Max sprites back then were implemented more like Shadow Pokemon, rather than forms). Because I was already going through all the trouble of adding new sprite folders, I threw in additional folder pathways for Super Shinies too as a secondary "might as well" addition. The new version of the Dynamax mechanic simplifies G-Max sprites to work just like regular forms, so I no longer need to include all of the tedious code reworking the entire sprite pathways, and thus, I no longer have any reason to include the same thing for Super Shinies. The Super Shiny stuff was just kind of an afterthought to me, so it was one of the first things I cut when trimming things down for this plugin.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,189
After some time puzzling over a bug in my game, I've realized that the overwrites for Pokemon included in Deluxe Battle Rules.rb break clone functionality. Because the various setters all clear values rather than reinitializing an empty object, the cloned Pokemon retains references to the values in the original Pokemon (the intial values are retained from Pokemon.clone, which uses Kernel.clone before attempting to set them with a new object). This also has the side effect of immediately clearing all stats on the original copy. I assume this also breaks Shedinja.

Would be nice to see this fixed

EDIT: On further investigation, the EV limit calculation in the same method is also bugged for arrays and hashes, resulting in fewer EVs being allocated than intended (values are added to the EV total before being checked against it, resulting in unnecessary clamping).
I think I kinda get what the issue is. This all sounds really annoying. I'll look into it at some point.
 

delusionsofgrandr

Novice
Member
Joined
Aug 10, 2024
Posts
25
Hi, I'm trying to code a battle where the boss Pokemon in a 2v1 battle will set up Stealth Rock if it gets hit by a super effective move. I've been trying to do so by using the teamEffects command, but basically everything happens except for the actual Stealth Rock being set up. Would you mind taking a look at my code and pointing out where I've gone wrong?

This is how I've set up the script/code:

Ruby:
Expand Collapse Copy
    "TargetWeakToMove_foe_repeat" => {
      "playCry"       => :Self,
      "text_A"          => [:Self, "{1} roared in anger!"],
      "playAnim"     => [:STEALTHROCK, :Self, :Opposing],     
      "teamEffects_player" => [:StealthRock, 2], #this doesn't seem to work
      "teamEffects_ally" => [:StealthRock, 2],  #this doesn't work either
      "text_B"        => [:Self, "It flung a fistful of rocks at your team's feet!"]
    },

Thank you!
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,189
Hi, I'm trying to code a battle where the boss Pokemon in a 2v1 battle will set up Stealth Rock if it gets hit by a super effective move. I've been trying to do so by using the teamEffects command, but basically everything happens except for the actual Stealth Rock being set up. Would you mind taking a look at my code and pointing out where I've gone wrong?

This is how I've set up the script/code:

Ruby:
Expand Collapse Copy
    "TargetWeakToMove_foe_repeat" => {
      "playCry"       => :Self,
      "text_A"          => [:Self, "{1} roared in anger!"],
      "playAnim"     => [:STEALTHROCK, :Self, :Opposing],    
      "teamEffects_player" => [:StealthRock, 2], #this doesn't seem to work
      "teamEffects_ally" => [:StealthRock, 2],  #this doesn't work either
      "text_B"        => [:Self, "It flung a fistful of rocks at your team's feet!"]
    },

Thank you!
You're setting Stealth Rocks to 2, which doesnt make any sense. Stealth Rocks doesnt set layers like Spikes or Toxic Spikes do. Stealth Rocks is more like Sticky Web in that its just either active or inactive (true or false).
 

delusionsofgrandr

Novice
Member
Joined
Aug 10, 2024
Posts
25
You're setting Stealth Rocks to 2, which doesnt make any sense. Stealth Rocks doesnt set layers like Spikes or Toxic Spikes do. Stealth Rocks is more like Sticky Web in that its just either active or inactive (true or false).
Ah, thank you! It didn't work when I set it to "true" either, though. I tried changing it to 2 to see if that had any effect and forgot to change it back.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,189
Ah, thank you! It didn't work when I set it to "true" either, though. I tried changing it to 2 to see if that had any effect and forgot to change it back.
Ah, I know why. It's actually working fine and completely as intended. The issue is just that it's setting Stealth Rocks on the opponent's side. Which makes total sense if you read what your script is doing. It's saying "when the target foe is hit with a Super Effective move, start the Stealth Rocks effect on the team." Because this midbattle trigger is activating on the opponent, the "team" it's referring to in this scenario is the opponent's team.

This is exactly where the "setBattler" utility command is meant to be used. For instances where a trigger activates on a certain Pokemon, but you want the target of the effects to actually trigger on a different battler/side. So, to accomplish what you want with this script, you just need to set the battler to one of the player's Pokemon by setting it to any battler index on the player's side (0, 2, 4, etc), or you can just use :Opposing in this case, and it will set the battler to whoever is currently opposing the original battler who activated the trigger. In this case, the foe activated the trigger, which means the opponent of the foe would be your Pokemon.

Here's an example of a cleaned up script that will do what you want:
Ruby:
Expand Collapse Copy
"TargetWeakToMove_foe" => {
    "playCry"     => :Self,
    "text"        => "{1} roared in anger!",
    "playAnim"    => [:STEALTHROCK, :Self, :Opposing],
    "setBattler"  => :Opposing,
    "teamEffects" => [:StealthRock, true, "It flung a fistful of rocks at your team's feet!"]
  }
 

delusionsofgrandr

Novice
Member
Joined
Aug 10, 2024
Posts
25
Ah, I know why. It's actually working fine and completely as intended. The issue is just that it's setting Stealth Rocks on the opponent's side. Which makes total sense if you read what your script is doing. It's saying "when the target foe is hit with a Super Effective move, start the Stealth Rocks effect on the team." Because this midbattle trigger is activating on the opponent, the "team" it's referring to in this scenario is the opponent's team.

This is exactly where the "setBattler" utility command is meant to be used. For instances where a trigger activates on a certain Pokemon, but you want the target of the effects to actually trigger on a different battler/side. So, to accomplish what you want with this script, you just need to set the battler to one of the player's Pokemon by setting it to any battler index on the player's side (0, 2, 4, etc), or you can just use :Opposing in this case, and it will set the battler to whoever is currently opposing the original battler who activated the trigger. In this case, the foe activated the trigger, which means the opponent of the foe would be your Pokemon.

Here's an example of a cleaned up script that will do what you want:
Ruby:
Expand Collapse Copy
"TargetWeakToMove_foe" => {
    "playCry"     => :Self,
    "text"        => "{1} roared in anger!",
    "playAnim"    => [:STEALTHROCK, :Self, :Opposing],
    "setBattler"  => :Opposing,
    "teamEffects" => [:StealthRock, true, "It flung a fistful of rocks at your team's feet!"]
  }
Ah, thank you! I knew it was going to be a dumb oversight like that! 😅
 
Back
Top