Dynamax

Section 7.E

PokeCommunity Link

Download Link

This plugin builds upon the Deluxe Battle Kit to add the Dynamax mechanic introduced in Pokemon Sword & Shield. All functionality for this mechanic has been replicated in this plugin, and will work along side other battle gimmicks such as Mega Evolution without issue. In the following subsections, I'll go over specific areas of this plugin in more detail. Below, I'll go over general plugin functionality.


Dynamax Availability

Once this plugin is installed, Dynamax will be available to use right out of the gate. However, there are some criteria that must be met in order for the option to use it to appear in battle. Below I'll go over all the factors for Dynamax eligibility, how to disable its availability, and various other settings related to its use.

General

Dynamax is available by default after installation. However, if you would like to disable the Dynamax mechanic entirely at any point, you may do so by using a game switch.

In the plugin settings, there is a setting named NO_DYNAMAX which stores the switch number used for disabling Dynamax. This is saved as switch number 66 by default, but please renumber this if this conflicts with an existing game switch that you use.

If this switch is turned on, then Dynamax will be disabled for all trainers and Pokemon until the switch is turned back off. If you're playing in debug mode, you can easily toggle this switch on and off by going into the debug menu and opening the "Deluxe plugin settings..." menu, and then selecting "Toggle Dynamax."


Map Eligibility

Unlike other battle gimmicks, Dynamax is unique in that it is only available while the user is near a Power Spot. A Power Spot is a special area where Dynamax energy is present for Pokemon to draw from. In Sword & Shield, Power Spots were limited to battle arenas (where the Gyms, Battle Tower, and Pokemon League were built upon) and raid dens.

To emulate this mechanic, this plugin allows you to give any map the PowerSpot flag in its metadata in the map_metadata.txt PBS file. Any map given this flag will be considered a Power Spot, and allow for Dynamax to be used during battle. By default, this plugin will automatically flag the following Essentials example maps as Power Spots:

  • Cedolan Gym (map 10)

  • Pokémon League (map 37)

  • Battle Tower (map 56)

  • Battle Palace (map 59)

  • Battle Arena (map 61)

  • Battle Factory (map 64)

If you would like to make Dynamax a universal mechanic that can be used on any map, then instead of using map flags, you may simply turn on a switch to enable this. In the plugin settings, there is a setting named DYNAMAX_ON_ANY_MAP which stores the switch number used to automatically consider all maps in the game as Power Spots. This is saved as switch number 67 by default, but please renumber this is this conflicts with an existing game switch that you use.

If this switch is turned on, every map will be considered a Power Spot, and thus support Dynamax. If you're playing in debug mode, you can easily toggle this switch on and off by going into the debug menu and opening the "Deluxe plugin settings..." menu, and then selecting the toggle within the "Dynamax settings..." menu.


Battle Eligibility

By default, Dynamax is a mechanic that may only be used by a trainer during trainer battles or raids. It cannot normally be used during regular wild battles, just as it functioned in Sword & Shield. However, this plugin can allow you to enable Dynamax for wild battles through the use of a switch.

In the plugin settings, there is a setting named DYNAMAX_IN_WILD_BATTLES which stores the switch number used for enabling Dynamax during wild battles. This is saved as switch number 68 by default, but please renumber this is this conflicts with an existing game switch that you use.

If this switch is turned on, then Dynamax will be available for any trainer on the player's side during wild battles, as long as all other conditions required for Dynamax are met. If you're playing in debug mode, you can easily toggle this switch on and off by going into the debug menu and opening the "Deluxe plugin settings..." menu, and then selecting the toggle within the "Dynamax settings..." menu.


Pokemon Requirements

By default, all Pokemon are capable of using Dynamax if all the necessary requirements to utilize the mechanic are met. However, there are some exceptions. The following are all of the reasons why a Pokemon may be unable to use Dynamax:

  • The Pokemon is a Shadow Pokemon.

  • The Pokemon is already Dynamaxed.

  • The Pokemon is in Mega form, or meets all the criteria for Mega Evolution.

  • The Pokemon is in Primal form, or meets all the criteria for Primal Reversion.

  • The Pokemon is holding a Z-Crystal and is capable of using an eligible Z-Move.

  • The Pokemon is in Ultra Burst form, or meets all the criteria for Ultra Burst.

  • The Pokemon is Terastallized.

  • The Pokemon is currently the host of another Pokemon with the Commander ability.

  • The Pokemon has been manually flagged as unable to use Dynamax.

  • The Pokemon is a member of a species that has been given the CannotDynamax flag in its PBS data. By default, Zacian & Zamazenta will always have this flag.

