Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement saves and checkpoints #24

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions chapters/ch1.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@
"value": 1
}
},
"special": ""
"special": "saves"
},
{
"code": "Restart game",
Expand Down Expand Up @@ -354,7 +354,7 @@
"value": 2
}
},
"special": ""
"special": "saves"
},
{
"code": "Restart game",
Expand Down Expand Up @@ -385,7 +385,7 @@
"value": 3
}
},
"special": ""
"special": "saves"
}
]
},
Expand Down Expand Up @@ -537,7 +537,6 @@
"target": "Ch2-Intro",
"set_variables": {
"v_current_scene": "Ch2-Intro",
"v_chapter_save": "1",
"v_chapter_save_counter": "5",
"v_checkpoint_rich": "1"
},
Expand All @@ -547,15 +546,14 @@
"value": 1
}
},
"special": ""
"special": "checkpoint_save"
},
{
"code": "Next chapter",
"text": "Next chapter",
"target": "Ch2-Intro",
"set_variables": {
"v_current_scene": "Ch2-Intro",
"v_chapter_save": "1",
"v_chapter_save_counter": "5",
"v_checkpoint_rich": "1"
},
Expand All @@ -565,7 +563,7 @@
"value": 1
}
},
"special": ""
"special": "checkpoint_save"
}
]
},
Expand Down Expand Up @@ -667,7 +665,6 @@
"target": "Ch2-Intro",
"set_variables": {
"v_current_scene": "Ch2-Intro",
"v_chapter_save": "1",
"v_chapter_save_counter": "5",
"v_checkpoint_rich": "1"
},
Expand All @@ -677,15 +674,14 @@
"value": 1
}
},
"special": ""
"special": "checkpoint_save"
},
{
"code": "Next chapter",
"text": "Next chapter",
"target": "Ch2-Intro",
"set_variables": {
"v_current_scene": "Ch2-Intro",
"v_chapter_save": "1",
"v_chapter_save_counter": "5",
"v_checkpoint_rich": "1"
},
Expand All @@ -695,7 +691,7 @@
"value": 1
}
},
"special": ""
"special": "checkpoint_save"
}
]
}
Expand Down
39 changes: 15 additions & 24 deletions chapters/ch2.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Ch2-Intro": {
"id": "Ch2-Intro",
"text": "<br/>Both Daren and I turn around at the same time. We see a slim, tall figure standing behind us, with long black hair, fair skin, and a very serious look on her face. She is wearing leather pants, a long sleeved white blouse, and a green, hooded cloak. She appears to be somewhere in her early twenties. <br/><br/>But that's not all there is to this woman. I can also sense a strong magical aura all around her. An aura that couldn't possibly be coming from a regular human. Could she be... a banshee?<br/><br/>My heart starts beating rapidly again. That night from fifteen years ago is coming back to me. I can see it vividly, and I can still hear the laughter. That sinister, high-pitched laughter. Will it never stop haunting me?<br/><br/>I breathe in deeply, and try to calm down. This woman can't be a banshee. The feeling I'm getting now is too different from the one I got back then. Does that mean she's a mage? No, that would be impossible. And yet... <br/><br/>\"Barry,\" whispers Daren. \"Don't be afraid. I know white magic. I can purify her.\"<br/><br/>I realize Daren must have also sensed the magic coming from the woman and concluded that she's been possessed by a banshee. Banshees are parasitic spirits that need to inhabit bodies in order to survive. They usually spend a few weeks inside a body in a dormant state before taking over. During this phase, the host may develop magical powers. Once a banshee is in full control of the body, they say she has awakened. The only way you can save the original host once she's been possessed by a banshee is to use white magic to purify her before the banshee has fully awakened, which basically means killing the banshee without harming the host.<br/>However, the purification technique operates on the assumption that a woman cannot have magic powers of her own. They call it purification, but all the technique does in fact is to completely eradicate the aura that gives off the strong magical vibe, with the purpose of also eliminating the banshee along with it. On the other hand, if the aura does not in fact belong to a banshee, but to the woman herself, the purification would be nothing short of a death sentence. <br/><br/>\"No, wait. Listen to me!\" I blurt out. \"This woman isn't a banshee.\"<br/><br/>\"So what, you're suggesting she's a mage, then? Barry, women can't be mages. There hasn't been a single recorded case of a woman mage in all of our world's history. Every time a woman's developed magical powers, it's been because of a banshee. Every single time.\"<br/><br/>\"Don't you think I know that? But this one is different. If you try to purify her, you may well end up killing her!\"<br/><br/> \"How can you be so sure?\"<br/>\"Because I've met a banshee before. Up close. Have you met a banshee before, Daren?\"<br/><br/>\"...No,\" he admits.<br/><br/>\"You just said you trusted me enough to tell me your greatest weakness. I'm asking you to trust me on this too. Can you trust me on this, Daren?\" <br/><br/>Daren gives me one long look, and then he sighs deeply. <br/><br/>\"Alright. We'll do it your way. But I'm keeping an eye on her. I swear, Barry, if it turns out you're only saying all of this because of her looks, I'm going to--\"<br/><br/>\"Would you guys mind telling me what you've been whispering about for the past minute?\" the woman asks us.<br/><br/>",
"text": "<% if((locals.v_checkpoint_rich || 0) == 1) {%><div class='stat_success'>Checkpoint reached: Game saved.</div><% } %><br/>Both Daren and I turn around at the same time. We see a slim, tall figure standing behind us, with long black hair, fair skin, and a very serious look on her face. She is wearing leather pants, a long sleeved white blouse, and a green, hooded cloak. She appears to be somewhere in her early twenties. <br/><br/>But that's not all there is to this woman. I can also sense a strong magical aura all around her. An aura that couldn't possibly be coming from a regular human. Could she be... a banshee?<br/><br/>My heart starts beating rapidly again. That night from fifteen years ago is coming back to me. I can see it vividly, and I can still hear the laughter. That sinister, high-pitched laughter. Will it never stop haunting me?<br/><br/>I breathe in deeply, and try to calm down. This woman can't be a banshee. The feeling I'm getting now is too different from the one I got back then. Does that mean she's a mage? No, that would be impossible. And yet... <br/><br/>\"Barry,\" whispers Daren. \"Don't be afraid. I know white magic. I can purify her.\"<br/><br/>I realize Daren must have also sensed the magic coming from the woman and concluded that she's been possessed by a banshee. Banshees are parasitic spirits that need to inhabit bodies in order to survive. They usually spend a few weeks inside a body in a dormant state before taking over. During this phase, the host may develop magical powers. Once a banshee is in full control of the body, they say she has awakened. The only way you can save the original host once she's been possessed by a banshee is to use white magic to purify her before the banshee has fully awakened, which basically means killing the banshee without harming the host.<br/>However, the purification technique operates on the assumption that a woman cannot have magic powers of her own. They call it purification, but all the technique does in fact is to completely eradicate the aura that gives off the strong magical vibe, with the purpose of also eliminating the banshee along with it. On the other hand, if the aura does not in fact belong to a banshee, but to the woman herself, the purification would be nothing short of a death sentence. <br/><br/>\"No, wait. Listen to me!\" I blurt out. \"This woman isn't a banshee.\"<br/><br/>\"So what, you're suggesting she's a mage, then? Barry, women can't be mages. There hasn't been a single recorded case of a woman mage in all of our world's history. Every time a woman's developed magical powers, it's been because of a banshee. Every single time.\"<br/><br/>\"Don't you think I know that? But this one is different. If you try to purify her, you may well end up killing her!\"<br/><br/> \"How can you be so sure?\"<br/>\"Because I've met a banshee before. Up close. Have you met a banshee before, Daren?\"<br/><br/>\"...No,\" he admits.<br/><br/>\"You just said you trusted me enough to tell me your greatest weakness. I'm asking you to trust me on this too. Can you trust me on this, Daren?\" <br/><br/>Daren gives me one long look, and then he sighs deeply. <br/><br/>\"Alright. We'll do it your way. But I'm keeping an eye on her. I swear, Barry, if it turns out you're only saying all of this because of her looks, I'm going to--\"<br/><br/>\"Would you guys mind telling me what you've been whispering about for the past minute?\" the woman asks us.<br/><br/>",
"responses": [
{
"code": "Her looks",
Expand Down Expand Up @@ -437,7 +437,6 @@
"text": "Load from last checkpoint",
"target": "",
"set_variables": {
"v_chapter_load": "1",
"v_chapter_save_counter": "5"
},
"conditions": {
Expand All @@ -454,7 +453,7 @@
"value": 3
}
},
"special": ""
"special": "checkpoint_load"
},
{
"code": "Load game",
Expand All @@ -475,7 +474,7 @@
"value": 3
}
},
"special": ""
"special": "saves"
}
]
},
Expand Down Expand Up @@ -681,7 +680,6 @@
"text": "Load from last checkpoint",
"target": "",
"set_variables": {
"v_chapter_load": "1",
"v_chapter_save_counter": "5"
},
"conditions": {
Expand All @@ -702,7 +700,7 @@
"value": 1
}
},
"special": ""
"special": "checkpoint_load"
},
{
"code": "Load game",
Expand All @@ -727,7 +725,7 @@
"value": 1
}
},
"special": ""
"special": "saves"
},
{
"code": "Restart game",
Expand Down Expand Up @@ -757,7 +755,6 @@
"text": "Load from last checkpoint",
"target": "",
"set_variables": {
"v_chapter_load": "1",
"v_chapter_save_counter": "5"
},
"conditions": {
Expand All @@ -774,7 +771,7 @@
"value": 3
}
},
"special": ""
"special": "checkpoint_load"
},
{
"code": "Load game",
Expand All @@ -795,7 +792,7 @@
"value": 3
}
},
"special": ""
"special": "saves"
}
]
},
Expand Down Expand Up @@ -885,7 +882,6 @@
"text": "Load from last checkpoint",
"target": "",
"set_variables": {
"v_chapter_load": "1",
"v_chapter_save_counter": "5"
},
"conditions": {
Expand All @@ -902,7 +898,7 @@
"value": 1
}
},
"special": ""
"special": "checkpoint_load"
},
{
"code": "Load game",
Expand All @@ -923,7 +919,7 @@
"value": 1
}
},
"special": ""
"special": "saves"
},
{
"code": "Restart game",
Expand All @@ -949,7 +945,6 @@
"text": "Load from last checkpoint",
"target": "",
"set_variables": {
"v_chapter_load": "1",
"v_chapter_save_counter": "5"
},
"conditions": {
Expand All @@ -962,7 +957,7 @@
"value": 3
}
},
"special": ""
"special": "checkpoint_load"
},
{
"code": "Load game",
Expand All @@ -979,7 +974,7 @@
"value": 3
}
},
"special": ""
"special": "saves"
}
]
},
Expand Down Expand Up @@ -1295,7 +1290,6 @@
"set_variables": {
"v_next_chapter_crash": "1",
"v_current_scene": "Ch3-Intro",
"v_chapter_save": "1",
"v_chapter_save_counter": "5",
"v_checkpoint_rich": "1"
},
Expand All @@ -1305,7 +1299,7 @@
"value": 2
}
},
"special": ""
"special": "checkpoint_save"
},
{
"code": "Offer to provide protection in exchange for leading us to their cave",
Expand Down Expand Up @@ -1369,12 +1363,11 @@
"set_variables": {
"v_next_chapter_crash": "1",
"v_current_scene": "Ch3-Intro",
"v_chapter_save": "1",
"v_chapter_save_counter": "5",
"v_checkpoint_rich": "1"
},
"conditions": {},
"special": ""
"special": "checkpoint_save"
}
]
},
Expand All @@ -1389,12 +1382,11 @@
"set_variables": {
"v_next_chapter_crash": "1",
"v_current_scene": "Ch3-Intro",
"v_chapter_save": "1",
"v_chapter_save_counter": "5",
"v_checkpoint_rich": "1"
},
"conditions": {},
"special": ""
"special": "checkpoint_save"
}
]
},
Expand All @@ -1409,12 +1401,11 @@
"set_variables": {
"v_next_chapter_crash": "1",
"v_current_scene": "Ch3-Intro",
"v_chapter_save": "1",
"v_chapter_save_counter": "5",
"v_checkpoint_rich": "1"
},
"conditions": {},
"special": ""
"special": "checkpoint_save"
}
]
}
Expand Down
Loading