• 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!
Resource icon

v20.1 Essentials Deluxe [v20.1] [DEPRECATED] v1.2.8

This resource pertains to version 20.1 of Pokémon Essentials.
ATTENTION! Final Update!
With the release of Essentials v21, this will be the final update for Essentials Deluxe for v20.1. Going forward I will instead be fully focused on v21, so I will no longer be updating or supporting this plugin. I intend to take a break before I even start thinking about how or when I'm going to start working on a v21 iteration of the plugin, so don't ask me about a time frame for release. I will keep this plugin available in the meantime. But this iteration of the plugin will eventually be removed once a v21 successor is released and takes its place. I will give fair warning before this happens, so don't panic.

See you all in v21!


Final Update (v1.2.8)

  • Made various tweaks for better compatibility with the newest update to the Gen 9 Pack.
  • This is the final update for this plugin. Going forward, my focus will now be on adapting this plugin for v21.

Note: When updating, please make a copy of any custom work you've added to Midbattle_Config. Updating the plugin will overwrite any of your additions.
  • Like
Reactions: A.I.R
IMPORTANT You must start a new game after installing this update. IMPORTANT
IMPORTANT
You must start a new game after installing this update. IMPORTANT

This update makes more changes to how Pokedex forms are stored, and as such, a new save file is once again required. Hopefully this is the last time I'll have to release an update that requires this. I'm really hoping this bold red text is enough to actually catch your attention so you don't have to ask why you're getting an error related to the Pokedex.


  • Fixed a major bug that has gone surprisingly unreported this entire time that would accidentally delete all of the Egg Move data for all species in pokemon.txt when compiling the ZUD Plugin, and perhaps others.
  • Made further improvements to the code relating to displaying Super Shiny sprites so that overworld follower sprites may also show Super Shiny variants. This can be done by simply adding the appropriate sprites to a folder named Followers super shiny in Graphics/Characters.
  • Added new PokemonOverworldSprite and PokemonSpeciesOverworldSprite classes that can be used to display overworld sprites in menus and other UI's in the same manner as icon sprites are used.
  • Updated the Pokedex so that it may now show Super Shiny forms in addition to normal Shiny forms. The POKEDEX_SHINY_FORMS plugin setting will also toggle Super Shiny forms.
  • The Pokedex will no longer display a form in the Pokedex unless a sprite for that form exists. For example, if you registered a Super Shiny form in the Pokedex, but you do not have any Super Shiny sprites for that species, then that Super Shiny form will not appear as a viewable form in its Pokedex entry. This rule applies to all forms, including gender differences, shadow Pokemon, Gigantamax forms, or other regular forms.
  • The Pokedex will no longer display gendered forms unless the species have actual visual gender differences. For example, Pikachu's Pokedex entry will show Male/Female forms, since that species has visual gender differences. However, for a species like Pidgey which has no gender differences, there will no longer be Male/Female form displays. This cuts back on a lot of redundant forms appearing in the dex.
  • While using the "Fill Storage Boxes" debug option, the Pokedex will now properly register Shiny and Super Shiny forms.
  • Removed the "Deluxe Plugins" option from the debug menu while on the loading screen. These options may now only be used in-game to avoid crashes.
  • Fixed $player.birthdate so that it returns the player's start time as is intended if no birthdate for the player has been set.
  • The pbNumOwnedSpecies utility has been tweaked so that you may now choose to set the species parameter to "nil" in order to return the number of any Pokemon owned by the player that match the particular attributes entered. For example, you can use pbNumOwnedSpecies(nil, :shiny, true) to return the number of ALL Shiny Pokemon the player owns, not just a particular species of shiny. Also fixed an error that would sometimes return incorrect totals.
  • Tweaked how certain code is aliased for improved efficiency.


Here's an example of the expanded Pokedex forms in action:

a9MwDvw.gif


Note: When updating, please make a copy of any custom work you've added to Midbattle_Config. Updating the plugin will overwrite any of your additions.

And just in case you missed it:

IMPORTANT You must start a new game after installing this update. IMPORTANT
IMPORTANT
You must start a new game after installing this update. IMPORTANT
Visually Different Super Shinies
I've implemented native functionality that allows you to have different sprites for Super Shiny Pokemon. This does not include any assets for this feature, only the support for it. To implement a Super Shiny sprite, you must create new subfolders in Graphics/Pokemon named Front super shiny, Back super shiny, etc, and place sprites in these folders in the same way you would in other similar folders. If so, then a Pokemon flagged as Super Shiny will pull their sprites from these folders instead.

If these folders don't exist, or a Super Shiny sprite cannot be found for the species, then the normal shiny sprite will be used instead. Note that if you're using the ZUD Plugin, you can also have folders named Dynamax and Gigantamax within these Super Shiny folders so that you may have Super Shiny sprites for Dynamax and Gigantamax forms, too.

Similar to above, you may also now set up custom cries for Super Shiny Pokemon. This is accomplished the same way you can set up custom cries for regular shiny Pokemon, you must simply set up a folder named Super shiny in Audio/SE/Cries instead. If no folder exists, or a Super Shiny cry cannot be found for the species, then the normal shiny cry will be used instead. If a shiny cry can't be found either, it will just use the default cry for that species.


Owned Species Count Utility
Added a new function called pbNumOwnedSpecies(species, attribute, value) to allow you to quickly return the number of a particular species that the player owns (both in the party, and in storage). This can be used if you want to trigger some kind of event, but only if the player owns a particular species. The "attribute" and "value" arguments are optional, and you can simply search for any number of a particular species that the player owns, such as: pbNumOwnedSpecies(:PIKACHU)

However, you can narrow this search down even further by specifying particular attributes to search for.
For instance, you can use pbNumOwnedSpecies(:PIKACHU, :gender, 1) to return ONLY the number of female Pikachu the player owns.

