Essentials Docs Wiki

The Essentials wiki has moved and is now at: Essentials Engine wiki

This wiki will no longer be updated.

READ MORE

Essentials Docs Wiki
Advertisement

This page describes the Debug mode available in Essentials.

What is Debug mode?[]

Debugging refers to playing a game with the aim of making sure everything works properly in it, and finding and fixing any problems that may arise before the game is made publicly available.

To help with this, games will often have a Debug mode, which is a mode only accessible to the game's developers. This mode provides additional commands and options that allow the developers to play through the game more easily and see what is going on behind the scenes. These commands can include the ability to modify Pokémon stats, warp to maps, and change game variables.

Essentials has a Debug mode.

Enabling Debug mode[]

A game run from RPG Maker XP (rather than run by itself) is automatically in Debug mode. The Debug mode can be also toggled on and off by setting the variable $DEBUG to true or false respectively.

Gameplay changes in Debug mode[]

Debug mode changes a number of features in the game, and enables several more options. These changes are:

  • A console window is opened alongside the game's window. You can print messages to the console with echoln "message" lines of code in the scripts to help you monitor various aspects of the scripts in use.
  • Upon starting the game, it may compile plugin scripts and data in the PBS files if the game detects they have been updated. You can hold Ctrl while the game starts to force these to compile (or hold Shift to force just the plugin scripts to compile) - the game's window must be in focus to do this, not the console window.
  • The splash and title screens are skipped, and the Continue/New Game screen is shown straight away.
    • The Continue/New Game screen contains a "Debug" option which opens a limited form of the Debug menu described below.
  • The Pause menu contains an extra option: "Debug". This opens the main Debug menu. See below for details.
    • This Debug menu can also be accessed by pressing F9.
  • There is a Debug menu in battle, accessed by pressing F9 while in the main choice menu (Fight/Bag/Pokémon/Run).
  • In the Party screen and the Pokémon storage screen, the interact menu for Pokémon/eggs contains an extra option: "Debug". This opens a menu with debugging commands that apply to that Pokémon. See below for details.
  • In the Bag, the interact menu for items contains an extra option: "Make Mystery Gift". This lets the player create a Mystery Gift containing that item.
  • The player can throw away important items such as Key Items and HMs from the Bag.
  • The player can use any field moves at any time, even without the required Badge.
    • If the field move can be used by interacting with something in the overworld (e.g. a small tree for Cut, water for Surf), then the player can use that move even if none of their Pokémon knows it.
    • Field moves that can only be used by selecting it from a Pokémon's menu in the Party screen (e.g. Teleport, Sweet Scent) still need to be known by a Pokémon in order to select it in the first place. Gym Badge requirements are ignored for these, though.

There are many more features of Debug mode, all of which require the Ctrl key to be pressed or held (this allows normal functionality to be experienced by not holding it). These features include:

  • Hold Ctrl when closing an error message to copy that message to the computer's clipboard.
  • Hold Ctrl while starting the game in Debug mode to force the game to recompile plugin scripts and PBS files.
  • In the overworld, hold Ctrl while moving to move over any tile.
  • In the overworld, hold Ctrl to skip trainer battles and prevent wild encounters from occurring.
  • In the overworld, hold Ctrl while using the Poké Radar to be able to use it regardless of its battery level.
  • When using Fly, hold Ctrl to allow flying to a location that hasn't been visited yet.
  • In the mining mini-game, hold Ctrl while breaking the wall to prevent the crack from getting longer.
  • In battle, hold Ctrl after a move's animation plays to force its additional effect to occur (if it has one).
  • In battle, hold Ctrl at the start of throwing a Poké Ball to ensure that it will capture the Pokémon.
  • In battle, hold Ctrl when choosing "Run" to ensure fleeing is successful. You can even run from trainer battles this way, and will be given the choice of whether to treat it as a win or loss for the player.
  • In battle, hold Ctrl while opening the Fight menu to force the Mega Evolution option to appear (ignoring whether you have already performed a Mega Evolution this battle, and ignoring whether you have a Mega Ring item).

