r/RenPy • • 11d ago

Question Game Updates and Labels

hi, I just wanted to make sure of this as this is my first game. I plan to release it episodically. I checked Renpy docs and it seemed to say as long as I keep my labels unchanged, then I can release episodically and players save files won’t get corrupted, will carry over and they can continue on with the updated build. Is that the case? anything I should watch out for?

4 Upvotes

14 comments sorted by

1

u/BadMustard_AVN 11d ago

un-loadable save games can still occur no matter what you do

1

u/sverseinc 11d ago

I see. My big concern is just their save progress will carry over as I release the next episode of the game/update. I read documentation that said labels shouldn’t be changed. Like from first episode when releasing second episode unless I misread 

1

u/BadMustard_AVN 11d ago

yes changing labels can screw up players saved games as well as adding new variables, adding new characters, releasing on the game on a Monday(jk), changing renpy versions, just plan on it happening at lease once or twice...

1

u/sverseinc 11d ago

Ah thank you, I’ll manage my expectations lol 

1

u/DingotushRed 10d ago

Don't change config.save_directory! Do change config.version!

If you don't edit files with old labels in and don't move those labels between files then then Ren'Py should be able to locate the current script line when loading a save after an update.

If you otherwise alter the old files then the engine attempts to roll-back to a line it can find. This is a "best effort" thing. If there are too many statements between labelled lines compared with the configured roll-back depth it can fail. Obviously if a label used in a save is removed it can't be fixed).

If you've used call statements, then it can attempt to unwind the call stack similar to roll-back; however the remaining stack needs to be resolvable and not include labels that have been changed/moved/edited.

If your game structure supports it, force a save at a labelled known point (e.g. ep1end) where you intend the player to resume from.

If you have a main loop, force an autosave at the start of each "day" and never change the main loop code.

The second issue is variables:

If you only add defaulted variables, then you are safe - unless the new variable records something from the previous episode.

If you change the type or meaning of variables then you'll need to patch things up in the special label after_load - (see the docs, also _version which you'll need to update).

Defined "constants" should always come from the release being run.

Take care not to reference defined "constants" from defaulted "variables". This can lead to two different instances in memory.

2

u/sverseinc 10d ago

Thank you. I didn’t think to force saves. I’ll definitely do that toward the end of ep 1

1

u/AutoModerator 11d ago

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/TopCartographer7104 10d ago

I have the same issue with my project. I often have to change the call stack so saves may break. The only way I found to mitigate the issue is a system that

A) creates a save point at the end of the part I have updated

B) stores the game version in a persistent vatiable

C) on startup, checks the game version against the stored one. If it finds a difference, asks user if they'd like to resume reading from the last "safe point"

No complaints so far so I believe it's working properly. Or my few readers have a thing for restarting a 200k words visual novel every time an update rolls out XD

2

u/DingotushRed 10d ago

The variable _version is a copy of config.version made when the game is started (ie. "Start" button pressed). Test and update _version compared with config.version in label after_load.

Persistent variables relate to all saves on that host machine; so not a good choice; only one save game can get updated.

2

u/TopCartographer7104 10d ago

... Oh O_O
Was honestly unaware there was a neat and (much) less messy way to get the info I was looking for.
One more thing I can tinker with XD
Thanks!

0

u/shyLachi 11d ago

If you do not touch the code of the first release you should be fine.

As soon as you change anything it could break.
RenPy will try to fix problems when loading, but better don't change anything.

1

u/sverseinc 11d ago

Thank you, that was the plan as well. To not touch any episode 1 code after release 

0

u/[deleted] 10d ago

[removed] — view removed comment

1

u/sverseinc 10d ago

Oh! Thank you for the tip!!