Mt. silver, Rock Climb - startup performance

This commit is contained in:
infinitefusion
2022-11-26 15:11:57 -05:00
parent 215e6a2462
commit 75569daf27
94 changed files with 775 additions and 3143 deletions

52
.gitignore vendored
View File

@@ -1,52 +0,0 @@
# Audio, Graphics and Plugins folders
Audio/
Graphics/
Plugins/
PBS/pokemon.txt
# Data folder, but not Data/Scripts folder
Data/species.dat
#!Data/Scripts.rxdata
#!Data/Scripts/
# Files in the main project folder
Game.ini
Game.rxproj
RGSS*.dll
# Common code editor folders & files
.vscode/
*.code-workspace
.idea/
# Operating system generated files & folders
.DS_Store
.DS_Store?
ehthumbs.db
Thumbs.db
[Dd]esktop.ini
# Temp files
~*
/.gitignore
/Graphics/Battlers/
/Graphics/CustomBattlers/
/Graphics/CustomBattlers_backup/
/data_backup/
/PBS/pokemon.txt
/PBS/pokemon_381.txt
/PBS/pokemon_419.txt
/PBS/pokemon_fr.txt
/PBS/pokemon-fr-iso.txt
/etc/
/Saves/
/Data - Copy/
/extendtext.exe
/fluidsynth.dll
/mkxp.json
/mkxp-z.exe
/Data.zip
/patch/
/build/
/bin/

View File

@@ -25,10 +25,6 @@ Frogman
The story and dialogues were based off Pok<6F>mon Red and Blue, as well as The story and dialogues were based off Pok<6F>mon Red and Blue, as well as
Pok<EFBFBD>mon Gold and Silver. Both games are made by Game Freak. Pok<EFBFBD>mon Gold and Silver. Both games are made by Game Freak.
#################################
Modern Mode by Tomate & Blaquaza
########################################################### ###########################################################
### Fusion Sprites ### ### Fusion Sprites ###
########################################################## ##########################################################
@@ -153,6 +149,7 @@ kakakiamekerasakia#3792, ItsThatSimple#6320, Gelos#9875, GalaxyDJx#0001, Fullmet
Evil Mailman#0604, elpano2#9588, Cenna#6226, Catdesu#0845, CaseyAether#2205, carni#0124, Buttlu#7240 Evil Mailman#0604, elpano2#9588, Cenna#6226, Catdesu#0845, CaseyAether#2205, carni#0124, Buttlu#7240
Triple fusion sprites Triple fusion sprites
######################## ########################
Legendary birds fusion sprite by Universez Legendary birds fusion sprite by Universez
@@ -286,8 +283,9 @@ KleinStudio Water bubble script http://kleinstudio.deviantart.com/art/SCRIPT
carmaniac Speech Bubbles script http://www.pokecommunity.com/showthread.php?t=295277 carmaniac Speech Bubbles script http://www.pokecommunity.com/showthread.php?t=295277
Wootius Turbo Speed https://www.pokecommunity.com/showthread.php?t=306037 Wootius Turbo Speed https://www.pokecommunity.com/showthread.php?t=306037
Marin Better maps script https://www.pokecommunity.com/showthread.php?t=411299 Marin Better maps script https://www.pokecommunity.com/showthread.php?t=411299
barafanatic Safari Zone improvements
M3rein Easy Questing System M3rein Easy Questing System
http404error Multisave https://reliccastle.com/resources/1059/ bo4p5687 Multisave
#### Data sources ### #### Data sources ###

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.

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.

Binary file not shown.

Binary file not shown.

BIN
Data/Map775.rxdata Normal file

Binary file not shown.

BIN
Data/Map776.rxdata Normal file

Binary file not shown.

BIN
Data/Map777.rxdata Normal file

Binary file not shown.

BIN
Data/Map778.rxdata Normal file

Binary file not shown.

BIN
Data/Map779.rxdata Normal file

Binary file not shown.

BIN
Data/Map780.rxdata Normal file

Binary file not shown.

BIN
Data/Map781.rxdata Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -421,6 +421,12 @@ def pbTrainerBattleCore(*args)
foeItems.push(arg.items) foeItems.push(arg.items)
elsif arg.is_a?(Array) # [trainer type, trainer name, ID, speech (optional)] elsif arg.is_a?(Array) # [trainer type, trainer name, ID, speech (optional)]
trainer = pbLoadTrainer(arg[0],arg[1],arg[2]) trainer = pbLoadTrainer(arg[0],arg[1],arg[2])
if !trainer && $game_switches[SWITCH_MODERN_MODE] #retry without modern mode
$game_switches[SWITCH_MODERN_MODE]=false
trainer = pbLoadTrainer(arg[0],arg[1],arg[2])
$game_switches[SWITCH_MODERN_MODE]=true
end
pbMissingTrainer(arg[0],arg[1],arg[2]) if !trainer pbMissingTrainer(arg[0],arg[1],arg[2]) if !trainer
return 0 if !trainer return 0 if !trainer
@@ -529,6 +535,11 @@ def pbTrainerBattle(trainerID, trainerName, endSpeech=nil,
end end
# Load the trainer's data, and call an event w0hich might modify it # Load the trainer's data, and call an event w0hich might modify it
trainer = pbLoadTrainer(trainerID,trainerName,trainerPartyID) trainer = pbLoadTrainer(trainerID,trainerName,trainerPartyID)
if !trainer && $game_switches[SWITCH_MODERN_MODE] #retry without modern mode
$game_switches[SWITCH_MODERN_MODE]=false
trainer = pbLoadTrainer(trainerID,trainerName,trainerPartyID)
$game_switches[SWITCH_MODERN_MODE]=true
end
pbMissingTrainer(trainerID,trainerName,trainerPartyID) if !trainer pbMissingTrainer(trainerID,trainerName,trainerPartyID) if !trainer
return false if !trainer return false if !trainer
Events.onTrainerPartyLoad.trigger(nil,trainer) Events.onTrainerPartyLoad.trigger(nil,trainer)

View File

@@ -192,7 +192,7 @@ def pbCut
move = :CUT move = :CUT
movefinder = $Trainer.get_pokemon_with_move(move) movefinder = $Trainer.get_pokemon_with_move(move)
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_CUT, false) || (!$DEBUG && !movefinder) if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_CUT, false) || (!$DEBUG && !movefinder)
if $PokemonBag.pbQuantity(:MACHETE)<=0 if $PokemonBag.pbQuantity(:MACHETE) <= 0
pbMessage(_INTL("This tree looks like it can be cut down.")) pbMessage(_INTL("This tree looks like it can be cut down."))
return false return false
end end
@@ -232,10 +232,10 @@ def pbSmashEvent(event)
return if !event return if !event
if event.name[/cuttree/i] if event.name[/cuttree/i]
pbSEPlay("Cut", 80) pbSEPlay("Cut", 80)
$scene.spriteset.addUserAnimation(Settings::CUT_TREE_ANIMATION_ID,event.x,event.y,false,1) $scene.spriteset.addUserAnimation(Settings::CUT_TREE_ANIMATION_ID, event.x, event.y, false, 1)
elsif event.name[/smashrock/i] elsif event.name[/smashrock/i]
pbSEPlay("Rock Smash", 80) pbSEPlay("Rock Smash", 80)
$scene.spriteset.addUserAnimation(Settings::ROCK_SMASH_ANIMATION_ID,event.x,event.y,false,1) $scene.spriteset.addUserAnimation(Settings::ROCK_SMASH_ANIMATION_ID, event.x, event.y, false, 1)
end end
pbMoveRoute(event, [ pbMoveRoute(event, [
PBMoveRoute::Wait, 2, PBMoveRoute::Wait, 2,
@@ -295,6 +295,32 @@ HiddenMoveHandlers::UseMove.add(:DIG, proc { |move, pokemon|
next false next false
}) })
def pbRockClimb
return false if $game_player.pbFacingEvent
move = :ROCKCLIMB
movefinder = $Trainer.get_pokemon_with_move(move)
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_ROCKCLIMB, false) || (!$DEBUG && !movefinder)
if $PokemonBag.pbQuantity(:CLIMBINGGEAR) <= 0
return false
end
end
if pbConfirmMessage(_INTL("It looks like it's possible to climb. Would you like to use Rock Climb?"))
speciesname = (movefinder) ? movefinder.name : $Trainer.name
pbMessage(_INTL("{1} used {2}!", speciesname, GameData::Move.get(move).name))
pbHiddenMoveAnimation(movefinder)
climbLedge
end
end
def climbLedge
if Kernel.pbJumpToward(2, true)
$scene.spriteset.addUserAnimation(DUST_ANIMATION_ID, $game_player.x, $game_player.y, true)
$game_player.increase_steps
$game_player.check_event_trigger_here([1, 2])
end
end
#=============================================================================== #===============================================================================
# Dive # Dive
#=============================================================================== #===============================================================================
@@ -305,7 +331,7 @@ def pbDive
move = :DIVE move = :DIVE
movefinder = $Trainer.get_pokemon_with_move(move) movefinder = $Trainer.get_pokemon_with_move(move)
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_DIVE, false) || (!$DEBUG && !movefinder) if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_DIVE, false) || (!$DEBUG && !movefinder)
if $PokemonBag.pbQuantity(:SCUBAGEAR)<=0 if $PokemonBag.pbQuantity(:SCUBAGEAR) <= 0
pbMessage(_INTL("The sea is deep here. A Pokémon may be able to go underwater.")) pbMessage(_INTL("The sea is deep here. A Pokémon may be able to go underwater."))
return false return false
end end
@@ -399,6 +425,7 @@ Events.onAction += proc { |_sender, _e|
end end
} }
HiddenMoveHandlers::CanUseMove.add(:DIVE, proc { |move, pkmn, showmsg| HiddenMoveHandlers::CanUseMove.add(:DIVE, proc { |move, pkmn, showmsg|
next false if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_DIVE, showmsg) next false if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_DIVE, showmsg)
if $PokemonGlobal.diving if $PokemonGlobal.diving
@@ -620,7 +647,7 @@ def pbRockSmash
move = :ROCKSMASH move = :ROCKSMASH
movefinder = $Trainer.get_pokemon_with_move(move) movefinder = $Trainer.get_pokemon_with_move(move)
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_ROCKSMASH, false) || (!$DEBUG && !movefinder) if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_ROCKSMASH, false) || (!$DEBUG && !movefinder)
if $PokemonBag.pbQuantity(:PICKAXE)<=0 if $PokemonBag.pbQuantity(:PICKAXE) <= 0
pbMessage(_INTL("It's a rugged rock, but a Pokémon may be able to smash it.")) pbMessage(_INTL("It's a rugged rock, but a Pokémon may be able to smash it."))
return false return false
end end
@@ -630,7 +657,7 @@ def pbRockSmash
pbMessage(_INTL("{1} used {2}!", speciesname, GameData::Move.get(move).name)) pbMessage(_INTL("{1} used {2}!", speciesname, GameData::Move.get(move).name))
pbHiddenMoveAnimation(movefinder) pbHiddenMoveAnimation(movefinder)
facingEvent = $game_player.pbFacingEvent(true) facingEvent = $game_player.pbFacingEvent(true)
$scene.spriteset.addUserAnimation(Settings::ROCK_SMASH_ANIMATION_ID,facingEvent.x,facingEvent.y,false) $scene.spriteset.addUserAnimation(Settings::ROCK_SMASH_ANIMATION_ID, facingEvent.x, facingEvent.y, false)
return true return true
end end
return false return false
@@ -669,7 +696,7 @@ def pbStrength
move = :STRENGTH move = :STRENGTH
movefinder = $Trainer.get_pokemon_with_move(move) movefinder = $Trainer.get_pokemon_with_move(move)
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_STRENGTH, false) || (!$DEBUG && !movefinder) if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_STRENGTH, false) || (!$DEBUG && !movefinder)
if $PokemonBag.pbQuantity(:LEVER)<=0 if $PokemonBag.pbQuantity(:LEVER) <= 0
pbMessage(_INTL("It looks heavy, but a Pokémon may be able to push it aside.")) pbMessage(_INTL("It looks heavy, but a Pokémon may be able to push it aside."))
return false return false
end end
@@ -719,7 +746,7 @@ def pbSurf
move = :SURF move = :SURF
movefinder = $Trainer.get_pokemon_with_move(move) movefinder = $Trainer.get_pokemon_with_move(move)
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_SURF, false) || (!$DEBUG && !movefinder) if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_SURF, false) || (!$DEBUG && !movefinder)
if $PokemonBag.pbQuantity(:SURFBOARD)<=0 if $PokemonBag.pbQuantity(:SURFBOARD) <= 0
return false return false
end end
end end
@@ -970,7 +997,7 @@ def pbWaterfall
move = :WATERFALL move = :WATERFALL
movefinder = $Trainer.get_pokemon_with_move(move) movefinder = $Trainer.get_pokemon_with_move(move)
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_WATERFALL, false) || (!$DEBUG && !movefinder) if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_WATERFALL, false) || (!$DEBUG && !movefinder)
if $PokemonBag.pbQuantity(:JETPACK)<=0 if $PokemonBag.pbQuantity(:JETPACK) <= 0
pbMessage(_INTL("A wall of water is crashing down with a mighty roar.")) pbMessage(_INTL("A wall of water is crashing down with a mighty roar."))
return false return false
end end
@@ -1010,3 +1037,21 @@ HiddenMoveHandlers::UseMove.add(:WATERFALL, proc { |move, pokemon|
pbAscendWaterfall pbAscendWaterfall
next true next true
}) })
HiddenMoveHandlers::CanUseMove.add(:ROCKCLIMB, proc { |move, pkmn, showmsg|
next false if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_ROCKCLIMB, showmsg)
if !$game_player.pbFacingTerrainTag.ledge
pbMessage(_INTL("Can't use that here.")) if showmsg
next false
end
next true
})
Events.onAction += proc { |_sender, _e|
terrain = $game_player.pbFacingTerrainTag
if terrain.ledge
pbRockClimb
end
}

