• 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.3

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,231
Lucidious89 submitted a new resource:

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

Deluxe Battle Kit for v21.1
A battle expansion kit which adds a ton of new features and allows you to completely customize your battles!

8zqakyX.gif
source.gif


Overview
This plugin is the spiritual successor to...

Read more about this resource...
 

Victorcarvalhosp

Novice
Member
Joined
Jan 19, 2021
Posts
32
That is awesome!! Hope we can have Dynamax and z-moves soon! These are the only things that are holding me back to update to v21.

The work you've been doing in the Pokémon Essentials is just so amazing! I really appreciate it!
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,231
does this work with addons that change the style of the battle ui?
This doesn't affect battle UI at all, so it should. This plugin should be set to load after any of those add-ons though, since it does alias a few methods that UI plugins might theoretically need to edit for some reason.
 

Jangajinx

An Overly Ambitious Developer
Member
Joined
Apr 21, 2023
Posts
213
The legend has returned! Essential for any essential projects! Much love to you so hyped for this release!
 

komeiji514

Elite Trainer
Member
Joined
Oct 28, 2023
Posts
275
After a raid style capture the bug happens but the game doesn't crash. By the way, when my Pokémon use multi-strike moves to knock foe down, capture comes earlier than effects and hit times, at least when I use Surging Strike.
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.6]

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

Backtrace:
[[MUI] Enhanced Pokemon UI] [002] Legacy Data.rb:162:in `pbFaint'
Battler_UseMove:701:in `block in pbProcessMoveHit'
Battler_UseMove:701:in `each'
Battler_UseMove:701:in `pbProcessMoveHit'
Battler_UseMove:409:in `block in pbUseMove'
Battler_UseMove:407:in `times'
Battler_UseMove:407:in `pbUseMove'
[Deluxe Battle Kit] [002] Misc Utilities.rb:78:in `pbUseMove'
[Deluxe Battle Kit] [001] Animation Utilities.rb:188:in `block in pbProcessTurn'
PBDebug:6:in `logonerr'
Seems that the former is the fault of Enhanced Pokemon UI.
 

Eskiss

Novice
Member
Joined
Oct 23, 2022
Posts
35
I have a question regarding the "ignoreUntil" statement.

I set the following :


Ruby:
Expand Collapse Copy
"BattlerReachedHPCap_foe" => {
    "speech" => "Did you think I was this weak ?",
    "battlerForm" => [3,"It unleash its true form!"],
    "battlerHP" => 1,
    "battlerStats" => [:SPECIAL_ATTACK,2],
    "addVariable" => 1
    },


"TargetHPHalf_foe_repeat" => {
    "ignoreUntil" => "Variable_1",
    "speech" => "No...I can't...",
    "text" => "Mewtwo seems weakened!",
    "battlerStats" => [:SPECIAL_ATTACK,-2,:SPEED,-2],
    "addVariable" => -1
    }

The idea was that once the battle cap has been reached, the variable goes from 0 to 1
This way it triggers the second handler "TargetHPHalf_foe_repeat" that has the condition "ignoreUntil" => "Variable_1".
If this one triggers, then it substract the variable value and make it 0 again so that, if the foe reach half it's HP again( healing then again under 50%), it should not activate again, since the Variable is now 0.

But it doesn't work this way, it activates everytime after it have been trigered once.
Does the "IgnoreUntil" statement check only once if it's true and the the ignore until is always ignored ?
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,231
I have a question regarding the "ignoreUntil" statement.

I set the following :


Ruby:
Expand Collapse Copy
"BattlerReachedHPCap_foe" => {
    "speech" => "Did you think I was this weak ?",
    "battlerForm" => [3,"It unleash its true form!"],
    "battlerHP" => 1,
    "battlerStats" => [:SPECIAL_ATTACK,2],
    "addVariable" => 1
    },


"TargetHPHalf_foe_repeat" => {
    "ignoreUntil" => "Variable_1",
    "speech" => "No...I can't...",
    "text" => "Mewtwo seems weakened!",
    "battlerStats" => [:SPECIAL_ATTACK,-2,:SPEED,-2],
    "addVariable" => -1
    }

The idea was that once the battle cap has been reached, the variable goes from 0 to 1
This way it triggers the second handler "TargetHPHalf_foe_repeat" that has the condition "ignoreUntil" => "Variable_1".
If this one triggers, then it substract the variable value and make it 0 again so that, if the foe reach half it's HP again( healing then again under 50%), it should not activate again, since the Variable is now 0.

