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.