Saving/restoring an earlier game state

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
Rocket Science
Newbie
Posts: 11
Joined: Sun May 24, 2009 12:15 am
Contact:

Saving/restoring an earlier game state

#1 Post by Rocket Science » Wed Oct 27, 2010 4:03 am

After a few days of tinkering around, I managed to get multilingual support working in a barebones game. Basically I can write this:

Code: Select all

say violet l_string("t-01", "foo")
and the game will output the string assigned to persistent.lang.strings["t-01"]["foo"], as if I'd written:

Code: Select all

violet "{b}{i}This is a test!{/i}{b}"
which works great, until you save the game, restart, change the language and load the saved game.

The problem is that any onscreen text from when the game is saved remains unchanged, because it's not refreshed until you rollback to it. As a workaround, what I want to do is hijack the load/save system so that it either saves the game state from when the text was last cleared, or loads the game and resets to that point (for the record, I'm working in NVL-mode). I don't see any easy way of doing that, though, so...help?

Post Reply

Who is online

Users browsing this forum: Bing [Bot]