SOS: Plugin Overview

Section 7.B.1

This plugin adds several new features that I will go over briefly below. Details on how to actually set and use these mechanics will be dealt with in their appropriate subpages.


SOS Calls

The primary function of this plugin implements the SOS mechanic, which allows wild Pokemon to call for help during battle. SOS calls may only happen if the wild Pokemon is alone on their side of the field, aren't suffering from any status conditions, and aren't in the semi-invulnerable phase of a two-turn attack.

If the LIMIT_SOS_CALLS_TO_ONE plugin setting is set to true, then wild Pokemon will only be able to call for help once per battle, unless an Adrenaline Orb was used. If this setting is set to false, then wild Pokemon will be able to call for help indefinitely.

The odds of a wild Pokemon calling for help is based on their CallRateSOS, which is set in their PBS data. If this data isn't set, it's assumed to be zero, and thus that species cannot use the SOS mechanic. The call rate of a wild Pokemon in battle may be modified by various factors which increase its likelihood, such as how much remaining HP the caller has, whether it was struck by a Super Effective move that turn, or whether you have a Pokemon on the field with the Intimidate, Unnerve, or Pressure abilities. If the Adrenaline Orb is used in battle, this will also increase the odds of the wild Pokemon calling for help.

The exact species that a wild Pokemon may call is based on their SpeciesSOS, which is set in their PBS data. This is an array containing a number of species that can be possibly called when a wild Pokemon of this species calls for help. If this data isn't set, it's assumed that this species may only call other members of its own species. In addition to this, you may also set conditional species that the species may summon on certain maps or when encountered through certain methods by setting ConditionalSOS in their PBS data.

As more wild Pokemon are summoned via SOS calls, this will increase your SOS chain. The higher your SOS chain grows, the higher your odds of each summoned Pokemon having higher IV's, hidden abilities, or even being shiny. After you begin an SOS chain, all EV's your Pokemon gain from this battle will be doubled. This effect will not expire, even if your chain prematurely ends. The only way for an SOS chain to end is if you KO the original caller Pokemon, and there are no other Pokemon on its side of the field that are in its evolutionary family.

If you would like to increase the likelihood of shiny Pokemon appearing during an SOS chain, you can open the Settings file in the plugin and set SOS_CHAIN_SHINY_MULTIPLIER to whatever you'd like. The number of rolls the game makes to check for shininess during an SOS chain will be multiplied by this number, allowing you to set the odds to your liking.

For a more detailed breakdown on SOS mechanics that have been covered in this section, I recommend skimming through the Bulbapedia page on this topic.

More details on the various PBS data used to set up SOS calls may be found in the "SOS: PBS Data" subsection.


Rival Species

This plugin allows you to set up species rivalries for wild Pokemon. This means that whenever a wild Pokemon of a particular species detects a Pokemon on the field that is a member of a species it considers a rival species, the wild Pokemon will mercilessly attack that rival species, even if they're on the same side.

For example, in Pokemon X & Y, if you encountered a horde battle versus a horde of Zangoose, sometimes a random Seviper would be among the Pokemon found in the horde. But because Zangoose and Seviper have such a bitter rivalry, these wild Pokemon would often attack each other in horde battles, even though they were on the same side.

This plugin allows you to replicate this behavior, as seen above. Whichever species you enter in RivalSpecies in a species' PBS data will always take top priority for the wild Pokemon's AI. This means it will always prefer to attack rival species as its primary target. If there are multiple rival species on the field for the Pokemon to choose from, it'll randomly select one of those targets. Non-rival species will take the lowest priority, and the wild Pokemon will only ever choose to target them if they are forced to by an effect, or if all rival species on the field have been removed or defeated.

This feature can work hand-in-hand with the SOS mechanic, since this can be set up to create scenarios where wild Pokemon meet rival species on the battlefield. For example, in Pokemon Sun & Moon, wild Corsola would have a chance of attracting wild Mareanie through SOS calls. However, Mareanie considers Corsola prey, so once Mareanie is on the field it would try to attack and KO Cosola first, even before it focuses on attacking the player. This same behavior can be mimicked by this plugin by listing Corsola as a rival species for Mareanie, and listing Mareanie as a potential SOS species that Corsola can call. You can use this to design unique interactions between different wild species.

