• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script: Deluxe Battle Kit [v21.1]

1,404
Posts
10
Years
  • Age 35
  • Seen today


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 the Essentials Deluxe plugin, which previously released for v20.1. However, this iteration is far more streamlined, and designed entirely around expanding what is possible with the Pokemon battle system. This kit will grant you the ability to design entirely unique encounters for your games that were previously impossible. There's practically no limit to what you can do beyond your own imagination! In addition, this kit will act as the foundation for other battle plugins I release going forward. This includes things like SOS Battles, Raid Battles, as well as generational battle gimmicks such as Z-Moves, Dynamax, and Terastallization. Each of those mechanics will act as expansions for this kit, and will expand what it can do and how it can be used.


Plugin Features
  • Adds an assortment of brand new Battle Rules to customize your battle events with.
  • Adds the ability to set up special boss encounters with wild Pokemon that have increased HP pools as well as unique immunities to make them more challenging.
  • Adds the ability to set damage thresholds on Pokemon that prevents their HP from being lowered after they reach a certain damage range, mimicking Raid boss mechanics.
  • Allows you to set up Raid-style capture sequences vs wild Pokemon where you are prompted to throw a ball upon defeating them.
  • Adds new animation for wild Pokemon that flee from battle.
  • Adds mid-battle scripting functionality to allow for dialogue during battle, as well as allowing you to set up scripted battle scenarios.
  • Adds new animations for in-battle trainer dialogue, as well as name plates to display the speaker of each line of dialogue.
  • Adds new animations for Mega Evolution and Primal Reversion, as well as animation utilities to be used by add-on battle mechanics.
  • Implements a new battle icon for Mega Evolution, as well as a held item icon for Mega Stones.
  • Introduces a toggleable feature that shortens the names of really long move names so that they fit properly in the battle UI.
  • Allows for compatibility between many other plugins that build on this kit to add unique battle features.

-DOWNLOAD LINK-


Installation
  • First, download and install the latest version of the v21.1 Hotfixes plugin, if you don't already have it.
  • Next, download this plugin using the link provided and extract its contents to your root Essentials folder so that the Audio, Graphics and Plugins folders in the download merge with their equivalent folders in your project.
  • Start your game in debug mode. If the plugin doesn't appear the list of installed plugins within the console window, make sure you installed everything properly and then force the game to recompile by holding down the CTRL key while the game is booting up. If the console says "Game data was not compiled", then you didn't hold down the key long enough, or don't have the game window in focus.

Changelog (v1.1.3)
Spoiler:


Plugin Tutorial
For all information and guides on how to use this and all supported plugins, please refer to the Deluxe Battle Kit Tutorial.
 
Last edited:
1,404
Posts
10
Years
  • Age 35
  • Seen today
Minor Update (v1.0.1)
  • Healing done by the "battlerHP"Command Key on a wild boss Pokemon with boosted HP will no longer be scaled down.
  • Updated which PBEffects can be set with midbattle commands.
  • Fixed a bug with the Forewarn ability.
  • Minor preparations for the Enhanced Battle UI plugin.
 
1,404
Posts
10
Years
  • Age 35
  • Seen today
Minor Update (v1.0.2)
  • Fixed a bug with the move Transform/Imposter that could cause errors.
  • Reworked some of the Damage Calc Refactor scripts.
  • Tweaked some animation utilities.
  • The "wildMegaEvolution" battle rule now sets a scripted battle scenario vs wild Mega Evolved Pokemon, instead of just flagging them as Mega-capable.
  • Introduced a new game stat tracker $stats.wild_mega_battles_won to track how many battles the player won vs wild Mega Evolved Pokemon.
  • Made some minor adjustments in preparation for the release of the Terastallization add-on.

The "wildMegaEvolution" rule now sets up battles that work similar to wild Tera Pokemon in Scarlet & Violet, except with the Mega Evolution mechanic instead of Terastallization.

6q1JhIg.gif


When encountering a wild Pokemon who is capable of Mega Evolving with this set rule, the wild Pokemon will immediately Mega Evolve when encountered. If so, Poke Balls will be disabled. The Pokemon will survive with 1/6th of their max HP when taking lethal damage. Once reaching this threshold however, the Pokemon's Mega Evolution will fade, and they will revert to their original form. Once this happens, Poke Balls become usable again, and the Pokemon may be caught.

Whenever the player defeats or captures a wild Pokemon in this manner, the game will keep count of it. The total number of wild Mega Battles the player has cleared can be called with the script $stats.wild_mega_battles_won. You can set this up as a unique way of requiring the player to "earn" certain Mega Stones by first defeating a wild Mega boss of sorts.
 
1,404
Posts
10
Years
  • Age 35
  • Seen today
Minor Update (v1.0.3)
  • Tweaked some compiler code to avoid errors in situations where there is missing PBS data.
  • Added a new battle rule called "setSlideSprite" which allows you to customize how the opponent's sprite slides on to screen at the start of a battle.
The opponent's slide sprite can be customized to slide in from the side (default), top, bottom, or remain still without sliding. For each of these variations, you can even hide the opponent's base and shadow sprites if you wish to give them the appearance of hovering in an abyss. More details can be found in the "Deluxe Battle Rules" section of the Deluxe Battle Kit tutorial, in the subsection "Battle Audio & Animations."

Here's some quick examples of every possible slide-in "style."
BznnuHo.gif
 
1,404
Posts
10
Years
  • Age 35
  • Seen today
