Skip to content

Commit

Permalink
1.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Manurocker95 committed May 11, 2024
1 parent 600f6a5 commit 8d665eb
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 9 deletions.
Binary file modified Data/PluginScripts.rxdata
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Plugins/Elite Battle DX/[003] Config/Config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion Plugins/Elite Battle DX/meta.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
#
Expand Down

0 comments on commit 8d665eb

Please sign in to comment.