diff --git a/Data/PluginScripts.rxdata b/Data/PluginScripts.rxdata index 1e2caf57..58b7c0df 100644 Binary files a/Data/PluginScripts.rxdata and b/Data/PluginScripts.rxdata differ diff --git a/Plugins/Elite Battle DX/[000] Scripts/Battle Core/Battler Bitmaps.rb b/Plugins/Elite Battle DX/[000] Scripts/Battle Core/Battler Bitmaps.rb index 45a3c7b6..b8f633a3 100644 --- a/Plugins/Elite Battle DX/[000] Scripts/Battle Core/Battler Bitmaps.rb +++ b/Plugins/Elite Battle DX/[000] Scripts/Battle Core/Battler Bitmaps.rb @@ -209,14 +209,28 @@ def pbCheckPokemonBitmapFiles(params) if EliteBattle::PRIORITIZE_ANIMATED_SPRITES bitmapFileName = sprintf("#{folder}#{dir}/%03d%s%s", species_id, (tform != "" ? "_" + tform : ""), tshadow ? "_shadow" : "") - bitmapFileName = sprintf("#{folder}#{dir}/%s%s%s", species_, (tform != "" ? "_" + tform : ""), tshadow ? "_shadow" : "") if !pbResolveBitmap(bitmapFileName) - bitmapFileName = sprintf("#{folder2}/%s%s%s", species_, (tform != "" ? "_" + tform : ""), tshadow ? "_shadow" : "") if !pbResolveBitmap(bitmapFileName) + if !pbResolveBitmap(bitmapFileName) + bitmapFileName = sprintf("#{folder}#{dir}/%s%s%s", species_, (tform != "" ? "_" + tform : ""), tshadow ? "_shadow" : "") + if !pbResolveBitmap(bitmapFileName) + bitmapFileName = sprintf("#{folder2}/%03d%s%s", species_id, (tform != "" ? "_" + tform : ""), tshadow ? "_shadow" : "") + if !pbResolveBitmap(bitmapFileName) + bitmapFileName = sprintf("#{folder2}/%s%s%s", species_, (tform != "" ? "_" + tform : ""), tshadow ? "_shadow" : "") + end + end + end else - bitmapFileName = sprintf("#{folder}#{dir}/%s%s%s", species_, (tform != "" ? "_" + tform : ""), tshadow ? "_shadow" : "") - bitmapFileName = sprintf("#{folder}#{dir}/%03d%s%s", species_id, (tform != "" ? "_" + tform : ""), tshadow ? "_shadow" : "") if !pbResolveBitmap(bitmapFileName) - bitmapFileName = sprintf("#{folder2}/%s%s%s", species_, (tform != "" ? "_" + tform : ""), tshadow ? "_shadow" : "") if !pbResolveBitmap(bitmapFileName) + bitmapFileName = sprintf("#{folder}#{dir}/%s%s%s", species_, (tform != "" ? "_" + tform : ""), tshadow ? "_shadow" : "") + if !pbResolveBitmap(bitmapFileName) + bitmapFileName = sprintf("#{folder}#{dir}/%03d%s%s", species_id, (tform != "" ? "_" + tform : ""), tshadow ? "_shadow" : "") + if !pbResolveBitmap(bitmapFileName) + bitmapFileName = sprintf("#{folder2}/%s%s%s", species_, (tform != "" ? "_" + tform : ""), tshadow ? "_shadow" : "") + if !pbResolveBitmap(bitmapFileName) + bitmapFileName = sprintf("#{folder2}/%03d%s%s", species_id, (tform != "" ? "_" + tform : ""), tshadow ? "_shadow" : "") + end + end + end end - + #echoln "Finding #{bitmapFileName}" ret = pbResolveBitmap(bitmapFileName) return ret if ret end @@ -237,26 +251,31 @@ def pbPokemonBitmapFile(species, shiny, back=false) end folder = "Graphics/EBDX/Battlers/"+subdir folder2 = "Graphics/Pokemon/"+subdir + species_id = EliteBattle.GetSpeciesIndex(species) #GameData::Species.try_get(species)&.species if EliteBattle::PRIORITIZE_ANIMATED_SPRITES - species_id = EliteBattle.GetSpeciesIndex(species) name = sprintf("#{folder}%03d", species_id) #check %s ret = pbResolveBitmap(name) return ret if ret name = sprintf("#{folder}%s", species) rescue nil ret = pbResolveBitmap(name) return ret if ret + name = sprintf("#{folder2}%03d", species_id) #check %s + ret = pbResolveBitmap(name) + return ret if ret name = sprintf("#{folder2}%s", species) rescue nil return pbResolveBitmap(name) else name = sprintf("#{folder}%s", species) rescue nil ret = pbResolveBitmap(name) return ret if ret - species_id = EliteBattle.GetSpeciesIndex(species) name = sprintf("#{folder}%03d", species_id) #check %s ret = pbResolveBitmap(name) return ret if ret name = sprintf("#{folder2}%s", species) rescue nil + ret = pbResolveBitmap(name) + return ret if ret + name = sprintf("#{folder2}%03d", species_id) #check %s return pbResolveBitmap(name) end end diff --git a/Plugins/Elite Battle DX/[000] Scripts/Battle Core/EBDX Module.rb b/Plugins/Elite Battle DX/[000] Scripts/Battle Core/EBDX Module.rb index b4fea7bf..3bcb5155 100644 --- a/Plugins/Elite Battle DX/[000] Scripts/Battle Core/EBDX Module.rb +++ b/Plugins/Elite Battle DX/[000] Scripts/Battle Core/EBDX Module.rb @@ -83,6 +83,11 @@ def self.InitializeItems end end def self.GetSpeciesIndex(species) + + if EliteBattle::TRY_TO_ALWAYS_INITIALIZE && @full_species.length <= GameData::Species.species_count + EliteBattle.InitializeSpecies() + end + #echoln "#{species} #{ @full_species.length} #{@full_species.index(species)}" number = @full_species.index(species) || 0 return number end diff --git a/Plugins/Elite Battle DX/[003] Config/Config.rb b/Plugins/Elite Battle DX/[003] Config/Config.rb index 9b84b63f..69ce63bc 100644 --- a/Plugins/Elite Battle DX/[003] Config/Config.rb +++ b/Plugins/Elite Battle DX/[003] Config/Config.rb @@ -77,6 +77,9 @@ module EliteBattle #if set to false, pokemon_metrics.txt is checked first (default Essentials file). If not, that file is skipped. FORCE_EBDX_ALTITUDE = true + + # If true, it always check the species count in GameData. If the full count is detected to be less than expected, it reinitilize the pokemon species list. + TRY_TO_ALWAYS_INITIALIZE = true end #------------------------------------------------------------------------------- # Adds additional "camera" vectors for when the camera is idling diff --git a/Plugins/Elite Battle DX/meta.txt b/Plugins/Elite Battle DX/meta.txt index 28db2a89..a2470c75 100644 --- a/Plugins/Elite Battle DX/meta.txt +++ b/Plugins/Elite Battle DX/meta.txt @@ -1,5 +1,5 @@ Name = Elite Battle: DX -Version = 1.4.3 (E20) +Version = 1.4.4 (E20) Essentials = 20.1 Conflicts = Elite Battle System Requires = Luka's Scripting Utilities,3.3 @@ -8,6 +8,9 @@ Credits = Luka S.J.,Maruno,Marin,Pokecheck.org,PinkCatDragon,Tebited15,BadSam #==================================================================== # Change log #==================================================================== +# 1.1.7 - Considered as 1.4.4 +# - Initialize the pokemon list before battle so and it can check if it's ready, so it can display mons properly before battle +# # 1.1.6 - Considered as 1.4.3 # - Added default essentials Path for sprites (Graphics/Pokemon) #