Minor Update (v1.0.4)
  • Fixed a bug that would cause the moves Sketch and Mimic to cause errors.
  • Added some missing Gen 9 effects to the PBEffect hash.
  • Made it so that the AI for wild Pokemon is improved when using a battle rule for certain wild battle modes (wild Mega Pokemon, wild Tera Pokemon, etc.)
  • Tweaked the opponent slide sprite animation so that the Pokemon's shadow sprite fades in if they slide in from the top of the screen.
  • Tweaked the wording of certain debug menu text.
  • Made various tweaks in preparation for the release of the Z-Power add-on.
 
1,404
Posts
10
Years
  • Age 35
  • Seen today
Minor Update (v1.0.6)
  • Made some slight adjustments for compatibility with the Customizable Battle UI plugin.
  • Fixed a crash that would occur when a battle is triggered in the Safari Zone.
  • Fixed an issue where entering your party in the Hall of Fame would delete all their moves.
  • Fixed an oversight that would prevent Attract from appropriately failing on targets, even if they should be unaffected.
  • Made various tweaks in preparation for the release of the Dynamax add-on.
  • Added global midbattle script functionality.
  • Added a global midbattle script that implements low HP music to play when the HP of the player's Pokemon is low.
  • Added a new audio file in Audio/BGM named "Battle low HP."
  • Added a new plugin setting named PLAY_LOW_HP_MUSIC to toggle the low HP music feature.
  • Added the "lowHealthBGM" Battle Rule to set custom tracks for low HP music.
  • Added the following midbattle Trigger Keys:
    • "AfterSendOut"
    • "AfterLastSendOut"
    • "BattlerHPRecovered"
    • "BattlerHPFull"
    • "BattlerHPReduced"
    • "BattlerHPCritical"
  • Added the following midbattle Command Keys:
    • "pauseAndPlayBGM"
    • "resumeBGM"
Please refer to the Deluxe Battle Kit Tutorial for more more details on the newly-added features.

Here's a quick video demonstration of low HP music implemented in this update:
 
1,404
Posts
10
Years
  • Age 35
  • Seen today
Minor Update (v1.0.7)
  • Fixed some AI damage calcs when using moves added by the Terastallization add-on.
  • Tidied up some animation utilities.
 
1,404
Posts
10
Years
  • Age 35
  • Seen today
Minor Update (v1.0.8)
  • Fixed an issue that would prevent battlers from updating their ability after Mega Evolution or Primal Reversion.
 
1,404
Posts
10
Years
  • Age 35
  • Seen today
Minor Update (v1.0.9)
  • Tweaked the refactored damage calculations to fix some errors and prevent some future potential errors.
  • Made it so that battle music that was changed with a midbattle script will be restored after low HP music ends.
 
1,404
Posts
10
Years
  • Age 35
  • Seen today
Minor Update (v1.1.0)
  • Fixed a bug introduced in the last update that misaligned battle text after midbattle speech.
 
1
Posts
2
Years
  • Age 28
  • Seen Mar 21, 2024
I am trying to download the file. But the archive that I downloaded from MediaFire says it's corrupted and I am not able to extract the files. Does this have a mirror link?
 
35
Posts
3
Years
  • Age 22
  • Seen Apr 23, 2024
Something in this, I don't know how to figure out what, overrides the hp stat calculations. Any chance I could be pointed at where in this I could change them from?
 
Last edited:
1,404
Posts
10
Years
  • Age 35
  • Seen today
Something in this, I don't know how to figure out what, overrides the stat calculations. Any chance I could be pointed at where in this I could change them from?
Please be more specific by what you mean by this. Base stats? Overall stats? Out of battle (Summary)? In battle? If so, when and where does it occur, how are you determining this, etc.
 
35
Posts
3
Years
  • Age 22
  • Seen Apr 23, 2024
Please be more specific by what you mean by this. Base stats? Overall stats? Out of battle (Summary)? In battle? If so, when and where does it occur, how are you determining this, etc.
The calculation of hp from base stats done by the calchp code in the Pokémon-Pokémon section of the Essentials scripts. It happens everywhere, constantly. I am determining this by using the same script with and without the Deluxe Battle Kit added to my game.

No matter what you change the numbers to in the return section, it does not change how much hp the pokémon has.

# @return [Integer] the maximum HP of this Pokémon
def calcHP(base, level, iv, ev)
return 1 if base == 1 # For Shedinja
iv = ev = 0 if Settings::DISABLE_IVS_AND_EVS
return (((base * 2) + iv + (ev / 4)) * level / 100).floor + level + 10
end
 
1,681
Posts
8
Years
  • Age 24
  • Seen yesterday
The calculation of hp from base stats done by the calchp code in the Pokémon-Pokémon section of the Essentials scripts. It happens everywhere, constantly. I am determining this by using the same script with and without the Deluxe Battle Kit added to my game.

No matter what you change the numbers to in the return section, it does not change how much hp the pokémon has.

# @return [Integer] the maximum HP of this Pokémon
def calcHP(base, level, iv, ev)
return 1 if base == 1 # For Shedinja
iv = ev = 0 if Settings::DISABLE_IVS_AND_EVS
return (((base * 2) + iv + (ev / 4)) * level / 100).floor + level + 10
end
I don't think this is a DBK issue. Have you been calling calc_stats or generating a fresh Pokémon? It doesn't magically retroactively correct the old stats.
 
35
Posts
3
Years
  • Age 22
  • Seen Apr 23, 2024
I don't think this is a DBK issue. Have you been calling calc_stats or generating a fresh Pokémon? It doesn't magically retroactively correct the old stats.
I've done both, neither reflects the updated code when I have DBK installed but both do when I remove it.
 
1,681
Posts
8
Years
  • Age 24
  • Seen yesterday
I've done both, neither reflects the updated code when I have DBK installed but both do when I remove it.
Are you editing def calcHPin DBK? Did you recompile plugins afterwards? DBK overwrites that method for the sake of other effects.
 
Back
Top