From 8c5911e4a4b07b07e832e4bb0d5d8859e88b4a9b Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Mon, 1 Jan 2024 20:35:28 +0000 Subject: [PATCH] Fixed being able to bypass a caught mon being forced into the party, fixed Rotom Catalog, fixed incorrect writing of some enums to PBS files, fixed Jukebox's awareness of audio files, fixed bug when battle default weather is primordial, disabled path cache to add speed --- Data/Scripts/002_BattleSettings.rb | 2 +- Data/Scripts/011_Battle/001_Battle/001_Battle.rb | 1 + .../011_Battle/003_Move/006_MoveEffects_BattlerStats.rb | 2 +- .../007_Other battle code/005_Battle_CatchAndStoreMixin.rb | 3 ++- Data/Scripts/013_Items/002_Item_Effects.rb | 2 +- Data/Scripts/013_Items/004_Item_Phone.rb | 6 +++--- Data/Scripts/016_UI/011_UI_Jukebox.rb | 6 ++++-- Data/Scripts/021_Compiler/001_Compiler.rb | 4 ++-- Data/Scripts/021_Compiler/004_Compiler_MapsAndEvents.rb | 2 +- mkxp.json | 2 +- 10 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Data/Scripts/002_BattleSettings.rb b/Data/Scripts/002_BattleSettings.rb index ba84e8f3b..550a35875 100644 --- a/Data/Scripts/002_BattleSettings.rb +++ b/Data/Scripts/002_BattleSettings.rb @@ -120,7 +120,7 @@ module Settings # End of battle #----------------------------------------------------------------------------- - # The Game Switch which, whie ON, prevents the player from losing money if + # The Game Switch which, while ON, prevents the player from losing money if # they lose a battle (they can still gain money from trainers for winning). NO_MONEY_LOSS = 33 # Whether party Pokémon check whether they can evolve after all battles diff --git a/Data/Scripts/011_Battle/001_Battle/001_Battle.rb b/Data/Scripts/011_Battle/001_Battle/001_Battle.rb index a2b875816..ce89d4307 100644 --- a/Data/Scripts/011_Battle/001_Battle/001_Battle.rb +++ b/Data/Scripts/011_Battle/001_Battle/001_Battle.rb @@ -732,6 +732,7 @@ class Battle end def pbEndPrimordialWeather + return if @field.weather == @field.defaultWeather oldWeather = @field.weather # End Primordial Sea, Desolate Land, Delta Stream case @field.weather diff --git a/Data/Scripts/011_Battle/003_Move/006_MoveEffects_BattlerStats.rb b/Data/Scripts/011_Battle/003_Move/006_MoveEffects_BattlerStats.rb index 14cc022b6..ec09b37ec 100644 --- a/Data/Scripts/011_Battle/003_Move/006_MoveEffects_BattlerStats.rb +++ b/Data/Scripts/011_Battle/003_Move/006_MoveEffects_BattlerStats.rb @@ -970,7 +970,7 @@ class Battle::Move::LowerTargetDefense1 < Battle::Move::TargetStatDownMove end #=============================================================================== -# Decreases the target's Defense by 1 stage. Power is mutliplied by 1.5 if +# Decreases the target's Defense by 1 stage. Power is multiplied by 1.5 if # Gravity is in effect. (Grav Apple) #=============================================================================== class Battle::Move::LowerTargetDefense1PowersUpInGravity < Battle::Move::LowerTargetDefense1 diff --git a/Data/Scripts/011_Battle/007_Other battle code/005_Battle_CatchAndStoreMixin.rb b/Data/Scripts/011_Battle/007_Other battle code/005_Battle_CatchAndStoreMixin.rb index 5d9c5f596..4466b0d90 100644 --- a/Data/Scripts/011_Battle/007_Other battle code/005_Battle_CatchAndStoreMixin.rb +++ b/Data/Scripts/011_Battle/007_Other battle code/005_Battle_CatchAndStoreMixin.rb @@ -17,9 +17,10 @@ module Battle::CatchAndStoreMixin _INTL("Send to a Box"), _INTL("See {1}'s summary", pkmn.name), _INTL("Check party")] - cmds.delete_at(1) if @sendToBoxes == 2 + cmds.delete_at(1) if @sendToBoxes == 2 # Remove "Send to a Box" option loop do cmd = pbShowCommands(_INTL("Where do you want to send {1} to?", pkmn.name), cmds, 99) + next if cmd == 99 && @sendToBoxes == 2 # Can't cancel if must add to party break if cmd == 99 # Cancelling = send to a Box cmd += 1 if cmd >= 1 && @sendToBoxes == 2 case cmd diff --git a/Data/Scripts/013_Items/002_Item_Effects.rb b/Data/Scripts/013_Items/002_Item_Effects.rb index 79e3d50e5..cad2fc8d5 100644 --- a/Data/Scripts/013_Items/002_Item_Effects.rb +++ b/Data/Scripts/013_Items/002_Item_Effects.rb @@ -1250,7 +1250,7 @@ ItemHandlers::UseOnPokemon.add(:ROTOMCATALOG, proc { |item, qty, pkmn, scene| if new_form == pkmn.form scene.pbDisplay(_INTL("It won't have any effect.")) next false - elsif new_form > 0 && new_form < choices.length - 1 + elsif new_form >= 0 && new_form < choices.length - 1 pkmn.setForm(new_form) do scene.pbRefresh scene.pbDisplay(_INTL("{1} transformed!", pkmn.name)) diff --git a/Data/Scripts/013_Items/004_Item_Phone.rb b/Data/Scripts/013_Items/004_Item_Phone.rb index e4d4e9a7e..f98163636 100644 --- a/Data/Scripts/013_Items/004_Item_Phone.rb +++ b/Data/Scripts/013_Items/004_Item_Phone.rb @@ -179,7 +179,7 @@ class Phone else contact = $PokemonGlobal.phone.get(false, args[1]) end - pbMessage(_INTL("\\me[Register phone]Registered {1} in the Pokégear!", contact.display_name) + "\\wtnp[60]") + pbMessage("\\me[Register phone]" + _INTL("Registered {1} in the Pokégear!", contact.display_name) + "\\wtnp[60]") end return ret end @@ -408,7 +408,7 @@ class Phone end def start_message(contact = nil) - pbMessage(_INTL("......\\wt[5] ......") + "\1") + pbMessage("......\\wt[5] ......\1") end def play(dialogue, contact) @@ -439,7 +439,7 @@ class Phone end def end_message(contact = nil) - pbMessage(_INTL("Click!\\wt[10]\n......\\wt[5] ......") + "\1") + pbMessage(_INTL("Click!") + "\\wt[10]\n......\\wt[5] ......\1") end #=========================================================================== diff --git a/Data/Scripts/016_UI/011_UI_Jukebox.rb b/Data/Scripts/016_UI/011_UI_Jukebox.rb index 58da901c4..bf50dee8d 100644 --- a/Data/Scripts/016_UI/011_UI_Jukebox.rb +++ b/Data/Scripts/016_UI/011_UI_Jukebox.rb @@ -106,10 +106,12 @@ class PokemonJukeboxScreen pbPlayDecisionSE files = [] Dir.chdir("Audio/BGM/") do - Dir.glob("*.ogg") { |f| files.push(f) } Dir.glob("*.wav") { |f| files.push(f) } - Dir.glob("*.mid") { |f| files.push(f) } + Dir.glob("*.ogg") { |f| files.push(f) } + Dir.glob("*.mp3") { |f| files.push(f) } Dir.glob("*.midi") { |f| files.push(f) } + Dir.glob("*.mid") { |f| files.push(f) } + Dir.glob("*.wma") { |f| files.push(f) } end files.map! { |f| File.basename(f, ".*") } files.uniq! diff --git a/Data/Scripts/021_Compiler/001_Compiler.rb b/Data/Scripts/021_Compiler/001_Compiler.rb index 7f77ea716..1dd5f3747 100644 --- a/Data/Scripts/021_Compiler/001_Compiler.rb +++ b/Data/Scripts/021_Compiler/001_Compiler.rb @@ -766,7 +766,7 @@ module Compiler enumer = schema[2 + i - start] case enumer when Array - file.write((value.is_a?(Integer) && enumer[value].nil?) ? enumer[value] : value) + file.write((value.is_a?(Integer) && !enumer[value].nil?) ? enumer[value] : value) when Symbol, String if GameData.const_defined?(enumer.to_sym) mod = GameData.const_get(enumer.to_sym) @@ -792,7 +792,7 @@ module Compiler enumer = schema[2 + i - start] case enumer when Array - file.write((value.is_a?(Integer) && enumer[value].nil?) ? enumer[value] : value) + file.write((value.is_a?(Integer) && !enumer[value].nil?) ? enumer[value] : value) when Symbol, String if !Kernel.const_defined?(enumer.to_sym) && GameData.const_defined?(enumer.to_sym) mod = GameData.const_get(enumer.to_sym) diff --git a/Data/Scripts/021_Compiler/004_Compiler_MapsAndEvents.rb b/Data/Scripts/021_Compiler/004_Compiler_MapsAndEvents.rb index 282501333..cb302adb0 100644 --- a/Data/Scripts/021_Compiler/004_Compiler_MapsAndEvents.rb +++ b/Data/Scripts/021_Compiler/004_Compiler_MapsAndEvents.rb @@ -309,7 +309,7 @@ module Compiler end def mapFilename(mapID) - return sprintf("Data/map%03d.rxdata", mapID) + return sprintf("Data/Map%03d.rxdata", mapID) end def getMap(mapID) diff --git a/mkxp.json b/mkxp.json index b50725fb1..dc6ad09e3 100644 --- a/mkxp.json +++ b/mkxp.json @@ -80,7 +80,7 @@ // Index all accessible assets via their lower case path (emulates Windows // case insensitivity). // - // "pathCache": true, + "pathCache": false, //========================================================================== // Window size, scaling, rendering and frame rate.