-Made with Pkmn Essentials v17.2 + EBS in mind.
If you use Pokemon Reborn's Battle Animations files in your game, and you also use the EBS system, you may notice a 1.5 second hang each time the game loads a battle animation. You can remove this lag by caching the animations files. Here's a handy tutorial to help you out!
-First things first, this will obviously only work if you use Pokemon Reborn's animations. So, download the game and copy over two files from the "Data" folder, and paste them inside the "Data" folder of your project.
PkmnAnimations.rxdata
Move2anim.dat
-Then, open your script editor within your project.
-Go to your EBS Settings (SJPlugins_Settings), and set
CUSTOMANIMATIONS = false REPLACEMISSINGANIM = true
-Then, make a new script section above "Main", and paste the following code:
-Then, make another new section and paste this:
-Next, go to PField_Metadata, and go to class PokemonTemp, and add the following to the bottom of the class, under forceSingleBattle:
attr_accessor :cachePkmnAnims
attr_accessor :cachePkmnAnims2
-After you do that, go to PokeBattle_Scene, in the def pbFindAnimation, where move2anim is referenced and replace the line:
move2anim=load_data("Data/move2anim.dat")with
move2anim=pbLoadCachedAnimations2
-Next, go to the def pbCommonAnimation, and replace the line:
animations=load_data("Data/PkmnAnimations.rxdata")with
animations=pbLoadCachedAnimations
-Right below in pbAnimation, replace the line:
animations=load_data("Data/PkmnAnimations.rxdata")with
animations=pbLoadCachedAnimations
Now, in the script section EliteBattle_2 (or Animations Script if it's renamed) under def PbAnimation, below "anim=animid[0]" replace:
animations=load_data("Data/PkmnAnimations.rxdata")with
animations=pbLoadCachedAnimations
In the script section EliteBattle_7 (), under "if REPLACEMISSINGANIM" right under "anim=animid[0], replace
animations=load_data("Data/PkmnAnimations.rxdata")with
animations=pbLoadCachedAnimations
Lastly, if you happen to use KleinStudio's Transform Mosaic script, go to the class PokeBattle_Scene's def pbAnimation, under anim=animid[0], replace:
animations=load_data("Data/PkmnAnimations.rxdata")with
animations=pbLoadCachedAnimations
Once you do all that, you should have lagless battle animations! Let me know if you have any questions!