• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Multiple save files 2.2

1,224
Posts
10
Years
Mayhap this is the problem? http://www.pokecommunity.com/showthread.php?t=333023

I've notice several spots that were missing ")"s, close quotes, and "|"s. If someone has the complete scripts I'd love them.

Thank you for pointing this out. I'll upload a mirror of the script on pastebin and add the link to the main post. I'll probably start doing that for all my tutorials, since I was not aware of this problem.
 

Wootius

Glah
300
Posts
11
Years
  • Seen May 31, 2022
I didn't touch the script at all except to remove the gamequest stuff.

It saves as game4 first, which means it never shows a save game because you need "game" there for it to look for the other saves I believe.
 
1,224
Posts
10
Years
Change this
Code:
 commands[cmdContinue=commands.length]=_INTL("Continue") if showContinue
      commands[cmdNewGame=commands.length]=_INTL("New Game")
      commands[cmdChooseSaveTwo=commands.length]=_INTL("Load Save 2") if safeExists?(savefile2)
      commands[cmdChooseSaveThree=commands.length]=_INTL("Load Save 3") if safeExists?(savefile3)
      commands[cmdChooseSaveFour=commands.length]=_INTL("Load Save 4") if safeExists?(savefile4)
      commands[cmdMysteryGift=commands.length]=_INTL("Mystery Gift") if (trainer.mysterygiftaccess rescue false)
      commands[cmdOption=commands.length]=_INTL("Options")
    else
      commands[cmdNewGame=commands.length]=_INTL("New Game")
      commands[cmdOption=commands.length]=_INTL("Options")

to this

Code:
 commands[cmdContinue=commands.length]=_INTL("Continue") if showContinue
      commands[cmdNewGame=commands.length]=_INTL("New Game")
      commands[cmdChooseSaveTwo=commands.length]=_INTL("Load Save 2") if safeExists?(savefile2)
      commands[cmdChooseSaveThree=commands.length]=_INTL("Load Save 3") if safeExists?(savefile3)
      commands[cmdChooseSaveFour=commands.length]=_INTL("Load Save 4") if safeExists?(savefile4)
      commands[cmdMysteryGift=commands.length]=_INTL("Mystery Gift") if (trainer.mysterygiftaccess rescue false)
      commands[cmdOption=commands.length]=_INTL("Options")
    else
      commands[cmdNewGame=commands.length]=_INTL("New Game")
      commands[cmdChooseSaveTwo=commands.length]=_INTL("Load Save 2") if safeExists?(savefile2)
      commands[cmdChooseSaveThree=commands.length]=_INTL("Load Save 3") if safeExists?(savefile3)
      commands[cmdChooseSaveFour=commands.length]=_INTL("Load Save 4") if safeExists?(savefile4)
      commands[cmdOption=commands.length]=_INTL("Options")
 
1,224
Posts
10
Years
Just a note, I realized that Mystery Gifts won't work for any past the first file, at least I don't believe. I'll probably fix that at some point.
 

Wootius

Glah
300
Posts
11
Years
  • Seen May 31, 2022
All right, I'll hold off on that. Didn't really have anything major planned for it.
 
2
Posts
9
Years
  • Age 33
  • Seen Feb 18, 2017
I can't seem to get this working. It will only save to slot 4. Looking at variable 99 it seems to be 4 every time I start a new game although by changing


Code:
$game_variables[99]=(savenum==1)? 0:(savenum==2)?2:(savenum==3)?3:4



The 4 to a 1 I can get it to save in slot 1 but the other slots still wont work. Also is variable 32 important?
 
1,224
Posts
10
Years
Sorry, change this portion, I'm highlighting the additions in red

right under the line
Code:
elsif cmdNewGame>=0 && command==cmdNewGame

Code:
savefile=RTP.getSaveFileName("Game.rxdata")
        [COLOR="red"]savenum=1[/COLOR]
        if safeExists?(savefile)
          savefile=RTP.getSaveFileName("Game2.rxdata")
          [COLOR="red"]savenum=2[/COLOR]
          if safeExists?(savefile)
            savefile=RTP.getSaveFileName("Game3.rxdata")
            [COLOR="red"]savenum=3[/COLOR]
          if safeExists?(savefile)
            savefile=RTP.getSaveFileName("Game4.rxdata")
            [COLOR="Red"]savenum=4[/COLOR]
          if safeExists?(savefile)
            if !Kernel.pbConfirmMessage(_INTL("All current save slots are full.  If you continue you will write over a save slot.  Is this okay?"))
           savefile=RTP.getSaveFileName("Game.rxdata")
          retry

Don't know how I missed that. If you didn't have to choose the slot to replace, savenum didn't get set. So it would always use the "else" option of 4.
 
2
Posts
9
Years
  • Age 33
  • Seen Feb 18, 2017
Thanks It's all good now. Only a slight bug left when saving in slot one for the first time, It will warn you about overriding even if there isn't a save file.
 

Bowlstir

Media Arts and Game Development
199
Posts
16
Years
Did everything correctly on a clean version but I'm still getting an Error on line 42 of PokemonSave.

Anyone else?
 
1,224
Posts
10
Years
Did everything correctly on a clean version but I'm still getting an Error on line 42 of PokemonSave.

Anyone else?

Super late, but did you install it by copy-pasting the script from here? In several browsers, the formatted view shows up incorrectly. Try clicking Thread Tools, and Show Printable Version from there. That should give you the correct text. I'm also fairly certain this is the problem, seeing as line 42 and even above are from a vanilla v13.
 
1,224
Posts
10
Years
Complete revamp of the script. Supports way more save files, autosave files, looks nicer, easy deletion of files, works with Mystery Gifts (haven't actually tested that part out, but by all logic it should).

Check it out
 

Derxwna Kapsyla

Derxwna "The Badman" Kapsyla
437
Posts
12
Years
Got an error upon updating. Cause?
Code:
---------------------------
Touhoumon Faith & Prayer Version 1.8
---------------------------
Exception: NameError

Message: uninitialized constant PokemonLoadScene::TrainerWalkingCharSprite

PokemonLoad:302:in `pbSetParty'

PokemonLoad:479:in `pbStartLoadScreen'

Scene_Intro:107:in `closeSplash'

PBEvent:54:in `call'

PBEvent:54:in `trigger'

PBEvent:49:in `each'

PBEvent:49:in `trigger'

EventScene:686:in `update'

EventScene:590:in `main'

Scene_Intro:139:in `main'



This exception was logged in 

C:\Users\Andrew_2\Saved Games/Touhoumon Faith _ Prayer Version 1_8/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK   
---------------------------
For reference, this is on Essentials Build 13. I think this has to do with the error being related to something added in Version 14 of Essentials, which I haven't updated to yet (and wont be until after this demo of my game is released), so is there a way I can revertt back to the 13 version of the continue screen without the trainer animation?
 
1,224
Posts
10
Years
Got an error upon updating. Cause?
Code:
---------------------------
Touhoumon Faith & Prayer Version 1.8
---------------------------
Exception: NameError

Message: uninitialized constant PokemonLoadScene::TrainerWalkingCharSprite

PokemonLoad:302:in `pbSetParty'

PokemonLoad:479:in `pbStartLoadScreen'

Scene_Intro:107:in `closeSplash'

PBEvent:54:in `call'

PBEvent:54:in `trigger'

PBEvent:49:in `each'

PBEvent:49:in `trigger'

EventScene:686:in `update'

EventScene:590:in `main'

Scene_Intro:139:in `main'



This exception was logged in 

C:\Users\Andrew_2\Saved Games/Touhoumon Faith _ Prayer Version 1_8/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK   
---------------------------
For reference, this is on Essentials Build 13

Sorry, that was an addition in v14, I forgot about it. Replace that line with
Code:
@sprites["player"]=IconSprite.new(64,64,@viewport)
      @sprites["player"].setBitmap("Graphics/Characters/"+filename)
and it should work
 

Derxwna Kapsyla

Derxwna "The Badman" Kapsyla
437
Posts
12
Years
And it does work, thanks! One question - I have a second save file from the previous build, how do I convert it so it works with the newer script, since I'm getting the message that there is no other save file.
 
1,224
Posts
10
Years
And it does work, thanks! One question - I have a second save file from the previous build, how do I convert it so it works with the newer script, since I'm getting the message that there is no other save file.

What is it named? Save names should be either Game or Game_(with a number 2 or greater), or any of those with _autosave afterwards.
 

Derxwna Kapsyla

Derxwna "The Badman" Kapsyla
437
Posts
12
Years
It was initially game2.rxdata, I just now renamed it to Game_2.rxdata and it's working now, much appreciated again!
I can also confirm that Mystery Gift seems to be working on the second save as well, so I guess that can be chalked up to compatable
 

MrVokan

Developer of Pokémon FireRedux Overhaul
13
Posts
9
Years
Heyo! Absolutely awesome script! It works perfectly in my game, but i seem to be having some problems with the Save screen.

I'm not the best with scripts but i think i know, somewhat, how i could go about fixing it.
In short: When saving, it puts the "Pokédex" text the same row as "Save File:", cutting of the actual save file number and makes the save windows very wide.
I'd post a screenshot but it seems i havent reached the post-requirement for that yet ;)

If you know, and could help me with this, that would be great. I'll admit ill just screw things up if i start fiddling with the code myself.
 
Back
Top