little problem
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.
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.
little problem
It's with the save and the load. I set a save point ever few events. Nothing different from what I see in the demo script. I test my game and save at certain points so I can continue with the story. But when I go to load the save it takes me back to the latest save set instead of where I exacltly saved at. I ran into a lot of problems, mostly with the actually scripting but I don't know whats provoking this. Any help, I'm boned.
- PyTom
- Ren'Py Creator
- Posts: 16096
- 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:
Actually, just to be pedantic, it's taking you back to the label before the $ save_name. But since you probably place such a label before each $ save_name, the issue is moot.
The behavior in Ren'Py is correct, if inconvenient for developers. Unfortunately, I can't think of a good way to change the behavior to make it more convenient for developers.
The way that Ren'Py works, each statement is given a name. If the statement is a label, then the name of that statement is the label name. Otherwise, the name of the statement is automatically created based on the name of the file and the date it was last modified.
You say that you only changed one part of the script, and that's true, but there's no way for Ren'Py to know that. So when you change the script, Ren'Py has to go and give every line a new name (except for labels). Then, when loading, it looks for the last statement executed that's still in the script. Usually that's a label, so it will return to the label.
The good news is that saving and loading should work fine when the script is not modified. And since the end-player won't modify the script, it will work fine for them. I never intended loading and saving to be a development tool... It's too easy to make incompatible changes to your game over the course of development.
I should point out that if you break your script up into multiple .rpy files, only saves that are in a modified file will be lost when a file is modified.
Hopefully, this helps you to understand what's going on.
The behavior in Ren'Py is correct, if inconvenient for developers. Unfortunately, I can't think of a good way to change the behavior to make it more convenient for developers.
The way that Ren'Py works, each statement is given a name. If the statement is a label, then the name of that statement is the label name. Otherwise, the name of the statement is automatically created based on the name of the file and the date it was last modified.
You say that you only changed one part of the script, and that's true, but there's no way for Ren'Py to know that. So when you change the script, Ren'Py has to go and give every line a new name (except for labels). Then, when loading, it looks for the last statement executed that's still in the script. Usually that's a label, so it will return to the label.
The good news is that saving and loading should work fine when the script is not modified. And since the end-player won't modify the script, it will work fine for them. I never intended loading and saving to be a development tool... It's too easy to make incompatible changes to your game over the course of development.
I should point out that if you break your script up into multiple .rpy files, only saves that are in a modified file will be lost when a file is modified.
Hopefully, this helps you to understand what's going on.
Who is online
Users browsing this forum: No registered users