indexed custom battlers

This commit is contained in:
infinitefusion
2022-11-29 20:22:16 -05:00
parent 572796d7cc
commit 7cd9760adf
40 changed files with 63 additions and 39 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -6,7 +6,7 @@
module Settings module Settings
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format. # The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
GAME_VERSION = '5.0.0' GAME_VERSION = '5.0.0'
GAME_VERSION_NUMBER = "5.0.36.4" GAME_VERSION_NUMBER = "5.1.0"
POKERADAR_LIGHT_ANIMATION_RED_ID = 17 POKERADAR_LIGHT_ANIMATION_RED_ID = 17
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18 POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18
@@ -299,6 +299,7 @@ module GameData
level = getRematchLevel(level, nbRematch) level = getRematchLevel(level, nbRematch)
species = evolveRematchPokemon(nbRematch, species) species = evolveRematchPokemon(nbRematch, species)
end end
pkmn = Pokemon.new(species, level, trainer, false) pkmn = Pokemon.new(species, level, trainer, false)
trainer.party.push(pkmn) trainer.party.push(pkmn)
@@ -578,10 +578,13 @@ class PokeBattle_Battler
if !inSwordForm && attacking if !inSwordForm && attacking
user.effects[PBEffects::PowerTrick] = true user.effects[PBEffects::PowerTrick] = true
user.attack,user.defense = user.defense,user.attack user.attack,user.defense = user.defense,user.attack
user.spatk,user.spdef = user.spdef,user.spatk
@battle.pbDisplay(_INTL("{1} changed to Sword Mode!",pbThis)) @battle.pbDisplay(_INTL("{1} changed to Sword Mode!",pbThis))
elsif inSwordForm && !attacking elsif inSwordForm && !attacking
user.effects[PBEffects::PowerTrick] = false user.effects[PBEffects::PowerTrick] = false
user.attack,user.defense = user.defense,user.attack user.attack,user.defense = user.defense,user.attack
user.spatk,user.spdef = user.spdef,user.spatk
@battle.pbDisplay(_INTL("{1} changed to Shield Mode!",pbThis)) @battle.pbDisplay(_INTL("{1} changed to Shield Mode!",pbThis))
end end
end end
+24 -18
View File
@@ -434,24 +434,30 @@ class PokemonOption_Scene
end end
}, "Sets the volume for sound effects" }, "Sets the volume for sound effects"
) )
options << EnumOption.new(_INTL("Text Speed"), [_INTL("Normal"), _INTL("Fast")],
if $game_switches && ($game_switches[SWITCH_NEW_GAME_PLUS] || $game_switches[SWITCH_BEAT_THE_LEAGUE]) #beat the league proc { $PokemonSystem.textspeed },
options << EnumOption.new(_INTL("Text Speed"), [_INTL("Normal"), _INTL("Fast"), _INTL("Instant")], proc { |value|
proc { $PokemonSystem.textspeed }, $PokemonSystem.textspeed = value
proc { |value| MessageConfig.pbSetTextSpeed(MessageConfig.pbSettingToTextSpeed(value))
$PokemonSystem.textspeed = value }, "Sets the speed at which the text is displayed"
MessageConfig.pbSetTextSpeed(MessageConfig.pbSettingToTextSpeed(value)) )
}, "Sets the speed at which the text is displayed" # if $game_switches && ($game_switches[SWITCH_NEW_GAME_PLUS] || $game_switches[SWITCH_BEAT_THE_LEAGUE]) #beat the league
) # options << EnumOption.new(_INTL("Text Speed"), [_INTL("Normal"), _INTL("Fast"), _INTL("Instant")],
else # proc { $PokemonSystem.textspeed },
options << EnumOption.new(_INTL("Text Speed"), [_INTL("Normal"), _INTL("Fast")], # proc { |value|
proc { $PokemonSystem.textspeed }, # $PokemonSystem.textspeed = value
proc { |value| # MessageConfig.pbSetTextSpeed(MessageConfig.pbSettingToTextSpeed(value))
$PokemonSystem.textspeed = value # }, "Sets the speed at which the text is displayed"
MessageConfig.pbSetTextSpeed(MessageConfig.pbSettingToTextSpeed(value)) # )
}, "Sets the speed at which the text is displayed" # else
) # options << EnumOption.new(_INTL("Text Speed"), [_INTL("Normal"), _INTL("Fast")],
end # proc { $PokemonSystem.textspeed },
# proc { |value|
# $PokemonSystem.textspeed = value
# MessageConfig.pbSetTextSpeed(MessageConfig.pbSettingToTextSpeed(value))
# }, "Sets the speed at which the text is displayed"
# )
# end
if $game_switches if $game_switches
options << options <<
+1 -1
View File
@@ -814,7 +814,7 @@ def setFusionMoves(fusedPoke, poke2, selected2ndOption = false)
bodySpeciesName = GameData::Species.get(bodySpecies).real_name bodySpeciesName = GameData::Species.get(bodySpecies).real_name
headSpeciesName = GameData::Species.get(headSpecies).real_name headSpeciesName = GameData::Species.get(headSpecies).real_name
choice = Kernel.pbMessage("What to do with the moveset?", [_INTL("Learn moves"), _INTL("Keep {1}'s moveset", bodySpeciesName), _INTL("Keep {1}'s moveset", headSpeciesName)], 0) choice = Kernel.pbMessage("What to do with the moveset?", [_INTL("Combine movesets"), _INTL("Keep {1}'s moveset", bodySpeciesName), _INTL("Keep {1}'s moveset", headSpeciesName)], 0)
if choice == 1 if choice == 1
if selected2ndOption if selected2ndOption
fusedPoke.moves = poke2.moves fusedPoke.moves = poke2.moves
@@ -315,7 +315,6 @@ module PBItems
TM24 = 311 TM24 = 311
TM25 = 312 TM25 = 312
TM26 = 313 TM26 = 313
TM27 = 314
TM27 = 315 TM27 = 315
TM29 = 316 TM29 = 316
TM30 = 317 TM30 = 317
+3 -1
View File
@@ -163,10 +163,12 @@ module GameData
if dex_number <= Settings::NB_POKEMON if dex_number <= Settings::NB_POKEMON
folder = dex_number.to_s folder = dex_number.to_s
filename = sprintf("%s.png", dex_number) filename = sprintf("%s.png", dex_number)
head_id=nil
else else
if dex_number >= Settings::ZAPMOLCUNO_NB if dex_number >= Settings::ZAPMOLCUNO_NB
specialPath = getSpecialSpriteName(dex_number) specialPath = getSpecialSpriteName(dex_number)
return pbResolveBitmap(specialPath) return pbResolveBitmap(specialPath)
head_id=nil
else else
body_id = getBodyID(dex_number) body_id = getBodyID(dex_number)
head_id = getHeadID(dex_number, body_id) head_id = getHeadID(dex_number, body_id)
@@ -174,7 +176,7 @@ module GameData
filename = sprintf("%s.%s.png", head_id, body_id) filename = sprintf("%s.%s.png", head_id, body_id)
end end
end end
customPath = pbResolveBitmap(Settings::CUSTOM_BATTLERS_FOLDER + filename) customPath = pbResolveBitmap(Settings::CUSTOM_BATTLERS_FOLDER + "/" + head_id.to_s + "/" +filename)
species = getSpecies(dex_number) species = getSpecies(dex_number)
use_custom = customPath && !species.always_use_generated use_custom = customPath && !species.always_use_generated
if use_custom if use_custom
+1 -1
View File
@@ -106,7 +106,7 @@ BATTLERSPATH = "Battlers"
def GetSpritePath(poke1, poke2, isFused) def GetSpritePath(poke1, poke2, isFused)
#Check if custom exists #Check if custom exists
spritename = GetSpriteName(poke1, poke2, isFused) spritename = GetSpriteName(poke1, poke2, isFused)
pathCustom = sprintf("Graphics/%s/%s.png", DOSSIERCUSTOMSPRITES, spritename) pathCustom = sprintf("Graphics/%s/%s/%s.png", DOSSIERCUSTOMSPRITES,poke2, spritename)
pathReg = sprintf("Graphics/%s/%s/%s.png", BATTLERSPATH, poke2, spritename) pathReg = sprintf("Graphics/%s/%s/%s.png", BATTLERSPATH, poke2, spritename)
path = pbResolveBitmap(pathCustom) && $game_variables[196] == 0 ? pathCustom : pathReg path = pbResolveBitmap(pathCustom) && $game_variables[196] == 0 ? pathCustom : pathReg
return path return path
-5
View File
@@ -20,11 +20,6 @@ class Scene_Intro
intro_bgm = "INTRO_music_cries" intro_bgm = "INTRO_music_cries"
intro_movie = Movie.new(intro_frames_path,intro_bgm,230,true) intro_movie = Movie.new(intro_frames_path,intro_bgm,230,true)
intro_movie.playInViewPort(@viewport) intro_movie.playInViewPort(@viewport)
while(!intro_movie.finished)
echo intro_movie.finished
echo "\n"
wait(8)
end
end end
def main def main
+1 -7
View File
@@ -42,13 +42,7 @@ class Movie
pbBGMPlay(@bgm) pbBGMPlay(@bgm)
while (@currentFrame <= @maxFrame)# && !(@canStopEarly && Input::ACTION)) while (@currentFrame <= @maxFrame)# && !(@canStopEarly && Input::ACTION))
Input.update break if Input.trigger?(Input::C) && @canStopEarly
if Input.trigger?(Input::C)
echo "bruh"
echo "\n"
end
break if Input.trigger?(Input::ACTION) && @canStopEarly
frame = sprintf(@framesPath, @currentFrame) frame = sprintf(@framesPath, @currentFrame)
picture = Sprite.new(viewport) picture = Sprite.new(viewport)
picture.bitmap = pbBitmap(frame) picture.bitmap = pbBitmap(frame)
+1
View File
@@ -356,6 +356,7 @@ class PokemonLoadScreen
when cmd_continue when cmd_continue
@scene.pbEndScene @scene.pbEndScene
Game.load(@save_data) Game.load(@save_data)
$game_switches[SWITCH_V5_1]=true
return return
when cmd_new_game when cmd_new_game
@scene.pbEndScene @scene.pbEndScene
@@ -147,12 +147,12 @@ class PokemonPokedexInfo_Scene
head_id = getHeadID(@species, body_id) head_id = getHeadID(@species, body_id)
baseFilename = head_id.to_s + "." + body_id.to_s baseFilename = head_id.to_s + "." + body_id.to_s
baseFilePath = Settings::CUSTOM_BATTLERS_FOLDER + baseFilename + ".png" baseFilePath = Settings::CUSTOM_BATTLERS_FOLDER + "/" + head_id.to_s + "/" + baseFilename + ".png"
if pbResolveBitmap(baseFilePath) if pbResolveBitmap(baseFilePath)
ret << baseFilePath ret << baseFilePath
end end
POSSIBLE_ALTS.each { |alt_letter| POSSIBLE_ALTS.each { |alt_letter|
altFilePath = Settings::CUSTOM_BATTLERS_FOLDER + baseFilename + alt_letter + ".png" altFilePath = Settings::CUSTOM_BATTLERS_FOLDER + "/" + head_id.to_s + "/" + baseFilename + alt_letter + ".png"
if pbResolveBitmap(altFilePath) if pbResolveBitmap(altFilePath)
ret << altFilePath ret << altFilePath
end end
+4 -2
View File
@@ -1,8 +1,10 @@
EXPORT_EXCEPT_MAP_IDS= [768,722,723,724,720]
def exportAllMaps def exportAllMaps
for id in 725..768 for id in 768..784
begin begin
MapExporter.export(id, [:Events]) MapExporter.export(id, [:Events]) if !EXPORT_EXCEPT_MAP_IDS.include?(id)
rescue rescue
echo "error in " +(id.to_s) +"\n" echo "error in " +(id.to_s) +"\n"
end end
+21
View File
@@ -22,8 +22,29 @@ def mainFunction
return 1 return 1
end end
def sortCustomBattlers()
customBattlersFolder = 'Graphics/CustomBattlers'
echo "Sorting CustomBattlers files..."
Dir.foreach(customBattlersFolder) do |filename|
next if filename == '.' or filename == '..'
next if !filename.end_with?(".png")
headNum = filename.split('.')[0]
oldPath = customBattlersFolder + "/" + filename
newPath = customBattlersFolder + "/" + headNum.to_s + "/" +filename
echo "\n"
echo "Sorted " + filename + " into " + newPath
begin
File.rename(oldPath, newPath)
rescue
echo "Could not sort "+ filename
end
end
end
def mainFunctionDebug def mainFunctionDebug
begin begin
sortCustomBattlers()
MessageTypes.loadMessageFile("Data/messages.dat") if safeExists?("Data/messages.dat") MessageTypes.loadMessageFile("Data/messages.dat") if safeExists?("Data/messages.dat")
PluginManager.runPlugins PluginManager.runPlugins
Compiler.main Compiler.main
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.