- 232
- Posts
- 7
- Years
- Seen Dec 3, 2024
Hello,
I would like to ask if anyone has successfully imported the move animations from Pokemon Reborn or Rejuvenation* while minimizing lag? I am using Essentials v17.2 by the way, if that matters.
Attempt #1 (successful but incredibe lag): I copied the sound effects, animation graphics, move2anim.dat, moves.dat, PkmnAnimations.rxdata, and Animations.rxdata from Pokemon Reborn into my game. The lag is quite noticeable. Also, it undoes the animations.rxdata file additions from mej71's Follower add-on, but I'm sure I could re-add those via critical thinking and using the Essentials Docs wiki.
Attempt #2 (unsuccesful): I used "Export All Battle Animations" from Pokemon Reborn, then imported the newly created Animations folder into my game using the "Import all Battle Animations" feature. At first, I got an error:
Exception: Name Error
Message: undefined local variable or method 'index' for ... located in Debug_Actions:797 in 'pbImportAllAnimations'...
Attempt #2.1 (partial success: moves imported without lag, but the moves are not associated correctly): I made a very minor alteration to the def pbImportAllAnimations code, noted in bold. All I did was move 'animations.resize(index)' to within where index is defined and commented out where it previously was.
Spoiler:def pbImportAllAnimations
animationFolders = []
if safeIsDirectory?("Animations")
Dir.foreach("Animations"){|fb|
f = "Animations/"+fb
if safeIsDirectory?(f) && fb!="." && fb!=".."
animationFolders.push(f)
end
}
end
if animationFolders.length==0
Kernel.pbMessage(_INTL("There are no animations to import. Put each animation in a folder within the Animations folder."))
else
msgwindow = Kernel.pbCreateMessageWindow
animations = tryLoadData("Data/PkmnAnimations.rxdata")
animations = PBAnimations.new if !animations
for folder in animationFolders
Kernel.pbMessageDisplay(msgwindow,folder,false)
Graphics.update
audios = []
files = Dir.glob(folder+"/*.*")
%w( wav ogg mid wma mp3 ).each{|ext|
upext = ext.upcase
audios.concat(files.find_all{|f| f[f.length-3,3]==ext})
audios.concat(files.find_all{|f| f[f.length-3,3]==upext})
}
for audio in audios
pbSafeCopyFile(audio,RTP.getAudioPath("Audio/SE/Anim/"+File.basename(audio)),"Audio/SE/Anim/"+File.basename(audio))
end
images = []
%w( png jpg bmp gif ).each{|ext|
upext = ext.upcase
images.concat(files.find_all{|f| f[f.length-3,3]==ext})
images.concat(files.find_all{|f| f[f.length-3,3]==upext})
}
for image in images
pbSafeCopyFile(image,RTP.getImagePath("Graphics/Animations/"+File.basename(image)),"Graphics/Animations/"+File.basename(image))
end
Dir.glob(folder+"/*.anm"){|f|
textdata = loadBase64Anim(IO.read(f)) rescue nil
if textdata && textdata.is_a?(PBAnimation)
index = pbAllocateAnimation(animations,textdata.name)
missingFiles = []
textdata.name = File.basename(folder) if textdata.name==""
textdata.id = -1 # this is not an RPG Maker XP animation
pbConvertAnimToNewFormat(textdata)
if textdata.graphic && textdata.graphic!=""
if !safeExists?(folder+"/"+textdata.graphic) &&
!FileTest.image_exist?("Graphics/Animations/"+textdata.graphic)
textdata.graphic = ""
missingFiles.push(textdata.graphic)
end
end
for timing in textdata.timing
if timing.name && timing.name!=""
if !safeExists?(folder+"/"+timing.name) &&
!FileTest.audio_exist?("Audio/SE/Anim/"+timing.name)
timing.name = ""
missingFiles.push(timing.name)
end
end
end
animations[index] = textdata
animations.resize(index)
end
}
end
#animations.resize(index)
save_data(animations,"Data/PkmnAnimations.rxdata")
Kernel.pbDisposeMessageWindow(msgwindow)
Kernel.pbMessage(_INTL("All animations were imported."))
end
end
With this, I was able to mass import move animations using "Import All Move Animations" but no animation shows up for various effects that have animations in Reborn/Rejuvenation such as mega evolving, surf, dig, waterfall, etc... At first, I thought it was unsuccessful but I noticed that some moves have animations from other moves - bite looks like feint attack, etc... This leads me to believe that the moves are in but aren't properly associated.
I would like to request help in my endeavor in implementing these move animations. If no one else has done it, then I'll resort to importing move animations one by one. While tedious, I've heard success stories + it wouldn't overwrite the animations.rxdata file changes from Mej71's Follower Pokemon add-on either.
*(Reborn and Rejuvenation have the same move animations and can be used by the public as long as sufficient credit is given, which I have in my credits list)
I did what you did in attempt number 1 but the movements are totally unbalanced, it doesn't match their strength, how do I fix it?