random wip stuff

This commit is contained in:
infinitefusion
2023-04-05 12:37:33 -04:00
parent cdb3cd5d20
commit 0b54dcd756
22 changed files with 178 additions and 150 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.

View File

@@ -206,6 +206,7 @@ module GameData
end end
def replaceSingleSpeciesModeIfApplicable(species) def replaceSingleSpeciesModeIfApplicable(species)
return species if getDexNumberForSpecies(species) >= Settings::ZAPMOLCUNO_NB
if $game_switches[SWITCH_SINGLE_POKEMON_MODE] if $game_switches[SWITCH_SINGLE_POKEMON_MODE]
if $game_switches[SWITCH_SINGLE_POKEMON_MODE_HEAD] if $game_switches[SWITCH_SINGLE_POKEMON_MODE_HEAD]
return replaceFusionsHeadWithSpecies(species) return replaceFusionsHeadWithSpecies(species)

View File

@@ -782,6 +782,8 @@ end
def pbEndSurf(_xOffset, _yOffset) def pbEndSurf(_xOffset, _yOffset)
return false if !$PokemonGlobal.surfing return false if !$PokemonGlobal.surfing
return false if !$PokemonGlobal.diving
x = $game_player.x x = $game_player.x
y = $game_player.y y = $game_player.y
if $game_map.terrain_tag(x, y).can_surf && !$game_player.pbFacingTerrainTag.can_surf || !$game_map.terrain_tag(x, y).can_surf if $game_map.terrain_tag(x, y).can_surf && !$game_player.pbFacingTerrainTag.can_surf || !$game_map.terrain_tag(x, y).can_surf

View File

@@ -28,7 +28,7 @@
# #
#GYM_TYPES_ARRAY = [0,5,11,13,12,3,14,10,4,1,0,6,2,16,7,15,1,8,15,1,7,16,18,17,7,16] #GYM_TYPES_ARRAY = [0,5,11,13,12,3,14,10,4,1,0,6,2,16,7,15,1,8,15,1,7,16,18,17,7,16]
GYM_TYPES_CLASSIC = [:NORMAL, :ROCK, :WATER, :ELECTRIC, :GRASS, :POISON, :PSYCHIC, :FIRE, :GROUND, :FIGHTING, :NORMAL, :BUG, :FLYING, :DRAGON, :GHOST, :ICE, :FIGHTING, :STEEL, :ICE, :FIGHTING, :GHOST, :DRAGON, :FAIRY, :DARK, :GHOST, :DRAGON] GYM_TYPES_CLASSIC = [:NORMAL, :ROCK, :WATER, :ELECTRIC, :GRASS, :POISON, :PSYCHIC, :FIRE, :GROUND, :FIGHTING, :NORMAL, :BUG, :FLYING, :DRAGON, :GHOST, :ICE, :FIGHTING, :STEEL, :ICE, :FIGHTING, :GHOST, :DRAGON, :FAIRY, :DARK, :GHOST, :ROCK]
GYM_TYPES_MODERN = [:NORMAL, :STEEL, :ICE, :FIGHTING, :BUG, :DARK, :FAIRY, :PSYCHIC, :NORMAL, :FIGHTING, :FAIRY, :GRASS, :BUG, :DRAGON, :FIRE, :GHOST, :GROUND, :ELECTRIC, :WATER, :ROCK, :POISON, :FLYING, :FAIRY, :DARK, :GHOST, :DRAGON] GYM_TYPES_MODERN = [:NORMAL, :STEEL, :ICE, :FIGHTING, :BUG, :DARK, :FAIRY, :PSYCHIC, :NORMAL, :FIGHTING, :FAIRY, :GRASS, :BUG, :DRAGON, :FIRE, :GHOST, :GROUND, :ELECTRIC, :WATER, :ROCK, :POISON, :FLYING, :FAIRY, :DARK, :GHOST, :DRAGON]
GYM_TYPES_ARRAY = ($game_switches && $game_switches[SWITCH_MODERN_MODE]) ? GYM_TYPES_MODERN : GYM_TYPES_CLASSIC GYM_TYPES_ARRAY = ($game_switches && $game_switches[SWITCH_MODERN_MODE]) ? GYM_TYPES_MODERN : GYM_TYPES_CLASSIC

View File