Debug menu[]

DebugMenu

The main Debug menu, as found in the Pause menu or by pressing F9

The Debug menu contains functions useful for debugging or configuring a Pokémon game. You can access it from the Continue/New Game screen, the Pause menu or by pressing F9 in the overworld.

The Debug menu has two levels of options. An option with "..." at the end of its name opens a sub-menu. Debug functions are grouped together for easier navigation.

The Debug menu functions are as follows:

Menu Debug function Description
Field options... Warp to map Transfers the player to a random passable spot on a chosen map.
Use PC Boots up a PC, from which the Pokémon storage and the player's PC can be accessed.
Switches Displays a list of all defined Game Switches and allows them to be modified.
Variables Displays a list of all defined Game Variables and allows them to be modified.
Safari Zone and Bug-Catching Contest Only shown while in a Safari Zone game or a Bug-Catching Contest. Allows the time/steps remaining to be changed, as well as the number of Safari/Sport Balls the player still has.
Change field effects Lists various effects that apply in the overworld and allows them to be changed/toggled. This includes the number of steps remaining for Repel's effect, whether Strength/Flash have been used, and whether the Black/White Flute effects apply.
Refresh map Makes all events on the current map refresh themselves and recheck their page conditions.
Day Care Displays the Pokémon currently deposited in the Day Care and allows them to be deposited/withdrawn and to force the generation of an egg.
Toggle storage wallpapers Lists all special box wallpapers for Pokémon storage and allows them to be locked and unlocked.
Skip credits Toggles whether the player can skip the Credits the next time they are played.
Battle options... Test wild battle Starts a battle with a wild Pokémon of a chosen species and level.
Test wild battle advanced Lets you choose one or more wild Pokémon to battle against. Each Pokémon can be entirely customised via the Pokémon Debug menu described below. The number of Pokémon the player is allowed to use in the battle can also be set (up to 3).
Test trainer battle Starts a single battle with a chosen Pokémon trainer.
Test trainer battle advanced Lets you choose one or more Pokémon trainers to battle against. The number of Pokémon allowed on each side of the field can be independently set (up to 3 per side).
Set wild encounters version Changes the value of $PokemonGlobal.encounter_version, which determines the encounter tables used for wild encounters.
Roaming Pokémon Displays information on all defined roaming Pokémon, including whether they are roaming and where, and allows roaming status to be changed. Also allows the locations of each roaming Pokémon to be changed.
Reset map's trainers Resets the Self Switches of all trainer events on the current map. Specifically, this affects any event with "trainer" in its name (case insensitive), and turns off their Self Switches A and B.
Toggle Exp. All's effect Toggles whether the effect of the Exp. All applies, assuming the player does not have that item in the Bag. It gives experience to all Pokémon in the party after a battle.
Toggle logging of battle messages Sets whether the game will log various useful messages in battle. This log is recorded in "debuglog.txt" in the "Data" folder.
Pokémon options... Heal party Fully heals all Pokémon in the player's party.
Add Pokémon Gives the player a Pokémon of a chosen species and level. It will be sent to the PC if the player's party is full. The player is the original owner.
Fill storage boxes Fills all Pokémon storage boxes with one Pokémon of each species, all at level 50. All forms of all these species will also be marked as seen.
Clear storage boxes Removes all Pokémon from the Pokémon storage.
Give demo party Fills the player's party with a set of predefined Pokémon.
Quick hatch all party eggs Makes all eggs in the player's party require only one more step to hatch.
Access Pokémon storage Opens the Pokémon storage screen.
Shadow Pokémon options... (inside the "Pokémon options..." menu) Toggle Snag Machine Toggles whether the player possesses the Snag Machine, which lets all their Poké Balls catch Shadow Pokémon.
Toggle Purify Chamber access Toggles whether the player can access the Purify Chamber via the PC.
Use Purify Chamber Opens the Purify Chamber to purify Shadow Pokémon.
Use Relic Stone Uses the Relic Stone to purify a chosen Shadow Pokémon.
Item options... Add item Adds a chosen number of a chosen item to the player's Bag.
Fill Bag Adds a chosen number of every item to the player's Bag.
Empty Bag Removes all items from the Bag.
Player options... Set money Sets the player's money, Coins or Battle Points (BP) to a chosen value.
Set Gym Badges Lists the first 24 Gym Badges and allows the player's ownership of each one to be toggled. Note that the Badges are only called "Badge 1", etc. and that you don't need to have all of them in your game.
Toggle running shoes Sets whether the player owns a pair of running shoes.
Toggle Pokédex and Regional Dexes Sets whether the player owns a Pokédex and which Regional Dexes/National Dex have been unlocked.
Toggle Pokégear Sets whether the player owns a Pokégear.
Edit phone and contacts Sets the time remaining until the next random phone call, whether rematches with trainers are allowed, and the maximum rematch version. Also allowed all trainer contacts in the phone to be made ready for a rematch.