Note that if a Pokemon is copying the appearance of another species who cannot Dynamax (such as Zacian or Zamazenta) through effects such as Transform, Imposter, or Illusion, then the transformed Pokemon will also be unable to Dynamax. This is also true if transformed into a species that may only Dynamax by entering a special Eternamax form, such as Eternatus.

If you would like to flag a specific Pokemon as unable to use Dynamax, you may do so by setting Pokemon.dynamax_able = false, where Pokemon is the specific Pokemon object that you'd like to flag.

While playing in debug mode, this can also be done for the player's Pokemon by opening a Pokemon's debug options and selecting "Plugin attributes..." at the bottom of the list, and then selecting "Dynamax..." From here, you can select "Set eligibility" to toggle the Pokemon's ability to use Dynamax.

If you would like to flag an entire species as unable to use Dynamax instead of just a specific Pokemon, you may also do this by giving that species the CannotDynamax flag in its PBS data.

Note that in any case where a Pokemon is unable to use Dynamax, it will be considered as having no Dynamax Level or G-Max Factor, and so this will be hidden from all displays that would show this information.


Debug Battle Options

While playing in debug mode, you can manually edit Dynamax options for trainers and Pokemon. To do so, open the debug menu while in battle (F9), and navigate to "Trainer options..." and then "Dynamax." You'll be able to toggle Dynamax availability for each trainer from here.

If you'd like to edit the Dynamax attributes of specific battlers or party members, you may also do this by navigating to a specific Pokemon from the "Battlers..." or "Pokemon teams" options, and then scrolling down to the "Dynamax values" option for that Pokemon.

Player

Dynamax Band

To use the Dynamax mechanic yourself, you'll first need to have an item in your inventory that unlocks the ability to use it. Any item given the DynamaxBand flag in its PBS data will be considered a Dynamax Band, which will allow you to use Dynamax. By default, this plugin adds the Dynamax Band introduced in Pokemon Sword & Shield. Feel free to create your own custom Dynamax Band items, too.

In addition, while playing in debug mode you may also hold CTRL while opening the Fight menu to force the Dynamax button to appear even if you have already used the mechanic during this battle.


Wishing Star

This plugin also adds the Wishing Star item from Sword & Shield. In those games, this was simply a key item that didn't have any inherent utility. However, this plugin revamps this item with a custom battle function not found in the original games. This provides unique functionality that may replenish your Dynamax Band during battle, allowing you to use Dynamax an additional time during the same battle. Using this item in battle uses up the player's entire turn in order to try and keep it (sorta) balanced, so this will use up the turn for all of your Pokemon even if you have more than one Pokemon to issue commands to.

This is intended to be a "just for fun" item, and not to be used seriously, but it's there if you'd like to make use of it.

NPC Trainers

Trainer Requirements

Other trainers may utilize Dynamax too, whether they're opponents or partners. The requirements for this are the same as for the player, they are simply set up differently. Like with the player, the NPC trainer must be given an eligible Dynamax Band in their inventory in order to use Dynamax.

The Pokemon eligible to be Dynamaxed by an NPC trainer all follow the same rules as for the player. This means that any Pokemon in an NPC trainer's party which is considered an "exception" will not be considered for Dynamax. If you'd like to flag certain members of an NPC's party as ineligible for Dynamax, you may do so by setting NoDynamax = true for that Pokemon in the trainer's PBS data. This may also be done within the in-game trainer editor while playing in debug mode.

This setting can be useful if the trainer has a certain Pokemon in their party that would be entirely wasteful to use Dynamax on due to not being able to enjoy the benefits of the HP boost (Shedinja, for example), or because changing their moves might actually screw up some sort of specific strategy you have in mind for that trainer to use. You can also use this setting to force a trainer to only consider Dynamax for a certain member in their party by flagging all other members besides the one you want them to Dynamax with this flag.