But it doesn't work this way, it activates everytime after it have been trigered once.
Does the "IgnoreUntil" statement check only once if it's true and the the ignore until is always ignored ?
Yeah, it only triggers once. Every single unique trigger that activates during battle is stored in one giant array. The "ignoreUntil" command essentially just means "dont run this command until the specific key you entered is detected in the array." Once it is, the conditions for that "ignoreUntil" are considered to have been met for the rest of the battle.
 

RegalSword

Pokemon Itinerant Developer
Member
Joined
Feb 13, 2021
Posts
522
Disclaimer: Yes I'm working in v20 but I think this error may apply to the v21 version of this plugin as well.
Please correct me if I'm wrong since I've only recently started getting into debugging code.
So I was working on a deluxe battle scenario with the raidcapture feature.
Things are going great. The add 1 hp is working, etc etc
Then things go wrong when the script tries to call the pbraidcapture.
I run into this error:
(Below is the Essentials Deluxe v20.1 version)
Code:
Expand Collapse Copy
=================

[2024-01-19 02:44:36 -0800]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `[]' for true:TrueClass

Backtrace:
[Essentials Deluxe] Midbattle_Triggers.rb:335:in `pbFaint'
Battler_UseMove:698:in `block in pbProcessMoveHit'
Battler_UseMove:698:in `each'
Battler_UseMove:698:in `pbProcessMoveHit'
Battler_UseMove:407:in `block in pbUseMove'
Battler_UseMove:405:in `times'
Battler_UseMove:405:in `pbUseMove'
Battler_UseMove:52:in `block in pbProcessTurn'
PBDebug:6:in `logonerr'
Battler_UseMove:51:in `pbProcessTurn'
BTW, I checked and the issue is the first line of the backtrace. It's possible to get completely different lines after the first line depending on what move you used to knock out the raid Pokemon, but the [Essentials Deluxe] Midbattle_Triggers.rb:335:in `pbFaint' appears every time.

(Below is the Deluxe Battle Kit v21 version of the error):
Code:
Expand Collapse Copy
=================

[2024-01-19 02:48:10 -0800]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

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

Backtrace:
[Essentials Deluxe] Midbattle_Triggers.rb:335:in `pbFaint'
Battler_UseMove:698:in `block in pbProcessMoveHit'
Battler_UseMove:698:in `each'
Battler_UseMove:698:in `pbProcessMoveHit'
Battler_UseMove:407:in `block in pbUseMove'
Battler_UseMove:405:in `times'
Battler_UseMove:405:in `pbUseMove'
Battler_UseMove:52:in `block in pbProcessTurn'
PBDebug:6:in `logonerr'
Battler_UseMove:51:in `pbProcessTurn'

So after rigorous testing to identify just what exactly the issue was, I finally arrived at my destination.
Line 335 in midbattle_triggers, which is pbRaidStyleCapture(self, (params[2] || 0), params[0], params[1]) in v20 and pbRaidStyleCapture(self, raid[:capture_chance], raid[:flee_msg], raid[:capture_bgm]) in v21 is likely the issue, because when I change this line to pbRaidStyleCapture(self, 0, nil, nil) in v20 and pbRaidStyleCapture(self, nil, nil, nil)* in v21 respectively the raid capture feature then works as intended.
Please let me know if I made a mistake somewhere.
*Since I am working in v20 I didn't actually test the v21 version but I did notice when comparing the scripts that "chance" has been changed from 0 to nil so I assume the same change would apply here.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,231
Disclaimer: Yes I'm working in v20 but I think this error may apply to the v21 version of this plugin as well.
Please correct me if I'm wrong since I've only recently started getting into debugging code.
So I was working on a deluxe battle scenario with the raidcapture feature.
Things are going great. The add 1 hp is working, etc etc
Then things go wrong when the script tries to call the pbraidcapture.
I run into this error:
(Below is the Essentials Deluxe v20.1 version)
Code:
Expand Collapse Copy
=================