For each contact in the phone, sets whether they are visible in the phone screen, sets the time remaining until they become ready for a rematch, and sets the last version of that trainer that the player defeated.

Toggle access to storage from party screen Toggles whether the effect of the Pokémon Box Link applies, assuming the player does not have that item in the Bag. It allows direct access to the Pokémon storage system from the party screen, except on certain maps.
Set player character Sets the player's character (i.e. a choice of the players listed in the metadata).
Set player outfit Sets the player's outfit number.
Set player name Renames the player.
Randomize player ID Randomizes the player's ID.
PBS file editors... Edit map_connections.txt Lets the user visually connect maps together.
Edit encounters.txt Allows the Pokémon encounters for each map to be modified.
Edit trainers.txt Allows the details of individual trainers and their Pokémon to be edited.
Edit trainer_types.txt Allows the details of each trainer type to be edited.
Edit map_metadata.txt Allows each map's metadata to be defined.
Edit metadata.txt Allows the global metadata to be defined.
Edit items.txt Allows the data of items to be edited.
Edit pokemon.txt Allows the data of Pokémon species to be edited.
Edit pokemon_metrics.txt A visual way to position Pokémon sprites in battle.
Auto-set pokemon_metrics.txts Automatically changes the positioning coordinates of all Pokémon sprites at once, to position them in roughly the right place. Can be used as a starting point.
Edit regional_dexes.txt A simpler way of creating and modifying the defined Regional Dexes.
Other editors... Battle animation editor Opens the Animation Editor to create and edit move animations and some other animations used in battle.
Battle animation organiser Allows the rearranging and deleting of battle animations in an easier way than the Animation Editor.
Import all battle animations Reads all animation data in the "Animations" folder and adds it to the game.
Export all battle animations Creates data files for each separate animation and puts them in the "Animations" folder. Note that the Animation Editor allows individual animations to be exported; this feature is a bulk exporter.
Edit terrain tags Allows the terrain tags of each tile in each tileset to be defined. This feature is necessary because of the terrain tag limit set by RPG Maker XP.
Fix invalid tiles Checks through all maps to ensure they do not use any tiles that don't exist in the tilesets they use (tiles beyond the bottom of the tileset, or autotile slots without a graphic). Properly clears any invalid tile found.
Files options... Compile data Compiles all data from the PBS files.
Create PBS file(s) Generates any chosen PBS file (or all of them) from the data currently loaded in the game.
Rename outdated files Updates the names of berry plant charsets to include an underscore (to be consistent with other file-naming conventions), and updates event data accordingly in any map that uses them.
Extract text for translation Extracts all text in the game for localisation. You can choose which language to extract the text for, and whether to extract common text or game-specific text.
Compile translated text Compiles a folder containing translated text files into a language file.
Manage Mystery Gifts Edits the contents of the master Mystery Gift file, and creates Gift files for uploading.
Reload system cache Refreshes the system's file cache.

When accessed from the Continue/New Game screen, only the "PBS file editors...", "Other editors..." and "Files options..." sub-menus are accessible. This is because the other sub-menus relate to in-game information which doesn't exist yet (because a save file has not been started or loaded).

Pokémon Debug menu[]

DebugMenuPokemon

The Pokémon-specific Debug menu.

The Pokémon Debug menu is accessible from the party screen, the Pokémon storage screen and the Debug menu function "Test Wild Battle Advanced" (see above). It contains options that edit aspects of the chosen Pokémon.

Most of the functions are self-explanatory, and often display information related to the selected function (e.g. the Pokémon's Hidden Power when "Set IVs" is selected).

An function with "..." at the end of its name opens a sub-menu with more function in it.

The function in the Pokémon Debug menu are as follows:

Debug function Description
HP/status... Allows you to set the Pokémon's HP and status condition. You can also make it fainted or heal it completely. You can also edit its Pokérus information.
Level/stats... Lets you sets the Pokémon's level and/or Exp amount (the latter can only set values that lie within the current level). You can also edit the Pokémon's EVs, IVs, randomise its personal ID, set its happiness value and change its contest stats.
Moves... Allows you to change the Pokémon's moveset. You can teach any Pokémon (except Shadow Pokémon) any move, even ones the Pokémon couldn't naturally learn. You can also make it forget a move (even the last known move), and reset the Pokémon's moveset to what it would have by default for its species/form/level. Each move's PP amount and PP Up value can be edited. Finally, the Pokémon's current moveset can be recorded as its initial moveset (for Move Relearner purposes).
Set item Allows you to change the Pokémon's held item. You can choose any item to make it hold (even Key Items and HMs which normally cannot be held), and you can delete its held item.
Set ability Allows you to change the Pokémon's ability. You can either choose from the abilities available to that Pokémon (including Hidden Abilities), or you can choose any ability at all. If the latter, the chosen ability is lost if the Pokémon changes species or form. You can also reset the Pokémon's ability and make it recalculate the one it would naturally have.
Set nature Allows you to change the Pokémon's nature. You can also reset the Pokémon's nature and make it recalculate the one it would naturally have.
Set gender Allows you to change the Pokémon's gender. You cannot make a Pokémon a gender it couldn't naturally be (e.g. male Chansey). You can also reset the Pokémon's gender and make it recalculate the one it would naturally have.
Species/form... Allows you to change the Pokémon's species, e.g. Pikachu, Charmander, Diglett. Also allows you to change the Pokémon's form; note that you can only choose from the forms defined in the PBS files "pokemon.txt" and "pokemon_forms.txt". If the species has a "getForm" proc (which determines the Pokémon's form automatically), you can also apply an override to force the chosen form despite the "getForm" proc. You can also remove this override.
Cosmetic info... Lets you set the Pokémon's shininess (and reset it to what it was naturally), the type of Poké Ball it is held in, the ribbons it has, its nickname, and information about the original trainer.
Set discardable Lets you toggle whether the Pokémon can be stored (in Pokémon storage or in the Day Care), released or traded.
Set egg Allows you to convert the Pokémon between an egg and a Pokémon. A warning message will appear if the Pokémon couldn't naturally be an egg, but you can still make it one anyway. You can also change an egg's remaining steps to 1.
Shadow Pkmn... Allows you to turn the Pokémon into a Shadow Pokémon. You can also change its heart gauge value if it is one. You still have to use a Purify Chamber or Purification Stone to completely remove the Shadow status.
Mystery Gift Allows you to create a Mystery Gift containing the Pokémon. You can set the name and ID of the gift, and set the Pokémon's obtain text. The gift will be added to the "MysteryGiftMaster.txt" file.
Duplicate Duplicates the Pokémon. If the party is full, the duplicate will be stored in the PC.
Delete Deletes the Pokémon. This is irreversible.

Battle Debug menu[]

The battle Debug menu allows you to change many aspects of a battle, including the Pokémon and trainers participating in it, the environment/weather/etc., and the special effects that apply. You can also view the speed order of Pokémon in battle. You can access it by pressing F9 in the main battle menu (the one in which you choose between Fight/Bag/Pokémon/Run).

Advertisement