How does the SAVE GAME file actually works?

Magusalfador

Veteran
Veteran
Joined
Jun 15, 2014
Messages
240
Reaction score
41
First Language
English Spanish
Primarily Uses
Hi all!! Im pretty sure this has been asked but I cannot find a concrete answer.
People inquire in, if you can load a game file after you had edited the game (like doing your game by chapters and releasing one chapter at a time, so the players does not need to start from the beginning).

Now, some people say that if you dont change MUCH it can be loaded without a problem (they dont specify how much IS much) others say that if you add plug ins or change the data (like adding new items) it will not work. But I just deployed my game, saved the game, then added some plug ins and items, deployed again, copied save game file from first game and loaded it in the second game and it loaded just fine.

So, do anybody had an actual explanation of what can be modified as to the save game be loaded properly and what cannot?

Thanks!
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
For the plugin part:

Adding most plugins will not cause you any trouble for existing save files.

Adding a plugin will cause an issue if that plugin alters the contents of the save file. An example of this is my Notepad plugin, which lets players write notes during the game. The notes should still be there when the player turns the game off and back on again, so I added the data to the save file.
Think about it in 3 steps:
  1. Plugin data is initialized when the player starts a new game
  2. Plugin data is added to the save file when the player saves
  3. Plugin data is gathered from the save file when the player loads
Do you see the issue with existing saves?
It's trying to do #3 before #1 or #2 happens. Your game will probably crash if it's trying to load data that doesn't exist.

Plugin developers can avoid most of these issues with proper error handling - if #3 fails then do #1. I haven't seen many do this however... but that's a different conversation.

For items:

Adding new items is fine, you could add 1000 new items and there would be no issue. Removing items would be an issue, for example, if the player has Weapon #12 in their inventory in the save file but you change the database to only hold 10 weapons I think the game would crash.

What might be tricky is changing any events on the map where the player saves. A nice trick is to teleport the player to an (almost) blank map between each chapter and autosave them there, that way you can easily send them to the next chapter when you develop it.
 

Magusalfador

Veteran
Veteran
Joined
Jun 15, 2014
Messages
240
Reaction score
41
First Language
English Spanish
Primarily Uses
Thank you so much!!! It really helps, I get the idea behind the empty room. Great!!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Remember that when an actor is added to the party, it takes a snapshot of the database settings for the actor and that is what gets saved to the save file. So if you make changes to that actor on the actor's tab in the database, those changes will not be apparent when you load the save file as that had a snapshot of the database BEFORE your changes.

A player could be three quarters of the way through the game, and you could change the ending map, which they haven't visited so far, or add a plugin that shows credits, and they won't be affected at all. Or they could be 5 minutes into the game, and you could change the starting equipment of the initial party members, and they won't be able to see that equipment when they resume their saved game. Or worse, they could be half way through and you add a plugin that creates new actor parameters when the actor is added to your party, and their game will crash when they try to resume.

It all really depends on what changes you're going to make - to the database, maps, or plugins - and how far through the game the player is when they save. Every situation is different.
 

Magusalfador

Veteran
Veteran
Joined
Jun 15, 2014
Messages
240
Reaction score
41
First Language
English Spanish
Primarily Uses
So the point here is, it all depends on how many changes are made? I understand that if I made multiple changes to something they havnt played and is not recorded on the save game, im fine. Im planning to have all that I need, plug ins, resources, actors, monsters, etc...and then just change the "length" of the game...separated in chapters. That could work, right?
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
I would not say it depends on how many changes were made. It would be more accurate to say it depends on the nature of the changes.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Yep. Not how many changes, but what the changes are. You could make a dozen changes that don't affect it one little bit. Or you could make one change that breaks the whole thing.

With chapters, you'll need to give them a way to get from an existing map to a new map, in the new game. You'll also need to add to the database rather than clearing it out and replacing it.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,859
Messages
1,017,030
Members
137,566
Latest member
Fl0shVS
Top