Miscellaneous Utilities
Section 6
Last updated
Section 6
Last updated
This section will briefly touch on a variety of smaller features or mechanics implemented by this plugin that don't really fit anywhere else in the guide, or aren't significant enough to warrant their own dedicated section.
Shorted Move Names
As the Pokemon series has gone on, character limits on move names has increased, allowing for moves with much longer names than in older generations. However, the default Essentials battle UI isn't designed to handle moves with really long names, so these moves can break the UI when trying to display them. To resolve this, the Deluxe Battle Kit allows you to truncate these long names with ellipses while displayed in the fight menu.
To toggle whether this feature applies, this can be done by simply opening the Settings file in the Deluxe Battle Kit plugin, and setting the SHORTEN_MOVES
setting to true
or false
to turn the feature on or off.
The examples above displays a mock move which was given the apt name "Move With a Very Long Name." On the left, this is how this move would appear normally. As you can see, the name is so long that it breaks the menu UI. On the right, however, this is how this same move would appear when the SHORTEN_MOVES
setting is turned on, truncating the move name with ellipses so that it now properly fits in the UI.
Low HP Music
In Pokemon Black & White, a feature was introduced where the battle music would change whenever the HP of the player's Pokemon reached critically low levels. This plugin replicates this feature by utilizing a global midbattle script to change the battle music in these scenarios.
To toggle whether this feature applies, this can be done by simply opening the Settings file in the Deluxe Battle Kit plugin, and setting the PLAY_LOW_HP_MUSIC
setting to true
or false
to turn the feature on or off.
If you'd like to disable or change the BGM that plays for specific battles, you may do so by using the "lowHealthBGM" Battle Rule.
Deluxe Plugin Settings in Debug Menu
While playing in Debug mode, there will now be a new option in the Debug menu named "Deluxe plugin settings..." In this menu, you will find options for toggling a variety of features related to special battle mechanics. By default, this will include the ability to toggle the availability of Mega Evolution on or off.
Other add-on plugins for the Deluxe Battle Kit may introduce new options, such as the ability to toggle off Z-Moves, setting the maps that are capable of supporting Dynamax, or charging the player's Tera Orb, for example. Remember to check this menu option when installing a new add-on plugin for the Deluxe Battle Kit, as chances are it will introduce new Debug options here.
Held Mega Stones in the Party Menu
Essentials is capable of displaying held item icons for specific types of items that differ from the generic icon. The Deluxe Battle Kit utilizes this code to fully implement this feature for Mega Stones, as seen below.
Primal Reversion Counter
Essentials internally keeps track of a variety of the player's game statistics. Things such as number of Repels used, number of eggs hatches, or battles won. One of those statistics is how many times the player has used Mega Evolution, which can be called with $stats.mega_evolution_count
.
However, the same isn't true for Primal Reversion. There is no internal counter for the number of times your Pokemon have entered Primal form through this mechanic. Which is understandable, since it's a fairly niche feature compared to Mega Evolution. However, adding a counter for this is rather trivial, so I decided to throw one in for the heck of it.
With the Deluxe Battle Kit installed, the game will now keep track of how many times the player's Pokemon have used Primal Reversion. To call this counter, you may use the following script:
$stats.primal_reversion_count
Wild Mega Battle Counter
The game will now also keep count of the number of wild Mega Battles won. This counts whenever the player defeats or captures a wild Mega Pokemon that was encountered through the use of the "wildMegaEvolution" Battle Rule.
To call this counter, you may use the following script:
$stats.wild_mega_battles_won
Improved HighCriticalHitRate Move Flag
In the moves.txt
PBS file, you can flag a move as a high critical hit ratio move by giving it the HighCriticalHitRate
flag. This flag essentially grants a +1 critical hit stage to those moves. However, there is one example of a move that has a +2 critical hit ratio, essentially as if the Pokemon used Focus Energy. This is the Z-Move 10,000,000 Volt Thunderbolt.
Because this move has this unique property, I decided to update how this move flag works. Now, the HighCriticalHitRate
flag can have a number attached to it in order to set the number of stages it should raise the critical hit ratio by. This is done by adding an underscore followed by the number of stages, such as HighCriticalHitRate_2
. If this extension isn't included, then the default HighCriticalHitRate
is always assumed to grant +1 to the move's critical hit ratio.
You can use this updated flag property to implement custom moves that grant higher critical hit ratios than your typical high-crit moves normally would. Keep in mind that anything with 4 or more stages will just be a guaranteed critical hit, so at that point you might as well just utilize the AlwaysCriticalHit
function code.
UsesAllBattleActions Item Flag
Some items, when used in battle, use up the player's entire turn regardless of how many Pokemon are on the player's side to issue commands to. The only types of items that behave this way by default are Poke Balls, however, many add-on plugins introduce other items which behave in this manner.
Due to this, I incorporated a new item flag to indicate the specific items that have this behavior. This is flag is called UsesAllBattleActions
. If you're designing a custom item which you want to have this behavior, you may give your item this flag to implement it. Keep in mind, however, that this is only half of what's required. To truly implement this properly, you'll need to utilize the firstAction
argument in the item handler for your custom item. Going into this any further would extend outside the scope of this plugin however, so I'll leave it at that.
Damage Calculation Refactor
Essentials uses the method pbCalcDamageMultipliers
to calculate various damage multipliers that may affect the resulting damage from an attack. This is a very long and complex method that factors in a huge range of possible effects, from weather/terrain to STAB, status effects, as wells as random effects like Charge and Helping Hand. Because of this, editing this method can be quite unruly when you're trying to implement a custom effect of some kind that can affect damage outcomes.
Because of this, I've chosen to completely recode this method in the Deluxe Battle Kit. I've refactored pbCalcDamageMultipliers
so that it is now broken off into much smaller and more manageable chunks so that adding custom content is far easier.
If you're a more experienced user who plans on implementing new custom content that may be affected by this, you may want to take a look at this refactored code. You can find it in the plugin scripts, located in [000] Essentials Patches/[003] Damage Calc Refactor
.