[2024-01-19 02:44:36 -0800]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `[]' for true:TrueClass

Backtrace:
[Essentials Deluxe] Midbattle_Triggers.rb:335:in `pbFaint'
Battler_UseMove:698:in `block in pbProcessMoveHit'
Battler_UseMove:698:in `each'
Battler_UseMove:698:in `pbProcessMoveHit'
Battler_UseMove:407:in `block in pbUseMove'
Battler_UseMove:405:in `times'
Battler_UseMove:405:in `pbUseMove'
Battler_UseMove:52:in `block in pbProcessTurn'
PBDebug:6:in `logonerr'
Battler_UseMove:51:in `pbProcessTurn'
BTW, I checked and the issue is the first line of the backtrace. It's possible to get completely different lines after the first line depending on what move you used to knock out the raid Pokemon, but the [Essentials Deluxe] Midbattle_Triggers.rb:335:in `pbFaint' appears every time.

(Below is the Deluxe Battle Kit v21 version of the error):
Code:
Expand Collapse Copy
=================

[2024-01-19 02:48:10 -0800]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

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

Backtrace:
[Essentials Deluxe] Midbattle_Triggers.rb:335:in `pbFaint'
Battler_UseMove:698:in `block in pbProcessMoveHit'
Battler_UseMove:698:in `each'
Battler_UseMove:698:in `pbProcessMoveHit'
Battler_UseMove:407:in `block in pbUseMove'
Battler_UseMove:405:in `times'
Battler_UseMove:405:in `pbUseMove'
Battler_UseMove:52:in `block in pbProcessTurn'
PBDebug:6:in `logonerr'
Battler_UseMove:51:in `pbProcessTurn'

So after rigorous testing to identify just what exactly the issue was, I finally arrived at my destination.
Line 335 in midbattle_triggers, which is pbRaidStyleCapture(self, (params[2] || 0), params[0], params[1]) in v20 and pbRaidStyleCapture(self, raid[:capture_chance], raid[:flee_msg], raid[:capture_bgm]) in v21 is likely the issue, because when I change this line to pbRaidStyleCapture(self, 0, nil, nil) in v20 and pbRaidStyleCapture(self, nil, nil, nil)* in v21 respectively the raid capture feature then works as intended.
Please let me know if I made a mistake somewhere.
*Since I am working in v20 I didn't actually test the v21 version but I did notice when comparing the scripts that "chance" has been changed from 0 to nil so I assume the same change would apply here.
I think you just pasted the same error message twice by accident. I don't see a v21 error message.
Also, I'm a bit confused as to when this error is actually happening. It can't just be any time the raid capture script is called, because it's literally never happened to me before. So it has to be some specific circumstances.

Edit: Oh wait, no, they aren't the same error messages. But they're both in v20? I don't understand.

Edit 2: OHHH I think I understand. Did you just literally copy the v21 code and put it in v20? Well yeah, that's obviously not gonna work, the code is implemented differently.

Looking over the first error, it seems like the issue is just that you set the parameters for the raid capture rule to "true", when it's supposed to be an array containing data for capture chance, flee message, and BGM (if any). Even if you don't want to edit any of these features, it should still be set as an empty array. It should never just be "true."
 
Last edited:

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,231
The Kit Tutorial on GitHub will not allow me access
It's down right now while I make some edits. It'll be up again in a couple of hours.
 

4AllNighterGrinder64

4 Sleepless nights to update to Teal Mask Part 1
Member
Joined
Nov 23, 2023
Posts
23
During the process of working on adding new moves such as Nerve Numb, an Electric-type version of Venom Drench that needs the opponent Pokemon to be paralyzed, I stumbled into a problem with the ability Forewarn. I just found this problem, but I will share the crash log I just got. Even after doing a small tweak to [005] Updated Effects, changing power = m.baseDamage to power = m.power, because the compiler log recommends to stop using the deprecated baseDamage variable, I still get this error message, when a Pokemon with the Forewarn ability hits the field:

Forwarn Crash Log:
Expand Collapse Copy
# This was the compiler log before I applied the recommended fix
WARNING: Usage of deprecated method "baseDamage" or its alias.
The method is slated to be removed in Essentials v22.
Use "power" instead.
Exception `NoMethodError' at [Deluxe Battle Kit] [005] Updated Effects.rb:158 - undefined method `function' for #<Battle::Move::None>

# This is after

Exception `NoMethodError' at [Deluxe Battle Kit] [005] Updated Effects.rb:159 - undefined method `function' for #<Battle::Move::LowerTargetDefense1>

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

Exception: NoMethodError
Message: undefined method `function' for #<Battle::Move::LowerTargetDefense1>

Backtrace:
[Deluxe Battle Kit] [005] Updated Effects.rb:159:in `block (3 levels) in <main>'
Battle_Battler:564:in `block in eachMoveWithIndex'
Battle_Battler:564:in `each'
Battle_Battler:564:in `each_with_index'
Battle_Battler:564:in `eachMoveWithIndex'
[Deluxe Battle Kit] [005] Updated Effects.rb:155:in `block (2 levels) in <main>'
[Deluxe Battle Kit] [005] Updated Effects.rb:154:in `each'
[Deluxe Battle Kit] [005] Updated Effects.rb:154:in `block in <main>'
Event_Handlers:195:in `trigger'
[Generation 9 Pack] [000] Ability Handlers.rb:21:in `triggerOnSwitchIn'

It's midnight as I write this, so I am sorry if I am not giving enough information to communicate the problem. I need to go to sleep.
 

Attachments

  • 005 Updated Effects Screenshot.PNG
    005 Updated Effects Screenshot.PNG
    67.3 KB · Views: 25
  • Crash Log.PNG
    Crash Log.PNG
    16.6 KB · Views: 31

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,231
During the process of working on adding new moves such as Nerve Numb, an Electric-type version of Venom Drench that needs the opponent Pokemon to be paralyzed, I stumbled into a problem with the ability Forewarn. I just found this problem, but I will share the crash log I just got. Even after doing a small tweak to [005] Updated Effects, changing power = m.baseDamage to power = m.power, because the compiler log recommends to stop using the deprecated baseDamage variable, I still get this error message, when a Pokemon with the Forewarn ability hits the field:

Forwarn Crash Log:
Expand Collapse Copy
# This was the compiler log before I applied the recommended fix
WARNING: Usage of deprecated method "baseDamage" or its alias.
The method is slated to be removed in Essentials v22.
Use "power" instead.
Exception `NoMethodError' at [Deluxe Battle Kit] [005] Updated Effects.rb:158 - undefined method `function' for #<Battle::Move::None>

# This is after

Exception `NoMethodError' at [Deluxe Battle Kit] [005] Updated Effects.rb:159 - undefined method `function' for #<Battle::Move::LowerTargetDefense1>

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

Exception: NoMethodError
Message: undefined method `function' for #<Battle::Move::LowerTargetDefense1>

Backtrace:
[Deluxe Battle Kit] [005] Updated Effects.rb:159:in `block (3 levels) in <main>'
Battle_Battler:564:in `block in eachMoveWithIndex'
Battle_Battler:564:in `each'
Battle_Battler:564:in `each_with_index'
Battle_Battler:564:in `eachMoveWithIndex'
[Deluxe Battle Kit] [005] Updated Effects.rb:155:in `block (2 levels) in <main>'
[Deluxe Battle Kit] [005] Updated Effects.rb:154:in `each'
[Deluxe Battle Kit] [005] Updated Effects.rb:154:in `block in <main>'
Event_Handlers:195:in `trigger'
[Generation 9 Pack] [000] Ability Handlers.rb:21:in `triggerOnSwitchIn'

It's midnight as I write this, so I am sorry if I am not giving enough information to communicate the problem. I need to go to sleep.
I guess I must've accidentally copied the Forewarn code from v20 instead of v21 for some reason. I'll fix it later.
 

RegalSword

Pokemon Itinerant Developer
Member
Joined
Feb 13, 2021
Posts
522
Looking over the first error, it seems like the issue is just that you set the parameters for the raid capture rule to "true", when it's supposed to be an array containing data for capture chance, flee message, and BGM (if any). Even if you don't want to edit any of these features, it should still be set as an empty array. It should never just be "true."
Ah there we go. I used to rely on the information in your Pokecommunity post but you recently cleared that so I had to guess how to use :raidcapture. Thanks for the help!
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,231

Zapayo

Rookie
Member
Joined
Dec 25, 2023
Posts
3
Are the deluxe battle rules in here the same as the ones in essentials deluxe?
I still want to use the last version but the tutorial is gone.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,231
Are the deluxe battle rules in here the same as the ones in essentials deluxe?
I still want to use the last version but the tutorial is gone.
Someone posted a link in that thread to an old version of the thread with the tutorial in tact.
 
Back
Top