📒
Deluxe Battle Kit Tutorial
  • Deluxe Battle Kit for v21.1
    • Deluxe Animations
      • Animation: Databoxes
      • Animation: Item Usage
      • Animation: Fleeing Pokemon
      • Animation: Mega Evolution
      • Animation: Primal Reversion
      • Animation: Shadow Pokemon
    • Deluxe Battle Rules
      • Rules: Battle Modes
      • Rules: Battle Visuals
      • Rules: Battle Audio
      • Rules: Editing the Player
      • Rules: Mega Evolution
      • Rules: Capturing Pokemon
      • Rules: Editing Wild Pokemon
    • Wild Boss Attributes
      • Attribute: Boosted HP
      • Attribute: Immunities
    • Mid-Battle Scripting
      • Trigger Keys
        • Triggers: Round Phases
        • Triggers: Battler Turns
        • Triggers: Item Usage
        • Triggers: Wild Capture
        • Triggers: Switching
        • Triggers: Megas & Primals
        • Triggers: Move Usage
        • Triggers: Damage Results
        • Triggers: Battler Condition
        • Triggers: End of Effects
        • Triggers: End of Battle
        • Triggers: Variable
        • Triggers: Choices
        • Triggers: Extensions
          • Extensions: User
          • Extensions: Frequency
      • Command Keys
        • Commands: Text & Speech
        • Commands: Audio & Animation
        • Commands: Utilities
        • Commands: Battle Mechanics
        • Commands: Battler Attributes
        • Commands: Battlefield Conditions
        • Commands: Extensions
      • Advanced Scripting
        • Advanced: Speech Utilities
          • Speech: General
          • Speech: Choices
          • Speech: Speakers
        • Advanced: Variable Utilities
        • Advanced: Storing Scripts
        • Advanced: Hardcoding
        • Advanced: Global Scripts
    • Example Battles
      • Examples: Wild Battles
      • Examples: Trainer Battles
    • Miscellaneous Utilities
    • Add-On Tutorials
      • Enhanced Battle UI
        • UI: Battler Info
        • UI: Poke Ball Shortcut
        • UI: Move Info
      • SOS Battles
        • SOS: Plugin Overview
        • SOS: PBS Data
        • SOS: Battle Rules
        • SOS: Mid-Battle Scripting
      • Raid Battles
      • Z-Power
        • Z-Power: Z-Moves
        • Z-Power: Ultra Burst
        • Z-Power: Animations
        • Z-Power: Battle Rules
        • Z-Power: Mid-Battle Scripting
      • Dynamax
        • Dynamax: Properties
        • Dynamax: Move Data
        • Dynamax: Form Data
        • Dynamax: Animations
        • Dynamax: Battle Rules
        • Dynamax: Mid-Battle Scripting
      • Terastallization
        • Terastal: Tera Types
        • Terastal: Tera Forms
        • Terastal: Animations
        • Terastal: Battle Rules
        • Terastal: Mid-Battle Scripting
      • Improved Item AI
        • Item AI: Handlers
      • Wonder Launcher
        • Launcher: Plugin Overview
        • Launcher: PBS Data
        • Launcher: Battle Rules
        • Launcher: Mid-Battle Scripting
      • Animated Pokemon System
        • Animated: Pokemon Sprites
        • Animated: Dynamic Sprite Effects
        • Animated: UI Sprites
        • Animated: Sprite Editor
        • Animated: Mid-Battle Scripting
      • Animated Trainer Intros
        • Intros: Trainer Sprites
        • Intros: Sprite Editor
        • Intros: UI Sprites
        • Intros: Battle Transitions
        • Intos: Mid-Battle Scripting
Powered by GitBook
On this page

Was this helpful?

  1. Deluxe Battle Kit for v21.1
  2. Mid-Battle Scripting
  3. Trigger Keys
  4. Triggers: Extensions

Extensions: User

Section 4.A.14.A

