Skip to main content
View

Battle transitions reference

PSDK ships thirteen wild battle transitions and twelve trainer ones, all picked by the same game variable. This page lists them side by side, with the value to set, what plays on screen, and which graphics each one uses.

How the transition is chosen

When a battle starts, a short animation plays before the battlers appear. That animation is the transition, and it is chosen by game variable 31, which PSDK also exposes under the name Yuki::Var::TrainerTransitionType.

That single variable feeds two separate lists. When the battle is against a trainer, PSDK reads the value in the trainer list. When it is a wild encounter, it reads the same value in the wild list. The two lists have nothing in common, so one value means two different animations:

  • 3 is the Diamond/Pearl/Platinum gym leader intro in a trainer battle, and the Ruby/Sapphire wipe in a wild encounter.
  • 0 is the X/Y trainer intro in a trainer battle, and the Red/Blue/Yellow wipe in a wild encounter.
Set the variable back after a special battle

Variable 31 keeps its value until something changes it. Set it to 3 for a gym leader and forget to reset it, and every wild encounter that follows plays the Ruby/Sapphire wipe instead of your usual one. Always add a second Control Variables command after the battle, putting it back to the value your project uses normally, 0 by default.

To set it from an event, add a Control Variables command before the one that starts the battle. From a script, the line is:

$game_variables[Yuki::Var::TrainerTransitionType] = 3

In the two tables below, the paths in the Graphics column are relative to graphics/transitions/ unless stated otherwise. Every one of those files ships with PSDK, so you only have to touch them if you want to reskin a transition.

See them before you choose

A written description only goes so far for an animation. This slideshow shows each transition in motion: Battle transitions preview. Look there first to pick the one you want, then come back here for the value to set.

Wild transitions

These play when the battle is not against a trainer.

ValueOn screenGraphics
0Red/Blue/Yellow. The screen flashes, a full-screen wipe plays, then the battlers slide in from opposite sidesspritesheets/rby_wild
1Gold. Same choreography as 0, different wipespritesheets/gold_wild
2Crystal. Same choreography as 0, different wipespritesheets/crystal_wild
3Ruby/Sapphire. The screen splits into two interlaced halves that slide off left and right, uncovering blackblack_screen
4Diamond/Pearl/Platinum. The same split as 3 with a different interlacing patternblack_screen
5HeartGold/SoulSilver. Same choreography as 0, slower wipe: 1.5 second instead of 0.5spritesheets/heartgold_soulsilver_wild
6HeartGold/SoulSilver, cave. Same as 5 with the cave wipespritesheets/heartgold_soulsilver_cave_wild
7HeartGold/SoulSilver, sea. The screen ripples, a bubble rises and oscillates, then a wave and a black panel scroll upassets/heartgold_soulsilver_sea_wild_01, assets/heartgold_soulsilver_sea_wild_02, black_screen
8Black/White. The screen distorts in an expanding ring while zooming in to three times its sizeNone, the effect is computed
9Diamond/Pearl/Platinum, cave. A mask dissolves the screen while it zooms in to three times its size around its centreshaders/diamant_perle_wild
10Ruby/Sapphire, cave. A mask dissolves the screen over one second, without any zoomshaders/ruby_saphir_wild
11Black/White, sea. The screen warps for 1.5 secondNone, the effect is computed
12Diamond/Pearl/Platinum, sea. The screen ripples, then a mask dissolves it half a second inshaders/shader_003, see the note below

The mask of transition 12 is the one exception to the naming: PSDK asks for it under the name shaders/diamant_perle_sea_wild, while the file that ships is shaders/shader_003.png. The transition works as it is, but if you replace that graphic, name your file shader_003.png rather than the name the engine announces.

Trainer transitions

These play when the battle is against a trainer.

