- Pokémon Essentials Version
- v18.1 ➖
Battle Debug Menu v18.1
Looking for a version for Essentials v19.1? Click here.
Thanks to Maruno for adding a hook, if you want to call it that, for adding a debug menu that can be used in battle! This makes it a lot easier to add this whole thing to existing projects.
Ever tested a new ability or move for your game and hat to restart the battle over and over just because the conditions were just not quite right? Or wanted to simulate a specific situation and couldn't get the AI to put your Pokemon to sleep? Then this Battle Debug Menu is for you! (It also is, if you just want to mess around a bit)
What you can do with the debug menu:
This menu provides color coded values and converts some effects to more understandable values (e.g. instead of showing only the move ID it will show the moves name).
Some effects were intentionally left out, as there is no point in changing them for various reasons. These include effects that rely on abilities.
Some changes (like type changes) only apply to that battle and are not permanent. The debug menu works for all battle types (1v2,2v2,1v3, etc)
How to install:
1) Copy the contents of each .txt file in a new script section above main but below Debug_Pokemon. Ensure the following order:
With
3) Done! Pressing F9 during battle will now open the Battle Debug Menu
Adding new effects
Adding new effects is fairly simple, as long as they only store a number, true/false, battler index or move ID.
The following steps assume that you have already added the effects to PBEffects, PBStats, PBBattleTerrains or PBWeather! If you want to add a battle meta data make sure it is added to the PokeBattle_Battle class.
For all types there is a constant in Debug_Battle_Constants. Here is a table that describes these constants and what format they expect.
*The type field is optional and only needs to be present if the value is not just a number or true/false value. It can be one of the following:
:MOVEID = This effect holds a move id and therefore will display the move name in the menu. It will also open the selection of the battlers moves.
It can be used for side effects, field effects and meta data as well, but requires further coding. By default these effects do not select a user and therefore cannot choose a move for it.
:USERINDEX = This effect holds the index of the user of a move etc and therefore will display the name of the battler. It will also open the selection of an active battler.
It is also available for side effects, field effects and meta data.
Some Images
For questions and bug reports visit our Discord channel https://discord.gg/7msDPaN or post them here.
Looking for a version for Essentials v19.1? Click here.
Thanks to Maruno for adding a hook, if you want to call it that, for adding a debug menu that can be used in battle! This makes it a lot easier to add this whole thing to existing projects.
Ever tested a new ability or move for your game and hat to restart the battle over and over just because the conditions were just not quite right? Or wanted to simulate a specific situation and couldn't get the AI to put your Pokemon to sleep? Then this Battle Debug Menu is for you! (It also is, if you just want to mess around a bit)
What you can do with the debug menu:
- About a battler:
- Change HP
- Change Status
- Change Level
- Change Ability
- Change Moves
- Change Item
- Change Types
- Set Stat Changes
- Set Battler Effects (Aqua Ring and such)
- Show Summary (will reflect made changes)
- About the battle field:
- Change Weather
- Change Terrain
- Set Field Effects (Wonder Room and such)
- Set Side Effects ( Aurora Veil and such)
- Set Battle Meta Data (Exp Gain, Opponents Items and such)
This menu provides color coded values and converts some effects to more understandable values (e.g. instead of showing only the move ID it will show the moves name).
Some effects were intentionally left out, as there is no point in changing them for various reasons. These include effects that rely on abilities.
Some changes (like type changes) only apply to that battle and are not permanent. The debug menu works for all battle types (1v2,2v2,1v3, etc)
How to install:
1) Copy the contents of each .txt file in a new script section above main but below Debug_Pokemon. Ensure the following order:
- Debug_Battle_Constants
- Debug_Battle_Listers
- Debug_Battle_Utilities
- Debug_Battle
Ruby:
# NOTE: This doesn't do anything yet. Maybe you can write your own debugging
# options!
Ruby:
pbDebugBattle
3) Done! Pressing F9 during battle will now open the Battle Debug Menu
Adding new effects
Adding new effects is fairly simple, as long as they only store a number, true/false, battler index or move ID.
The following steps assume that you have already added the effects to PBEffects, PBStats, PBBattleTerrains or PBWeather! If you want to add a battle meta data make sure it is added to the PokeBattle_Battle class.
For all types there is a constant in Debug_Battle_Constants. Here is a table that describes these constants and what format they expect.
Constant | Description | Format |
BATTLER_EFFECTS | Effects that apply to a battler | PBEffects::EffectName => {:name => "Displayed name", :type => type*} |
SIDE_EFFECTS | Effects that apply to a side (player side, opposing side) | PBEffects::EffectName => {:name => "Displayed name", :type => type*} |
FIELD_EFFECTS | Effects that apply to the whole field | PBEffects::EffectName => {:name => "Displayed name", :type => type*} |
WEATHER | Weather types | PBWeather::WeatherName => "Displayed name" |
TERRAINS | Terrain types | PBBattleTerrains::TerrainName => "Displayed name" |
BATTLE_METADATA | Information about the battle itself (turn counts, etc.) | :variableName (e.g. @turnCount becomes :turnCount) |
BATTLE_STATS | Stats that can increase during the battle | PBEffects::EffectName => {:name => "Displayed name"} |
*The type field is optional and only needs to be present if the value is not just a number or true/false value. It can be one of the following:
:MOVEID = This effect holds a move id and therefore will display the move name in the menu. It will also open the selection of the battlers moves.
It can be used for side effects, field effects and meta data as well, but requires further coding. By default these effects do not select a user and therefore cannot choose a move for it.
:USERINDEX = This effect holds the index of the user of a move etc and therefore will display the name of the battler. It will also open the selection of an active battler.
It is also available for side effects, field effects and meta data.
Some Images
For questions and bug reports visit our Discord channel https://discord.gg/7msDPaN or post them here.
- Credits
- Credit if used:
Hollow_Ego for Battle Debug Menu structure and logic
Maruno and his team for all code that was resused from base Essentials