• 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.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Deluxe Battle Kit [v21.1]

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

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,253
This is the line 65 in the code : default_target = default_battler.pbDirectOpposing if default_target.index == default_battler.index

And this is the battle script:
ARTHUR_CHAMPION = {
"BattleEndLoss" =>
{
"setSpeaker" => :Self,
"editWindow" => [nil, "speech hgss 1"],
"speech" => "Tu vas avoir besoin de plus d'entrainement si tu veux mon badge."
},
"BeforeLastSwitchIn_foe" =>
{
"setSpeaker" => :Self,
"editWindow" => [nil, "speech hgss 1"],
"speech" => "Il reste plus qu'toi Teddiursa.\nJ'ai confiance en toi."
},
"AfterLastSwitchIn_player" =>
{
"setSpeaker" => :Opposing,
"editWindow" => [nil, "speech hgss 1"],
"speech" => "Dos au mur mais t'abandonnes pas.\nC'est ça que j'veux voir!"
},
}

It appears that the "setSpeaker" function doesn't work with "BeforeLastSwitchIn", indeed, I managed to make it work by using an "AfterLastSwitchIn".
And this is with the latest version of the plugin installed? I thought this was fixed already.
 

Erra'

Rookie
Member
Joined
Jun 30, 2024
Posts
3
And this is with the latest version of the plugin installed? I thought this was fixed already.
Name = Deluxe Battle Kit
Version = 1.2.4
Essentials = 21.1
Requires = v21.1 Hotfixes,1.0.9
Optional = Generation 9 Pack,3.2.9
Optional = Generation 8 Pack Scripts,1.0
Optional = Bag Screen w/int. Party,2.5
Optional = Customizable Battle UI,1.0
Optional = Modular UI Scenes,2.0.8
Conflicts = Essentials Deluxe,1.0
Conflicts = Mid Battle Dialogue,1.0
Conflicts = Elite Battle: DX,1.0
Conflicts = SOS Battles,1.0
Conflicts = Rejuv-style Bosses,1.0
Website = https://lucidious89-tutorials.gitbook.io/deluxe-battle-kit-tutorial
Credits = Lucidious89

There is the meta.txt file, I'm quite sure this is the latest version!
 

Fossilized_Nerd

Novice
Member
Joined
Mar 24, 2017
Posts
16
Just a general question, because I know this is something that isn't necessarily designed to collaborate with other similar systems - has anyone (creator included) tested if this plugin can coexist in the same game as a game using EBDX? The functionality here for in-battle scenes is phenomenal, and EBDX allows for some of these but is far more visually-focused than DBK - if the two could be utilized in tandem, it would be a real game-changer.
 

Willøw

Main Dev of Pokemon Oraculum
Member
Joined
Nov 1, 2023
Posts
109
Just a general question, because I know this is something that isn't necessarily designed to collaborate with other similar systems - has anyone (creator included) tested if this plugin can coexist in the same game as a game using EBDX? The functionality here for in-battle scenes is phenomenal, and EBDX allows for some of these but is far more visually-focused than DBK - if the two could be utilized in tandem, it would be a real game-changer.
Lucidious made DBK Incompatible with EBDX on purpose, they don't work together, and if you really want they to work together, you will need a lot of work and ruby knowledge
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,253
Just a general question, because I know this is something that isn't necessarily designed to collaborate with other similar systems - has anyone (creator included) tested if this plugin can coexist in the same game as a game using EBDX? The functionality here for in-battle scenes is phenomenal, and EBDX allows for some of these but is far more visually-focused than DBK - if the two could be utilized in tandem, it would be a real game-changer.
As mentioned, I specifically made it so DBK wouldnt be compatible with EBDX. The current version of EBDX for v21.1 is an unofficial port, and I don't want to support it. I already made my own plugin for animated Pokemon sprites, anyway.

As for the battle scene, id rather wait for Luka's official release of his Scenic Battles plugin.
 

Fossilized_Nerd

Novice
Member
Joined
Mar 24, 2017
Posts
16
As mentioned, I specifically made it so DBK wouldnt be compatible with EBDX. The current version of EBDX for v21.1 is an unofficial port, and I don't want to support it. I already made my own plugin for animated Pokemon sprites, anyway.

As for the battle scene, id rather wait for Luka's official release of his Scenic Battles plugin.
Makes sense, EBDX has been difficult to utilize with how much of it is outside the realm of Essentials, I will concede (not to disparage the work of the guy who ported it and did quite a decent job). The scenery has been the biggest reason our project has stuck with EBDX next to the Gen 5 style camera panning for idle waiting.

I had no idea a Scenic Battles plugin was in the works! I'll definitely keep an eye out, TY for mentioning that
 

Bguy7

