📒
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. Add-On Tutorials
  3. Animated Trainer Intros

Intos: Mid-Battle Scripting

Section 7.J.5

This plugin adds various new keys to be used by the Deluxe Battle Kit's mid-battle scripting functionality.


Command Keys

These are keys which trigger a trainer sprite's intro animation to replay before or after midbattle speech.

"setAnimSpeaker" ⇒ Integer, Symbol, or Array

This command functions identically to the "setSpeaker" command found in the Mid-Battle Scripting section of the base guide of the Deluxe Battle Kit, so please refer to that command for everything you need to know in using this command.

The only difference between the two is that using "setSpeaker" will slide a still sprite of a trainer on screen to speak, while "setAnimSpeaker" will slide a speaker on screen who will play their intro animation prior to speaking.

Note that if you set this as an array, you can add :Reversed as the last entry in the array to make the speaker's animation play in reverse prior to speaking. Depending on the animation, this may allow you to suggest different things prior to the trainer speaking.

"hideAnimSpeaker" ⇒ Boolean or Symbol

This can be used if you want to force a trainer to slide off screen after their speech ends, but you want them to play their intro animation first before leaving. To do this, you simply have to set this command to true.

However, if you instead set this to :Reversed, the trainer will play their intro animation in reverse prior to sliding off screen. Depending on the animation, this may allow you to suggest different things prior to the trainer leaving.


Hardcoding

Here's a list of methods and/or properties that you might want to reference when hardcoding a midbattle script, since this plugin adds a lot of new custom content which you may need to call on to make certain things happen:

GameData::TrainerType
  • trainer_sprite_scale Returns the amount of scaling applied to the front sprite of this trainer type.

  • trainer_sprite_hue Returns the hue value applied to this trainer type's sprites.

  • shows_shadow? Returns true if this trainer type should display a shadow during battle.

Battle::Scene
  • pbShowAnimatedSpeaker(1, nil, reversed = false, id = nil) Used to slide a trainer sprite on screen and play their intro animation prior to speaking. The first two arguments should probably always be 1 and nil, as there's no reason to need to set these differently in the majority of cases. The reversed argument is false by default, but you may set this to true if you want the trainer's intro animation to play backwards. The id argument can be the index of the battler who's owner you want to slide on screen to speak, or an ID of a particular trainer type that you want to appear on screen. If no ID is set, the owner of the first battler on the foe's side will default as the speaker.

  • pbHideAnimatedSpeaker(reversed = false) Used to animate a speaker's on-screen sprite after speaking and then sliding them off screen after their animation completes. You can set reversed to true if you want this animation to play backwards before leaving the screen. By default, this value is set to false.

PreviousIntros: Battle Transitions

Last updated 22 days ago

Was this helpful?