I was going to say the same... Use
You must be registered to see the links
.
Include this code in both games...
Python:
init python:
tfmg_mp = MultiPersistent("thirsty4myguest.f95zone.to")
The name used only has to be unique. Using one that looks like a domain name is the recommended style.
Then at the end of season one, have something that "saves" the variables you care about to the shared space...
(variables picked at random).
Python:
label end_of_season1:
if renpy.variant("pc"):
python:
tfmg_mp.s1_player = player
tfmg_mp.s1_day9laurensdaddy = day9laurensdaddy
tfmg_mp.s1_day11vanessaprivacyissues = day11vanessaprivacyissues
# etc
tfmg_mp.save()
As far as I know, multi-persistence doesn't work on either Android or iOS. Which is why I've coded it to only work with "pc" (which covers Windows, Mac and Linux).
Unlike normal variable spaces, multi-persistence isn't automatically saved. So you have to do it with code.
Then at the beginning of season 2, copy the values from the shared space, back into variables used by the new game.
(Keep in mind, you may end up with players who only play season 2, without playing season 1).
If the mp variables haven't been set, they have a value of
None
(a bit like
True
or
False
).
So, within your "season 2" game, you'd have something like...
Python:
default player = None
# set values, making "best" assumptions for players who haven't played season 1.
default s1_day9laurensdaddy = True
default s1_day11vanessaprivacyissues = False
# etc
label start:
if tfmg_mp.s1_day9laurensdaddy != None: # if one mp variable exists, chances are they all do.
python:
s1_day9laurensdaddy = tfmg_mp.s1_day9laurensdaddy
s1_day11vanessaprivacyissues = tfmg_mp.s1_day11vanessaprivacyissues
# etc
# some more code....
if tfmg_mp.s1_player != None:
menu:
"Would you like to continue to use the name [tfmg_mp.s1_player] for Season 2 too?"
"Yes":
$ player = tfmg_mp.s1_player
"No":
pass
if player == None:
$ player = renpy.input("Enter your name: {i}(The default is James){/i}", length=20)
$ player = player.strip() or "James"
# onward...
I've copied the values from the multi-persistent space instead of using them directly purely to cope with those players who won't have played season 1. It also makes it easier to reference variables from
this game, rather than checking if multi-persistent variables exist all the time.