Pokémon Sol Version Creator
Member
Joined
Jul 1, 2024
Posts
33
Hello! When trying to use the plug-in for making mid-battle scripts, I got this error:
[2025-02-16 16:43:15 +0000]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: NoMethodError
Message: undefined method `index' for nil:NilClass

Backtrace:
[Deluxe Battle Kit] [002] Midbattle Triggers.rb:65:in `block in <main>'
[Deluxe Battle Kit] [002] Midbattle Triggers.rb:36:in `trigger'
[Deluxe Battle Kit] [000] Midbattle Animations.rb:175:in `pbConvertBattlerIndex'
[Deluxe Battle Kit] [000] Midbattle Animations.rb:296:in `pbShowSpeaker'
[Deluxe Battle Kit] [002] Midbattle Triggers.rb:248:in `block in <main>'
[Deluxe Battle Kit] [002] Midbattle Triggers.rb:36:in `trigger'
[Deluxe Battle Kit] [001] Midbattle Overwrites.rb:198:in `block (3 levels) in pbMidbattleScripting'
[Deluxe Battle Kit] [001] Midbattle Overwrites.rb:196:in `each'
[Deluxe Battle Kit] [001] Midbattle Overwrites.rb:196:in `block (2 levels) in pbMidbattleScripting'
[Deluxe Battle Kit] [001] Midbattle Overwrites.rb:160:in `each_key'

This is an old battle that was working on previous versions of my game, I believe an update of the deluxe battle kit could have broken it? To be honest I'm quite lost I don't know how to deal with this haha

I wanted to report that I got pretty much the same error as this after recently updating to the most current version. The mid-battle script worked fine before the update, but now there's a problem. The issue comes into play when a battle is set to have a message appear every time after a certain move is used, and that specific move knocks out the target. The message usually works fine, it's only when your Pokémon has been knocked out that it creates an issue.

Here's the error message:

Exception: NoMethodError
Message: undefined method `index' for nil:NilClass

Backtrace:
[Deluxe Battle Kit] [002] Midbattle Triggers.rb:65:in `block in <main>'
[Deluxe Battle Kit] [002] Midbattle Triggers.rb:36:in `trigger'
[Deluxe Battle Kit] [000] Midbattle Animations.rb:175:in `pbConvertBattlerIndex'
[Deluxe Battle Kit] [000] Midbattle Animations.rb:296:in `pbShowSpeaker'
[Deluxe Battle Kit] [002] Midbattle Triggers.rb:248:in `block in <main>'
[Deluxe Battle Kit] [002] Midbattle Triggers.rb:36:in `trigger'
[Deluxe Battle Kit] [001] Midbattle Overwrites.rb:198:in `block (3 levels) in pbMidbattleScripting'
[Deluxe Battle Kit] [001] Midbattle Overwrites.rb:196:in `each'
[Deluxe Battle Kit] [001] Midbattle Overwrites.rb:196:in `block (2 levels) in pbMidbattleScripting'
[Deluxe Battle Kit] [001] Midbattle Overwrites.rb:160:in `each_key'

Here's the mid-battle script:

"AfterMove_PLANETARYLASER_repeat" => { "setSpeaker" => :Opposing,
"editWindow" => ["Polaris", "choice 1"],
"speech" => ["Recharging!"]}

And here's line 65, in case you want that again:

default_target = default_battler.pbDirectOpposing(true) if default_target.index == default_battler.index
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,253
I wanted to report that I got pretty much the same error as this after recently updating to the most current version. The mid-battle script worked fine before the update, but now there's a problem. The issue comes into play when a battle is set to have a message appear every time after a certain move is used, and that specific move knocks out the target. The message usually works fine, it's only when your Pokémon has been knocked out that it creates an issue.

Here's the error message:

Exception: NoMethodError
Message: undefined method `index' for nil:NilClass

Backtrace:
[Deluxe Battle Kit] [002] Midbattle Triggers.rb:65:in `block in <main>'
[Deluxe Battle Kit] [002] Midbattle Triggers.rb:36:in `trigger'
[Deluxe Battle Kit] [000] Midbattle Animations.rb:175:in `pbConvertBattlerIndex'
[Deluxe Battle Kit] [000] Midbattle Animations.rb:296:in `pbShowSpeaker'
[Deluxe Battle Kit] [002] Midbattle Triggers.rb:248:in `block in <main>'
[Deluxe Battle Kit] [002] Midbattle Triggers.rb:36:in `trigger'
[Deluxe Battle Kit] [001] Midbattle Overwrites.rb:198:in `block (3 levels) in pbMidbattleScripting'
[Deluxe Battle Kit] [001] Midbattle Overwrites.rb:196:in `each'
[Deluxe Battle Kit] [001] Midbattle Overwrites.rb:196:in `block (2 levels) in pbMidbattleScripting'
[Deluxe Battle Kit] [001] Midbattle Overwrites.rb:160:in `each_key'

Here's the mid-battle script:

"AfterMove_PLANETARYLASER_repeat" => { "setSpeaker" => :Opposing,
"editWindow" => ["Polaris", "choice 1"],
"speech" => ["Recharging!"]}

And here's line 65, in case you want that again:

default_target = default_battler.pbDirectOpposing(true) if default_target.index == default_battler.index
Try replacing that handler with this, and tell me if it resolves things. I'm not able to check myself right now.
Ruby:
Expand Collapse Copy
#-------------------------------------------------------------------------------
# Sets a new battler as the focus.
#-------------------------------------------------------------------------------
MidbattleHandlers.add(:midbattle_triggers, "setBattler",
  proc { |battle, idxBattler, idxTarget, params|
    idxBattler = 0 if idxBattler.nil? || !battle.battlers[idxBattler]
    default_battler = battle.battlers[idxBattler]
    if default_battler.fainted?
      side = battle.allSameSideBattlers(idxBattler)
      default_battler = side.first if !side.empty?
    end
    idxTarget = 1 if idxTarget.nil? || !battle.battlers[idxTarget]
    default_target = battle.battlers[idxTarget]
    if default_target.fainted?
      side = battle.allSameSideBattlers(idxTarget)
      default_target = side.first if !side.empty?
    end
    default_target = default_battler.pbDirectOpposing(true) if default_target.index == default_battler.index
    case params
    when Integer        then targ = battle.battlers[params] || default_battler
    when :Self          then targ = default_battler
    when :Ally          then targ = default_battler.allAllies.first || default_battler
    when :Ally2         then targ = default_battler.allAllies.last  || default_battler
    when :Opposing      then targ = default_target
    when :OpposingAlly  then targ = default_target.allAllies.first  || default_target
    when :OpposingAlly2 then targ = default_target.allAllies.last   || default_target
    end
    targ = default_battler if !targ
    PBDebug.log("     'setBattler': finding battler #{targ.name} (#{targ.index})...")
    next targ
  }
)
 

Bguy7

Pokémon Sol Version Creator
Member
Joined
Jul 1, 2024
Posts
33
Try replacing that handler with this, and tell me if it resolves things. I'm not able to check myself right now.
Ruby:
Expand Collapse Copy
#-------------------------------------------------------------------------------
# Sets a new battler as the focus.
#-------------------------------------------------------------------------------
MidbattleHandlers.add(:midbattle_triggers, "setBattler",
  proc { |battle, idxBattler, idxTarget, params|
    idxBattler = 0 if idxBattler.nil? || !battle.battlers[idxBattler]
    default_battler = battle.battlers[idxBattler]
    if default_battler.fainted?
      side = battle.allSameSideBattlers(idxBattler)
      default_battler = side.first if !side.empty?
    end
    idxTarget = 1 if idxTarget.nil? || !battle.battlers[idxTarget]
    default_target = battle.battlers[idxTarget]
    if default_target.fainted?
      side = battle.allSameSideBattlers(idxTarget)
      default_target = side.first if !side.empty?
    end
    default_target = default_battler.pbDirectOpposing(true) if default_target.index == default_battler.index
    case params
    when Integer        then targ = battle.battlers[params] || default_battler
    when :Self          then targ = default_battler
    when :Ally          then targ = default_battler.allAllies.first || default_battler
    when :Ally2         then targ = default_battler.allAllies.last  || default_battler
    when :Opposing      then targ = default_target
    when :OpposingAlly  then targ = default_target.allAllies.first  || default_target
    when :OpposingAlly2 then targ = default_target.allAllies.last   || default_target
    end
    targ = default_battler if !targ
    PBDebug.log("     'setBattler': finding battler #{targ.name} (#{targ.index})...")
    next targ
  }
)

That did indeed resolve the issue. Thanks.
 

The_Bird_King

Novice
Member
Joined
Sep 3, 2024
Posts
13
So I am not sure what I am doing wrong here, the game runs but the effect does not happen in battle (I want the gym leader to get a stats boost each turn):

setBattleRule("midbattleScript",
"TurnStart_foe" => {
"setBattler" => :Opposing,
"battlerStats" => [:RANDOM,1]}
)
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,253
So I am not sure what I am doing wrong here, the game runs but the effect does not happen in battle (I want the gym leader to get a stats boost each turn):

setBattleRule("midbattleScript",
"TurnStart_foe" => {
"setBattler" => :Opposing,
"battlerStats" => [:RANDOM,1]}
)
Two things:

1) :Opposing of "TurnStart_foe" would be the player's Pokemon. Because the opponent of your opponent is you.

2) It's :Random not :RANDOM.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,253
One more question, is there a way to set this so it happens every turn?
TurnStart_foe_repeat

But only if this is a 1v1 battle, becaue this will trigger every turn for each foe. If it's not a 1v1 battle, then use RoundStart instead of TurnStart.
 

The_Bird_King

Novice
Member
Joined
Sep 3, 2024
Posts
13
TurnStart_foe_repeat

But only if this is a 1v1 battle, becaue this will trigger every turn for each foe. If it's not a 1v1 battle, then use RoundStart instead of TurnStart.
Thank you, I teach a middle school video game design class and we are using this mod to add some basic programming language to the class and the kids are coming up with all sorts of crazy boss battle ideas, they love it!
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,253
Thank you, I teach a middle school video game design class and we are using this mod to add some basic programming language to the class and the kids are coming up with all sorts of crazy boss battle ideas, they love it!
That's really cool to hear, I never imagined this being used as an educational tool. I think that's the coolest application of this that I've heard of so far.
 
Back
Top