These extensions specify the activation of a Trigger Key from a particular perspective. For example, attaching the "_player" extension would only activate Trigger Key's from the player's perspective, while attaching the "_foe" extension would only activate Trigger Keys from the opponent's perspective. However, not every key is compatible with these extensions. Since these extensions are used to specify the perspective of who has activated a specific key, any keys that occur during a point in battle that don't happen from any particular perspective aren't compatible.

For example, "TargetHPLow" is compatible with these extensions, since it is possible to specify a particular battler that may have low HP. However, "BattleEnd" would not be compatible with these extensions, since the end of the battle doesn't occur from any particular perspective, it's simply part of the structure of battle itself. As a rule of thumb, all of the keys in the subsections "Triggers: End of Battle", "Triggers: Variable", and "Triggers: Choices" are not compatible with these extensions. In addition, none of the keys in the "Wild Capture" subsection are compatible with these extensions since only the player is ever capable of capturing a Pokemon, so there isn't ever a need to specify any other perspective for those Trigger Keys. With all of that out of the way, here are all of the possible user extensions that can be used:

"_player"

Add this extension to a key so that it may only trigger when activated by one of the player's Pokemon. For example, "BeforeMove" would trigger before any Pokemon uses a move, but "BeforeMove_player" would only ever trigger before one of the player's Pokemon uses a move.

"_player1"

Add this extension to a key so that it may only trigger when activated by the Pokemon that occupies the left-most position on the player's side (index 0). For example, "BeforeMove_player" would trigger before any of the Pokemon on the player's side uses a move, but "BeforeMove_player1" would only ever trigger before the first Pokemon on the player's side uses a move.

"_player2"

Add this extension to a key so that it may only trigger when activated by the Pokemon that occupies the right-most position (doubles) or center position (triples) on the player's side (index 2). For example, "BeforeMove_player1" would trigger before the first Pokemon on the player's side uses a move, but "BeforeMove_player2" would only ever trigger before the second Pokemon on the player's side uses a move. This extension does nothing in single battles.

"_player3"

Add this extension to a key so that it may only trigger when activated by the Pokemon that occupies the right-most position on the player's side (index 4). For example, "BeforeMove_player2" would trigger before the second Pokemon on the player's side uses a move, but "BeforeMove_player3" would only ever trigger before the third Pokemon on the player's side uses a move. This extension does nothing in single or double battles.

"_foe"

Add this extension to a key so that it may only trigger when activated by one of the opponent's Pokemon. For example, "AfterMove" would trigger after any Pokemon uses a move, but "AfterMove_foe" would only ever trigger after one of the opponent's Pokemon uses a move.

"_foe1"

Add this extension to a key so that it may only trigger when activated by the Pokemon that occupies the right-most position on the opponent's side (index 1). For example, "AfterMove_foe" would trigger after any of the Pokemon on the opponent's side uses a move, but "AfterMove_foe1" would only ever trigger after the first Pokemon on the opponent's side uses a move.

"_foe2"

Add this extension to a key so that it may only trigger when activated by the Pokemon that occupies the left-most position (doubles) or center position (triples) on the opponent's side (index 3). For example, "AfterMove_foe1" would trigger after the first Pokemon on the opponent's side uses a move, but "AfterMove_foe2" would only ever trigger after the second Pokemon on the opponent's side uses a move. This extension does nothing in single battles.

"_foe3"

Add this extension to a key so that it may only trigger when activated by the Pokemon that occupies the left-most position on the opponent's side (index 5). For example, "AfterMove_foe2" would trigger after the second Pokemon on the opponent's side uses a move, but "AfterMove_foe3" would only ever trigger after the third Pokemon on the opponent's side uses a move. This extension does nothing in single or double battles.

"_ally"

Add this extension to a key so that it may only trigger when activated by a Pokemon owned by a partner trainer who is teamed up with the player. For example, "BattlerFainted_player" would trigger upon any Pokemon on the player's side fainting, but "BattlerFainted_ally" would only ever trigger upon a Pokemon owned by the player's partner fainting. Unlike "player" and "foe", there is only a single "ally" extension, since the player cannot ever have more than one partner trainer with them at a time, anyway.

PreviousTriggers: ExtensionsNextExtensions: Frequency

Last updated 10 months ago

Was this helpful?