Loading Renpy 8 saves on Renpy 7.3

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
Unixsystem
Newbie
Posts: 1
Joined: Sat Sep 10, 2022 12:21 am
Contact:

Loading Renpy 8 saves on Renpy 7.3

#1 Post by Unixsystem » Sat Sep 10, 2022 12:48 am

A quick preface: I fully understand that what I'm asking for is not officially supported in any way, that it's extremely niche and it's probably a terrible idea. However as far as I can tell there's no technical reason it shouldn't work so I'm just curious if anyone can help me figure out the smoothest way to do it.

The situation:
I'm making a mod for an existing Renpy game that is built on Renpy 7.3.5.606. I know the creator and I know that he has no interest in migrating to a new version of the engine any time in the foreseeable future. The mod that I am making benefits greatly from both some of the new options included in Renpy 7.5/8 but more importantly several important features I would like to implement rely heavily on Python 3.

The game in question is very simple in its coding and I was able to literally just load the stock game files in the Renpy 8 launcher and build a new distribution that works out of the box, no tweaking or code changes necessary to make the game boot up and play fine out of the box. Similarly, I can load old Renpy 7.3.5 saves on my Renpy 8 version and they load with no issues.

However, one of the fundamental features of this mod is that I am determined to make it something that can be installed or removed at any point without impacting one's personal save. The game updates twice a month and while my mod thus far has continued working independent of new updates, I do not want someone to be left with a broken game and an unusable save if some future update happens to brick my mod. I want to ensure that there's at least some way that someone could have the mod installed for weeks or months, keep playing new updates, and then have a backlog of "vanilla" saves that can then be loaded back on the original Renpy 7.3.5 version so they don't need to replay dozens of hours of content to get back to where they previously were.

For reference, my mod does not modify any of the vanilla game variables nor functions and while it adds some small bits to the vanilla labels, none of the original names are changed.

Loading up my custom Renpy 8 version of the game, making a new save and loading it on the original 7.3.5 version gives me the following error:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00action_file.rpy", line 452, in __call__
ImportError: No module named revertable

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "renpy/common/_layout/screen_main_menu.rpymc", line 28, in script
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\ast.py", line 914, in execute
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\python.py", line 2028, in py_exec_bytecode
  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in <module>
  File "renpy/common/_layout/screen_main_menu.rpym", line 35, in _execute_python_hide
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\ui.py", line 297, in interact
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\core.py", line 2702, in interact
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\core.py", line 3518, in interact_core
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 998, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 998, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 998, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\screen.py", line 714, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 998, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 244, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 998, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 244, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 998, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 244, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\behavior.py", line 962, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\behavior.py", line 897, in handle_click
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\behavior.py", line 313, in run
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\behavior.py", line 320, in run
  File "renpy/common/00action_file.rpy", line 452, in __call__
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\loadsave.py", line 769, in load
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\loadsave.py", line 63, in loads
ImportError: No module named revertable

Windows-8-6.2.9200
Ren'Py 7.3.5.606
Lessons in Love 0.25.0Part2
Fri Sep 09 23:31:17 2022
All I care about is being able to load into the current label (start of the current label is totally fine) and that the state of all of the variables matches (the stock game has no complex objects, just ints, bools, strings, etc) and I'm willing to sacrifice things like rollback if it will work in a pinch.

If I set 'config.rollback_enabled = False' and then make a new save in the Renpy 8 version, when I load it in 7.3.5 I get a different error:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00action_file.rpy", line 452, in __call__
ImportError: No module named rollback

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "renpy/common/_layout/screen_load_save.rpymc", line 35, in script
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\ast.py", line 914, in execute
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\python.py", line 2028, in py_exec_bytecode
  File "renpy/common/_layout/screen_load_save.rpym", line 35, in <module>
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\ui.py", line 297, in interact
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\core.py", line 2702, in interact
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\core.py", line 3518, in interact_core
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 998, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 998, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 998, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\screen.py", line 714, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 998, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 244, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 998, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\layout.py", line 998, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\behavior.py", line 962, in event
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\behavior.py", line 897, in handle_click
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\behavior.py", line 313, in run
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\display\behavior.py", line 320, in run
  File "renpy/common/00action_file.rpy", line 452, in __call__
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\loadsave.py", line 769, in load
  File "C:\Users\Selebus\Documents\RenPy\renpy-7.3.2-sdk\renpy\loadsave.py", line 63, in loads
ImportError: No module named rollback

Windows-8-6.2.9200
Ren'Py 7.3.5.606
Lessons in Love 0.25.0Part2
Fri Sep 09 23:35:59 2022
Clearly the issue is just that the Renpy 8 (and as far as I can tell, Renpy 7.5) versions of the engine include a handful of new .py files that handle different functions of the saving process and 7.3.5 just doesn't know what to do about that. My basic questions at this point are the following:
1) Are there a certain set of features similar to config.rollback_enabled that can be disabled to create an extremely barebones save that Renpy 7.3.5 may be able to read and load correctly?
2) Assuming that isn't possible, would it work to import the old Renpy 7.3.5 save/load functions into my Renpy 8 copy, perhaps under a different namespace, and just simply call the old save functions separately when needing to make one of these backwards compatible backup saves?

I'm fine with any solution being clunky as long as it works. This mod is already a behemoth of my spaghetti code and if the solution is importing half of Renpy 7.3.5 into the install folder, that's cool in my book.

Thanks in advance for any advice!

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1882
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Loading Renpy 8 saves on Renpy 7.3

#2 Post by Ocelot » Sat Sep 10, 2022 4:02 am

In theory, it could work. Saving and loading is just dumping/restoring state of stores with pickle. It is normally a single line.
However, for that to workl normally, you will have either never save anything which changed behavior between Py2 and Py3. That means: no importing date / time, no saving strings (unlikely, I believe RenPy handled this for a long time), no saving lists/sets/dicts, etc. RenPy does have a compatibility layer which helps with converting 7.x saves into 8.x but not backward. Oh. and base game should not do that too, obviously.
< < insert Rick Cook quote here > >

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Loading Renpy 8 saves on Renpy 7.3

#3 Post by PyTom » Sat Sep 10, 2022 2:55 pm

Unixsystem wrote:
Sat Sep 10, 2022 12:48 am
1) Are there a certain set of features similar to config.rollback_enabled that can be disabled to create an extremely barebones save that Renpy 7.3.5 may be able to read and load correctly?
No.
2) Assuming that isn't possible, would it work to import the old Renpy 7.3.5 save/load functions into my Renpy 8 copy, perhaps under a different namespace, and just simply call the old save functions separately when needing to make one of these backwards compatible backup saves?
No.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Ocelot