View File

@@ -5,7 +5,7 @@
def getTrainersDataMode def getTrainersDataMode
mode = GameData::Trainer mode = GameData::Trainer
if $game_switches && $game_switches[SWITCH_MODERN_MODE] && !$game_switches[SWITCH_BIRDBOSS_BATTLE] if $game_switches && $game_switches[SWITCH_MODERN_MODE]
mode = GameData::TrainerModern mode = GameData::TrainerModern
end end
return mode return mode

View File

@@ -143,7 +143,7 @@ class PokemonPauseMenu
end end
commands[cmdOption = commands.length] = _INTL("Options") commands[cmdOption = commands.length] = _INTL("Options")
commands[cmdDebug = commands.length] = _INTL("Debug") if $DEBUG commands[cmdDebug = commands.length] = _INTL("Debug") if $DEBUG
commands[cmdEndGame = commands.length] = _INTL("Quit Game") commands[cmdEndGame = commands.length] = _INTL("Title screen")
loop do loop do
command = @scene.pbShowCommands(commands) command = @scene.pbShowCommands(commands)
if cmdPokedex >= 0 && command == cmdPokedex if cmdPokedex >= 0 && command == cmdPokedex

View File

@@ -129,5 +129,5 @@ DIRECTION_RIGHT = 6
DIRECTION_DOWN = 2 DIRECTION_DOWN = 2
DIRECTION_UP = 8 DIRECTION_UP = 8
DUST_ANIMATION_ID=2
SWITCH_BIRDBOSS_BATTLE = 824 SWITCH_BIRDBOSS_BATTLE = 824

View File

@@ -35,7 +35,7 @@ Events.onMapUpdate += proc { |sender, e|
next if !$game_switches[AUTOSAVE_STEPS_SWITCH] next if !$game_switches[AUTOSAVE_STEPS_SWITCH]
stepsNum = pbGet(AUTOSAVE_STEPS_VAR) stepsNum = pbGet(AUTOSAVE_STEPS_VAR)
if stepsNum > 0 && !$PokemonGlobal.sliding if stepsNum > 0 && !$PokemonGlobal.sliding
return if $PokemonGlobal.stepcount < 100 next if $PokemonGlobal.stepcount < 100
if $PokemonGlobal.stepcount % stepsNum == 0 if $PokemonGlobal.stepcount % stepsNum == 0
$PokemonGlobal.stepcount += 1 $PokemonGlobal.stepcount += 1
Kernel.tryAutosave() Kernel.tryAutosave()

File diff suppressed because it is too large Load Diff

View File

@@ -1,919 +0,0 @@
# # Store save file after load save file
# $storenamefilesave = nil
# # Some method for checking save file
# module FileSave
# # Set name of folder
# #DIR_SAVE_GAME = System.data_directory
# DIR_SAVE_GAME = "Save Game"
# # Set name of file for saving:
# # Ex: Game1,Game2,etc
# FILENAME_SAVE_GAME = "Game"
# # Create dir
# def self.createDir(dir = DIR_SAVE_GAME)
# Dir.mkdir(dir) if !safeExists?(dir)
# end
#
# # Return location
# def self.location(dir = DIR_SAVE_GAME)
# self.createDir
# return "#{dir}"
# end
#
# # Array file
# def self.count(arr = false, dir = DIR_SAVE_GAME, file = FILENAME_SAVE_GAME, type = "rxdata")
# self.createDir(dir)
# File.rename("#{dir}/#{file}.#{type}", "#{dir}/#{file}1.#{type}") if File.file?("#{dir}/#{file}.#{type}")
# return arr ? Dir.glob("#{dir}/#{file}*.#{type}") : Dir.glob("#{dir}/#{file}*.#{type}").size
# end
#
# # Rename
# def self.rename(dir = DIR_SAVE_GAME, file = FILENAME_SAVE_GAME, type = "rxdata")
# arr = self.count(true)
# return if arr.size <= 0
# name = []
# arr.each { |f| name << (File.basename(f, ".#{type}").gsub(/[^0-9]/, "")) }
# needtorewrite = false
# (0...arr.size).each { |i|
# needtorewrite = true if arr[i] != "#{dir}/#{file}#{name[i]}.#{type}"
# }
# if needtorewrite
# numbername = []
# name.each { |n| numbername << n.to_i }
# (0...numbername.size).each { |i|
# loop do
# break if i == 0
# diff = numbername.index(numbername[i])
# break if diff == i
# numbername[i] += 1
# end
# Dir.mkdir("#{dir}/#{numbername[i]}")
# File.rename("#{arr[i]}", "#{dir}/#{numbername[i]}/#{file}#{numbername[i]}.#{type}")
# }
# (0...name.size).each { |i|
# name2 = "#{dir}/#{numbername[i]}/#{file}#{numbername[i]}.#{type}"
# File.rename(name2, "#{dir}/#{file}#{numbername[i]}.#{type}")
# Dir.delete("#{dir}/#{numbername[i]}")
# }
# end
# arr.size.times { |i|
# num = 0
# namef = sprintf("%d", i + 1)
# loop do
# break if File.file?("#{dir}/#{file}#{namef}.#{type}")
# num += 1
# namef2 = sprintf("%d", i + 1 + num)
# File.rename("#{dir}/#{file}#{namef2}.#{type}", "#{dir}/#{file}#{namef}.#{type}") if File.file?("#{dir}/#{file}#{namef2}.#{type}")
# end
# }
# end
#
# # Save
# def self.name(n = nil, re = true, dir = DIR_SAVE_GAME, file = FILENAME_SAVE_GAME, type = "rxdata")
# self.rename if re
# return "#{dir}/#{file}1.rxdata" if n.nil?
# if !n.is_a?(Numeric)
# p "Set number for file save"
# return
# end
# return "#{dir}/#{file}#{n}.rxdata"
# end
#
# # Old file save
# def self.title
# return System.game_title.gsub(/[^\w ]/, '_')
# end
#
# # Version 19
# def self.dirv19(dir = DIR_SAVE_GAME, file = FILENAME_SAVE_GAME, type = "rxdata")
# game_title = self.title
# return if !File.directory?(System.data_directory)
# old_file = System.data_directory + '/Game.rxdata'
# return if !File.file?(old_file)
# self.rename
# size = self.count
# File.move(old_file, "#{dir}/#{file}#{size + 1}.#{type}")
# end
#
# # Version 18
# def self.dirv18(dir = DIR_SAVE_GAME, file = FILENAME_SAVE_GAME, type = "rxdata")
# game_title = self.title
# home = ENV['HOME'] || ENV['HOMEPATH']
# return if home.nil?
# old_location = File.join(home, 'Saved Games', game_title)
# return if !File.directory?(old_location)
# old_file = File.join(old_location, 'Game.rxdata')
# return if !File.file?(old_file)
# self.rename
# size = self.count
# File.move(old_file, "#{dir}/#{file}#{size + 1}.#{type}")
# end
# end
# #-------------------------#
# # Set for module SaveData #
# #-------------------------#
# module SaveData
# def self.delete_file(file = FILE_PATH)
# File.delete(file)
# File.delete(file + '.bak') if File.file?(file + '.bak')
# end
#
# def self.move_old_windows_save
# FileSave.dirv19
# FileSave.dirv18
# end
#
# def self.changeFILEPATH(new = nil)
# return if new.nil?
# const_set(:FILE_PATH, new)
# end
# end
# #---------------------#
# # Set 'set_up_system' #
# #---------------------#
# module Game
# def self.set_up_system
# SaveData.changeFILEPATH($storenamefilesave.nil? ? FileSave.name : $storenamefilesave)
# SaveData.move_old_windows_save if System.platform[/Windows/]
# save_data = (SaveData.exists?) ? SaveData.read_from_file(SaveData::FILE_PATH) : {}
# if save_data.empty?
# SaveData.initialize_bootup_values
# else
# SaveData.load_bootup_values(save_data)
# end
# # Set resize factor
# pbSetResizeFactor([$PokemonSystem.screensize, 4].min)
# # Set language (and choose language if there is no save file)
# if Settings::LANGUAGES.length >= 2
# $PokemonSystem.language = pbChooseLanguage if save_data.empty?
# pbLoadMessages('Data/' + Settings::LANGUAGES[$PokemonSystem.language][1])
# end
# end
# end
# #--------------------#
# # Set emergency save #
# #--------------------#
# def pbEmergencySave
# oldscene = $scene
# $scene = nil
# pbMessage(_INTL("The script is taking too long. The game will restart."))
# return if !$Trainer
# # It will store the last save file when you dont file save
# count = FileSave.count
# SaveData.changeFILEPATH($storenamefilesave.nil? ? FileSave.name : $storenamefilesave)
# if SaveData.exists?
# File.open(SaveData::FILE_PATH, 'rb') do |r|
# File.open(SaveData::FILE_PATH + '.bak', 'wb') do |w|
# while s = r.read(4096)
# w.write s
# end
# end
# end
# end
# if Game.save
# pbMessage(_INTL("\\se[]The game was saved.\\me[GUI save game] The previous save file has been backed up.\\wtnp[30]"))
# else
# pbMessage(_INTL("\\se[]Save failed.\\wtnp[30]"))
# end
# $scene = oldscene
# end
#
# #------------------------------------------------------------------------------#
# #------------------------------------------------------------------------------#
# #------------------------------------------------------------------------------#
# #------------------------------------------------------------------------------#
# # Save #
# #------------------------------------------------------------------------------#
# # Custom message
# def pbCustomMessageForSave(message, commands, index, &block)
# return pbMessage(message, commands, index, &block)
# end
#
# # Save screen
# class PokemonSaveScreen
# def pbSaveScreen
# ret = false
# # Check for renaming
# FileSave.rename
# # Count save file
# count = FileSave.count
# # Start
# @scene.pbStartScreen
# msg = _INTL("What do you want to do?")
# cmds = [_INTL("Save"),
# _INTL("Save to new file"),
# _INTL("Overwrite another save"),
# _INTL("Cancel")
# ]
# cmd2 = pbCustomMessageForSave(msg, cmds, 3)
#
# # New save file
# case cmd2
# when 1
# ret = writeToNewSaveFile(count)
# # Overwrite
# when 2
# ret = overwriteSaveFile(count)
# when 0
# ret = overwriteCurrentFile(count)
# end
#
# @scene.pbEndScreen
# return ret
# end
#
# def overwriteCurrentFile(count)
# if !$storenamefilesave.nil? && count > 0
# SaveData.changeFILEPATH($storenamefilesave)
# if Game.save
# pbMessage(_INTL("\\se[]{1} saved the game.\\me[GUI save game]\\wtnp[30]", $Trainer.name))
# ret = true
# else
# pbMessage(_INTL("\\se[]Save failed.\\wtnp[30]"))
# ret = false
# end
#
# SaveData.changeFILEPATH(!$storenamefilesave.nil? ? $storenamefilesave : FileSave.name)
# return ret
# else
# return writeToNewSaveFile(count)
# end
# end
#
# def overwriteSaveFile(count)
# if count <= 0
# pbMessage(_INTL("No save file was found."))
# else
# pbFadeOutIn {
# file = ScreenChooseFileSave.new(count)
# file.movePanel
# file.endScene
# return file.staymenu
# }
# end
# end
#
# def writeToNewSaveFile(count)
# SaveData.changeFILEPATH(FileSave.name(count + 1))
# ret = false
# if Game.save
# pbMessage(_INTL("\\se[]{1} saved the game.\\me[GUI save game]\\wtnp[30]", $Trainer.name))
# ret = true
# else
# pbMessage(_INTL("\\se[]Save failed.\\wtnp[30]"))
# end
# SaveData.changeFILEPATH(!$storenamefilesave.nil? ? $storenamefilesave : FileSave.name)
# return ret
# end
# end
#
# #------------------------------------------------------------------------------#
# #------------------------------------------------------------------------------#
# #------------------------------------------------------------------------------#
# #------------------------------------------------------------------------------#
# # Load #
# #------------------------------------------------------------------------------#
# class PokemonLoadScreen
# def initialize(scene)
# @scene = scene
# end
#
# def pbStartLoadScreen
# commands = []
# cmd_continue = -1
# cmd_new_game = -1
# cmd_options = -1
# cmd_debug = -1
# cmd_quit = -1
# show_continue = FileSave.count > 0
# commands[cmd_continue = commands.length] = _INTL('Continue') if show_continue
# commands[cmd_new_game = commands.length] = _INTL('New Game')
# commands[cmd_options = commands.length] = _INTL('Options')
# commands[cmd_delete = commands.length] = _INTL('Delete Save') if show_continue
# commands[cmd_debug = commands.length] = _INTL('Debug') if $DEBUG
# commands[cmd_quit = commands.length] = _INTL('Quit Game')
# @scene.pbStartScene(commands, false, nil, 0, 0)
# @scene.pbStartScene2
# loop do
# command = @scene.pbChoose(commands)
# pbPlayDecisionSE if command != cmd_quit
# case command
# when cmd_continue
# pbFadeOutIn {
# file = ScreenChooseFileSave.new(FileSave.count)
# file.movePanel(1)
# @scene.pbEndScene if !file.staymenu
# file.endScene
# return if !file.staymenu
# }
# when cmd_new_game
# @scene.pbEndScene
# Game.start_new
# return
# when cmd_options
# pbFadeOutIn do
# scene = PokemonOption_Scene.new
# screen = PokemonOptionScreen.new(scene)
# screen.pbStartScreen(true)
# end
# when cmd_debug
# pbFadeOutIn { pbDebugMenu(false) }
# when cmd_quit
# pbPlayCloseMenuSE
# @scene.pbEndScene
# $scene = nil
# return
# when cmd_delete
# #pbStartDeleteScreen
# deleteFileMenu(FileSave.count)
# else
# pbPlayBuzzerSE
# end
# end
# end
#
# def deleteFileMenu(count)
# if count <= 0
# pbMessage(_INTL("No save file was found."))
# else
# pbFadeOutIn {
# file = ScreenChooseFileSave.new(count)
# file.movePanel(2)
# file.endScene
# Graphics.frame_reset if file.deletefile
# }
# # Return menu
# return false
# end
# end
#
# def pbStartDeleteScreen
# @scene.pbStartDeleteScene
# @scene.pbStartScene2
# count = FileSave.count
# if count < 0
# pbMessage(_INTL("No save file was found."))
# else
# msg = _INTL("What do you want to do?")
# cmds = [_INTL("Delete All File Save"), _INTL("Delete Only One File Save"), _INTL("Cancel")]
# cmd = pbCustomMessageForSave(msg, cmds, 3)
# case cmd
# when 0
# if pbConfirmMessageSerious(_INTL("Delete all saves?"))
# pbMessage(_INTL("Once data has been deleted, there is no way to recover it.\1"))
# if pbConfirmMessageSerious(_INTL("Delete the saved data anyway?"))
# pbMessage(_INTL("Deleting all data. Don't turn off the power.\\wtnp[0]"))
# haserrorwhendelete = false
# count.times { |i|
# name = FileSave.name(i + 1, false)
# begin
# SaveData.delete_file(name)
# rescue
# haserrorwhendelete = true
# end
# }
# pbMessage(_INTL("You have at least one file that cant delete and have error")) if haserrorwhendelete
# Graphics.frame_reset
# pbMessage(_INTL("The save file was deleted."))
# end
# end
# when 1
# pbFadeOutIn {
# file = ScreenChooseFileSave.new(count)
# file.movePanel(2)
# file.endScene
# Graphics.frame_reset if file.deletefile
# }
# end
# end
# @scene.pbEndScene
# $scene = pbCallTitle
# end
# end
#
# #------------------------------------------------------------------------------#
# #------------------------------------------------------------------------------#
# #------------------------------------------------------------------------------#
# #------------------------------------------------------------------------------#
# # Scene for save menu, load menu and delete menu #
# #------------------------------------------------------------------------------#
# class ScreenChooseFileSave
# attr_reader :staymenu
# attr_reader :deletefile
#
# def initialize(count)
# @sprites = {}
# @viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
# @viewport.z = 99999
# # Set value
# # Check quantity
# @count = count
# if @count <= 0
# pbMessage("No save file was found.")
# return
# end
# # Check still menu
# @staymenu = false
# @deletefile = false
# # Check position
# @position = 0
# # Check position if count > 7
# @choose = 0
# # Set position of panel 'information'
# @posinfor = 0
# # Quantity of panel in information page
# @qinfor = 0
# # Check mystery gift
# @mysgif = false
# end
#
# # Set background (used "loadbg")
# def drawBg
# color = Color.new(248, 248, 248)
# addBackgroundOrColoredPlane(@sprites, "background", "loadbg", color, @viewport)
# end
#
# #-------------------------------------------------------------------------------
# # Set Panel
# #-------------------------------------------------------------------------------
# # Draw panel
# def startPanel
# # Check and rename
# FileSave.rename
# # Start
# drawBg
# # Set bar
# num = (@count > 7) ? 7 : @count
# (0...num).each { |i|
# create_sprite("panel #{i}", "loadPanels", @viewport)
# w = 384; h = 46
# set_src_wh_sprite("panel #{i}", w, h)
# x = 16; y = 444
# set_src_xy_sprite("panel #{i}", x, y)
# x = 24 * 2; y = 16 * 2 + 48 * i
# set_xy_sprite("panel #{i}", x, y)
# }
# # Set choose bar
# create_sprite("choose panel", "loadPanels", @viewport)
# w = 384; h = 46
# set_src_wh_sprite("choose panel", w, h)
# x = 16; y = 444 + 46
# set_src_xy_sprite("choose panel", x, y)
# choosePanel(@choose)
# # Set text
# create_sprite_2("text", @viewport)
# textPanel
# pbFadeInAndShow(@sprites) { update }
# end
#
# def choosePanel(pos = 0)
# x = 24 * 2; y = 16 * 2 + 48 * pos
# set_xy_sprite("choose panel", x, y)
# end
#
# # Draw text panel
# BaseColor = Color.new(252, 252, 252)
# ShadowColor = Color.new(0, 0, 0)
#
# def textPanel(font = nil)
# return if @count <= 0
# bitmap = @sprites["text"].bitmap
# bitmap.clear
# if @count > 0 && @count < 7
# namesave = 0; endnum = @count
# else
# namesave = (@position > @count - 7) ? @count - 7 : @position
# endnum = 7
# end
# textpos = []
# (0...endnum).each { |i|
# string = _INTL("Save File #{namesave + 1 + i}")
# if i + 1 == getCurrentSaveFileNumber()
# string += " (Current)"
# end
# x = 24 * 2 + 36; y = 16 * 2 + 5 + 48 * i
# textpos << [string, x, y, 0, BaseColor, ShadowColor]
# }
# (font.nil?) ? pbSetSystemFont(bitmap) : bitmap.font.name = font
# pbDrawTextPositions(bitmap, textpos)
# end
#
# def getCurrentSaveFileNumber()
# saveFilePath = $storenamefilesave
# return nil if saveFilePath == nil
# begin
# filename = saveFilePath.split(".")[0]
# return filename[-1].to_i
# rescue nil
# end
# end
#
# # Move panel
# # Type: 0: Save; 1: Load; 2: Delete
# def movePanel(type = 0)
# infor = false; draw = true; loadmenu = false
# @type = type
# loop do
# # Panel Page
# if !loadmenu
# if !infor
# if draw;
# startPanel; draw = false
# else
# # Update
# update_ingame
# if checkInput(Input::UP)
# @position -= 1
# @choose -= 1
# if @choose < 0
# if @position < 0
# @choose = (@count < 7) ? @count - 1 : 6
# else
# @choose = 0
# end
# end
# @position = @count - 1 if @position < 0
# # Move choose panel
# choosePanel(@choose)
# # Draw text
# textPanel
# end
# if checkInput(Input::DOWN)
# @position += 1
# @choose += 1 if @position > @count - 7
# (@choose = 0; @position = 0) if @position >= @count
# # Move choose panel
# choosePanel(@choose)
# # Draw text
# textPanel
# end
# if checkInput(Input::USE)
# dispose
# draw = true
# if self.fileLoad.empty?
# @choose = 0; @position = 0
# if FileSave.count == 0
# pbMessage(_INTL('You dont have any save file. Restart game now.'))
# @staymenu = false
# $scene = pbCallTitle if @type == 1
# break
# end
# else
# infor = true
# end
# end
# if checkInput(Input::BACK)
# @staymenu = true if @type == 1
# break
# end
# end
# # Information page
# elsif infor
# if draw;
# startPanelInfor(@type); draw = false
# else
# # Update
# update_ingame
# # Load file
# loadmenu = true if @type == 1
# if checkInput(Input::USE)
# # Save file
# case @type
# when 0
# SaveData.changeFILEPATH(FileSave.name(@position + 1))
# if Game.save
# pbMessage(_INTL("\\se[]{1} saved the game.\\me[GUI save game]\\wtnp[30]", $Trainer.name))
# ret = true
# else
# pbMessage(_INTL("\\se[]Save failed.\\wtnp[30]"))
# ret = false
# end
# SaveData.changeFILEPATH($storenamefilesave.nil? ? FileSave.name : $storenamefilesave)
# break
# # Delete file
# when 2
# if pbConfirmMessageSerious(_INTL("Delete all saved data?"))
# pbMessage(_INTL("Once data has been deleted, there is no way to recover it.\1"))
# if pbConfirmMessageSerious(_INTL("Delete the saved data anyway?"))
# pbMessage(_INTL("Deleting all data. Don't turn off the power.\\wtnp[0]"))
# # Delete
# self.deleteFile
# @deletefile = true
# end
# end
# break
# end
# end
# (dispose; draw = true; infor = false) if checkInput(Input::BACK)
# end
# end
# else
# # Update
# update_ingame
# # Start
# if @qinfor > 0
# if checkInput(Input::UP)
# @posinfor -= 1
# @posinfor = @qinfor if @posinfor < 0
# choosePanelInfor
# end
# if checkInput(Input::DOWN)
# @posinfor += 1
# @posinfor = 0 if @posinfor > @qinfor
# choosePanelInfor
# end
# end
# if checkInput(Input::USE)
# # Set up system again
# $storenamefilesave = FileSave.name(@position + 1)
# Game.set_up_system
# if @posinfor == 0
# Game.load(self.fileLoad)
# @staymenu = false
# break
# # Mystery Gift
# elsif @posinfor == 1 && @mysgif
# pbFadeOutIn {
# pbDownloadMysteryGift(self.fileLoad[:player])
# @posinfor = 0; @qinfor = 0; @mysgif = false
# dispose; draw = true; loadmenu = false; infor = false
# }
# # Language
# elsif Settings::LANGUAGES.length >= 2 && (@posinfor == 2 || (@posinfor == 1 && !@mysgif))
# $PokemonSystem.language = pbChooseLanguage
# pbLoadMessages('Data/' + Settings::LANGUAGES[$PokemonSystem.language][1])
# self.fileLoad[:pokemon_system] = $PokemonSystem
# File.open(FileSave.name(@position + 1), 'wb') { |file| Marshal.dump(self.fileLoad, file) }
# @posinfor = 0; @qinfor = 0; @mysgif = false
# dispose; draw = true; loadmenu = false; infor = false
# end
# end
# if checkInput(Input::BACK)
# @posinfor = 0; @qinfor = 0; @mysgif = false
# dispose; draw = true; loadmenu = false; infor = false
# end
# end
# end
# end
#
# #-------------------------------------------------------------------------------
# # Set information
# #-------------------------------------------------------------------------------
# def startPanelInfor(type)
# # Draw background
# drawBg
# create_sprite("infor panel 0", "loadPanels", @viewport)
# w = 408; h = 222
# set_src_wh_sprite("infor panel 0", w, h)
# x = 0; y = 0
# set_src_xy_sprite("infor panel 0", x, y)
# x = 24 * 2; y = 16 * 2
# set_xy_sprite("infor panel 0", x, y)
# drawInfor(type)
# end
#
# # Color
# TEXTCOLOR = Color.new(232, 232, 232)
# TEXTSHADOWCOLOR = Color.new(136, 136, 136)
# MALETEXTCOLOR = Color.new(56, 160, 248)
# MALETEXTSHADOWCOLOR = Color.new(56, 104, 168)
# FEMALETEXTCOLOR = Color.new(240, 72, 88)
# FEMALETEXTSHADOWCOLOR = Color.new(160, 64, 64)
#
# # Draw information (text)
# def drawInfor(type, font = nil)
# # Set trainer
# trainer = self.fileLoad[:player]
# # Set mystery gift and language
# if type == 1
# mystery = self.fileLoad[:player].mystery_gift_unlocked
# @mysgif = mystery
# @qinfor += 1 if mystery
# @qinfor += 1 if Settings::LANGUAGES.length >= 2
# (0...@qinfor).each { |i|
# create_sprite("panel load #{i}", "loadPanels", @viewport)
# w = 384; h = 46
# set_src_wh_sprite("panel load #{i}", w, h)
# x = 16; y = 444
# set_src_xy_sprite("panel load #{i}", x, y)
# x = 24 * 2 + 8; y = 16 * 2 + 48 * i + 112 * 2
# set_xy_sprite("panel load #{i}", x, y)
# } if @qinfor > 0
# end
# # Move panel (information)
# create_sprite("infor panel 1", "loadPanels", @viewport)
# w = 408; h = 222
# set_src_wh_sprite("infor panel 1", w, h)
# x = 0; y = 222
# set_src_xy_sprite("infor panel 1", x, y)
# x = 24 * 2; y = 16 * 2
# set_xy_sprite("infor panel 1", x, y)
# # Set
# create_sprite_2("text", @viewport)
# framecount = self.fileLoad[:frame_count]
# totalsec = (framecount || 0) / Graphics.frame_rate
# bitmap = @sprites["text"].bitmap
# textpos = []
# # Text of trainer
# x = 24 * 2; y = 16 * 2
# title = (type == 0) ? "Save" : (type == 1) ? "Load" : "Delete"
# textpos << [_INTL("#{title}"), 16 * 2 + x, 5 * 2 + y, 0, TEXTCOLOR, TEXTSHADOWCOLOR]
# textpos << [_INTL("Badges:"), 16 * 2 + x, 56 * 2 + y, 0, TEXTCOLOR, TEXTSHADOWCOLOR]
# textpos << [trainer.badge_count.to_s, 103 * 2 + x, 56 * 2 + y, 1, TEXTCOLOR, TEXTSHADOWCOLOR]
# textpos << [_INTL("Pokédex:"), 16 * 2 + x, 72 * 2 + y, 0, TEXTCOLOR, TEXTSHADOWCOLOR]
# textpos << [trainer.pokedex.seen_count.to_s, 103 * 2 + x, 72 * 2 + y, 1, TEXTCOLOR, TEXTSHADOWCOLOR]
# textpos << [_INTL("Time:"), 16 * 2 + x, 88 * 2 + y, 0, TEXTCOLOR, TEXTSHADOWCOLOR]
# hour = totalsec / 60 / 60
# min = totalsec / 60 % 60
# if hour > 0
# textpos << [_INTL("{1}h {2}m", hour, min), 103 * 2 + x, 88 * 2 + y, 1, TEXTCOLOR, TEXTSHADOWCOLOR]
# else
# textpos << [_INTL("{1}m", min), 103 * 2 + x, 88 * 2 + y, 1, TEXTCOLOR, TEXTSHADOWCOLOR]
# end
# if trainer.male?
# textpos << [trainer.name, 56 * 2 + x, 32 * 2 + y, 0, MALETEXTCOLOR, MALETEXTSHADOWCOLOR]
# elsif textpos << [trainer.name, 56 * 2 + x, 32 * 2 + y, 0, FEMALETEXTCOLOR, FEMALETEXTSHADOWCOLOR]
# else
# textpos << [trainer.name, 56 * 2 + x, 32 * 2 + y, 0, TEXTCOLOR, TEXTSHADOWCOLOR]
# end
# mapid = self.fileLoad[:map_factory].map.map_id
# mapname = pbGetMapNameFromId(mapid)
# mapname.gsub!(/\\PN/, trainer.name)
# textpos << [mapname, 193 * 2 + x, 5 * 2 + y, 1, TEXTCOLOR, TEXTSHADOWCOLOR]
# # Load menu
# if type == 1
# # Mystery gift / Language
# string = []
# string << _INTL("Mystery Gift") if mystery
# string << _INTL("Language") if Settings::LANGUAGES.length >= 2
# if @qinfor > 0
# (0...@qinfor).each { |i|
# str = string[i]
# x1 = x + 36 + 8
# y1 = y + 5 + 112 * 2 + 48 * i
# textpos << [str, x1, y1, 0, TEXTCOLOR, TEXTSHADOWCOLOR]
# }
# end
# end
# # Set text
# (font.nil?) ? pbSetSystemFont(bitmap) : bitmap.font.name = font
# pbDrawTextPositions(bitmap, textpos)
#
# # Set trainer (draw)
# if !trainer || !trainer.party
# # Fade
# pbFadeInAndShow(@sprites) { update }
# return
# else
# meta = GameData::Metadata.get_player(trainer.character_ID)
# if meta
# filename = pbGetPlayerCharset(meta, 1, trainer, true)
# @sprites["player"] = TrainerWalkingCharSprite.new(filename, @viewport)
# charwidth = @sprites["player"].bitmap.width
# charheight = @sprites["player"].bitmap.height
# @sprites["player"].x = 56 * 2 - charwidth / 8
# @sprites["player"].y = 56 * 2 - charheight / 8
# @sprites["player"].src_rect = Rect.new(0, 0, charwidth / 4, charheight / 4)
# end
# for i in 0...trainer.party.length
# @sprites["party#{i}"] = PokemonIconSprite.new(trainer.party[i], @viewport)
# @sprites["party#{i}"].setOffset(PictureOrigin::Center)
# @sprites["party#{i}"].x = (167 + 33 * (i % 2)) * 2
# @sprites["party#{i}"].y = (56 + 25 * (i / 2)) * 2
# @sprites["party#{i}"].z = 99999
# end
# # Fade
# pbFadeInAndShow(@sprites) { update }
# end
# end
#
# def choosePanelInfor
# if @posinfor == 0
# w = 408; h = 222
# set_src_wh_sprite("infor panel 1", w, h)
# x = 0; y = 222
# set_src_xy_sprite("infor panel 1", x, y)
# x = 24 * 2; y = 16 * 2
# set_xy_sprite("infor panel 1", x, y)
# else
# w = 384; h = 46
# set_src_wh_sprite("infor panel 1", w, h)
# x = 16; y = 490
# set_src_xy_sprite("infor panel 1", x, y)
# x = 24 * 2 + 8
# y = 16 * 2 + 48 * (@posinfor - 1) + 112 * 2
# set_xy_sprite("infor panel 1", x, y)
# end
# end
#
# #-------------------------------------------------------------------------------
# # Delete
# #-------------------------------------------------------------------------------
# def deleteFile
# savefile = FileSave.name(@position + 1, false)
# begin
# SaveData.delete_file(savefile)
# pbMessage(_INTL('The saved data was deleted.'))
# rescue SystemCallError
# pbMessage(_INTL('All saved data could not be deleted.'))
# end
# end
#
# #-------------------------------------------------------------------------------
# # Load File
# #-------------------------------------------------------------------------------
# def load_save_file(file_path)
# save_data = SaveData.read_from_file(file_path)
# unless SaveData.valid?(save_data)
# if File.file?(file_path + '.bak')
# pbMessage(_INTL('The save file is corrupt. A backup will be loaded.'))
# save_data = load_save_file(file_path + '.bak')
# else
# self.prompt_save_deletion
# return {}
# end
# end
# return save_data
# end
#
# # Called if all save data is invalid.
# # Prompts the player to delete the save files.
# def prompt_save_deletion
# pbMessage(_INTL('Cant load this save file'))
# pbMessage(_INTL('The save file is corrupt, or is incompatible with this game.'))
# exit unless pbConfirmMessageSerious(_INTL('Do you want to delete this save file?'))
# self.deleteFile
# $game_system = Game_System.new
# $PokemonSystem = PokemonSystem.new
# end
#
# def fileLoad
# return load_save_file(FileSave.name(@position + 1))
# end
#
# #-------------------------------------------------------------------------------
# # Set SE for input
# #-------------------------------------------------------------------------------
# def checkInput(name)
# if Input.trigger?(name)
# (name == Input::BACK) ? pbPlayCloseMenuSE : pbPlayDecisionSE
# return true
# end
# return false
# end
#
# #-------------------------------------------------------------------------------
# # Set bitmap
# #-------------------------------------------------------------------------------
# # Image
# def create_sprite(spritename, filename, vp, dir = "Pictures")
# @sprites["#{spritename}"] = Sprite.new(vp)
# @sprites["#{spritename}"].bitmap = Bitmap.new("Graphics/#{dir}/#{filename}")
# end
#
# # Set x, y
# def set_xy_sprite(spritename, x, y)
# @sprites["#{spritename}"].x = x
# @sprites["#{spritename}"].y = y
# end
#
# # Set src
# def set_src_wh_sprite(spritename, w, h)
# @sprites["#{spritename}"].src_rect.width = w
# @sprites["#{spritename}"].src_rect.height = h
# end
#
# def set_src_xy_sprite(spritename, x, y)
# @sprites["#{spritename}"].src_rect.x = x
# @sprites["#{spritename}"].src_rect.y = y
# end
#
# #-------------------------------------------------------------------------------
# # Text
# #-------------------------------------------------------------------------------
# # Draw
# def create_sprite_2(spritename, vp)
# @sprites["#{spritename}"] = Sprite.new(vp)
# @sprites["#{spritename}"].bitmap = Bitmap.new(Graphics.width, Graphics.height)
# @sprites["#{spritename}"].bitmap.clear
# end
#
# #-------------------------------------------------------------------------------
# def dispose
# pbDisposeSpriteHash(@sprites)
# end
#
# def update
# pbUpdateSpriteHash(@sprites)
# end
#
# def update_ingame
# Graphics.update
# Input.update
# pbUpdateSpriteHash(@sprites)
# end
#
# def endScene
# dispose
# @viewport.dispose
# end
# end

View File

@@ -9,7 +9,7 @@ class Scene_DebugIntro
end end
def pbCallTitle def pbCallTitle
# return Scene_DebugIntro.new if $DEBUG return Scene_DebugIntro.new if $DEBUG
return Scene_Intro.new return Scene_Intro.new
end end

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,9 +0,0 @@
[InternetShortcut]
URL=http://essentialsdocs.wikia.com/
IDList=
HotKey=0
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut.A]
[InternetShortcut.W]

Binary file not shown.

BIN
Game.exe

Binary file not shown.

436
LICENSE
View File

@@ -1,436 +0,0 @@
Attribution-NonCommercial-ShareAlike 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More_considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International Public License
("Public License"). To the extent this Public License may be
interpreted as a contract, You are granted the Licensed Rights in
consideration of Your acceptance of these terms and conditions, and the
Licensor grants You such rights in consideration of benefits the
Licensor receives from making the Licensed Material available under
these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-NC-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution, NonCommercial, and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. NonCommercial means not primarily intended for or directed towards
commercial advantage or monetary compensation. For purposes of
this Public License, the exchange of the Licensed Material for
other material subject to Copyright and Similar Rights by digital
file-sharing or similar means is NonCommercial provided there is
no payment of monetary compensation in connection with the
exchange.
l. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
m. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
n. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part, for NonCommercial purposes only; and
b. produce, reproduce, and Share Adapted Material for
NonCommercial purposes only.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties, including when
the Licensed Material is used other than for NonCommercial
purposes.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-NC-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database for NonCommercial purposes
only;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public licenses.
Notwithstanding, Creative Commons may elect to apply one of its public
licenses to material it publishes and in those instances will be
considered the "Licensor." Except for the limited purpose of indicating
that material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the public
licenses.
Creative Commons may be contacted at creativecommons.org.