More details on setting up rival species may be found in the "SOS: PBS Data" subsection.


Totem Battles

Pokemon Sun & Moon introduced Totem Pokemon; wild boss Pokemon that acted as powerful trial challenges. Totem Battles utilized the SOS mechanic to allow the Totem Pokemon to summon minions during battle. This plugin allows you to easily set up your own Totem Battles as well by utilizing the "totemBattle" Battle Rule.

Totem Battles aren't dramatically different than standard wild battles, but there are some key differences.

  • You cannot run from a Totem Battle.

  • You cannot throw Poke Balls during a Totem Battle.

  • During battle, Totem Pokemon will be referred to as "Totem __" instead of "The wild __."

  • Totem Pokemon get an aura boost at the start of the battle that raises their stats a number of stages. The exact stats and stages can be set.

  • Totem Pokemon have more advanced AI than wild Pokemon, mirroring medium skilled trainers.

  • Totem Pokemon and their allies will work together in battle, ignoring any species rivalries.

  • The Totem Pokemon will always be able to call for help, even if the SOS mechanic is disabled.

  • Unlike normal wild Pokemon, Totem Pokemon cannot be prevented from calling for help while suffering from a status condition. Totems also have a 100% call rate, which overrides whatever the base call rate is for the species in its PBS. The success rate when calling allies is also 100%.

  • Unlike normal wild Pokemon, Totem Pokemon can only call for help a maximum of two times during the battle. The first Pokemon will always be summoned at the end of the first turn, and the second Pokemon will be summoned once the Totem Pokemon's HP drops to 30% of their max HP or lower.

  • The wild Pokemon that are called by the Totem Pokemon will be summoned in a fixed order, instead of randomly chosen. However, this only occurs when SOS species are set via battle rules. Any species set with the "setSOSPokemon" rule will always be summoned first, and any species set with the "addSOSPokemon" rule will always be summoned second.

Example:

setBattleRule("battleIntroText", "You were challenged by Totem {1}!")
setBattleRule("totemBattle", [:DEFENSE, 1, :SPECIAL_DEFENSE, 1])
setBattleRule("setSOSPokemon", :PELIPPER)
setBattleRule("addSOSPokemon", :CASTFORM)
WildBattle.start(:LUDICOLO, 20)

In this example above, the player will be challenged by a level 20 Totem Ludicolo. The Totem Pokemon will gain +1 Defense and +1 Sp. Def with their aura boost at the start of the battle, and summon a Pelipper to their aid at the end of the first turn. When Totem Ludicolo grows weak, it'll summon a Castform to its side as its second support Pokemon.

More details on the "totemBattle" Battle Rule may be found in the "SOS: Battle Rules" subsection.


Mid-Battle Wild Reinforcements

Having wild Pokemon join the battle isn't only limited to SOS mechanics. You can make wild Pokemon join a battle whenever you want, and function completely independently of any SOS mechanics. You can even use this to make a third wild Pokemon join the battle. This can be done through mid-battle scripting by utilizing the "addWild" Command Key.

More details on the "addWild" Command Key may be found in the "SOS: Mid-Battle Scripting" subsection.

Note that while in playing in debug mode, you can manually force a new wild Pokemon to join the battle by opening the debug menu (F9) and selecting "Battlers..." and then "Add new foe."


Mid-Battle Trainer Reinforcements

You aren't only limited to using this plugin to have wild Pokemon join the opponent during wild battles. You can even utilize this in trainer battles by having entirely new trainers enter the fight at any point in battle. You can use this to suddenly turn a 1v1 battle into a 1v2 or even a 1v3 fight. This can be done through mid-battle scripting by utilizing the "addTrainer" Command Key.

More details on the "addTrainer" Command Key may be found in the "SOS: Mid-Battle Scripting" subsection.

Note that while in playing in debug mode, you can manually force a new trainer to join the battle by opening the debug menu (F9) and selecting "Battlers..." and then "Add new foe."

Wonder Launcher Compatibility

If the Wonder Launcher add-on is installed and a new trainer is added during a Wonder Launcher battle, their inventory will automatically be updated with Launcher items and will start with 0 LP.

Last updated