Has anyone here tried to implement different user profiles into their game, which would have their own save slots and persistent data?
Any ideas how to implement something like this?
Different user profiles with their own saves/persistent data
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.
- dragondatingsim
- Regular
- Posts: 103
- Joined: Sat Feb 14, 2015 10:22 am
- Tumblr: angelswithscalywings
- Contact:
Re: Different user profiles with their own saves/persistent
I'm no expert on the persistent stuff, but couldn't you just use "save slots?" Like have players choose at the beginning whether they want to be "slot A," B, or C, and then you could have PersistantVariableA, B, and C, and when you check persistent variables, run an "if PersistantVariableA and SlotA:" to check that they have the persistent variable that matches their chosen slot, if A had cleared something and C was the one playing then it wouldn't pass the statement. Of course this would work best with a relatively small number of persistent variables and a relatively small number of checks, but there might be a way to make it work a bit more efficiently in more complicated situations, like perhaps having non-persistent variables to each playthrough that get reset to Persistant values occasionally so that you can access them as needed without having to look at the persistent one.
- Evildumdum
- Regular
- Posts: 191
- Joined: Sun Jan 18, 2015 8:49 am
- Projects: ApoclypseZ
- Contact:
Re: Different user profiles with their own saves/persistent
I would have thought that classes would enable you to do this. On game initialisation you get a choice to create a new profile of to choose an existing one. ll existing profile / class names would be stored in a list. The class would have functions to create persistent data specific to the name of the class.
"If at first you don't succeed, try hitting it with a shoe."