Hello! I'm a bit stumped with something here.
The game we're working on now is quite long, so we'd like to break it up into short releases. These releases would add additional music, image, and script files. However, we're not sure how to keep the choice-based variable data from each of the original game saves when a new release is downloaded. I imagine that we could release the new scenes as .zips and just have the player extract the additional script and resources to their old game file, but that seems a bit tedious. Is there any way to automate it on their end so either:
1) The new download puts the script and resources in their old game file for them (preferred),
2) Or the new download grabs the saves from the previous game and imports them to the update.
And would we need a custom installer to do this or is there a feature built into Ren'Py to manage this type of thing?
Releasing Extensions Without Losing Save Data
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Re: Releasing Extensions Without Losing Save Data
Ren'Py Documentation wrote: Multi-Game Persistence
Multi-Game persistence is a feature that lets you share information between Ren'Py games. This may be useful if you plan to make a series of games, and want to have them share information.
To use multipersistent data, a MultiPersistent object must be created inside an init block. The user can then update this object, and save it to disk by calling its save method. Undefined fields default to None. To ensure the object can be loaded again, we suggest not assigning the object instances of user-defined types.
Code: Select all
class MultiPersistent(key) Creates a new MultiPersistent object. This should only be called inside an init block, and it returns a new MultiPersistent with the given key. key The key used to to access the multipersistent data. Games using the same key will access the same multipersistent data. save() Saves the multipersistent data to disk. This must be called after the data is modified.
- Holland
- Regular
- Posts: 92
- Joined: Mon Jun 09, 2014 4:10 pm
- Projects: Lycoris: Their Journies [WIP], With or Without You [NaNo19]
- Location: NJ, USA
- Contact:
Re: Releasing Extensions Without Losing Save Data
I was hoping there was a feature to this effect :3
Now that I know what it's called, I should be able to look into it more on my own. Thank you!
Now that I know what it's called, I should be able to look into it more on my own. Thank you!
♡
Re: Releasing Extensions Without Losing Save Data
I had a question on this feature. My plan is to release a game, allow players to progress through it, and then later release an update to the game that adds a lot of new features , but that would ideally allow them to retain all their current progress. The example under the persistence documentation gives a simple example, basically "did they beat the game? yes? Ok, remember that," but is there a simple way to keep track of a ton of variables? Like would I have to code it to represent something like this:
. . .would I have to list out like that every single variable that I wanted to carry over to the new game, or is there a simpler way to batch in basically all the variables from the one game to the other?
Also, I would like it to be possible for players to start fresh on version two if they prefer or if this is the first time they're playing, so I'd also want to be able to initialize all those values to the original defaults if the player goes that route, so I wouldn't want the persistent data to automatically overwrite the defaults.
So basically. . . how does that all work?
Code: Select all
$ mp.XP = XP
$ mp.HP = HP
$ mp.MP = MP
$ mp.Money = Money
$ mp.Skills = Skills # (and as an aside, would this be the correct way to "save" a list variable?)
$ mp.ClearedDungeon1 = ClearedDungeon1
#etc. etc. etc.
$ mp.save()
Also, I would like it to be possible for players to start fresh on version two if they prefer or if this is the first time they're playing, so I'd also want to be able to initialize all those values to the original defaults if the player goes that route, so I wouldn't want the persistent data to automatically overwrite the defaults.
So basically. . . how does that all work?
Who is online
Users browsing this forum: Google [Bot], Sergei Falcon