Below is a list of all the attributes and values that can be checked for:
:level: Only returns the number of species with a level that matches value (1-100)
:form: Only returns the number of species in a form that matches value (Any positive number)
:gender: Only returns the number of species with a gender that matches value (0 = Male, 1 = Female, 2 = Genderless)
:shiny: Only returns the number of species who's shiny flag matches value (True = Shiny Pokemon, False = Non-shiny)
:shadow: Only returns the number of species who's shadow flag matches value (True = Shadow Pokemon, False = Non-shadow)
:foreign: Only returns the number of species who's "foreign" flag matches value (True = Player is not the OT, False = Player is the OT)
:pokerus: Only returns the number of species who's Pokerus state matches value (0 = No Pokerus, 1 = Contagious, 2 = Cured)
:hatched: Only returns the number of species who's obtained method matches value (True = Hatched from an Egg, False = Not hatched)
:nature: Only returns the number of species who's Nature matches value (Any Nature ID)
:ability: Only returns the number of species who's Ability matches value (Any Ability ID)
:move: Only returns the number of species who has a Move that matches value (Any Move ID)
:ribbon: Only returns the number of species who has a Ribbon or Mark that matches value (Any Ribbon or Mark ID)
:item: Only returns the number of species who's held Item matches value (Any Item ID)
:ball: Only returns the number of species who's Poke Ball matches value (Any Poke Ball Item ID)
:gmax: (ZUD Plugin) Only returns the number of species who's G-Max Factor flag matches value (True = Has G-Max Factor, False = No G-Max Factor)
:teratype: (Terastal Phenomenon) Only returns the number of species who's Tera Type matches value (Any Type ID)
:focus: (Focus Meter System) Only returns the number of species who's Focus Style matches value (Any Focus Style ID)
:birthsign: (Pokemon Birthsigns) Only returns the number of species who's Birthsign matches value (Any Birthsign ID)
:blessed: (Pokemon Birthsigns) Only returns the number of species who's blessing flag matches value (True = Blessed, False = Non-blessed)
:celestial: (Pokemon Birthsigns) Only returns the number of species who's celestial flag matches value (True = Celestial, False = Non-celestial)


Note: When updating, please make a copy of any custom work you've added to Midbattle_Config. Updating the plugin will overwrite any of your additions.
  • Like
Reactions: Ned and A.I.R
IMPORTANT You must start a new game after installing this update. IMPORTANT
IMPORTANT
You must start a new game after installing this update. IMPORTANT

General Fixes
  • Reorganized many of the files included in the plugin.
  • Aliased the code related to pbEffectivenessMessage so that this plugin should no longer overwrite any custom effectiveness messages.
  • Previously, in battles where the "Shift" command button may appear, the coordinates for the button that triggers special battle mechanics such as Mega Evolution would be misaligned in some cases when pressing Back to return to a previous Pokemon's menu. This has been fixed so that these buttons are always aligned properly.
  • Fixed a bug that would accidentally swap the names of the player and their partner when sending out your lead Pokemon in a double battle.
  • Fixed an oversight that would prevent the Deluxe Wild Battle call from accepting Pokemon objects.
  • Fixed an oversight in the Deluxe Wild Battle call when setting up a wild battle vs multiple wild Pokemon. Previously, if you wanted to set the values for any of these wild Pokemon in the Pokemon hash, you could only do so if you made a hash for each wild Pokemon, even if you only wanted to edit one of them. This restriction has been fixed, and you may now edit as few or as many wild Pokemon that are to appear in this battle that you want.
  • Fixed a bug related to how forms are recoreded in the Pokedex that would flag certain forms as seen even if they shouldn't be. This fix inadvertently resolves any incompatibilities with the Encounter List UI plugin.
  • Updated how the Sprite Outliner works so that it may be used on Pokemon sprites in more situations.

New Additions
  • Added a new Pokemon property that gives each individual Pokemon a "size" statistic that ranges from 0 (XXXS) to 255 (XXXL), like in the modern games.
  • Added an option that allows you to set a Pokemon's size value under the Deluxe Options in the Pokemon debug menu.
  • You may now set the size of a wild Pokemon encounted in a Deluxe Wild Battle by setting the :size attribute to a number between 0-255 in the Pokemon hash.
  • Added new Player data that allows you to set the player's birthday, like in the modern games. If no birthday is set, this defaults to the adventure start time.
  • Added an option that allows you to set the player's birthday under the Deluxe Options in the debug menu.
  • Added the ability to track a variety of new game statistics to be utilized by supported plugins.
  • The number of times the player has used Primal Reversion will now be tracked, similar to how Mega Evolution is tracked.
  • Added :raidcapture as a new Deluxe Wild Battle rule. When set, all wild Pokemon in this battle will prompt you to capture them upon defeating them, similar to how Raid-style capture mechanics work. If not captured, the Pokemon will flee to end the battle.
  • Added a new battle animation for fleeing Pokemon.
  • Added various code in preparation of the release of the Improved Mementos plugin.
  • Added :memento as a new Pokemon attribute to set in a Deluxe Wild Battle if the Improved Mementos plugin is installed. This allows you to set the memento that should be attached to this wild Pokemon.

Note: When updating, please make a copy of any custom work you've added to Midbattle_Config. Updating the plugin will overwrite any of your additions.


Here's some examples of how the new :raidcapture Deluxe battle rule can change how your wild battles function:

demo.gif
demo1.gif


And just in case you missed it:

IMPORTANT You must start a new game after installing this update. IMPORTANT
IMPORTANT
You must start a new game after installing this update. IMPORTANT
  • Fixed some speech in DEMO_VS_SADA_PHASE_1 from displaying the wrong speaker.
  • Fixed how the :ignore midbattle key works so that it no longer repeats infinitely until the conditions for the ignore are met. The trigger now only occurs once (unless set to repeat), regardless if the trigger was ignored or not.
  • The :useitem midbattle key can now be triggered by wild Pokemon, allowing them to use items on themselves in battle, as if they were a trainer.
  • The :bgm midbattle key now accepts arguments to control volume and pitch when set as an array.
  • Added :disableballs as a new midbattle key. You may set this to true or false to toggle the availability of Poke Balls mid-battle.
  • Added :shadow as a Pokemon property when setting up a wild Deluxe battle. This can be used to make wild Pokemon into Shadow Pokemon.
  • Made several small edits related to the (eventual) upcoming Pokemon Birthsigns plugin.
  • Aliased how trainers are generated for better compatibility with other plugins.
  • Aliased several methods related to battle databoxes for better compatibility with other plugins or custom edits.
  • Added compatibility with the All Abilities Mutation plugin (v1.2).
  • Added a new PBS file to this plugin that adds various new item categories to existing items to better group them.
  • Added a ton of new methods to check for new item categories. These can be used to more easily check for a certain category of item, instead of having to list each relevant item.
    • is_repel?: Returns true if the item has the "Repel" flag. (Repel, Max Repel, etc.)
    • is_medicine?: Returns true if the item has the "Medicine" flag. (Potion, Ether, Revive, etc.)
    • is_remedy?: Returns true if the item has the "Remedy" flag. (Energy Root, Revival Herb, all bitter healing items.)
    • is_vitamin?: Returns true if the item has the "Vitamin" flag. (Protein, HP Up, PP Up, etc.)
    • is_exp_candy?: Returns true if the item has the "ExpCandy" flag. (Exp. Candy S, Exp. Candy XL, all Exp. Candies.)
    • is_feather?: Returns true if the item has the "Feather" flag. (Muscle Feather, Swift Feather, all feathers.)
    • is_mint?: Returns true if the item has the "Mint" flag. (Jolly Mint, Naive Mint, all mints.)
    • is_incense?: Returns true if the item has the "Incense" flag. (Rock Incense, Wave Incense, all incenses.)
    • is_contest_item?: Returns true if the item has the "Contest" flag. (Red Scarf, Blue Scarf, all items that boost contest stats.)
    • is_ev_booster?: Returns true if the item has the "EVBooster" flag. (Macho Brace, Power Weight, etc.)
    • is_flute?: Returns true if the item has the "Flute" flag. (Black Flute, Red Flute, etc.)
    • is_shard?: Returns true if the item has the "Shard" flag. (Green Shard, Yellow Shard, etc.)
    • is_nectar?: Returns true if the item has the "Nectar" flag. (Red Nectar, Purple Nectar, all Oricorio nectars.)
    • is_sweet?: Returns true if the item has the "Sweet" flag. (Love Sweet, Ribbon Sweet, all Alcremie sweets.)
    • is_plate?: Returns true if the item has the "Plate" flag. (Insect Plate, Dread Plate, all Arceus plates.)
    • is_memory?: Returns true if the item has the "Memory" flag. (Fire Memory, Ice Memory, all Silvally memories.)
    • is_drive?: Returns true if the item has the "Drive" flag. (Burn Drive, Douse Drive, all Genesect drives.)
    • is_fossil_half?: Returns true if the item has the "FossilHalf" flag. (Fossilized Bird, Fossilized Dino, all Gen 8 fossils.)
    • is_enhancer?: Returns true if the item has the "BattleEnhancer" flag. (X Attack, Dire Hit, Guard Spec., etc.)
    • is_heal_berry?: Returns true if the item has the "HealBerry" flag. (Oran Berry, Sitrus Berry, all berries that heal HP.)
    • is_status_berry?: Returns true if the item has the "StatusBerry" flag. (Pecha Berry, Persim Berry, Lum Berry, all berries that cure status conditions.)
    • is_flavor_berry?: Returns true if the item has the "FlavorBerry" flag. (Figy Berry, Wiki Berry, all berries that may cause confusion based on flavor.)
    • is_ev_berry?: Returns true if the item has the "EVReduceBerry" flag. (Pomeg Berry, Tomato Berry, all berries that reduce EV's.)
    • is_type_berry?: Returns true if the item has the "TypeReduceBerry" flag. (Yache Berry, Haban Berry, all berries that reduce damage from certain types.)
    • is_pinch_berry?: Returns true if the item has the "PinchBerry" flag. (Salac Berry, Starf Berry, all berries that trigger at low HP.)
    • is_tera_shard?: Returns true if the item has the "TeraShard_TYPE" flag. (Requires Terastal Phenomenon)


Note: When updating, please make a copy of any custom work you've added to Midbattle_Config. Updating the plugin will overwrite any of your additions.
NOTE: This update heavily overhauls many of the previous systems used in this plugin. Even if you are well versed in how to use it, It's highly recommended that you go through the tutorial again to get a handle on what's been changed and/or added.

Midbattle Triggers
I've overhauled and renamed a ton of the existing midbattle triggers. I know this'll be annoying for those of you who have a lot of existing battles set up with the old trigger names, so I'm going to try not to go on a mass re-naming spree from here on out. But I wanted to redo all of the triggers so that all of the ones that are closely related to each other all start with the same word, to make them all easier to sort and remember. For example, all the triggers related to moves now start with the word "move", all of the triggers related to switching now start with the word "switch", etc. A lot of the triggers previously would just have no rhyme or reason for the way they were named, and in this update I tried to make everything much neater and organized.

In addition to this, I've also split a ton of existing triggers into two separate ones. Primarily, this has to do with the triggers related to the Attack Phase of battle. For example, previously there was only one trigger that checked if an attacking Pokemon dealt a critical hit, but no trigger that would activate on the defending side that would activate when a Pokemon took critical damage. To address this I've now split every trigger that deals with scenarios like this into "attacker" and "defender" triggers, so you can choose which side to trigger the effect from.

The following triggers have been removed, renamed or replaced, and are no longer used:
  • "damageMove"
  • "physicalMove"
  • "specialMove"
  • "statusMove"
  • "superEffective"
  • "notVeryEffective"
  • "immune"
  • "miss"
  • "criticalHit"
  • "damageTaken"
  • "halfHP"
  • "lowHP"
  • "halfHPLast"
  • "lowHPLast"
  • "recall"
  • "beforeNext"
  • "afterNext"
  • "beforeLast"
  • "afterLast"
  • "beforeCapture"
  • "afterCapture"
  • "failedCapture"

Here are all of the re-worked triggers. A few may still have the same name, but have been given additional functionality. Others simply are renamed versions of old triggers. And some are completely brand new:
  • Capture Triggers
    These triggers activate at different points during the capture process when the player throws a Poke Ball. You may add a species ID to these triggers to only activate when attempting to capture a specific species, or a type ID to trigger on a Pokemon of a specific type. These triggers are only usable by the player, so the _foe and _ally extensions do not apply.
    • "captureAttempt" - Previously named "beforeCapture". Triggers prior to throwing a Poke Ball.
    • "captureSuccess" - Previously named "afterCapture". Triggers upon successfully capturing a Pokemon.
    • "captureFailure" - Previously named "failedCapture". Triggers upon a Pokemon escaping from a Poke Ball.


  • Move Triggers
    These triggers activate upon selecting a move, but prior to actually using the move. You may add a type ID to these triggers to only activate when selecting a move of a particular type, or a species ID to only trigger when a Pokemon of a particular species uses the move. With the "move" trigger in particular, you may also add a move ID to check if a specific move has been selected. You may specify which trainers this should trigger for by using the _foe and _ally extensions.
    • "move" - Triggers when any move was selected.
    • "moveDamaging" - Previously named "damageMove". Triggers when a damage-dealing move was selected.
    • "movePhysical" - Previously named "physicalMove". Triggers when a physical move was selected.
    • "moveSpecial" - Previously named "specialMove". Triggers when a special move was selected.
    • "moveStatus"- Previously named "statusMove". Triggers when a status move was selected.


  • Switching Triggers
    These triggers activate at different points during the process of switching Pokemon. You may add a species ID to these triggers to only activate when attempting to switch in/out a specific species, or a type ID to trigger on a Pokemon of a specific type. You may specify which trainers this should trigger for by using the _foe and _ally extensions.
    • "switchOut" - Previously named "recall". Triggers when a trainer manually selects to switch out an active Pokemon, but prior to actually withdrawing them.
    • "switchIn" - Previously named "beforeNext". Triggers when a trainer is about to send in a new Pokemon.
    • "switchInLast" - Previously named "beforeLast". Triggers when a trainer is about to send in their final Pokemon.
    • "switchSentOut" - Previously named "afterNext". Triggers after a trainer successfully sent out a new Pokemon.
    • "switchSentOutLast"- Previously named "afterLast". Triggers after a trainer successfully sent out their final Pokemon.


  • Attacker Triggers
    These triggers activate after an attacking Pokemon uses their move on an opponent and damage has been calculated. You may add a species ID to these triggers to only activate when the attacking Pokemon is of a particular species; a move ID to only activate when a particular move was used, or a type ID to only trigger if a move of a particular type was used. You may specify which trainers this should trigger for by using the _foe and _ally extensions.
    • "attackerDamaged" - Triggers when an attacking Pokemon deals damage with an attack and reduces an opponent's HP.
    • "attackerSubDamaged" - Triggers when an attacking Pokemon deals damage to an opponent's Substitute without breaking it.
    • "attackerSubBroken" - Triggers when an attacking Pokemon deals enough damage to break an opponent's Substitute.
    • "attackerSEdmg" - Triggers when an attacking Pokemon deals Super Effective damage to an opponent and reduces their HP.
    • "attackerNVEdmg" - Triggers when an attacking Pokemon deals Not Very Effective damage to an opponent and reduces their HP.
    • "attackerNegated" - Triggers when an attacking Pokemon's move is negated due to an effect or type immunity, and deals no damage to an opponent.
    • "attackerDodged" - Triggers when an attacking Pokemon's move misses the opponent, and deals no damage.
    • "attackerCrit" - Triggers when an attacking Pokemon deals a Critical Hit to an opponent and reduces their HP.
    • "attackerHPHalf" - Triggers when an attacking Pokemon's HP is at 50% or less after using an attack.
    • "attackerHPHalfLast" - Triggers when an attacking Pokemon's is the last remaining Pokemon in the party, and its HP is at 50% or less after using an attack.
    • "attackerHPLow" - Triggers when an attacking Pokemon's HP is at 25% or less after using an attack.
    • "attackerHPLowLast" - Triggers when an attacking Pokemon's is the last remaining Pokemon in the party, and its HP is at 25% or less after using an attack.


  • Defender Triggers
    These triggers activate after a defending Pokemon is targeted by an opponent's move and damage has been calculated. You may add a species ID to these triggers to only activate when the defending Pokemon is of a particular species; a move ID to only activate when a particular move was used on it, or a type ID to only trigger if the move it was targeted with is of a particular type. You may specify which trainers this should trigger for by using the _foe and _ally extensions.
    • "defenderDamaged" - Triggers when a defending Pokemon takes damage from an attack and its HP is reduced.
    • "defenderSubDamaged" - Triggers when a defending Pokemon absorbs damage with a Substitute without it breaking.
    • "defenderSubBroken" - Triggers when a defending Pokemon absorbs enough damage with a Substitute that it breaks.
    • "defenderSEdmg" - Triggers when a defending Pokemon takes Super Effective damage from an opponent's attack.
    • "defenderNVEdmg" - Triggers when a defending Pokemon takes Not Very Effective damage from an opponent's attack.
    • "defenderNegated" - Triggers when a defending Pokemon negates an opponent's attack due to an effect or type immunity, and takes no damage.
    • "defenderDodged" - Triggers when a defending Pokemon evades an opponent's attack and takes no damage.
    • "defenderCrit" - Triggers when a defending Pokemon suffers a Critical Hit from an opponent's attack.
    • "defenderHPHalf" - Triggers when a defending Pokemon is left with 50% of their total HP or less after taking damage.
    • "defenderHPHalfLast" - Triggers when a defending Pokemon is the last remaining Pokemon in the party and its HP is at 50% or less after taking damage.
    • "defenderHPLow" - Triggers when a defending Pokemon is left with 25% of their total HP or less after taking damage.
    • "defenderHPLowLast" - Triggers when a defending Pokemon is the last remaining Pokemon in the party and its HP is at 25% or less after taking damage.


  • Pokemon Effects
    These triggers activate when certain effects on a battler or a certain side of the battlefield expire. Specifically, this pertains to certain effects that count down each turn until their effects end, such as with Taunt or Light Screen. You may add the name of a specific effect in all caps to only have these triggers activate when a particular effect expires. You may specify which trainers this should trigger for by using the _foe and _ally extensions.
    • "endEffect" - Triggers when an effect on an individual battler expires. You may specify a particular effect such as "endEffectDISABLE".
      Eligible effects: Disable, Embargo, Heal Block, Magnet Rise, Taunt, Telekinesis, Yawn, Focus Lock (Focus Meter System)
    • "endTeamEffect" - Triggers when an effect on a particular side of the battlefield expires. You may specify a particular effect such as "endTeamEffectREFLECT"
      Eligible effects: Aurora Veil, Light Screen, Lucky Chant, Mist, Rainbow, Reflect, Safeguard, Sea of Fire, Swamp, Tailwind, Vine Lash (ZUD), Wildfire (ZUD), Cannonade (ZUD), Volcalith (ZUD), Focused Guard (Focus Meter System)


  • Field Effects
    These triggers activate when certain effects that apply to the entire battlefield expire. Specifically, this pertains to certain effects that count down each turn until their effects end, such as with Weather, Terrain, or effects like Trick Room. You may add the name of a specific effect in all caps to only have these triggers activate when a particular effect expires. Since these effects affect the entire battlefield and not any specific trainer, the _foe and _ally extensions cannot be used.
    • "endFieldEffect" - Triggers when an effect that applies to the entire battlefield ends. You may specify a particular effect such as "endFieldEffectGRAVITY".
      Eligible effects: Gravity, Magic Room, Mud Sport Field, Trick Room, Water Sport Field, Wonder Room
    • "endWeather" - Triggers when a weather condition ends. You may specify a particular weather such as "endWeatherRAIN".
    • "endTerrain" - Triggers when a battle terrain ends. You may specify a particular terrain such as "endTerrainGRASSY".


  • Randomized Triggers
    All midbattle triggers that end in "_random" may now be given specific odds for them to trigger. For example, a trigger such as "turnEnd_random_20" will trigger 20% of the time at the end of the turn, where something like "moveDamaging_foe_repeat_random_70" would repeatedly trigger 70% of the time each time the opponent uses a damage-dealing move.

  • All Other Triggers
    If a trigger is not mentioned anywhere in this section, then it's safe to assume that it remains unchanged, and functions the same as it did before.


General Fixes
  • Standardized the "statusInflicted" midbattle trigger throughout the plugin. Some places were using a differently named trigger by accident.
  • Fixed an error that would occur when setting up midbattle messages in wild battles with some configurations.
  • Fixed an error that would occur when using the Interactable Party w/ Bag plugin when the Terastal Phenomenon plugin is not present.
  • Generalized how the Tera button is displayed in battle when the Terastal Phenomenon plugin is installed so that the button now appears correctly even if you've added or removed types from your game.
  • Fixed a typo error with the :teracharge midbattle key.
  • Fixed a bug when using the :delay and :ignore keys in a midbattle hash that wouldn't reset their conditions after the battle concluded, keeping them stuck as if they have already activated if initiating the same battle again.
  • Fixed a potential infinite loop that could occur when using midbattle triggers to force switching.
  • Fixed a potential infinite loop that could occur when using midbattle triggers to force a Pokemon to faint.
  • Opponent trainer sprites that slide in during speech will now appear in front of their Pokemon sprites if their active Pokemon in slot 1 is currently Dynamaxed. This both reflects how it works in SwSh (the Dynamax Pokemon is behind the trainer), as well as fixing awkward visual situations where the speaking trainer would be completely obscured by enlarged Dynamax sprites.

Midbattle Speech & Text
  • All custom messages entered in a midbattle hash have been updated to now accept \\PN to display the player's name.
  • The name of a speaker that is displayed during midbattle speech will now be displayed in its own text box above the speaker's dialogue, instead of appearing in all caps as part of the speaker's speech. The windowskin for this name plate will default to one with a blue outline for male speakers and one with a red outline for female speakers. This windowskin may also be customized for each speaker as well.
  • You may now display speech events for opponents during wild battles, not just trainer battles. Doing so will allow the wild Pokemon to "speak", complete with their own name plates.
  • The name displayed for a speaker during midbattle speech may now be customized, allowing you to display a name or title that doesn't necessarily match the actual name of the speaker.
  • You may now have any trainer or Pokemon sprite you want slide in and speak during battle, even if they aren't your current opponent. For example, if you are currently in a battle with your rival, you can have Prof. Oak slide in to speak, even though he isn't your opponent.
  • New functionality with midbattle speech has been implemented to now allow you to set up choice boxes during dialogue, and set up different outcomes depending on the chosen option. Refer to the tutorial for an in-depth guide on how this can be accomplished.

Midbattle Rules
  • Added the :compbattle Deluxe battle rule. When set to true, the battle will function with the same rules as competitive PvP battles, or those found in the Battle Frontier. Specifically, no exp. or money is earned from this battle, and the player is unable to use any items from the bag. The player may also select "Run" to forfeit the match.
  • Added the :introtext Deluxe battle rule. You may use this to override the default battle text that appears at the start of the battle, such as "A wild __ appeared!" in wild battles, or "You are challenged by ___!" in trainer battles.
  • Added the :losetext Deluxe battle rule. You may use this to override the speech text that will display at the end of battle for opposing trainers when they are defeated.
  • Added the :wintext Deluxe battle rule. You may use this to override the speech text that will display at the end of battle for opposing trainers when they defeat you. This text only appears when the :compbattle rule is active, since trainers only show their win speech text in those types of battles (such as in the Battle Frontier). For all other battles, you can still use the "loss" midbattle trigger to display trainer speech when you lose.

Midbattle Hashes
  • When the :move key used in a midbattle hash is set as an array, the array will now accept "nil" as a valid entry. This will make it so that you can use this feature to delete moves from a Pokemon's moveset. For example, [nil, :TACKLE, nil, :LEER] would delete the Pokemon's moves that appear at indexes 0 and 2, and replace the moves at indexes 1 and 3 with Tackle and Leer, respectively. You may also set all of a Pokemon's moves to nil to force it to Struggle.
  • Added new midbattle functionality that allows you to set and manipulate a variable during midbattle events that you can use to proc different outcomes. For example, you can have a battle that keeps track of "points" earned by the player throughout the battle, and different events are triggered depending on what number this variable is currently at. More details are covered in the tutorial.
  • Added the :setvariable key to be used in a midbattle hash to allow you to set or alter a midbattle variable.
  • Added the "variable_#" midbattle trigger which activate whenever the midbattle variable reaches a certain total, represented with #.
  • Added the "variable_over_#" and "variable_under_#" midbattle triggers which activate whenever the midbattle variable reaches a total that is above or below the number represented with #, respectively.
  • Added the "variable_up" and "variable_down" midbattle triggers which activate whenever the midbattle variable is increased or decreased, respectively.
  • Added the :setchoice key to be used in a midbattle hash to allow you to set up a tag for a specific speech event that contains a question for the player to select an answer to.
  • Added the "choice_/tag/_#" midbattle trigger which activates whenever the player selects a response to a question represented by /tag/, and the index of that selection matches the number represented with #.
  • Added the "choice_/tag/_correct" and "choice_/tag/_incorrect" midbattle triggers which activate whenever the player selects the correct or incorrect response to a question represented by /tag/, respectively.
  • Added the DEMO_VS_OPAL hash to Midbattle_Config to showcase and replicate the battle quizzes found in the battle vs Gym Leader Opal from Pokemon Sword & Shield.
  • Added the DEMO_BATTLE_QUIZMASTER hash to Midbattle_Config to showcase a more elaborate example of what the new choice/variable functionality of this update is capable of.

Other
  • Added a placeholder for the NoDynamax attribute for NPC trainer's Pokemon, to be used by the ZUD Plugin. This may be used to allow NPC trainers to use Dynamax and Terastallization in the same battle. More details found in the ZUD Plugin.
  • Added the :nodynamax setting to be used in the Pokemon hash of a Deluxe wild battle. This flags the Pokemon as being unable to use Dynamax when the ZUD Plugin is present. This allows wild Pokemon to Terastallize even if you are on a map that would normally cause them to prioritize Dynamax instead.


Video Examples:
Below are example battles showcasing just a few up the new features in this update. Keep in mind that these videos were made prior to the new name plate additions, so they are mostly just to show off the dialogue choice features.
Battle vs Gym Leader Opal
Battle vs Quizmaster

Here is a GIF to showcase the new :introtext Deluxe battle rule, name plates, as well as the ability to set guest speakers during midbattle speech.
75CGc3J.gif


Please refer to the tutorial for more information about changes to specific mechanics.

Note: When updating, please make a copy of any custom work you've added to Midbattle_Config. Updating the plugin will overwrite any of your additions.
  • Fixed a bug that would cause a crash with Safari Zone encounters.
  • Fixed a bug that prevented the "halfHPLast" and "lowHPLast" midbattle triggers from being properly detected.
  • Made the following changes to the file Midbattle_Config:
    • Added the DEMO_MEGA_EVOLUTION hash to showcase midbattle triggers related to Mega Evolution.
    • Added the DEMO_PRIMAL_REVERSION hash to showcase midbattle triggers related to Primal Reversion.
    • Added the DEMO_TERASTALLIZE hash to showcase midbattle triggers related to Terastallization.
    • Edited the DEMO_ZUD_MECHANICS hash to showcase new midbattle triggers related to ZUD mechanics.
    • Added comments for each demo hash with suggested battle rules to be set in battles that utilize those hashes.
  • Revamped how midbattle speech is sorted so that it will more consistently display the correct speaker.
  • Made it so that multiple trainers may now speak during the same speech animation, as seen in the example gif below.

Multi-trainer dialogue in a single speech event:
zY1ki48.gif


Please refer to the tutorial for more information about changes to specific mechanics.

Note: When updating, please make a copy of any custom work you've added to Midbattle_Config. Updating the plugin will overwrite any of your additions.
General
  • Fixed a bug with certain midbattle effects that would cause crashes when triggered by wild Pokemon in particular.
  • Sped up the black bar animation that appears during trainer dialogue.
  • Cleaned up the DEMO_SPEECH triggers in Midbattle_Config.
  • Added the Generation 9 Pack as an optional dependency to hopefully address compatibility issues.
  • Moved all battle animation-related graphics used by other plugins to Essentials Deluxe, for tidiness.
  • Made many changes to code related to Pokemon sprites to accommodate changes made to Dynamax sprites in ZUD.
  • Revamped battle animations for compatibility with animated battler sprites.
  • Expanded the functionality of the "ace" flag to now have a function when applied to wild Pokemon. Wild Pokemon with the "ace" flag may now initiate battle mechanics such as Mega Evolution without needing a trainer.
  • In a Deluxe wild battle call, you may now flag a wild Pokemon as an "ace" by setting :ace to true.
  • Added debug Pokemon options to allow you to toggle the "ace" flag on Pokemon.

Below is an example of how you would set up a basic battle vs. a wild Pokemon that can use Mega Evolution.
Code:
Expand Collapse Copy
WildBattle.dx_start([:CHARIZARD, 50], {}, {
  :ace => true,
  :item => :CHARIZARDITEX
})


Mega Evolution
  • Revamped Mega Evolution and Primal Reversion code for better compatibility with other mechanics.
  • Made it so now all battle mechanics utilize the ZUD sound effect when triggered, including Mega Evolution.
  • Moved all code in ZUD that edited Mega Evolution mechanics into this plugin instead.
  • Added custom animations for Mega Evolution and Primal Reversion to keep it consistent with other plugins.
  • Changed the Mega Evolution icon used in battle to be more consistent Primal Reversion and other mechanics.
  • Pokemon holding Mega Stones will now display a Mega Stone icon in the party menu, instead of the standard held item icon.
  • Added a Deluxe Plugin debug tool to allow you to toggle the availability of Mega Evolution.

Examples:
Mega Evolution Animation:
giphy.gif


Mega Evolution (Wild Pokemon):
giphy.gif


Primal Reversion Animation:
giphy.gif
giphy.gif


Terastallization
  • Revamped the entire plugin in preparation for the release of the Terastal Phenomenon plugin.
  • Removed some placeholder code previously used for the beta Terastal plugin by wrigty12.
  • Added placeholder data for Tera Types so that you may edit the Tera Types of NPC Trainer Pokemon if Terastallization is installed.
  • Implemented storage screen compatibility so that Tera Type icons may be displayed along with additions made by other plugins.
  • Updated BW Storage System compatibility to support Tera Type icons.
  • Updated Interactable Bag Screen compatibility to support Tera Shard mechanics, as well as compatibility with the Improved Item Text plugin.
  • In a Deluxe wild battle call, you may now set a wild Pokemon's Tera Type by setting :teratype to a type ID.
  • In a midbattle hash, you may now use :teracharge to set whether the player's Tera Orb is charged or not.


Midbattle Triggers
  • Added the "primal" midbattle trigger, which activates whenever a Pokemon initiates Primal Reversion.
  • Added the "gmax" midbattle trigger when using the ZUD Plugin, which activates whenever a Pokemon Dynamaxes specifically when doing so would cause them to enter Gigantamax form.
  • Added the "tera" midbattle trigger when using the Terastal Phenomenon plugin, which activates whenever a Pokemon Terastallizes.
  • Added the "teraType" midbattle trigger when using the Terastal Phenomenon plugin, which activates whenever a Terastallized Pokemon selects a damaging move that matches their Tera Type.
  • Expanded the functionality of several midbattle triggers to now allow you to specify certain criteria. These triggers are as follows:
    • "item"
      You may now attach a specific item ID to this trigger so that it may only trigger when that specific item is used. For example, "itemPOTION" will only ever trigger if the player uses a Potion from their inventory, whereas "itemFULLRESTORE_foe" would only ever trigger when an opponent uses a Full Restore.

    • "statusInflicted"
      You may now attach a specific status ID to this trigger so that it may only trigger when that specific status is inflicated. For example, "statusInflictedPOISON" will only ever trigger if the player's Pokemon is inflicted with the Poison status, whereas "statusInflictedBURN_foe" would only ever trigger when an opponent's Pokemon is inflicted with the Burn status.

    • "mega", "primal", "ultra", "dynamax", "gmax", "zmove", "tera", "teraType"
      You may now attach a specific species ID to these triggers so that they may only trigger when that specific species triggers them. For example, "megaGYARADOS" will only ever trigger if the player specifically Mega Evolves a Gyarados, and no other species; whereas "primalKYOGRE_foe" would only ever trigger specifically when the opponent has a Kyogre that enters Primal form. You may also attach a Type ID instead to trigger when a Pokemon of a particular type triggers these mechanics, instead. When using a Type ID with the "zmove" or "teraType" triggers, the type will instead refer to the type of the Pokemon's selected move. When using a Type ID with the "tera" trigger, the type will instead refer to the Tera Type of the Pokemon, instead of its actual types.

    • "recall", "beforeNext", "afterNext"
      You may now attach a specific species ID OR a specific type ID to these triggers so that they may only trigger when the specific species OR a Pokemon of a specific type is switched out or enters battle. For example, "recallPIKACHU" will only ever trigger when the player withdraws a Pikachu from battle; whereas "afterNextPSYCHIC_foe" would only ever trigger specifically when the opponent sends in a Psychic-type Pokemon.

    • "fainted"
      You may now attach a specific species ID OR a specific type ID to these triggers so that they may only trigger when the specific species OR a Pokemon of a specific type faints. For example, "faintedMEOWTH" will only ever trigger when the player has a Meowth on the field that faints; whereas "faintedWATER_foe" would only ever trigger specifically when the opponent has a Water-type Pokemon on the field that faints.


Please refer to the tutorial for more information about changes to specific mechanics.

Note: When updating, please make a copy of any custom work you've added to Midbattle_Config. Updating the plugin will overwrite any of your additions.
  • Like
Reactions: CelestialFearow
General
  • Fixed several errors related to undefined methods.
  • Fixed a bug that would cause an error when Ultra Burst is available in battle when using the ZUD Plugin.
  • Fixed an issue where fainted Pokemon will still have their databoxes displayed during cinematic battle text displays.
  • Cinematic battle speech can now be used on the player's side too, and will display the player or ally as the speaker. Trainer sprites won't slide in for these speakers, however.
  • When setting speech or text as an array to be triggered mid-battle, you may now have sound effects and animations play during that speech by including the :SE, :Cry or :Anim symbols in the array to set a sound effect, battler cry, or animation during a cinematic speech event, respectively. It also accepts move ID's to play the animation of a specific move as well.
  • Added DEMO_CAPTURE_TUTORIAL to Midbattle_Config which may be used as an example to set up a scripted battle that may serve as a basic capture tutorial.
  • Added DEMO_VS_SADA_PHASE_1 and DEMO_VS_SADA_PHASE_2 to Midbattle_Config which may be used as an example to replicate both phases of battle versus AI Sada from Pokemon Scarlet.


Deluxe Battle Rules
  • Added the following settings to be used in the "Rules" hash for a Deluxe Battle:
    • :victory - Allows you to set certain music to play as the victory jingle for this battle (or no jingle to play).
    • :player - Allows you to temporarily change the name and/or outfit of the player character for this battle only.
    • :party - Allows you to set a temporary party to be used by the player for this battle only.
    • :setcapture - Allows you to set all Poke Balls thrown in a wild battle to always be 100% or 0% successful.
    • :autobattle - Allows you to set the AI to control the player's choices in this battle.


Midbattle Triggers
  • Added the following midbattle triggers:
    • "move" - Triggers when a battler uses ANY move during the attack phase.
    • "physicalMove" - Triggers when a battler uses a physical move during the attack phase.
    • "specialMove" - Triggers when a battler uses a special move during the attack phase.
    • "statusInflicted" - Triggers when a battler is inflicted with a status condition.
    • "battleStyle" - Triggers when a battler initiates EITHER battle style (PLA Battle Styles).
  • Renamed the following midbattle triggers so that they are more clear about when they trigger, or are more consistent with other triggers:
    • "attack" renamed to "damageMove"
    • "status" renamed to "statusMove"
    • "damage" renamed to "damageTaken"
    • "halfhp" renamed to "halfHP"
    • "halfhp_final" renamed to "halfHPLast"
    • "lowhp" renamed to "lowHP"
    • "lowhp_final" renamed to "lowHPLast"
  • You may now add a type ID at the end of any "move" trigger to specifically trigger when a move of that particular type is used. For example, "moveFIRE", "statusMoveWATER", "physicalMoveFAIRY", etc.
  • With the "move" trigger specifically, you may add a particular move ID at the end to only trigger when that specific move is used. For example, "moveBODYSLAM" will only ever trigger when the move Body Slam is used.


Midbattle Keys
  • The :ability key used in a midbattle hash now accepts :Reset as a value to reset the battler's ability back to whatever its natural ability is.
  • Added the following keys to be used in a midbattle hash:
    • :blankspeech - May be used to display normal text with cinematic black bars without being tied to a specific speaker.
    • :usemove - May be used to control which specific move a battler will use this turn.
    • :lockspecial - May be used to toggle the availability of battle mechanics such as Mega Evolution mid-battle.


Please refer to the tutorial for more information about changes to specific mechanics.

Note: When updating, please make a copy of any custom work you've added to Midbattle_Config. Updating the plugin will overwrite any of your additions.


VIDEO EXAMPLE
Here's a video showcasing DEMO_VS_SADA_PHASE_1 and DEMO_VS_SADA_PHASE_2 added in this update. This is just an example to show what can be accomplished with this update (particularly phase 2).
  • Fixed a bug that would prevent the use of the "Shift" command during battles where you have three battlers on your side.
  • Fixed a visual bug where a Pokemon's move window would display over the black bar during trainer dialogue in a Deluxe Battle.
  • Refactored the entire code relating to the Fight Menu in battle; making it far easier to read and edit, and more modular.
  • Added several new plugin Settings that are used to assign a value to each battle mechanic that can be triggered through the Fight Menu.
  • All Message Types introduced by my other plugins have now been moved to this plugin instead, for tidiness.
  • Added new optional data properties for GameData::Item called PortionName and PortionNamePlural in preparation of the Improved Item Text plugin.
  • Changed any item text displays utilized by the plugin to now display portion name text wherever appropriate.
  • Added new optional data property for GameData::Item called HeldDescription to set up an alternative description for items. This may be used to display a second, completely different line of description text of an item if they have an effect that differs for some reason when viewed in other menus outside of the bag screen. (Z-Crystals, for example)
  • Changed any item text displays utilized by the plugin to now display held description text wherever appropriate.
  • The :setstyle key used in the "rules" hash of a Deluxe Battle has been renamed to :setmode so that it isn't confused with Battle Styles.
  • The :size key used in the "rules" hash of a Deluxe Battle now accepts strings to allow you to set up uneven battle sizes, such as "3v1" or "2v3", or any existing combination you'd like. It still also accepts a number as it did before to set the battle size generally.
  • The :status key used in a midbattle hash now accepts :Random as a valid entry, to randomly select a status effect to apply, out of all main status effects. Alternatively, you may now input an array of statuses to randomize a status out of the specific ones you've entered in the array.
  • The :item and :ability keys used in a midbattle hash now accept an array to randomly give a battler an item/ability out of the specific ones you've entered in the array.
  • The :stats key used in a midbattle hash now accepts :Random in place of a stat ID when setting up an array of stats to change. This will randomly select a stat to change by the number of inputted stages. This will never select a stat that already appears in your stat array.
  • The :useitem key used in a midbattle hash will now properly allow a trainer to use ANY item in battle that has an in-battle effect, not just in-battle items such as X Attack. This means you can force a trainer to use things such as Potions, Ethers, a flute item, or even Poke Balls (though only the player can be forced to use these).
  • The :usespecial key used in a midbattle hash is now compatible with the Focus Meter plugin, and will now accept :Focus as a value to force a trainer to use their Pokemon's built up Focus, or to manipulate the level of their Focus Meter.

Please refer to the tutorial for more information about changes to specific mechanics.

Note: When updating, please make a copy of any custom work you've added to Midbattle_Config. Updating the plugin will overwrite any of your additions.
Back
Top