Binary file not shown.

View File

@@ -1,26 +0,0 @@
animmaker.exe - Converts sprites to RPG Maker XP format animations
(C) 2008 Peter O.
Usage: animmaker xmlfile.xml
('xmlfile.xml' is the path to any XML file, see below)
Example of XML file:
<animations>
<!--Animation file to create (in this case, animation.png)-->
<animation name="animation.png">
<!--Pattern to add to the animation. Consists of the image's
filename plus the rectangle of the pattern to extract
from the image (x, y, width, height) (up to 96x96 in size)
Sprites listed here will be doubled in size in the animation-->
<pattern filename="pkmnfrlg_effects.png" x="50" y="201"
width="56" height="68" />
</animation>
<!--Another animation file, animation2.png)-->
<animation name="animation2.png">
<pattern filename="pkmnfrlg_effects.png" x="50" y="201"
width="56" height="68" />
<!-- You can leave out x, y, etc. to use the whole image-->
<pattern filename="effects2.png" />
</animation>
</animations>

View File

@@ -1,155 +0,0 @@
5.1
Many, many bugfixes
## Re-added features ##
In-game clock
Speed-up button
Reverse mode
Easy and Hard difficulties
#Removals
Removed Trainer House
Removed the Convert Pokemon option from the update menu
Oak no longer gives a Johto starter after beating the league
Removed Pokedex key item
##New Stuff
Added Quick Surf option
Added Kin Island Club
Replaced Delibird's hidden ability with Snow Warning
Added overworld sprites for a few important trainers
Added animations for using Rock Smash and Cut in the overworld
Traded Pokémon now become owned by player when fused (so they can be unfused)
Made Oak's Lab look more like the HGSS version
Added egg move tutor in Battle Factory
Battle Factory now gives Factory Points instead of Rare Candies
Updated critical hits to gen 6 mechanics
Added gen 6 status move immunity from certain types
Implemented Multitype ability for fusions
5.0
##########################
The 5.0 update brings Infinite Fusion to a new engine, which makes the game run better and allows
for a variety of improvements.
However, there are also a handful features that were in previous versions of the game which are not
compatible with this new version of Pokemon Essentials and that have been removed. Some of them will
be added back progressively in future updates and others will likely be gone for good.
See the full changelog of Pokémon Essentials 19 and MKXP
MKXP: https://github.com/Ancurio/mkxp
Essentials: https://essentialsdocs.fandom.com/wiki/Change_log
#############
Added Features
#############
## Technical###
- MKXP player is now used to run the game instead of RGSS player
- Fullscreen & resizable screen
- Performance improvements
- Built-in controls binding (F1)
-- Includes native controller support
- The game now continues running when it's in the background
- Savefiles have been moved to the appdata folder (Windows)
## UI and menus ##
- Changed the battle UI's appearance
- New options in in-game menu:
- Default movement
- Text entry type
- Battle type
- Added Instant text speed option
- Menus and controls should be more responsive in general
- Added visual indicator for selecting fusion order on the title screen
## Gameplay ##
- Exp. gain when catching Pokémon
- Now possible to register multiple items at once
- Adds several new moves from generations 5 to 7
- Added back double battles
- Added triple battles lounge in Knot Island
- Added Battle Factory
- Changed how levels are calculated when unfusing:
- Level when originally fused + experience obtained while fused
- Levels gained via Rare Candies are NOT taken into account
-NB: Pokemon that were fused in previous versions still use the old method
- Updated all movesets to gen 7
- Added 12 new TMs and 5 new Move tutors
- Removed the Mt. Silver requirement for making triple fusions
- Added an option to set the default battle type (single, double, triple) - Only available if beat the game at least once
- Traded Pokémon now become owned by player when fused
## Maps ##
- Changed some tiles in Vermillion City
- Added Dive section to Kindle Road
## Tweaks / Balance ##
- Reduced DNA Splicers price to $300
- Tweaked Sprout Tower to make it a bit easier
- Moon Stones, Sun Stones, Dawn Stones, Dusk Stones and Shiny Stones are now sold at the Goldenrod Dept. Store instead of Celadon
- Changed some trainer teams in Lavender tower
## Miscellaneous ##
- Resort Gorgeous now prioritizes Pokemon with custom sprites
- Renamed Spring boots to Golbat Boots
- New debug options
- Item stack limit increased to 999
- Added overworld animations for Cut and Rock Smash
#################
# Bug fixes #
#################
- Fixed random memory crashes (unconfirmed, but I haven't encountered one so far)
- Fixed random crash when catching Pokémon
- Fixed several moves and abilities which were previously broken (Crafty Shield, Fairy Lock, Purify, Gale Wings, Moxie, Innards Out, Magician, Pickpocket, Protean, Disguise)
- Fixed double battles
#################
Removed Features
#################
Removed features that will be coming back eventually
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
- Randomizer
- Speed up button
- Pokedex seen/caught
- Wild fusions //TODO: pas oublier de init exp_gained_since_fused=0 && exp_when_fused = self.exp
- Autosave (except in Pokemon centers)
- Fusing from PC
- Nicknaming from the party screen - Added temporary name rater in Vermillion City's Pokemon center
- Modern Mode compatibility
- Quest log
- Hidden abilities routes
- Pokeradar special encounters
- In-game clock
- Hard mode, Easy mode
- Some quests probably don't work
- Obtaining items from Rock Smash and fishing
Removed features that probably won't be coming back
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
- Elite Battle System (includes EBS and NxtGen UI battle UIs, battle motion, etc.)
- Autorun button toggle
- Gen 5 style bag
- Demice's endgame challenge
- Bill's battletower mod
- French pack compatibility
############ KNOWN ISSUES ##############
- Some areas might have abnormal lag - please tell me in the discord if you find one that's unreasonably laggy (you will know if you see one)
- Some side-stairs might act strange
- The Pokedex is currently all sorts of messed up
- Long loading time when starting up the game
- Some of the music and sound effects might not load correctly
- Some Pokémon appear higher than they should in battles on the player's side
- Significant stutter in the overworld when playing the game on an AMD CPU
- Several custom items have not yet been reimplemented
- Some battle backgrounds might be missing
- Erika's backsprite uses's May's backsprite from RSE
- Some NPC trades likely to crash the game

Binary file not shown.

View File

@@ -1,4 +0,0 @@
Extendtext.exe by Peter O.
This program is a small tool for extending the size of the Show Text
and Script dialog boxes in RPG Maker XP. To use it, just run the program while the Show Text or Script dialog box is displayed.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

View File

@@ -1,6 +0,0 @@
echo POKEMON INFINITE FUSION 5.0 savefile utility
echo Moving the game's savefile to appdata folder
@echo off
chcp 65001
xcopy "C:\Users\%USERNAME%\Saved Games\Pokémon Infinite Fusion\Game.rxdata" "C:\Users\%USERNAME%\AppData\Roaming\infinitefusion\"
PAUSE

View File

@@ -1 +0,0 @@
#<Table:0x000001b3a13ec848>

View File

@@ -1 +0,0 @@
#<Table:0x000001b3a13ec820>

View File

@@ -19,7 +19,7 @@ A few thousand custom sprites made by the community are included with the game b
You can find more custom sprite packs made by members of the community online here: You can find more custom sprite packs made by members of the community online here:
https://drive.google.com/drive/folders/0Bx5WTzAX8jMnNmRualNrZ2J4cm8 https://drive.google.com/drive/folders/0Bx5WTzAX8jMnNmRualNrZ2J4cm8
Your savefile is located in C:\Users\%USERNAME%\AppData\Roaming\infinitefusion\Game.rxdata Your savefile is located in C:/Users/%username%/Saved Games/Pok<6F>mon Infinite Fusion/Game.rxdata
If you want to have multiple savefiles, just rename this file to something else and start a new game. If you want to have multiple savefiles, just rename this file to something else and start a new game.
Useful links: Useful links:

View File

@@ -1,193 +0,0 @@
require 'zlib'
class Numeric
def to_digits(num = 3)
str = to_s
(num - str.size).times { str = str.prepend("0") }
return str
end
end
module Scripts
def self.dump(path = "Data/Scripts", rxdata = "Data/Scripts.rxdata")
scripts = File.open(rxdata, 'rb') { |f| Marshal.load(f) }
if scripts.length < 10
p "Scripts look like they're already extracted. Not doing so again."
return
end
create_directory(path)
clear_directory(path)
folder_id = [1, 1] # Can only have two layers of folders
file_id = 1
level = 0 # 0=main path, 1=subfolder, 2=sub-subfolder
folder_path = path
folder_name = nil
scripts.each_with_index do |e, i|
_, title, script = e
title = title_to_filename(title).strip
script = Zlib::Inflate.inflate(script).delete("\r")
next if title.empty? && script.empty?
section_name = nil
if title[/\[\[\s*(.+)\s*\]\]$/] # Make a folder
section_name = $~[1].strip
section_name = "unnamed" if !section_name || section_name.empty?
folder_num = (i < scripts.length - 2) ? folder_id[level].to_digits(3) : "999"
folder_name = folder_num + "_" + section_name
create_directory(folder_path + "/" + folder_name)
folder_id[level] += 1
if level < folder_id.length-1
level += 1 # Go one level deeper
folder_id[level] = 1 # Reset numbering of subfolders
folder_path += "/" + folder_name
folder_name = nil
end
file_id = 1 # Reset numbering of script files
elsif title.start_with?("=====") # Return to top level directory
level = 0
folder_path = path
folder_name = nil
end
# Create script file
next if script.empty?
this_folder = folder_path
this_folder += "/" + folder_name if folder_name
section_name ||= title.strip
section_name = "unnamed" if !section_name || section_name.empty?
file_num = (i < scripts.length - 1) ? file_id.to_digits(3) : "999"
file_name = file_num + "_" + section_name + ".rb"
create_script(this_folder + "/" + file_name, script)
file_id += 1 # Increment numbering of script files
end
# Backup Scripts.rxdata to ScriptsBackup.rxdata
File.open("Data/ScriptsBackup.rxdata", "wb") do |f|
Marshal.dump(scripts, f)
end
# Replace Scripts.rxdata with ScriptsLoader.rxdata
createLoaderScripts(rxdata)
end
def self.createLoaderScripts(rxdata)
# loader_scripts = File.open("Data/ScriptsLoader.rxdata", 'rb') { |f| Marshal.load(f) }
# p loader_scripts
txt = "x\x9C}SM\x8F\xDA0\x10\xBD#\xF1\x1F\x86,Rb-2\xCB\xB1\x95\xE8\x1E\xBAm\xD5S\xAB\x85\e\xA0\xC8$\x13p7\xD8\x91\xED\x94n\t\xFF\xBD\xB6C0\xE9\xD7\xC5\xF2\xCCx\xDE\xCC\xBCy\xBE\x83\xE5\x9Ek\xC8%j\x10\xD2\xC0Q\xAA\x17\xE0\x05\x98=\xC2\x8E\x1D\x10l\x10E\xA6^+\x83\xF9h8\x18\x0Er\xB4Q\xC52\xDC\xB2\xEC%UXIe\x86\x03\x00gz?\xCCa<\xA2W\x93f\xA5\x14\xD8{A\x91e\xFB\x134[\xD38\xBF\x8D\x18\xAA\xEB\xED(\x99\xAEO\xC9:\xBF'\xEB\xF3\x94\xC0)Z\xDD\x9D\xC6\xB3\xF3\xC6\x9E\xCF\x9F\x16\x8Bt\xF1\xFE\xF9\xF3\xD7\xE5b5\x9EQ#S\xBEY\xCD6\xE7\xE8\xEC\x10\xFC\xA1\xD0\xD4J\xB8\xDA\a\xD4\x9A\xED\x10\xEE!Z\x8B\xB5\x88\xEC%\xD4\xFE&\xB9H\xAC?\"\xC3\x01\x8A\xBC\eI1\xAE1\r\x83\xA1RR9XKF\x80\xA4\x9A\xFFDx7\x877\x0F\x0Fm\xEB\x1Fy\x89TV(\x92\xF8\x9ALK\xB9\x8B'\x10\x1Fc;\x054E\x03\x05=*n0\x19\x8FH\xDB,\xB4\x05!^vI\x8Ei#%l\xF9\x8E\xC2\x97\xDAT\xB5\x01.\xA0\x0F\xEAR\xB1\xD4x\x03\xE1]n\x8E\x9BaJ\xC9\xF2Tg\x8AWF\xA7\x85\x92\x87\xB4\x90e\x8E*\xA9\x98\xD9\x13\x97Q\xD8\xB6\xB5\x85\x98\xC3j\xE3m\x1F\xD7W\xFB\x89+ZH\xE5\x16\xD5&Y\x89\xB8I\xDA\xC2\x02\x7F\x18GL\x01\xF39\xC44\x86\xA6\xE9\xEE4n\x9F$\x9E\x98\x9C+\xCC\x8CT\xAF\x8F\x1E\xC5md\xEA\xD6Q\x10\x02\x8F]QZ\xD5z\x9F\x14\x04\xDE^\xFA\xEA\x1C\xD7\xD1:\xBF\xB6Z\e\x05\xD3u\xD7\xEB+\x93\xB9\x93_\xD8I\xBF\xE8\x04\"\x15\xB5+\xB1/\x1A\x8FB\xED\x8Cy\xB7\x93-\xEE\xB8h\xAF\xB6\xF2wV&\x0Eq\x02\x82\x97\x13h\xFBq:\xD3Y\x8D\xB0\xF0\xF4~\xE8d\x12Vz\x13\xA0\x02\x8FIPO\x0F\xA0K\xBA\x15\x97\xFB\x03\xC1\x9E\xFC\xF1\xCFH\xAF\xD2\xDF\xD4z%\xAC\xE3\xEDBq`\xEE\xE2\b\xDCy\xC7\x85\xC0\xFF\n'\x10\xE9}\xE4w\xE5\xFD39zb\x86M[^tD~\x01LYX\x94"
File.open(rxdata, "wb") do |f|
Marshal.dump([[62054200, "Main", txt]], f)
end
end
def self.from_folder(path = "Data/Scripts", rxdata = "Data/Scripts.rxdata")
scripts = File.open(rxdata, 'rb') { |f| Marshal.load(f) }
if scripts.length > 10
p "Scripts.rxdata already has a bunch of scripts in it. Won't consolidate script files."
return
end
scripts = []
aggregate_from_folder(path, scripts)
# Save scripts to file
File.open(rxdata, "wb") do |f|
Marshal.dump(scripts, f)
end
end
def self.aggregate_from_folder(path, scripts, level = 0)
files = []
folders = []
Dir.foreach(path) do |f|
next if f == '.' || f == '..'
if File.directory?(path + "/" + f)
folders.push(f)
else
files.push(f)
end
end
# Aggregate individual script files into Scripts.rxdata
files.sort!
files.each do |f|
section_name = filename_to_title(f)
content = File.open(path + "/" + f, "rb") { |f2| f2.read }#.gsub(/\n/, "\r\n")
scripts << [rand(999_999), section_name, Zlib::Deflate.deflate(content)]
end
# Check each subfolder for scripts to aggregate
folders.sort!
folders.each do |f|
section_name = filename_to_title(f)
scripts << [rand(999_999), "==================", Zlib::Deflate.deflate("")] if level == 0
scripts << [rand(999_999), "", Zlib::Deflate.deflate("")] if level == 1
scripts << [rand(999_999), "[[ " + section_name + " ]]", Zlib::Deflate.deflate("")]
aggregate_from_folder(path + "/" + f, scripts, level + 1)
end
end
def self.filename_to_title(filename)
filename = filename.bytes.pack('U*')
title = ""
if filename[/^[^_]*_(.+)$/]
title = $~[1]
title = title[0..-4] if title.end_with?(".rb")
title = title.strip
end
title = "unnamed" if !title || title.empty?
title.gsub!(/&bs;/, "\\")
title.gsub!(/&fs;/, "/")
title.gsub!(/&cn;/, ":")
title.gsub!(/&as;/, "*")
title.gsub!(/&qm;/, "?")
title.gsub!(/&dq;/, "\"")
title.gsub!(/&lt;/, "<")
title.gsub!(/&gt;/, ">")
title.gsub!(/&po;/, "|")
return title
end
def self.title_to_filename(title)
filename = title.clone
filename.gsub!(/\\/, "&bs;")
filename.gsub!(/\//, "&fs;")
filename.gsub!(/:/, "&cn;")
filename.gsub!(/\*/, "&as;")
filename.gsub!(/\?/, "&qm;")
filename.gsub!(/"/, "&dq;")
filename.gsub!(/</, "&lt;")
filename.gsub!(/>/, "&gt;")
filename.gsub!(/\|/, "&po;")
return filename
end
def self.create_script(title, content)
f = File.new(title, "wb")
f.write content
f.close
end
def self.clear_directory(path, delete_current = false)
Dir.foreach(path) do |f|
next if f == '.' || f == '..'
if File.directory?(path + "/" + f)
clear_directory(path + "/" + f, true)
else
File.delete(path + "/" + f)
end
end
Dir.delete(path) if delete_current
end
def self.create_directory(path)
paths = path.split('/')
paths.each_with_index do |_e, i|
if !File.directory?(paths[0..i].join('/'))
Dir.mkdir(paths[0..i].join('/'))
end
end
end
end
#Scripts.dump("D:/Desktop/Scripts", "D:/Desktop/Main Essentials/Data/Scripts.rxdata")
#Scripts.from_folder("D:/Desktop/Scripts", "D:/Desktop/Main Essentials/Data/Scripts.rxdata")
#Scripts.dump
Scripts.from_folder

View File

@@ -1,193 +0,0 @@
require 'zlib'
class Numeric
def to_digits(num = 3)
str = to_s
(num - str.size).times { str = str.prepend("0") }
return str
end
end
module Scripts
def self.dump(path = "Data/Scripts", rxdata = "Data/Scripts.rxdata")
scripts = File.open(rxdata, 'rb') { |f| Marshal.load(f) }
if scripts.length < 10
p "Scripts look like they're already extracted. Not doing so again."
return
end
create_directory(path)
clear_directory(path)
folder_id = [1, 1] # Can only have two layers of folders
file_id = 1
level = 0 # 0=main path, 1=subfolder, 2=sub-subfolder
folder_path = path
folder_name = nil
scripts.each_with_index do |e, i|
_, title, script = e
title = title_to_filename(title).strip
script = Zlib::Inflate.inflate(script).delete("\r")
next if title.empty? && script.empty?
section_name = nil
if title[/\[\[\s*(.+)\s*\]\]$/] # Make a folder
section_name = $~[1].strip
section_name = "unnamed" if !section_name || section_name.empty?
folder_num = (i < scripts.length - 2) ? folder_id[level].to_digits(3) : "999"
folder_name = folder_num + "_" + section_name
create_directory(folder_path + "/" + folder_name)
folder_id[level] += 1
if level < folder_id.length-1
level += 1 # Go one level deeper
folder_id[level] = 1 # Reset numbering of subfolders
folder_path += "/" + folder_name
folder_name = nil
end
file_id = 1 # Reset numbering of script files
elsif title.start_with?("=====") # Return to top level directory
level = 0
folder_path = path
folder_name = nil
end
# Create script file
next if script.empty?
this_folder = folder_path
this_folder += "/" + folder_name if folder_name
section_name ||= title.strip
section_name = "unnamed" if !section_name || section_name.empty?
file_num = (i < scripts.length - 1) ? file_id.to_digits(3) : "999"
file_name = file_num + "_" + section_name + ".rb"
create_script(this_folder + "/" + file_name, script)
file_id += 1 # Increment numbering of script files
end
# Backup Scripts.rxdata to ScriptsBackup.rxdata
File.open("Data/ScriptsBackup.rxdata", "wb") do |f|
Marshal.dump(scripts, f)
end
# Replace Scripts.rxdata with ScriptsLoader.rxdata
createLoaderScripts(rxdata)
end
def self.createLoaderScripts(rxdata)
# loader_scripts = File.open("Data/ScriptsLoader.rxdata", 'rb') { |f| Marshal.load(f) }
# p loader_scripts
txt = "x\x9C}SM\x8F\xDA0\x10\xBD#\xF1\x1F\x86,Rb-2\xCB\xB1\x95\xE8\x1E\xBAm\xD5S\xAB\x85\e\xA0\xC8$\x13p7\xD8\x91\xED\x94n\t\xFF\xBD\xB6C0\xE9\xD7\xC5\xF2\xCCx\xDE\xCC\xBCy\xBE\x83\xE5\x9Ek\xC8%j\x10\xD2\xC0Q\xAA\x17\xE0\x05\x98=\xC2\x8E\x1D\x10l\x10E\xA6^+\x83\xF9h8\x18\x0Er\xB4Q\xC52\xDC\xB2\xEC%UXIe\x86\x03\x00gz?\xCCa<\xA2W\x93f\xA5\x14\xD8{A\x91e\xFB\x134[\xD38\xBF\x8D\x18\xAA\xEB\xED(\x99\xAEO\xC9:\xBF'\xEB\xF3\x94\xC0)Z\xDD\x9D\xC6\xB3\xF3\xC6\x9E\xCF\x9F\x16\x8Bt\xF1\xFE\xF9\xF3\xD7\xE5b5\x9EQ#S\xBEY\xCD6\xE7\xE8\xEC\x10\xFC\xA1\xD0\xD4J\xB8\xDA\a\xD4\x9A\xED\x10\xEE!Z\x8B\xB5\x88\xEC%\xD4\xFE&\xB9H\xAC?\"\xC3\x01\x8A\xBC\eI1\xAE1\r\x83\xA1RR9XKF\x80\xA4\x9A\xFFDx7\x877\x0F\x0Fm\xEB\x1Fy\x89TV(\x92\xF8\x9ALK\xB9\x8B'\x10\x1Fc;\x054E\x03\x05=*n0\x19\x8FH\xDB,\xB4\x05!^vI\x8Ei#%l\xF9\x8E\xC2\x97\xDAT\xB5\x01.\xA0\x0F\xEAR\xB1\xD4x\x03\xE1]n\x8E\x9BaJ\xC9\xF2Tg\x8AWF\xA7\x85\x92\x87\xB4\x90e\x8E*\xA9\x98\xD9\x13\x97Q\xD8\xB6\xB5\x85\x98\xC3j\xE3m\x1F\xD7W\xFB\x89+ZH\xE5\x16\xD5&Y\x89\xB8I\xDA\xC2\x02\x7F\x18GL\x01\xF39\xC44\x86\xA6\xE9\xEE4n\x9F$\x9E\x98\x9C+\xCC\x8CT\xAF\x8F\x1E\xC5md\xEA\xD6Q\x10\x02\x8F]QZ\xD5z\x9F\x14\x04\xDE^\xFA\xEA\x1C\xD7\xD1:\xBF\xB6Z\e\x05\xD3u\xD7\xEB+\x93\xB9\x93_\xD8I\xBF\xE8\x04\"\x15\xB5+\xB1/\x1A\x8FB\xED\x8Cy\xB7\x93-\xEE\xB8h\xAF\xB6\xF2wV&\x0Eq\x02\x82\x97\x13h\xFBq:\xD3Y\x8D\xB0\xF0\xF4~\xE8d\x12Vz\x13\xA0\x02\x8FIPO\x0F\xA0K\xBA\x15\x97\xFB\x03\xC1\x9E\xFC\xF1\xCFH\xAF\xD2\xDF\xD4z%\xAC\xE3\xEDBq`\xEE\xE2\b\xDCy\xC7\x85\xC0\xFF\n'\x10\xE9}\xE4w\xE5\xFD39zb\x86M[^tD~\x01LYX\x94"
File.open(rxdata, "wb") do |f|
Marshal.dump([[62054200, "Main", txt]], f)
end
end
def self.from_folder(path = "Data/Scripts", rxdata = "Data/Scripts.rxdata")
scripts = File.open(rxdata, 'rb') { |f| Marshal.load(f) }
if scripts.length > 10
p "Scripts.rxdata already has a bunch of scripts in it. Won't consolidate script files."
return
end
scripts = []
aggregate_from_folder(path, scripts)
# Save scripts to file
File.open(rxdata, "wb") do |f|
Marshal.dump(scripts, f)
end
end
def self.aggregate_from_folder(path, scripts, level = 0)
files = []
folders = []
Dir.foreach(path) do |f|
next if f == '.' || f == '..'
if File.directory?(path + "/" + f)
folders.push(f)
else
files.push(f)
end
end
# Aggregate individual script files into Scripts.rxdata
files.sort!
files.each do |f|
section_name = filename_to_title(f)
content = File.open(path + "/" + f, "rb") { |f2| f2.read }#.gsub(/\n/, "\r\n")
scripts << [rand(999_999), section_name, Zlib::Deflate.deflate(content)]
end
# Check each subfolder for scripts to aggregate
folders.sort!
folders.each do |f|
section_name = filename_to_title(f)
scripts << [rand(999_999), "==================", Zlib::Deflate.deflate("")] if level == 0
scripts << [rand(999_999), "", Zlib::Deflate.deflate("")] if level == 1
scripts << [rand(999_999), "[[ " + section_name + " ]]", Zlib::Deflate.deflate("")]
aggregate_from_folder(path + "/" + f, scripts, level + 1)
end
end
def self.filename_to_title(filename)
filename = filename.bytes.pack('U*')
title = ""
if filename[/^[^_]*_(.+)$/]
title = $~[1]
title = title[0..-4] if title.end_with?(".rb")
title = title.strip
end
title = "unnamed" if !title || title.empty?
title.gsub!(/&bs;/, "\\")
title.gsub!(/&fs;/, "/")
title.gsub!(/&cn;/, ":")
title.gsub!(/&as;/, "*")
title.gsub!(/&qm;/, "?")
title.gsub!(/&dq;/, "\"")
title.gsub!(/&lt;/, "<")
title.gsub!(/&gt;/, ">")
title.gsub!(/&po;/, "|")
return title
end
def self.title_to_filename(title)
filename = title.clone
filename.gsub!(/\\/, "&bs;")
filename.gsub!(/\//, "&fs;")
filename.gsub!(/:/, "&cn;")
filename.gsub!(/\*/, "&as;")
filename.gsub!(/\?/, "&qm;")
filename.gsub!(/"/, "&dq;")
filename.gsub!(/</, "&lt;")
filename.gsub!(/>/, "&gt;")
filename.gsub!(/\|/, "&po;")
return filename
end
def self.create_script(title, content)
f = File.new(title, "wb")
f.write content
f.close
end
def self.clear_directory(path, delete_current = false)
Dir.foreach(path) do |f|
next if f == '.' || f == '..'
if File.directory?(path + "/" + f)
clear_directory(path + "/" + f, true)
else
File.delete(path + "/" + f)
end
end
Dir.delete(path) if delete_current
end
def self.create_directory(path)
paths = path.split('/')
paths.each_with_index do |_e, i|
if !File.directory?(paths[0..i].join('/'))
Dir.mkdir(paths[0..i].join('/'))
end
end
end
end
#Scripts.dump("D:/Desktop/Scripts", "D:/Desktop/Main Essentials/Data/Scripts.rxdata")
#Scripts.from_folder("D:/Desktop/Scripts", "D:/Desktop/Main Essentials/Data/Scripts.rxdata")
Scripts.dump
#Scripts.from_folder

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

View File

@@ -1 +0,0 @@
#<Table:0x000001b3a13ec7f8>

View File

@@ -1,373 +0,0 @@
<body>
<div id="map">
<img name="map" src="Graphics/Pictures/mapRegion0.png" alt="" width="480" height="320"/>
</div>
<form name="mf" action="javascript:void(null)">
<div>
Map Filename (in Graphics/Pictures/): <input type="text" name="filename" value="mapRegion0.png"/>&nbsp;
<input type="button" name="btnChange" value="Change"/><br/ >
Square width: <input type="text" name="sqwidth" size="4" min="1" max="16" value="16"/>&nbsp;
Square height: <input type="text" name="sqheight" size="4" min="1" max="16" value="16"/>&nbsp;
<input type="button" name="btnRefresh" value="Refresh"/><br/ >
Region Name: <input type="text" name="name" value="Sample Region"/>&nbsp;
<input type="button" name="btnChange2" value="Change"/>
</div>
</form>
<hr/>
<form name="f" action="javascript:void(null)">
<table>
<tr>
<td>Current Position:</td>
<td><input type="text" name="curpos" readonly="readonly"/></td>
</tr>
<tr>
<td>Name:</td>
<td><input type="text" name="locname"/><td>
</tr>
<tr>
<td>Point of Interest:</td>
<td><input type="text" name="poi"/><td>
</tr>
<tr>
<td>Fly Destination:</td>
<td><input type="text" name="healing"/><td>
</tr>
<tr>
<td>Switch:</td>
<td><input type="text" name="swtch"/><td>
</tr>
</table>
<div>
<input type="button" name="btnSave" value="Save" disabled="disabled"/>
<input type="button" name="btnCancel" value="Cancel"/><br/ >
Single section from townmap.txt (without section heading):<br/ >
<textarea name="data" rows="10" cols="70"></textarea><br/ >
<input type="button" name="btnLoad" value="Load"/> (To load data into the editor)<br/ >
Copy the data above into townmap.txt when you're done.
</div>
</form>
<script type="text/javascript">
choiceX=-1
choiceY=-1
mappoints=[]
mpelements=[]
function target(event){
return event.target||event.srcElement
}
function addChild(e){
if(document.documentElement){
document.documentElement.appendChild(e)
} else{
document.body.appendChild(e)
}
}
function removeChild(e){
if(document.documentElement){
document.documentElement.removeChild(e)
} else{
document.body.removeChild(e)
}
}
function positionedOffset(element) {
var valueT = 0, valueL = 0;
do {
valueT += element.offsetTop || 0;
valueL += element.offsetLeft || 0;
element = element.offsetParent;
if (element) {
p = element.style.position;
if (p == 'relative' || p == 'absolute') break;
}
} while (element);
return [valueL, valueT];
}
function pointerX(event) {
return event.pageX || (event.clientX +
(document.documentElement.scrollLeft || document.body.scrollLeft));
}
function pointerY(event) {
return event.pageY || (event.clientY +
(document.documentElement.scrollTop || document.body.scrollTop));
}
function elementPos(event){
t=target(event)
po=positionedOffset(t)
return [(pointerX(event))-po[0],(pointerY(event))-po[1]]
}
function elementPosObject(event,other){
t=other
po=positionedOffset(t)
return [(pointerX(event))-po[0],(pointerY(event))-po[1]]
}
function attachEvent(element,name,observer,useCapture){
if (element.addEventListener) {
element.addEventListener(name, observer, useCapture||false);
} else if (element.attachEvent) {
element.attachEvent('on' + name, observer);
}
}
function qstr(text){
var temp;
temp = text.toString();
while (true){
if (temp == '') return text;
if (temp.indexOf("'") >= 0) break;
if (temp.indexOf('"') >= 0) break;
if (temp.indexOf(' ') >= 0) break;
if (temp.indexOf(',') >= 0) break;
return temp;
}
// temp = temp.replace(/\'/g,"''");
// temp = temp.replace(/\"/g,"\"\"");
return temp
// return "\"" + temp + "\"";
}
function CsvNextToken(dataobj){
var i;
var text;
var c,n;
var inside;
var value;
var q = '';
inside = false;
value = '';
var skip = false;
var data=dataobj[0]
if (data == '') return '';
text = '';
for (i = 0; i < data.length; ++i){
if (skip){
skip = false;
continue;
}
c = data.charAt(i);
n = '';
if (inside){
if (c == q) {
if (i < data.length-1) n = data.charAt(i+1);
if (n == q){
value = value + c;
skip = true;
continue;
}
inside = false;
continue;
}
value = value + c;
continue;
}
// if ((c == '"') || (c == "'")){
// inside = true;
// q = c;
// continue;
// }
if (c == ',') break;
value = value + c;
}
if (i >= (data.length-1)) { dataobj[0]= ''; }
else{dataobj[0]=data.substr(i+1);}
dataobj[0]=dataobj[0].replace(/^\s+/,"").replace(/\s+$/,"")
return value;
}
///////////////////////////
function loadMapPoints(){
mappoints=[]
lines=document.f.data.value.split("\n")
for(var i=0;i<lines.length;i++){
lines[i]=lines[i].replace(/\s+$/,"")
if(!/^\#/.test(lines[i])&&!/^\s*$/.test(lines[i])){
e=/^\s*(\w+)\s*=\s*(.*)$/.exec(lines[i])
if(!e){
alert("Bad line syntax in line "+(i+1))
}
if(e[1]=="Filename"){
o=document.getElementById("map")
o.innerHTML='<img name="map" src="Graphics/Pictures/'+e[2]+'" alt="" width="480" height="320"/'+'>'
} else if(e[1]=="Name"){
document.mf.name.value=e[2]
} else if(e[1]=="Point"){
data=[e[2]]
mappt=[]
mappt[0]=parseInt(CsvNextToken(data),10)
mappt[1]=parseInt(CsvNextToken(data),10)
mappt[2]=CsvNextToken(data)
mappt[3]=CsvNextToken(data)
mappt[4]=[CsvNextToken(data),CsvNextToken(data),CsvNextToken(data)]
mappt[5]=CsvNextToken(data)
mappoints[mappoints.length]=mappt
}
}
}
}
function createMapPoint(imgfile,x,y){
e=document.createElement("div")
e.innerHTML="<img src='"+imgfile+"' alt=''/>"
e.style.left=elempos[0]+x*document.mf.sqwidth.value+(document.mf.sqwidth.value-8)/2
e.style.top=elempos[1]+y*document.mf.sqheight.value+(document.mf.sqheight.value-8)/2
e.style.position="absolute"
attachEvent(e,"mousemove",MapMouseMove)
attachEvent(e,"click",MapClick)
return e
}
function showMapPoints(){
for(var i=0;i < mpelements.length ; i++){ //>
removeChild(mpelements[i])
}
mpelements=[]
elempos=positionedOffset(document.images.map)
for(var i=0;i<mappoints.length;i++){//>
e=createMapPoint("knownpoint.bmp",mappoints[i][0],mappoints[i][1])
addChild(e)
mpelements[mpelements.length]=e
}
if(choiceX!=-1 || choiceY!=-1){
e=createMapPoint("selpoint.bmp",choiceX,choiceY)
addChild(e)
mpelements[mpelements.length]=e
}
}
function MapMouseMove(e){
if(choiceX==-1 && choiceY==-1){
elempos=elementPosObject(e,document.getElementById("map"))
if (elempos[0]>=0 && elempos[0]<480 && elempos[1]>=0 && elempos[1]<320){
setMapPoint(Math.floor(elempos[0]/document.mf.sqwidth.value),
Math.floor(elempos[1]/document.mf.sqheight.value))
}
}
}
function MapClick(e){
elempos=elementPosObject(e,document.getElementById("map"))
if(elempos[0]>=0 && elempos[0]<480 && elempos[1]>=0 && elempos[1]<320){
choiceX=Math.floor(elempos[0]/document.mf.sqwidth.value)
choiceY=Math.floor(elempos[1]/document.mf.sqheight.value)
setMapPoint(Math.floor(elempos[0]/document.mf.sqwidth.value),
Math.floor(elempos[1]/document.mf.sqheight.value))
document.f.btnSave.disabled=false
showMapPoints()
}
}
function getbase(fn){
if(fn.lastIndexOf("/")>=0){
fn=fn.substr(fn.lastIndexOf("/")+1)
}
if(fn.lastIndexOf("\\")>=0){
fn=fn.substr(fn.lastIndexOf("\\")+1)
}
return fn
}
function genMapPoints(){
ret=""
ret+="Filename = "+qstr(getbase(document.images.map.src))+"\r\n"
ret+="Name = "+qstr(document.mf.name.value)+"\r\n"
for(var i=0;i<mappoints.length;i++){
ret+="Point = "+[mappoints[i][0],mappoints[i][1],
qstr(mappoints[i][2]),qstr(mappoints[i][3]),
mappoints[i][4][0]!=null?mappoints[i][4][0]:"",
mappoints[i][4][1]!=null?mappoints[i][4][1]:"",
mappoints[i][4][2]!=null?mappoints[i][4][2]:"",
mappoints[i][5]]+"\r\n"
}
document.f.data.value=ret
showMapPoints()
}
function setMapPoint(x,y){
document.f.curpos.value=[x,y]
for(var i=0;i<mappoints.length;i++){
if(mappoints[i][0]==x && mappoints[i][1]==y){
document.f.locname.value=mappoints[i][2]
document.f.poi.value=mappoints[i][3]
document.f.healing.value=mappoints[i][4]
document.f.swtch.value=mappoints[i][5]
return
}
}
document.f.locname.value=""
document.f.poi.value=""
document.f.healing.value=""
document.f.swtch.value=""
}
function addMapPoint(x,y){
for(var i=0;i<mappoints.length;i++){
if(mappoints[i][0]==x && mappoints[i][1]==y){
mappoints[i][2]=document.f.locname.value
mappoints[i][3]=document.f.poi.value
mappoints[i][4]=document.f.healing.value.split(",")
mappoints[i][5]=document.f.swtch.value
return
}
}
mappoints[mappoints.length]=[x,y,
document.f.locname.value,
document.f.poi.value,
document.f.healing.value.split(","),
document.f.swtch.value,
]
}
attachEvent(window,"load",function(e){
genMapPoints()
attachEvent(document.images.map,"mouseout",function(e){
if(choiceX==-1 && choiceY==-1){
document.f.curpos.value=""
}
})
attachEvent(document.getElementById("map"),"mousemove",MapMouseMove)
attachEvent(document.getElementById("map"),"click",MapClick)
attachEvent(document.f.btnSave,"click",function(e){
if(choiceX!=-1 || choiceY!=-1){
addMapPoint(choiceX,choiceY)
genMapPoints()
target(e).disabled=true
choiceX=choiceY=-1
showMapPoints()
}
})
attachEvent(document.f.btnCancel,"click",function(e){
if(choiceX!=-1||choiceY!=-1){
setMapPoint(choiceX,choiceY)
choiceX=choiceY=-1
showMapPoints()
}
})
attachEvent(document.f.btnLoad,"click",function(e){
loadMapPoints()
genMapPoints()
choiceX=choiceY=-1
showMapPoints()
})
attachEvent(document.mf.btnChange,"click",function(e){
document.images.map.src="Graphics/Pictures/"+document.mf.filename.value
genMapPoints()
showMapPoints()
})
attachEvent(document.mf.btnChange2,"click",function(e){
genMapPoints()
showMapPoints()
})
attachEvent(document.mf.btnRefresh,"click",function(e){
choiceX=choiceY=-1
document.f.curpos.value=""
showMapPoints()
})
})
</script>

View File

@@ -1,53 +0,0 @@
Script error in event 6 (coords 16,7), map 371 (Pokemon Center):
Exception: NameError
Message: uninitialized constant PBSpecies::SPEAROW
***Full script:
pbChoosePokemon(1,2,
proc {|poke|
!poke.egg? &&
!(poke.isShadow? rescue false) &&
poke.species==PBSpecies::SPEAROW
})
Backtrace:
(eval):5:in `block in execute_script'
005_UI_Party.rb:1067:in `block in pbChooseAblePokemon'
005_UI_Party.rb:1066:in `each'
005_UI_Party.rb:1066:in `pbChooseAblePokemon'
005_UI_Party.rb:1353:in `block in pbChoosePokemon'
002_MessageConfig.rb:573:in `pbFadeOutIn'
005_UI_Party.rb:1349:in `pbChoosePokemon'
(eval):1:in `execute_script'
003_Interpreter.rb:137:in `eval'
003_Interpreter.rb:137:in `execute_script'
003_Interpreter.rb:189:in `rescue in execute_script'
003_Interpreter.rb:135:in `execute_script'
004_Interpreter_Commands.rb:1024:in `command_355'
004_Interpreter_Commands.rb:116:in `execute_command'
003_Interpreter.rb:127:in `block in update'
003_Interpreter.rb:87:in `loop'
003_Interpreter.rb:87:in `update'
002_Scene_Map.rb:157:in `block in update'
002_Scene_Map.rb:155:in `loop'

Binary file not shown.

BIN
zlib1.dll

Binary file not shown.