thepsynergist
Vinemon: Sauce Edition Programmer and Composer
- 795
- Posts
- 15
- Years
- California, USA
- Seen Jul 24, 2024
-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.
-Then, open your script editor within your project.
-Go to your EBS Settings (SJPlugins_Settings), and set
-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:
-After you do that, go to PokeBattle_Scene, in the def pbFindAnimation, where move2anim is referenced and replace the line:
with
-Next, go to the def pbCommonAnimation, and replace the line:
with
-Right below in pbAnimation, replace the line:
with
Now, in the script section EliteBattle_2 (or Animations Script if it's renamed) under def PbAnimation, below "anim=animid[0]" replace:
with
In the script section EliteBattle_7 (), under "if REPLACEMISSINGANIM" right under "anim=animid[0], replace
with
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:
with
Once you do all that, you should have lagless battle animations! Let me know if you have any questions!
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.
Code:
PkmnAnimations.rxdata
Move2anim.dat
-Then, open your script editor within your project.
-Go to your EBS Settings (SJPlugins_Settings), and set
Code:
CUSTOMANIMATIONS = false REPLACEMISSINGANIM = true
-Then, make a new script section above "Main", and paste the following code:
Spoiler:
Code:
#Animations Cache
class PokemonTemp
attr_accessor :cachePkmnAnims
end
def pbLoadCachedAnimations
$PokemonTemp=PokemonTemp.new if !$PokemonTemp
if !$PokemonTemp.cachePkmnAnims
$PokemonTemp.cachePkmnAnims=load_data("Data/PkmnAnimations.rxdata")
end
return $PokemonTemp.cachePkmnAnims
end
-Then, make another new section and paste this:
Spoiler:
Code:
#Moves2Anim Cache
class PokemonTemp
attr_accessor :cachePkmnAnims2
end
def pbLoadCachedAnimations2
$PokemonTemp=PokemonTemp.new if !$PokemonTemp
if !$PokemonTemp.cachePkmnAnims2
$PokemonTemp.cachePkmnAnims2=load_data("Data/move2anim.dat")
end
return $PokemonTemp.cachePkmnAnims2
end
-Next, go to PField_Metadata, and go to class PokemonTemp, and add the following to the bottom of the class, under forceSingleBattle:
Code:
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:
Code:
move2anim=load_data("Data/move2anim.dat")
Code:
move2anim=pbLoadCachedAnimations2
-Next, go to the def pbCommonAnimation, and replace the line:
Code:
animations=load_data("Data/PkmnAnimations.rxdata")
Code:
animations=pbLoadCachedAnimations
-Right below in pbAnimation, replace the line:
Code:
animations=load_data("Data/PkmnAnimations.rxdata")
Code:
animations=pbLoadCachedAnimations
Now, in the script section EliteBattle_2 (or Animations Script if it's renamed) under def PbAnimation, below "anim=animid[0]" replace:
Code:
animations=load_data("Data/PkmnAnimations.rxdata")
Code:
animations=pbLoadCachedAnimations
In the script section EliteBattle_7 (), under "if REPLACEMISSINGANIM" right under "anim=animid[0], replace
Code:
animations=load_data("Data/PkmnAnimations.rxdata")
Code:
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:
Code:
animations=load_data("Data/PkmnAnimations.rxdata")
Code:
animations=pbLoadCachedAnimations
Once you do all that, you should have lagless battle animations! Let me know if you have any questions!
Last edited: