- Jun 14, 2018
- 1,607
- 2,256
Okay. So someone asked me a question and I've gotten close to an answer... but it still doesn't work.
I'm wondering if any of the brilliant minds out there can see a solution that is eluding me.
The basic problem:
The dev wants to create a game which is a collection of stories.
They want to select each story when they start a new game. I presume there's no restriction about playing them in order or anything.
Call them "Story 1", "Story 2" and "Story 3".
Now the quirk:
They only want "Story 1" save games to show in the load/save screens, when that story has been selected. Likewise Story 2 and Story 3.
In effect, they want to filter the list of save slots based on the selected story.
My solutions so far:
The dev really wants to get things working how they originally envisioned. So #1 and #2 are out for the moment.
So I did some playing around with concept #3.
The problem I have run into is the way the slots are numbered compared with the filenames and the way the paging works.
RenPy's load/save pages are flexible enough to start at being a 2x3 grid, but can be expanded to 2x4 or even 3x4 (if you set the thumbnail sizes smaller).
As a result going from page 1 to page 2 doesn't always mean forward 6 slots - though that is the most common, since it's the default.
But if I filter out certain slots, it messes with how it's working.
My initial problem was the slot grid. Showing less than 6 elements in a 2x3 grid causes an error. (Fixed by padding out the slots if there's a shortfall).
But then you start to get into the different behaviours of the save screen -vs- the load screen... where if the slot is empty matters.
Next I've convinced myself that there's going to be paging problems. Except, given the way RenPy names save files with both the page number and slot number... perhaps that's less of an issue than I thought.
Except... now I think more... it's likely that saving Page #1, Slot #1 when showing "Story 2" saves will inadvertently overwrite an identically named Page #1, Slot #1 save for "Story 1".
I know I'm missing something fundament here, but even if I can get over that... I'm not sure this filtering idea is the way to solve the original problem anyway.
Anyone got any other thoughts or insights.
I'm wondering if any of the brilliant minds out there can see a solution that is eluding me.
The basic problem:
The dev wants to create a game which is a collection of stories.
They want to select each story when they start a new game. I presume there's no restriction about playing them in order or anything.
Call them "Story 1", "Story 2" and "Story 3".
Now the quirk:
They only want "Story 1" save games to show in the load/save screens, when that story has been selected. Likewise Story 2 and Story 3.
In effect, they want to filter the list of save slots based on the selected story.
My solutions so far:
- Forget it. Don't filter the save files. Let the player load any save file they like. Maybe set
save_name
to "Story 1", etc so the player knows which story the save belongs to. - Make each story a separate RenPy game. The saves will be separated and the concept will be mostly identical (except being able to choose which story from a menu).
- Filter the save/load slots by comparing the value of
save_load
(viaYou must be registered to see the links) with a persistent variable set when each story starts.
The dev really wants to get things working how they originally envisioned. So #1 and #2 are out for the moment.
So I did some playing around with concept #3.
The problem I have run into is the way the slots are numbered compared with the filenames and the way the paging works.
RenPy's load/save pages are flexible enough to start at being a 2x3 grid, but can be expanded to 2x4 or even 3x4 (if you set the thumbnail sizes smaller).
As a result going from page 1 to page 2 doesn't always mean forward 6 slots - though that is the most common, since it's the default.
But if I filter out certain slots, it messes with how it's working.
My initial problem was the slot grid. Showing less than 6 elements in a 2x3 grid causes an error. (Fixed by padding out the slots if there's a shortfall).
But then you start to get into the different behaviours of the save screen -vs- the load screen... where if the slot is empty matters.
Next I've convinced myself that there's going to be paging problems. Except, given the way RenPy names save files with both the page number and slot number... perhaps that's less of an issue than I thought.
Except... now I think more... it's likely that saving Page #1, Slot #1 when showing "Story 2" saves will inadvertently overwrite an identically named Page #1, Slot #1 save for "Story 1".
I know I'm missing something fundament here, but even if I can get over that... I'm not sure this filtering idea is the way to solve the original problem anyway.
Anyone got any other thoughts or insights.
Last edited: