enhanced save possible?

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
User avatar
Yeto
Newbie
Posts: 18
Joined: Sun Sep 04, 2011 5:11 am
Contact:

enhanced save possible?

#1 Post by Yeto » Tue Jun 30, 2020 10:17 am

I'm progging a 3D-Adventure.

The necessary graphic-tiles are no problem, cities, dungeons and wilderness are working so far...
Because I plan to have a dozen of cities with up to 9 dungeon underneath I use temp-files and have only the place I am with my party loaded.
If you press a button in a city or a teleport is activated, the game should remember their status. This is managed by the temp-files while you play.
The problem is:
The temp-files should be saved too, to the game-file, to remember all changes you made in the different places before when you load a saved game.

Is there a possibility to enhance the save-routine of renpy?

I hope my English is not to rusty...

nananame
Regular
Posts: 72
Joined: Fri Oct 13, 2017 1:40 pm
Contact:

Re: enhanced save possible?

#2 Post by nananame » Tue Jun 30, 2020 12:48 pm

You want the save callback.

I used this thread when I started exploring it: viewtopic.php?t=40407
It's easy to add something simple. The more complex a thing you want to add the more you'll have to think about it. I don't know much about what your tempfiles really are but I'm sure you can figure out how to connect them to the save with this.

User avatar
Yeto
Newbie
Posts: 18
Joined: Sun Sep 04, 2011 5:11 am
Contact:

Re: enhanced save possible?

#3 Post by Yeto » Tue Jun 30, 2020 1:28 pm

Hmmm...
the only thing, I must figure out, is, where I can switch from the normal save-routine to my own part...
The temp-files are .csv-files, that only must be copied to save-folder (what is no problem) an named similar to the renpy-savefile.

Well, I do my very best...

nananame
Regular
Posts: 72
Joined: Fri Oct 13, 2017 1:40 pm
Contact:

Re: enhanced save possible?

#4 Post by nananame » Wed Jul 01, 2020 2:18 am

Sounds like you'll just need to use the save callback to insert a reference to the correct temp file.

Post Reply

Who is online

Users browsing this forum: Google [Bot], TioNick