ValueOn screenGraphics
0X/Y. The screen blacks out through six masks, then a background with a gradient and three scrolling halos appears and the opponent's artwork rises into frame, the small copy first, then the large onebattle_bg, battle_deg, battle_halo1, battle_halo2, black_out00 to black_out05, plus the trainer artwork you provide, see below
1Diamond/Pearl/Platinum. An image spins a full turn while zooming from a fifth of the screen to the whole of it, then two animations play in sequencespritesheets/diamant_perle_trainer_01, spritesheets/diamant_perle_trainer_02
2Red/Blue/Yellow. A mask sweeps over the screen for 2.75 seconds, then the battlers slide in from opposite sidesshaders/rby_trainer
3Diamond/Pearl/Platinum gym leader. VS bar transition, see Set up a VS bar trainer transitionThe bar and the portrait are yours to draw
4HeartGold/SoulSilver. Same choreography as 1 with the HeartGold/SoulSilver imagesspritesheets/heartgold_soulsilver_trainer_01, spritesheets/heartgold_soulsilver_trainer_02
5Ruby/Sapphire. The screen flashes six times over 1.5 second, then a mask dissolves itshaders/ruby_saphir_trainer
6Battle Frontier, vertical. Same as 5 with a vertical mask patternshaders/battle_frontier_vertical
7Battle Frontier, horizontal. Same as 5 with a horizontal mask patternshaders/battle_frontier_horizontal
8Red. A gold Poké Ball sits in the centre of the screen while it flashes six times, then a wipe plays over itpokeball_gold, spritesheets/crystal_wild
9Black/White. The screen zooms in slightly, then distorts for 1.4 secondNone, the effect is computed
10HeartGold/SoulSilver gym leader. VS bar transition, see Set up a VS bar trainer transitionThe bar and the portrait are yours to draw
11Team Rocket. VS bar transition, see Set up a VS bar trainer transitionassets/team_rocket/hgss_bg_1, assets/team_rocket/hgss_bg_2, assets/team_rocket/hgss_strobes, plus the portrait you provide

The three VS bar transitions are the only shipped ones that expect images from you, because they show the opponent's face. Their filenames, canvas sizes and naming rules are covered in Set up a VS bar trainer transition.

What happens on a value that is not in the list

Nothing crashes. Both lists have a fallback entry, and both point at the Red/Blue/Yellow transition. A wild encounter started with variable 31 on 13 therefore plays the Red/Blue/Yellow wipe, and a trainer battle started on 12 plays the Red/Blue/Yellow trainer transition.

This is worth knowing when you debug: an unexpected Red/Blue/Yellow animation usually means variable 31 holds a value that does not exist in the list being read, and quite often that the battle you thought was a trainer battle is being read as a wild one.

Which trainer image the transition shows

A trainer transition has to display the opponent somewhere, and PSDK lets each transition pick which of the trainer's images it wants. Three are available, and they are the three fields of the Resources tab of a trainer in Pokémon Studio: Battle sprite, Artwork - Full and Artwork - Small.

Every shipped transition uses the Battle sprite, except one: the X/Y transition, value 0, which asks for Artwork - Full. It expects two files in graphics/battlers/, derived from that name: one ending in _sma for the small copy that appears first, and one ending in _big for the large one that rises into frame. Set variable 31 to 0 for a trainer whose Artwork - Full field is empty and the transition has nothing to show.

If you write a transition of your own and want it to read a different image, that choice is declared alongside the transition class. See Create a custom battle transition.

The 3D camera reuses both lists: every transition here has a 3D counterpart, generated automatically from the 2D one, so the values in these tables stay valid with the camera enabled.

Conclusion

  • Game variable 31 picks the transition, and the same value points at two different animations: one in the trainer list, one in the wild list.
  • Always reset variable 31 after a special battle, otherwise the wild encounters that follow inherit its value.
  • PSDK ships thirteen wild transitions, values 0 to 12, and twelve trainer ones, values 0 to 11. All of their graphics ship with the engine.
  • A value outside the list does not crash: it falls back to the Red/Blue/Yellow transition.
  • The three VS bar transitions, values 3, 10 and 11, are the only ones asking for images of your own, and the X/Y transition, value 0, is the only one reading the trainer's full artwork instead of the battle sprite.