Animated: Mid-Battle Scripting
Section 7.I.5
Command Keys
These are keys which trigger certain actions related to animated Pokemon sprites.
"spriteSpeed" => Integer
Forces a battler's sprite to animate at the entered speed. This must be set to an integer ranging from 0-4.
0: No animation (static sprite)
1: Fast animation
2: Normal animation
3: Slow animation
4: Very slow animation
"spriteReverse" => Boolean
Forces a battler's sprite to begin animating backwards. This must be set to either true
to begin animating in reverse, or false
to return to its original animation.
"spriteHue" => Integer
Forces a battler's sprite to change hue. This must be set to a number ranging from -255 to 255 to set the desired hue.
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::Species
has_gendered_sprites?
Returns true if the species has the"HasGenderedSprites"
flag, which is automatically assigned if the species has female-exclusive sprites that aren't tied to a form.shows_shadow?(back = false)
Returns true if the species' sprites should cast a viewable shadow. This will only return false when a species has itsShadowSize
metrics set to 0, or ifback
is true and theSHOW_PLAYER_SIDE_SHADOW_SPRITES
plugin setting is disabled.
GameData::SpeciesMetrics
back_sprite_scale
Returns the scaling applied to a species' back sprite.front_sprite_scale
Returns the scaling applied to a species' front sprite.back_sprite_speed
Returns the animation speed applied to a species' back sprite.front_sprite_speed
Returns the animation speed applied to a species' front sprite.sprite_super_hue
Returns the Super Shiny hue applied to a species' sprites.get_random_hue
Re-randomizes the Super Shiny hue applied to a species' sprites if one has not been set.shows_shadow?(back = false)
Returns true if the species' sprites should cast a viewable shadow. This will only return false when a species has itsShadowSize
metrics set to 0, or ifback
is true and theSHOW_PLAYER_SIDE_SHADOW_SPRITES
plugin setting is disabled.
Battle::Scene class
pbGetBattlerSprites(idxBattler)
Returns the sprite and shadow sprite objects of the bounder found at the index idxBattler.pbAnimateSubstitute(idxBattler, mode, delay = false)
Animates the Substitute doll for the battler found at the indexidxBattler
. Details on this method can be found in the "Dynamic Sprite Effects" subsection in the write-up related to the Substitute Doll.pbUpdateSubstituteSprite(battler, mode)
Updates the state of the Substitute doll for the battler found at the indexidxBattler
, but without playing any animations. The mode argument functions the same way as it does for thepbAnimateSubstitute
method.
Battle::Battler class
airborneOffScreen?
Returns true if the battler's sprite is currently hidden due to being in the middle of a two-turn attack that sends the user airborne (Fly, Bounce, Sky Drop).vanishedOffScreen?(ignoreAirborne = false)
Returns true if the battler's sprite is currently hidden due to being in the middle of a two-turn attack that puts the user in a semi-invulnerable state. IfignoreAirborne
is true, this will not return true if the battler's shadow is still visible due to being airborne during their semi-invulnerable phase.
Battle::Scene::BattlerSprite class
speed
Sets the animation speed of a battler's sprite, overriding its natural speed. This can be a value ranging from 0-4.reversed
Toggles whether the battler's sprite should animate in reverse or not. This is set to false by default.hue
Sets the hue of a battler's sprite. This can be a value ranging from -255 to 255. This cannot be overwritten if the battler's hue is already being altered due to being Super Shiny.
Last updated