Dynamax AI

The Pokemon that an NPC trainer will Dynamax will be automatically determined by the trainer's AI. How effective this is depends on the skill level of each particular trainer. Below, I'll give a general description of how each trainer skill level will handle how to utilize Dynamax.

Note that Trainers who are given the ReserveLastPokemon flag in their PBS data will always save Dynamax for their final Pokemon, no matter what. This behavior will override what their natural AI behavior would otherwise be.

  • "Low" skilled trainers (skill < 32) Typically, the lowest skilled trainers will only ever consider how to use Dynamax offensively. This means if using Dynamax would give them an immediate offensive advantage due to dealing more raw damage to one of the currently active targets on the field, then they will use it.

  • "Medium" skilled trainers (skill >= 32) Medium skilled trainers will also only consider Dynamax offensively, however they will gauge this across their entire party. So if Dynamax would give them an advantage, but there's another Pokemon in their party which would gain a substantially higher advantage from Dynamax, then they will hold off on using it until they send out that Pokemon. This calculation is constantly checked each turn, so which Pokemon would be "best" to use Dynamax on may constantly change as the battle state progresses.

  • "High" skilled trainers (skill >= 48) High skill trainers will consider Dynamax both offensively and defensively, and across their entire party. If they have determined that their active Pokemon would gain the most overall benefit from Dynamax when considering both offense and defense, then they'll choose to Dynamax that Pokemon.

  • "Best" skilled trainers (skill = 100+) Trainers with the highest skill level will naturally be given the ReserveLastPokemon flag. Any trainer with this skill flag will always save Dynamax for their final Pokemon, no matter what. This will typically include trainers such as Gym Leaders and Elite Four members. If you choose to disable this flag for a trainer with this skill level, then their AI behavior will default to how "high" skilled trainers function.

For trainers of all skill levels, if they are down to their final Pokemon and have still yet to use Dynamax in this battle for some reason, then they may use it out of desperation even if it's not particularly advantageous. The will still avoid using it however if it would put them in a dramatically worse position, though (depending on their AI).

Wild Pokemon

Dynamax may also be utilized by wild Pokemon, without the need of a trainer or a Dynamax Band. These wild Dynamax battles work a little differently than a standard wild battle.

When encountered, a wild Pokemon will immediately Dynamax at the start of battle, before any commands can even be entered. While the Pokemon is Dynamaxed, it cannot be captured. Unlike normal Dynamax, this will not expire after a certain number of turns. Instead, the wild Pokemon's Dynamax will only end when their HP falls to a certain threshold (1/6th of their max HP). Any damage dealt by direct attacks cannot exceed this threshold until the wild Pokemon's Dynamax ends. When removed, the Pokemon will become catchable again like a normal wild Pokemon.

If the wild Pokemon is ineligible to use Dynamax for some reason, nothing will happen and the battle will just be a standard wild battle. To set up battles against wild Dynamax Pokemon, you may do so by using the "wildDynamax" Battle Rule.


Dynamax Counts

Essentials internally keeps track of a variety of the player's game statistics. One of those statistics is how many times the player has used Mega Evolution. To keep Dynamax in line with this, I've added trackers which will keep count of various statistics related to Dynamax, too.

Below are all of the new statistics tracked by this plugin, and how to call them.

  • Dynamax count This plugin keeps count of how many times the player has Dynamaxed a Pokemon in battle. This can be called with the script $stats.dynamax_count.

  • Gigantamax count This plugin keeps count of how many times the player has Gigantamaxed a Pokemon in battle. This can be called with the script $stats.gigantamax_count.

  • Total Dynamax levels gained This plugin keeps count of how many times the player has increased their Pokemon's Dynamax levels through the use of Dynamax Candies. This can be called with the script $stats.total_dynamax_lvls_gained.

  • Total number of times G-Max Factor was given This plugin keeps count of how many times the player has given the Gigantamax Factor to their Pokemon through the use of Max Soup. This can be called with the script $stats.total_gmax_factors_given.

  • Wild Dynamax battles won This plugin keeps count of how many battles the player has won against wild Dynamax Pokemon. A "win" counts as either defeating or capturing the Pokemon to end the battle. This can be called with the script $stats.wild_dynamax_battles_won.

Last updated