- Sep 4, 2017
- 1,024
- 2,084
Hello Everybody.
I'm currently working on a Ren'py game project and for the very first time, I'm completely stuck. None of my attempts has allowed me the slightest progress.
I already requested some help on the discord (even on reddit), but I hope I could get more opinions here.
SUMMARY :
I'm creating a visual novel which will have several paths. As I want to reward players who make the right decisions and don't want them to force a Game over, I want to create a gallery system that unlock every available cutscene when players complete the "GOOD PATH" while they will only unlock the cutscene of the path they are on if they took a "BAD PATH".
Here is an example of the code I use for my replay gallery system. Consider that "DEFEATAGAINSTBOSS" is the bad path while "VICTORYAGAINSTBOSS" is the good path.
So, in order to make it work, I have to set flags in the script of my game. I will use 1 flag for each path.
And I will "activate" those flags at the right timing". I will only activate the "BAD PATH" flag when reaching the defeat scene, and I will activate both the "GOOD PATH" and "BAD PATH" flag on the victory scene.
Problem being that this doesn't work. If I reach the "defeatagainstboss" scene while playing, I rightfully unlock the bad ending cutscene. However, if I reach the "victoryagainstboss" scene, then I only unlock the good ending cutscene.
It's especially confusing since :
- Using the dev console show me that the defeatagainstboss flag has been rightfully triggered on the "GOOD PATH"
- The replay gallery show me the unlockedthumbnail picture, like if I unlocked the bad ending scene. However when I click on the imagebutton it doesn't trigger anything and the replay doesn't start.
I would like to get your opinion on it.
Thanks for your help.
I'm currently working on a Ren'py game project and for the very first time, I'm completely stuck. None of my attempts has allowed me the slightest progress.
I already requested some help on the discord (even on reddit), but I hope I could get more opinions here.
SUMMARY :
I'm creating a visual novel which will have several paths. As I want to reward players who make the right decisions and don't want them to force a Game over, I want to create a gallery system that unlock every available cutscene when players complete the "GOOD PATH" while they will only unlock the cutscene of the path they are on if they took a "BAD PATH".
Here is an example of the code I use for my replay gallery system. Consider that "DEFEATAGAINSTBOSS" is the bad path while "VICTORYAGAINSTBOSS" is the good path.
Python:
screen Replay:
tag menu
use replay_menu (_("Replay Scenes"))
if persistent.defeatagainstboss:
imagebutton:
xalign 0.31
yalign 0.80
idle "Scenes/thumbnail/unlockedthumbnail2.webp"
action Replay("defeatagainstboss")
else:
imagebutton:
xalign 0.31
yalign 0.80
idle "Scenes/thumbnail/lockedthumbnail1.webp"
action NullAction()
if persistent.victoryagainstboss:
imagebutton:
xalign 0.62
yalign 0.80
idle "Scenes/thumbnail/unlockedthumbnail2.webp"
action Replay("victoryagainstboss")
else:
imagebutton:
xalign 0.62
yalign 0.80
idle "Scenes/thumbnail/lockedthumbnail2.webp"
action NullAction()
Python:
default persistent.victoryagainstboss = False
default persistent.defeatagainstboss = False
Python:
label defeatagainstboss :
$ persistent.defeatagainstboss = True
if _in_replay:
show screen Replayexit
label victoryagainstboss :
$ persistent.victoryagainstboss = True
$ persistent.defeatagainstboss = True
if _in_replay:
show screen Replayexit
Problem being that this doesn't work. If I reach the "defeatagainstboss" scene while playing, I rightfully unlock the bad ending cutscene. However, if I reach the "victoryagainstboss" scene, then I only unlock the good ending cutscene.
It's especially confusing since :
- Using the dev console show me that the defeatagainstboss flag has been rightfully triggered on the "GOOD PATH"
- The replay gallery show me the unlockedthumbnail picture, like if I unlocked the bad ending scene. However when I click on the imagebutton it doesn't trigger anything and the replay doesn't start.
I would like to get your opinion on it.
Thanks for your help.