- Nov 23, 2018
- 63
- 151
I did plan on telling everyone to start over with this release. My game is still pretty short at the moment anyway.old saves in new version issues
I did plan on telling everyone to start over with this release. My game is still pretty short at the moment anyway.old saves in new version issues
I'm not suggestingI never got this to work:
define config.autosave_on_choice = True
define
can't be used this way... but I would expect config.autosave_on_choice
to be in an init python:
block.Another option to consider is a single choice menu. No reason you need to give the player more than one choice.If True, Ren'Py will autosave upon encountering an in-game choice. (WhenYou must be registered to see the linksis called.)
init 2 python: #picking 2 just to be higher than the default of 0
config.autosave_on_choice = True
label start:
scene black with fade
"*** START ***"
menu:
"Thank you for playing chapter 1"
"Continue to chapter 2":
pass
"*** THE END ***"
return
config.autosave_on_choice = True
will cause an autosave to happen.pass
if you put some dialogue in there instead.Finally... You don't need to overwrite your existing RenPy SDK folder. You can have lots of them. Each one independent of another. As long as you rename your "Shortcut to RenPy.exe" to something like "RenPy 7.1.x" or whatever - you can pick whichever version you want to run at that given moment.Ok, upgrade first.
# ----- script.rpy ----
label start:
scene black with fade
"*** START ***"
jump ch01_start
label thank_you_for_playing:
"Thanks for playing, blah, blah, Patreon, blah, blah, valuable players, blah, blah, next month...."
return
# ----- chapter01.rpy ----
label ch01_start:
# blah, blah.
# lots of code, blah, blah.
jump endof_ch01:
label endof_ch01:
if not renpy.has_label("ch02_start")
call thank_you_for_playing
if renpy.has_label("ch02_start"):
jump ch02_start
else:
return
label chxx_start:
and always end a chapter with that bit of code using if renpy.has_label()
. $ FileTakeScreenshot()
$ FileSave(1, confirm=False, page=1)() ### Save in page 1, slot 1
$ FileTakeScreenshot()
$ FileSave(4, confirm=False, page=2)() ### Save in page 2, slot 4
label end:
"bla"
"bla"
"The save menu will now be opend, save!"
$ ShowMenu("save")()
init python:
def forced_save(name="forced-", slots=renpy.config.autosave_slots, extra_info="Forced Save"):
renpy.loadsave.cycle_saves(name, slots)
extra_info = extra_info
renpy.exports.take_screenshot()
renpy.loadsave.save("%s1" % name, extra_info=extra_info)
screen navigation():
.
.
.
if main_menu and renpy.can_load("forced-1"):
textbutton _("Continue Last Chapter") action FileLoad(1, "forced-")
.
.
.
label end_ch1:
"bla"
"bla"
$ forced_save(extra_info="End of v%s" % config.version)
if renpy.loadable("chapter2.rpyc"):
jump start_ch2
return
I know this is old and probably fixed, but I was looking for something similar and seeing thisIf I just use
renpy.force_autosave(True, True)
I get this from the start:
Code:I'm sorry, but errors were detected in your script. Please correct the errors listed below, and try again. File "game/episode3.rpy", line 585: expected statement. renpy.force_autosave(True, True) ^ Ren'Py Version: Ren'Py 7.1.1.929 Sat Jan 18 16:08:28 2020
If I use $renpy.force_autosave(True, True)
the game starts but crashs when it gets to the code
Code:I'm sorry, but an uncaught exception occurred. While running game code: File "game/script.rpy", line 115, in script call call episode3 from _call_episode3 File "game/episode3.rpy", line 585, in script $renpy.force_autosave(True, True) File "game/episode3.rpy", line 585, in <module> $renpy.force_autosave(True, True) TypeError: force_autosave() takes at most 1 argument (2 given) -- Full Traceback ------------------------------------------------------------ Full traceback: File "game/script.rpy", line 115, in script call call episode3 from _call_episode3 File "game/episode3.rpy", line 585, in script $renpy.force_autosave(True, True) File "D:\renpy\renpy-7.0.0-sdk\renpy\ast.py", line 882, in execute renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store) File "D:\renpy\renpy-7.0.0-sdk\renpy\python.py", line 1913, in py_exec_bytecode exec bytecode in globals, locals File "game/episode3.rpy", line 585, in <module> $renpy.force_autosave(True, True) TypeError: force_autosave() takes at most 1 argument (2 given) Windows-8-6.2.9200 Ren'Py 7.1.1.929 Pink Prescriptions 0.2.1 Sat Jan 18 16:06:11 2020
$renpy.force_autosave(True, True)
in the error code, there is the error: you simply missed the space between $ and renpy.force_autosave.