Hello all,
I'm new to coding and came across an issue while working on a game. I have a text input inside the tutorial section of my game, so that players can name their own character. I also edited my save screen to display that same name. So when a player reaches the input and types in the name they want, that name will show up in their saves as well. I was hoping to use this as a way of keeping track of multiple playthroughs, so players will know which save belongs to which character.
Screenshot of the save/load screen for reference: https://i.imgur.com/Q75YcSr.png
The problem is that the game will only register one name at a time. Even if I restart and type in a new name, all the saved files will update to use the most recent name, overriding the old inputs. They aren't saving as separate "playthroughs" like I was hoping. I'm assuming it has to do with persistent data vs saved game data, but since I'm new to coding, I'm not sure what I should do to fix it. I've been reading the doc to get an idea:
https://www.renpy.org/doc/html/save_loa ... ete%20save
Any help is appreciated!
Separating Save Files Per "Playthrough"
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.
- Nici
- Newbie
- Posts: 2
- Joined: Wed Aug 31, 2022 7:11 pm
- Projects: Aardis: Blade of Judgement, Deimos
- Discord: Nicole Rene#2186
- Contact:
Separating Save Files Per "Playthrough"
♪ I am the very model of a scientist Salarian ♪
- Ocelot
- Eileen-Class Veteran
- Posts: 1882
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Separating Save Files Per "Playthrough"
You should post how you input and store your name. If you do in in persistent data: everything is working as intended, it is for data which is globally shared between all sessions. Do not do that for character name.
You need to store data you want to access externally in extra JSON data: https://www.renpy.org/doc/html/config.h ... _callbacks
And then extract if per slot: https://www.renpy.org/doc/html/screen_a ... l#FileJson
You need to store data you want to access externally in extra JSON data: https://www.renpy.org/doc/html/config.h ... _callbacks
And then extract if per slot: https://www.renpy.org/doc/html/screen_a ... l#FileJson
< < insert Rick Cook quote here > >
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot]