• 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
Okay, completely revamped this. It looks a lot nicer and makes a lot more sense. Supports virtually unlimited save files (which is not recommended, but it can do a very large amount, albeit taking longer the more save files). Nice slidy menus. Can choose to load your regular save file, or autosave file if you have one (for use with my autosave function, won't effect performance or cause crashes if you don't have autosaves though, it just checks to see if you have them). When choosing these, the last modified date/time is displayed, so you can choose the newer one or whatever. In menu option to delete the currently loaded save file (have to confirm two serious confirms, so you shouldn't accidentally do it).

Most importantly, when you choose a save file it reloads the Load menu with the chosen save file, so it shows the party and location, etc. That way you know which save file you're actually loading.

Note, when looking for files, it will skip up to two before quitting. For example, if you have only Game_2 and Game_5 files, it will find both of them, but if you have Game_2 and Game_6, it will not look for Game_6. This can be changed, I just figured two was a decent amount and I had to pick something.

Should work for v13+


This script uses game_variables[99] to determine which slot it should save in in-game. So keep that variable open or change all the instances in these to whatever variable you want.
Replace PokemonLoad with this (PScreen_Load in v15)
PokemonLoad
If using v13, replace line 309 here with
Spoiler:


Replace PokemonSave with this (PScreen_Save in v15)
PokemonSave

Replace PokemonSystem with this (I only changed a few lines, but I'd rather not walk people through bugs and it's a short section)
(PSystem_System in v15)
PokemonSystem

You need the attatched graphics, put them in your Pictures folder.

When you start a new game, it finds the next available game slot for you. Also removed the begunNewGame part of PokemonSave, because it doesn't really make sense with this.

Replace Main with this (I've highlighted the added code in red, if you've made changes
Spoiler:


And finally replace these two defs in Scene_Intro (closeSplash, and closeSplashDelete)
Spoiler:



Please give credit if you use it.

Removed security features, they did more harm than good. Fixed it so that when changing between save files, it resizes the screen if you have them set differently (large on one file, medium on another). Automatically stores the last accessed file to a separate data file, to read and load the last accessed game on start-up
 

Attachments

  • loadsavepanel.png
    loadsavepanel.png
    3 KB · Views: 761
  • loadsavepanel_1.png
    loadsavepanel_1.png
    3 KB · Views: 685
Last edited:
68
Posts
11
Years
  • Seen Jan 17, 2017
when I try to save I get an error, here


63Dlq0L.jpg





and when I open the game does not see options
new game
options
"continue"

the text does not appear :S
 
1,224
Posts
10
Years
when I try to save I get an error, here


63Dlq0L.jpg





and when I open the game does not see options
new game
options
"continue"

the text does not appear :S

Are you running 1.3? I tried it with a stock version and it worked fine. I did not change anything on that line or before it.

Edit: I double checked, that error does show up on v12, and runs fine on v13. MetaId was not added until v13, because it is part of the support added for multiple outfits.

Do you mean that the load options don't show up for the other save files? Because that's supposed to happen, it runs a check and the options don't appear unless a save file exists.


has an error, when he will continue pokes picks up the first save, the more the story runs usually remains
Can you reword that? I'm not understanding you.
 
Last edited:
68
Posts
11
Years
  • Seen Jan 17, 2017
so only works for v13 :S
i use Pokémon Essentials 2012-05-15 (I guess ver 10 ) :S , well :S thanx :)

PD: you dont have this script for ver10? or you can do it please xD?
dexter18.png
 
1,224
Posts
10
Years
so only works for v13 :S
i use Pokémon Essentials 2012-05-15 (I guess ver 10 ) :S , well :S thanx :)

PD: you dont have this script for ver10? or you can do it please xD?
dexter18.png

I'm attempting to, but for some reason I'm having conflicts with this line in PokemonLoad
Code:
@sprites["cmdwindow"].commands=commands
 
41
Posts
10
Years
I already have a saved game, started another to simultaneously test both saved, the second saved game copies the entire page saved the first team.,
the same happens as copy pokedex and badges.
 

Derxwna Kapsyla

Derxwna "The Badman" Kapsyla
437
Posts
12
Years
I'm going to assume - I might be wrong - that this is because it stores the values for Pokedex Entries, Money, Badges, Trainer ID, and Play Time in a global variable, which doesn't get overwritten unless the new game overwrites those variables. (Again, just a guess).
The script would need to differentiate between the different variables for each saved game in order to work perfectly. Alternatively, I don't see a supermassive issue with sharing ID number, money, Pokedex Entries, or Play Time. Badges, however, could be troublesome, but it's best to rectify these issues.
 