@@ -100,6 +100,7 @@ module SaveData
# should never reach here since the original file should always exist # should never reach here since the original file should always exist
return file return file
end end
# See self.get_next_slot # See self.get_next_slot
def self.get_prev_slot(file_list, file) def self.get_prev_slot(file_list, file)
return self.get_next_slot(file_list.reverse, file) return self.get_next_slot(file_list.reverse, file)
@@ -141,7 +142,7 @@ module SaveData
# This is used in a hidden function (ctrl+down+cancel on title screen) or if the save file is corrupt # This is used in a hidden function (ctrl+down+cancel on title screen) or if the save file is corrupt
# Pass nil to delete everything, or a file path to just delete that one # Pass nil to delete everything, or a file path to just delete that one
# @raise [Error::ENOENT] # @raise [Error::ENOENT]
def self.delete_file(file_path=nil) def self.delete_file(file_path = nil)
if file_path if file_path
File.delete(file_path) if File.file?(file_path) File.delete(file_path) if File.file?(file_path)
else else
@@ -203,16 +204,16 @@ class PokemonLoad_Scene
if Input.trigger?(Input::USE) if Input.trigger?(Input::USE)
return @sprites["cmdwindow"].index return @sprites["cmdwindow"].index
elsif @sprites["cmdwindow"].index == continue_idx elsif @sprites["cmdwindow"].index == continue_idx
@sprites["leftarrow"].visible=true @sprites["leftarrow"].visible = true
@sprites["rightarrow"].visible=true @sprites["rightarrow"].visible = true
if Input.trigger?(Input::LEFT) if Input.trigger?(Input::LEFT)
return -3 return -3
elsif Input.trigger?(Input::RIGHT) elsif Input.trigger?(Input::RIGHT)
return -2 return -2
end end
else else
@sprites["leftarrow"].visible=false @sprites["leftarrow"].visible = false
@sprites["rightarrow"].visible=false @sprites["rightarrow"].visible = false
end end
end end
end end
@@ -222,29 +223,29 @@ class PokemonLoad_Scene
@sprites = {} @sprites = {}
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height) @viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@viewport.z = 99998 @viewport.z = 99998
addBackgroundOrColoredPlane(@sprites,"background","loadbg",Color.new(248,248,248),@viewport) addBackgroundOrColoredPlane(@sprites, "background", "loadbg", Color.new(248, 248, 248), @viewport)
@sprites["leftarrow"] = AnimatedSprite.new("Graphics/Pictures/leftarrow",8,40,28,2,@viewport) @sprites["leftarrow"] = AnimatedSprite.new("Graphics/Pictures/leftarrow", 8, 40, 28, 2, @viewport)
@sprites["leftarrow"].x=10 @sprites["leftarrow"].x = 10
@sprites["leftarrow"].y=140 @sprites["leftarrow"].y = 140
@sprites["leftarrow"].play @sprites["leftarrow"].play
#@sprites["leftarrow"].visible=true #@sprites["leftarrow"].visible=true
@sprites["rightarrow"] = AnimatedSprite.new("Graphics/Pictures/rightarrow",8,40,28,2,@viewport) @sprites["rightarrow"] = AnimatedSprite.new("Graphics/Pictures/rightarrow", 8, 40, 28, 2, @viewport)
@sprites["rightarrow"].x = 460 @sprites["rightarrow"].x = 460
@sprites["rightarrow"].y = 140 @sprites["rightarrow"].y = 140
@sprites["rightarrow"].play @sprites["rightarrow"].play
#@sprites["rightarrow"].visible=true #@sprites["rightarrow"].visible=true
y = 16*2 y = 16 * 2
for i in 0...commands.length for i in 0...commands.length
@sprites["panel#{i}"] = PokemonLoadPanel.new(i,commands[i], @sprites["panel#{i}"] = PokemonLoadPanel.new(i, commands[i],
(show_continue) ? (i==0) : false,trainer,frame_count,map_id,@viewport) (show_continue) ? (i == 0) : false, trainer, frame_count, map_id, @viewport)
@sprites["panel#{i}"].x = 24*2 @sprites["panel#{i}"].x = 24 * 2
@sprites["panel#{i}"].y = y @sprites["panel#{i}"].y = y
@sprites["panel#{i}"].pbRefresh @sprites["panel#{i}"].pbRefresh
y += (show_continue && i==0) ? 112*2 : 24*2 y += (show_continue && i == 0) ? 112 * 2 : 24 * 2
end end
@sprites["cmdwindow"] = Window_CommandPokemon.new([]) @sprites["cmdwindow"] = Window_CommandPokemon.new([])
@sprites["cmdwindow"].viewport = @viewport @sprites["cmdwindow"].viewport = @viewport
@@ -289,7 +290,7 @@ class PokemonLoadScreen
end end
# nil deletes all, otherwise just the given file # nil deletes all, otherwise just the given file
def delete_save_data(file_path=nil) def delete_save_data(file_path = nil)
begin begin
SaveData.delete_file(file_path) SaveData.delete_file(file_path)
pbMessage(_INTL("The save data was deleted.")) pbMessage(_INTL("The save data was deleted."))
@@ -298,19 +299,42 @@ class PokemonLoadScreen
end end
end end
def checkEnableSpritesDownload
if $PokemonSystem.download_sprites && $PokemonSystem.download_sprites != 0
customSprites = getCustomSpeciesList
if !customSprites
promptEnableSpritesDownload
else
if customSprites.length < 1000
promptEnableSpritesDownload
end
end
end
end
def promptEnableSpritesDownload
message = "Some sprites appear to be missing from your game. \nWould you like the game to download sprites automatically while playing? (this requires an internet connection)"
if pbConfirmMessage(message)
$PokemonSystem.download_sprites = 0
end
end
def pbStartLoadScreen def pbStartLoadScreen
if($game_temp.unimportedSprites && $game_temp.unimportedSprites.size >0) if ($game_temp.unimportedSprites && $game_temp.unimportedSprites.size > 0)
handleReplaceExistingSprites() handleReplaceExistingSprites()
end end
if ($game_temp.nb_imported_sprites && $game_temp.nb_imported_sprites > 0) if ($game_temp.nb_imported_sprites && $game_temp.nb_imported_sprites > 0)
pbMessage(_INTL("{1} new custom sprites were imported into the game",$game_temp.nb_imported_sprites.to_s)) pbMessage(_INTL("{1} new custom sprites were imported into the game", $game_temp.nb_imported_sprites.to_s))
end end
$game_temp.nb_imported_sprites=nil checkEnableSpritesDownload
$game_temp.nb_imported_sprites = nil
copyKeybindings() copyKeybindings()
save_file_list = SaveData::AUTO_SLOTS + SaveData::MANUAL_SLOTS save_file_list = SaveData::AUTO_SLOTS + SaveData::MANUAL_SLOTS
first_time = true first_time = true
loop do # Outer loop is used for switching save files loop do
# Outer loop is used for switching save files
if @selected_file if @selected_file
@save_data = load_save_file(SaveData.get_full_path(@selected_file)) @save_data = load_save_file(SaveData.get_full_path(@selected_file))
else else
@@ -356,7 +380,8 @@ class PokemonLoadScreen
@scene.pbUpdate @scene.pbUpdate
end end
loop do # Inner loop is used for going to other menus and back and stuff (vanilla) loop do
# Inner loop is used for going to other menus and back and stuff (vanilla)
command = @scene.pbChoose(commands, cmd_continue) command = @scene.pbChoose(commands, cmd_continue)
pbPlayDecisionSE if command != cmd_quit pbPlayDecisionSE if command != cmd_quit
@@ -364,7 +389,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 $game_switches[SWITCH_V5_1] = true
return return
when cmd_new_game when cmd_new_game
@scene.pbEndScene @scene.pbEndScene
@@ -372,8 +397,8 @@ class PokemonLoadScreen
return return
when cmd_new_game_plus when cmd_new_game_plus
@scene.pbEndScene @scene.pbEndScene
Game.start_new(@save_data[:bag],@save_data[:storage_system],@save_data[:player]) Game.start_new(@save_data[:bag], @save_data[:storage_system], @save_data[:player])
@save_data[:player].new_game_plus_unlocked=true @save_data[:player].new_game_plus_unlocked = true
return return
when cmd_mystery_gift when cmd_mystery_gift
pbFadeOutIn { pbDownloadMysteryGift(@save_data[:player]) } pbFadeOutIn { pbDownloadMysteryGift(@save_data[:player]) }
@@ -422,12 +447,12 @@ end
class PokemonSave_Scene class PokemonSave_Scene
def pbUpdateSlotInfo(slottext) def pbUpdateSlotInfo(slottext)
pbDisposeSprite(@sprites, "slotinfo") pbDisposeSprite(@sprites, "slotinfo")
@sprites["slotinfo"]=Window_AdvancedTextPokemon.new(slottext) @sprites["slotinfo"] = Window_AdvancedTextPokemon.new(slottext)
@sprites["slotinfo"].viewport=@viewport @sprites["slotinfo"].viewport = @viewport
@sprites["slotinfo"].x=0 @sprites["slotinfo"].x = 0
@sprites["slotinfo"].y=160 @sprites["slotinfo"].y = 160
@sprites["slotinfo"].width=228 if @sprites["slotinfo"].width<228 @sprites["slotinfo"].width = 228 if @sprites["slotinfo"].width < 228
@sprites["slotinfo"].visible=true @sprites["slotinfo"].visible = true
end end
end end
@@ -458,7 +483,7 @@ class PokemonSaveScreen
_INTL("Save to another slot"), _INTL("Save to another slot"),
_INTL("Don't save") _INTL("Don't save")
] ]
opt = pbMessage(_INTL('Would you like to save the game?'),choices,3) opt = pbMessage(_INTL('Would you like to save the game?'), choices, 3)
if opt == 0 if opt == 0
pbSEPlay('GUI save choice') pbSEPlay('GUI save choice')
ret = doSave($Trainer.save_slot) ret = doSave($Trainer.save_slot)
@@ -495,7 +520,7 @@ class PokemonSaveScreen
# Handles the UI for the save slot select screen. Returns the index of the chosen slot, or -1. # Handles the UI for the save slot select screen. Returns the index of the chosen slot, or -1.
# Based on pbShowCommands # Based on pbShowCommands
def slotSelectCommands(choices, choice_info, defaultCmd=0) def slotSelectCommands(choices, choice_info, defaultCmd = 0)
msgwindow = Window_AdvancedTextPokemon.new(_INTL("Which slot to save in?")) msgwindow = Window_AdvancedTextPokemon.new(_INTL("Which slot to save in?"))
msgwindow.z = 99999 msgwindow.z = 99999
msgwindow.visible = true msgwindow.visible = true
@@ -509,9 +534,9 @@ class PokemonSaveScreen
cmdwindow.z = 99999 cmdwindow.z = 99999
cmdwindow.visible = true cmdwindow.visible = true
cmdwindow.resizeToFit(cmdwindow.commands) cmdwindow.resizeToFit(cmdwindow.commands)
pbPositionNearMsgWindow(cmdwindow,msgwindow,:right) pbPositionNearMsgWindow(cmdwindow, msgwindow, :right)
cmdwindow.index=defaultCmd cmdwindow.index = defaultCmd
command=0 command = 0
loop do loop do
@scene.pbUpdateSlotInfo(choice_info[cmdwindow.index]) @scene.pbUpdateSlotInfo(choice_info[cmdwindow.index])
Graphics.update Graphics.update
@@ -568,8 +593,8 @@ class PokemonSaveScreen
elapsed_str = _INTL("Time<r>{1}m<br>", min) elapsed_str = _INTL("Time<r>{1}m<br>", min)
end end
return "<c3=3050C8,D0D0C8>#{datetime_str}</c3>"+ # blue return "<c3=3050C8,D0D0C8>#{datetime_str}</c3>" + # blue
"<ac><c3=209808,90F090>#{map_str}</c3></ac>"+ # green "<ac><c3=209808,90F090>#{map_str}</c3></ac>" + # green
"#{elapsed_str}" "#{elapsed_str}"
end end
end end
@@ -635,7 +660,7 @@ module Game
# @param safe [Boolean] whether $PokemonGlobal.safesave should be set to true # @param safe [Boolean] whether $PokemonGlobal.safesave should be set to true
# @return [Boolean] whether the operation was successful # @return [Boolean] whether the operation was successful
# @raise [SaveData::InvalidValueError] if an invalid value is being saved # @raise [SaveData::InvalidValueError] if an invalid value is being saved
def self.save(slot=nil, auto=false, safe: false) def self.save(slot = nil, auto = false, safe: false)
slot = $Trainer.save_slot if slot.nil? slot = $Trainer.save_slot if slot.nil?
return false if slot.nil? return false if slot.nil?

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.