This page describes how to set up a Pokémon Gym. It also describes Gym Badges, and touches upon the Elite Four.
The trainers, including the Gym Leader, are set up just like any other trainer in the game. The one difference is that, after the Gym Leader is defeated, no other trainers in the Gym should challenge the player to a battle, even if they hadn't been defeated beforehand. To arrange this, do the following:
- When the Gym Leader is defeated, turn a Game Switch ON. This Switch indicates that the player has defeated that Gym Leader.
- Include a third page in each trainer's event, which depends on this Game Switch being ON, and which contains text to the effect of: "You've defeated the Gym Leader!"
You can also use this Game Switch in other events, e.g. have the Gym Guy at the entrance say something different, change the contents of a sign, make an obstacle disappear, etc.
There are some predefined Game Switches in Essentials intended for this use.
When the player defeats a Gym Leader, they will reward the player with a Gym Badge. Badges are stored in the array
$Trainer.badges, where each entry is either TRUE or FALSE depending on whether that Badge is owned or not. Note that it starts at zero, so
$Trainer.badges is the first Badge,
$Trainer.badges is the second Badge and so on.
To give the player a Badge, simply set the appropriate entry in this array to TRUE, e.g.
$Trainer.badges = true
You can have as many Badges as you like. The script
$Trainer.numbadges will return the number of Badges the player has.
What badges do
Gym Badges have a few effects in Essentials:
|Obedience|| Traded Pokémon may not follow the player's orders in battle if their level is too high. The obedience level depends on the number of Gym Badges the player has:
This effect is found in the script section PokeBattle_Battler, in
|Power up stats|| Certain stats of the player's Pokémon are boosted during battle if the player has the appropriate number of Badges. By default, this works as follows:
The minimum number of Badges needed to grant a boost to each stat are defined in the script section Settings. If you don't want Badges to boost stats, simply set the numbers to an unattainably high value (e.g. "at least 42 Badges").
|Money lost when losing a battle|| If the player loses a battle, they will lose some of their money. The amount lost depends on the number of Badges the player has:
This effect is found in the script section PokeBattle_Battle, in
|Allows HMs to be used out of battle||HMs can either require a certain number of Badges to be owned before they can be used outside of battle (including 0), or they can require particular Badges to be owned. These settings are defined in the script section Settings.|
Badges have a few other effects in the main games, but those effects haven't been included in Essentials.
- Make the Gyms creative. Most Gyms in the main games have puzzles to solve, and while not all of them can be easily replicated in RPG Maker XP, you can still come up with a few different kinds of puzzle (and many variants of each one).
- Gym Leaders will have well-trained Pokémon, so why not give all their Pokémon high IVs and/or good natures or abilities? They typically also have custom movesets, which usually contain the move taught by the TM they hand out.
- You will likely want to change the order in which HMs are unlocked for use outside of battle, based on the order of progression in your game. Edit the relevant variables in the script section Settings to do so.
- You can have all HM moves usable outside of battle immediately (like in Gen 5), by just making them depend on the player having at least 0 badges.