1,224
Posts
10
Years
I'm going to assume - I might be wrong - that this is because it stores the values for Pokedex Entries, Money, Badges, Trainer ID, and Play Time in a global variable, which doesn't get overwritten unless the new game overwrites those variables. (Again, just a guess).
The script would need to differentiate between the different variables for each saved game in order to work perfectly. Alternatively, I don't see a supermassive issue with sharing ID number, money, Pokedex Entries, or Play Time. Badges, however, could be troublesome, but it's best to rectify these issues.

Yes, this is the problem. I'm trying to rectify it now, it's proving to be tricky for me.
 
1,224
Posts
10
Years
I already have a saved game, started another to simultaneously test both saved, the second saved game copies the entire page saved the first team.,
the same happens as copy pokedex and badges.

Alright, I believe it's fixed for real now. Sorry about that, I hope I didn't mess anything of yours up.

The real problem was because (I'm an idiot) I needed to call pbTryLoadFile for each load selection in order to actually load the correct trainer data. Otherwise it was just using the trainer data it calls at the beginning to display your team and info in the continue screen

Let me know if there are any more errors found. Again, sorry about that.
 
15
Posts
10
Years
  • Age 23
  • Seen Jan 10, 2017
Found a few minor bugs with this.

If I have 3 filled save slots and I start a New Game for the fourth slot, it will give me the warning that I have all 4 save slots filled.

Also, when I had all save slots filled, select New Game and respond No to if it is OK to replace save slot four, then select an existing save slot, the game crashes and gives me this error code (Not sure if this happens without all save slots filled):

Code:
---------------------------
Pokemon Essentials
---------------------------
Exception: NoMethodError

Message: undefined method `index' for nil:NilClass

PokemonLoad:93:in `pbUpdate'

PokemonLoad:186:in `pbEndScene'

PokemonLoad:186:in `pbFadeOutAndHide'

SpriteWindow:1625:in `each'

SpriteWindow:1625:in `pbFadeOutAndHide'

SpriteWindow:1624:in `pbDeactivateWindows'

SpriteWindow:1551:in `pbActivateWindow'

SpriteWindow:1551:in `pbDeactivateWindows'

SpriteWindow:1624:in `pbFadeOutAndHide'

PokemonLoad:186:in `pbEndScene'



This exception was logged in 

C:\Users\Wong\Saved Games/Pokemon Essentials/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
And just a question, if I wanted to start a New Game but keep Save Slot 4 and overwrite Save Slot 2, for example, would there be any way to do that?

Great script though. Thanks!
 
1,224
Posts
10
Years
Found a few minor bugs with this.

If I have 3 filled save slots and I start a New Game for the fourth slot, it will give me the warning that I have all 4 save slots filled.

Also, when I had all save slots filled, select New Game and respond No to if it is OK to replace save slot four, then select an existing save slot, the game crashes and gives me this error code (Not sure if this happens without all save slots filled):

Code:
---------------------------
Pokemon Essentials
---------------------------
Exception: NoMethodError

Message: undefined method `index' for nil:NilClass

PokemonLoad:93:in `pbUpdate'

PokemonLoad:186:in `pbEndScene'

PokemonLoad:186:in `pbFadeOutAndHide'

SpriteWindow:1625:in `each'

SpriteWindow:1625:in `pbFadeOutAndHide'

SpriteWindow:1624:in `pbDeactivateWindows'

SpriteWindow:1551:in `pbActivateWindow'

SpriteWindow:1551:in `pbDeactivateWindows'

SpriteWindow:1624:in `pbFadeOutAndHide'

PokemonLoad:186:in `pbEndScene'



This exception was logged in 

C:\Users\Wong\Saved Games/Pokemon Essentials/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
And just a question, if I wanted to start a New Game but keep Save Slot 4 and overwrite Save Slot 2, for example, would there be any way to do that?

Great script though. Thanks!

Thank you for bringing these to my attention! I've fixed them in the main post and added your suggestion.
 
Last edited:
15
Posts
10
Years
  • Age 23
  • Seen Jan 10, 2017
Thank you for bringing these to my attention! I've fixed them in the main post and added your suggestion.

Thanks for the fix!

And the lines with $game_quests in PokemonLoad were causing an error code so I just took them out and it's working fine now. (I'm assuming they're for your Quest Log script)
 
1,224
Posts
10
Years
Thanks for the fix!

And the lines with $game_quests in PokemonLoad were causing an error code so I just took them out and it's working fine now. (I'm assuming they're for your Quest Log script)

Oh yeah, I totally forgot about those lol. I'll take them out.
 

Wootius

Glah
300
Posts
11
Years
  • Seen May 31, 2022
I get a Syntax error on line 59 with a clean version of v13. Any idea what'd it be?

vsHbZlo.png
 
Back
Top