Let's make this happen:
First, inside your metadata.txt you need add a new sprite to save scene, like below:
Also, you need a character OW to that. So, take mine for example and model:
P.S: Save inside Character folder like boy_save, or like you wrote inside 'metadata.txt'.
Now, open your script and search to 'PScreen_Save' script, then, find 'def pbSaveScreen' and paste in right order:
Finally, add the red line, inside 'Settings' script:
New ATT:
Inside 'PScreen_Load' script, find 'def pbStartLoadScreen' and past the red lines:
And done!
It was a lot of work to study and do this script for a layman like me, so if you use this script, give me credits for that.
First, inside your metadata.txt you need add a new sprite to save scene, like below:
Code:
PlayerA=POKEMONTRAINER_Red,trchar000,boy_bike,boy_surf,boy_run,boy_surf,boy_fish_offset,[COLOR="Red"]boy_save[/COLOR],xxx
Also, you need a character OW to that. So, take mine for example and model:
P.S: Save inside Character folder like boy_save, or like you wrote inside 'metadata.txt'.
Now, open your script and search to 'PScreen_Save' script, then, find 'def pbSaveScreen' and paste in right order:
Spoiler:
Code:
def pbSaveScreen
ret=false
@scene.pbStartScreen
if Kernel.pbConfirmMessage(_INTL("Would you like to save the game?"))
[COLOR="red"]if !pbCommonEvent(SAVEBEGINCOMMONEVENT)
patternb = 2*$game_player.direction - 1
meta = pbGetMetadata(0,MetadataPlayerA+$PokemonGlobal.playerID)
oldpattern = $game_player.fullPattern
num = 7
if meta && meta[num] && meta[num]!=""
charset = pbGetPlayerCharset(meta,num)
4.times do |pattern|
$game_player.setDefaultCharName(charset,patternb-pattern,true)
2.times do
Graphics.update
Input.update
pbUpdateSceneMap
end
end
end
end[/COLOR]
if safeExists?(RTP.getSaveFileName("Game.rxdata"))
confirm=""
if $PokemonTemp.begunNewGame
Kernel.pbMessage(_INTL("WARNING!"))
Kernel.pbMessage(_INTL("There is a different game file that is already saved."))
Kernel.pbMessage(_INTL("If you save now, the other file's adventure, including items and Pokémon, will be entirely lost."))
if !Kernel.pbConfirmMessageSerious(
_INTL("Are you sure you want to save now and overwrite the other save file?"))
[COLOR="red"]$game_player.setDefaultCharName(nil,oldpattern)[/COLOR]
@scene.pbEndScreen
return false
end
end
end
$PokemonTemp.begunNewGame=false
if pbSave
Kernel.pbMessage(_INTL("\\se[]{1} saved the game.\\me[GUI save game]\\wtnp[30]",$Trainer.name))
[COLOR="red"]$game_player.setDefaultCharName(nil,oldpattern)[/COLOR]
ret=true
else
Kernel.pbMessage(_INTL("\\se[]Save failed.\\wtnp[30]"))
[COLOR="red"] $game_player.setDefaultCharName(nil,oldpattern)
[/COLOR] ret=false
end
end
@scene.pbEndScreen
return ret
end
end
Finally, add the red line, inside 'Settings' script:
Code:
[COLOR="red"]SAVEBEGINCOMMONEVENT = -1[/COLOR]
FISHINGBEGINCOMMONEVENT = -1
FISHINGENDCOMMONEVENT = -1
New ATT:
Inside 'PScreen_Load' script, find 'def pbStartLoadScreen' and past the red lines:
Spoiler:
Code:
File.open(savefile){|f|
Marshal.load(f) # Trainer already loaded
$Trainer = trainer
Graphics.frame_count = Marshal.load(f)
$game_system = Marshal.load(f)
Marshal.load(f) # PokemonSystem already loaded
Marshal.load(f) # Current map id no longer needed
$game_switches = Marshal.load(f)
$game_variables = Marshal.load(f)
$game_self_switches = Marshal.load(f)
$game_screen = Marshal.load(f)
$MapFactory = Marshal.load(f)
$game_map = $MapFactory.map
$game_player = Marshal.load(f)
$PokemonGlobal = Marshal.load(f)
metadata = Marshal.load(f)
$PokemonBag = Marshal.load(f)
$PokemonStorage = Marshal.load(f)
[COLOR="red"]oldpattern = $game_player.fullPattern[/COLOR]
magicNumberMatches = false
if $data_system.respond_to?("magic_number")
magicNumberMatches = ($game_system.magic_number==$data_system.magic_number)
else
magicNumberMatches = ($game_system.magic_number==$data_system.version_id)
end
if !magicNumberMatches || $PokemonGlobal.safesave
if pbMapInterpreterRunning?
pbMapInterpreter.setup(nil,0)
end
begin
$MapFactory.setup($game_map.map_id) # calls setMapChanged
rescue Errno::ENOENT
if $DEBUG
Kernel.pbMessage(_INTL("Map {1} was not found.",$game_map.map_id))
map = pbWarpToMap
if map
$MapFactory.setup(map[0])
$game_player.moveto(map[1],map[2])
else
$game_map = nil
$scene = nil
return
end
else
$game_map = nil
$scene = nil
Kernel.pbMessage(_INTL("The map was not found. The game cannot continue."))
end
end
[COLOR="red"]$game_player.setDefaultCharName(nil,oldpattern)[/COLOR]
$game_player.center($game_player.x, $game_player.y)
else
[COLOR="Red"]$game_player.setDefaultCharName(nil,oldpattern)[/COLOR]
$MapFactory.setMapChanged($game_map.map_id)
end
}
And done!
It was a lot of work to study and do this script for a layman like me, so if you use this script, give me credits for that.
Last edited: