diff --git a/Coordinator/Coordinator.js b/Coordinator/Coordinator.js
index 33f9729..44f4fc4 100644
--- a/Coordinator/Coordinator.js
+++ b/Coordinator/Coordinator.js
@@ -12,7 +12,7 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
//selectable scenes from main menu
- var scenes = ["finalDinner", "finalLecture", "intro:deanOrTravel", "intro:tempDinnerWithFam", "finalBeach"];
+ var scenes = ["finalDinner", "finalLecture", "intro:deanOrTravel", "intro:tempDinnerWithFam", "finalBeach", "intro:theEnd"];
//for reference, easy access to old temporary scenes.
@@ -21,7 +21,7 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
//var finalScenes = ["finalDinner", "finalLecture", "finalTravel", "finalDean", "finalFamilyDinner", "finalBeach", "finalUN", "finalFaculty"];
//scenes played when you hit Begin
- var playGameScenes = ["finalDinner", "finalLecture", "finalDean", "finalFamilyDinner", "finalBeach"];
+ var playGameScenes = ["finalDinner", "finalLecture", "intro:deanOrTravel", "intro:tempDinnerWithFam", "finalBeach", "intro:theEnd"];
State.set("scenes", playGameScenes);
if (Display.interfaceMode == "timeline") {
@@ -81,6 +81,7 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
//returns index of next scene
//available scenes: ["finalDinner", "finalLecture", "finalTravel", "finalDean", "finalFamilyDinner", "finalBeach", "finalUN", "finalFaculty"]
var getNextScene = function(currentScene) {
+ /* This is the old conditional code for moving between scenes based on states, needs to be refactored away from here to evaluate custom State compares put in each scene to see if it's valid, but that means we have to write them, so leaving for now
switch(currentScene) {
case "finalDinner":
return 1;
@@ -114,6 +115,10 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
case "finalFaculty": //this should return epilogue eventually
return 0;
}
+ */
+
+ return State.get("scenes").indexOf(currentScene)+1;
+
}
@@ -1126,7 +1131,7 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
},
{
id : "undergradDean",
- text : "
You've been having a somewhat rough time with your lectures. It looks like your superiors are starting to notice as Dean Smith has called you to come meet with him in private.
Choose what Emma says, but make sure to keep your cool or your job might be in jeoprardy!
"
+ text : "You've been having a somewhat rough time with your lectures. It looks like your superiors are starting to notice as Dean Smith has called you to come meet with him in private.
Choose what Emma says, but make sure to keep your cool or your job might be in jeopardy!
"
},
{
id : "undergradTravel",
@@ -1174,7 +1179,7 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
},
{
id : "finalDinner",
- text : "You are Emma Richards, a PhD student finishing up your degree on the effects of climate change.
Tomorrow, you'll be defending your thesis. Your friends have decided to throw a dinner party for you.
Choose what Emma says, but keep an eye on the task you're performing, too!
"
+ text : "It's the year 2025. You are Emma Richards, a PhD student finishing up your degree on the effects of climate change.
Tomorrow, you'll be defending your thesis. Your friends have decided to throw a dinner party for you.
Choose what Emma says, but keep an eye on the task you're performing, too!
"
},
{
id : "finalLecture",
@@ -1198,7 +1203,7 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
},
{
id : "finalBeach",
- text : "As years have passed, you've fought the good fight as best you can, locally. You've managed to keep the Oxbow Marshes designated as a wildlife refuge, and pushed for tighter regulations of the local paper mill. Sometimes it feels hopeless, given global events, but you've kept working. One day you have a memorable conversation with your co-worker about this very thing.
"
+ text : "{ifState|failedLecture|true|As years have passed, you've fought the good fight as best you can, locally.|You took Mom's words to heart, and later on got involved with a local group helping with habitat remediation for crabs.}
You managed to keep the Oxbow Marshes designated as a wildlife refuge, and pushed for tighter regulations of the local paper mill. Sometimes it feels hopeless, given global events, but you've kept working. One day you have a memorable conversation with your co-worker about this very thing.
"
},
{
id : "finalFaculty",
@@ -1206,14 +1211,25 @@ define(["Display", "StoryDisplay", "State", "ChunkLibrary", "Wishlist", "StoryAs
},
{
id : "deanOrTravel",
- text : "this is the intro for dean or travel"
+ text : "{ifState|failedLecture|true|(Well, that could have gone better.
Trouble is, things didn't get easier as you continued lecturing. Bad class feedback meant you had to meet with the Dean to discuss your 'pedagogical style'. He seemed sympathetic, and gave you a second chance.
As the years went on, however, you found yourself drifting more towards working with local groups to help remediate the growing environmental effects of the rising sea level. You were able to translate your expertise with {stateVar|areaOfExpertise|shrimp} to help with research on changing crab biomes.
)|That lecture was the first of many in your budding career as an academic. It turns out you had a natural gift for education, and students flocked to your courses as the years progressed. You began giving talks and leading panels outside of academia, which were in high demand as various organizations and governments around the world struggled to cope with the effects of the changing climate on their people.
}"
},
{
id : "tempDinnerWithFam",
- text : "this ithe dinner with fam intro"
+ text : "It's six years later: 2032. Your parents decided to come visit you, and you took them out to a local restaurant: {ifState|failedLecture|true|their treat|your treat}. They hadn't changed much, although you noticed Mom had more gray hair than you remembered, and Dad had finally gotten glasses.
The conversation went well, though as usual they pushed you a bit on some of your life choices. {ifState|failedLecture|true|Sometimes you thought they didn't see the value of your activist work locally.|Mom gave you a bit of grief over your decision to teach people, rather than directly getting involved with local groups. She'd been volunteering a lot since retiring.}
All in all it was an enjoyable night!
"
+ },
+ {
+ id : "theEnd",
+ text : "As the years progressed, you watched the world around you changing. Knowing that you'd had a hand, even in some small way, in how things turned out.
(Thanks for playing! You can hit 'refresh' on the browser window now)
"
}
]
- var sceneText = sceneScreens.filter(function(v) { return v.id === id; })[0].text;
+
+ var lookup;
+ if (id.substring(0,6) == "intro:") { //if we're just using the intro as an interstitial scene, not actually running the scene...
+ lookup = id.substring(6,id.length);
+ }
+ else { lookup = id; }
+ var sceneText = sceneScreens.filter(function(v) { return v.id === lookup; })[0].text;
+ sceneText = Templates.render(sceneText);
Display.setSceneIntro(sceneText, id);
};
diff --git a/StoryAssembler/data/knobs/beach.json b/StoryAssembler/data/knobs/beach.json
index 807eb7e..25426c4 100644
--- a/StoryAssembler/data/knobs/beach.json
+++ b/StoryAssembler/data/knobs/beach.json
@@ -253,6 +253,10 @@
{
"id": "coworkerOptimism_low",
"content": "\"I don't know, {name|protagonist},\" {name|volunteer} said. \"I mean, we've been pushing this project for what, five years? At what point do we admit we're just not making a difference?\"",
+ "choices" : [
+ {"gotoId" : "cheerUp"},
+ {"gotoId" : "differenceSmallOrBig"}
+ ],
"effects" : [
"set showCoworkerOptimism true"
],
@@ -261,6 +265,26 @@
]
},
+ {
+ "id" : "cheerUp",
+ "choiceLabel" : "{ifState|protagonistOptimism|low|Well...uh...|Hey, cheer up!}",
+ "content" : "{ifState|protagonistOptimism|low|(\"I hear you. I mean, I'll admit I'm not feeling terribly optimistic about the future either. Sometimes it even keeps me up at night. But it doesn't help to be down about it. I mean we're doing something, so that counts for something? I guess?\"
{name|volunteer} looks extremely unconvinced.)|(\"Come on, {name|volunteer}! Stop being so doom and gloom! I mean, it's a job, right? So at the least we can be happy we're doing something for a 9 to 5. Could be worse?\"
{name|volunteer} looks extremely unconvinced.)}",
+ "conditions" : [
+ "coworkerOptimism eq low"
+ ]
+ },
+ {
+ "id" : "differenceSmallOrBig",
+ "choiceLabel" : "But we are making a difference.",
+ "content" : "{ifState|protagonistOptimism|low|(\"I mean, it may not be a big difference,\" you say. \"Heck, even after the stuff I've done, it's hard sometimes to see if it matters. But the most important thing is that we're out here trying. Doing the best we can. Some days that's enough. So let's get back to work and see what we can do, huh?\"
{name|volunteer} nods. \"Yeah, I guess you're right. Thanks, {name|protagonist}.\")|(\"These things are all inter-connected. That's what makes climate change so challenging to study. We sometimes have trouble seeing the importance or scale of all the different aspects. You and I are doing good work out here. Trust me.\"
{name|volunteer} nods. \"Well, ok I suppose. I mean, that's why I signed up, right? Got tired of just sitting around doing nothing about it. Thanks, Emma.\")}",
+ "conditions" : [
+ "coworkerOptimism eq low"
+ ],
+ "effects" : [
+ "set coworkerOptimism high"
+ ]
+ },
+
{
"id": "coworkerOptimism_high",
@@ -359,7 +383,7 @@
"choiceLabel" : "Break the silence",
"content" : "After about half an hour of quietly working, you feel the need to hear another human voice. You clear your throat. {name|volunteer} looks up.",
"conditions" : [
- // "effort gte 3"
+ //"effort gte 3"
],
"effects": [
"set expendEffort true"
diff --git a/StoryAssembler/data/knobs/lecture.json b/StoryAssembler/data/knobs/lecture.json
index 14388c9..4f0208e 100644
--- a/StoryAssembler/data/knobs/lecture.json
+++ b/StoryAssembler/data/knobs/lecture.json
@@ -51,7 +51,8 @@ Todo:
"set student2 true",
"set talkToStudent 3",
"set followUp true",
- "set lectureEnd true"
+ "set lectureEnd true",
+ "set failedLecture true" //flag so we know we failed
]
},
@@ -264,8 +265,8 @@ Todo:
"choiceLabel": "Just a few more examples",
"content": "You present a few more quick facts before continuing. {ifStateCondition|concentration gte 5|So far, it seems like it's going well. \"Those|Some people are yawning in the front row. \"Th-those} were just a few examples of things we'll be covering. Besides effects of climate change, you'll also learn how each of you can help out, both locally and on the global scale.\"",
"choices": [
- {"gotoId": "lectureBridge"}
- // {"gotoId": "seminarBridge"}
+ {"gotoId": "lectureBridge"},
+ {"gotoId": "seminarBridge"}
],
"effects": [
"set lectureFinished true"
@@ -294,7 +295,8 @@ Todo:
"choiceLabel": "Take some questions",
"content": "\"{ifStateCondition|concentration gte 5|Well that's enough talking from me.|Oh umm, I think I might be talking a bit too much.} Because this is not a lecture, {ifStateCondition|concentration gte 5|we should have a discussion about climate change.|umm, I guess we can try to have a discussion about climate change.} Does anyone want to start off with a question?\"",
"effects": [
- "set bridgeFinished true"
+ "set bridgeFinished true",
+ "set doneTalking true"
],
"conditions": [
"lectureFinished eq true",
@@ -422,7 +424,7 @@ Todo:
{
"id" : "student2Intro",
- "unavailableChoiceLabel" : "Already called on {name|student1}.",
+ "unavailableChoiceLabel" : "Already called on {name|student2}.",
"choiceLabel" : "...the student frowning skeptically, but shy.",
"content" : "Better to take on some students that seem on the fence.",
"effects" : [
@@ -437,9 +439,9 @@ Todo:
{
"id" : "student3Intro",
- "unavailableChoiceLabel" : "Already called on {name|student2}.",
+ "unavailableChoiceLabel" : "Already called on {name|student3}.",
"choiceLabel" : "...the student earnestly waving her hand.",
- "content" : "You know you can count on {name|student2}, at least, for some enthusiastic conversation. Hopefully others will pick up on the energy.",
+ "content" : "You know you can count on {name|student3}, at least, for some enthusiastic conversation. Hopefully others will pick up on the energy.",
"effects" : [
"incr talkToStudent 1",
"set doneTalking false",
@@ -471,38 +473,38 @@ Todo:
"questionsLeft gt 0"
]
},
- {
- "id" : "logicResponse",
- "choiceLabel" : "Turn to the facts.",
- "content" : "\"Well...while there might be a number of people who believe in the same thing that your mother does, the facts don't lie. We'll go over specifics in future classes, but here are just some rough statistics for you. The global temperature has increased by 1.7 degrees fahrenheit since 1880, and the minimum amount of arctic ice decreases about 13.3 percent each decade.\"",
- "effects" : [
- "incr optimism 1",
- "incr hope 1",
- "incr curiosity 1",
- "set doneTalking true"
- ]
- },
-
- {
- "id" : "sourResponse",
- "choiceLabel" : "\"Really? A conspiracy?\"",
- "content" : "\"So let me get this straight, there are hundreds of thousands of scientist around the world who dedicate their lives to studying climate change, and your mother claims they're all lying? 95% of those scientist can prove, using real data that they or their peers worked hard to collect, that the Earth's climate is changing.\"",
- "effects" : [
- "decr skepticCuriosity 2",
- "set doneTalking true"
- ]
- },
-
- {
- "id" : "valueResponse",
- "choiceLabel" : "\"Your mom is biased\"",
- "content" : "\"Big oil companies like Tysoncorp are one of the leading causes of climate change. If laws and regulations passed to limit their carbon emissions, then it would probably hurt their profits. So of course your mother would say it's a conspiracy. But the facts don't lie.\"",
- "effects" : [
- "incr optimism 1",
- "incr curiosity 1",
- "set doneTalking true"
- ]
- },
+ {
+ "id" : "logicResponse",
+ "choiceLabel" : "Turn to the facts.",
+ "content" : "\"Well...while there might be a number of people who believe in the same thing that your mother does, the facts don't lie. We'll go over specifics in future classes, but here are just some rough statistics for you. The global temperature has increased by 1.7 degrees fahrenheit since 1880, and the minimum amount of arctic ice decreases about 13.3 percent each decade.\"",
+ "effects" : [
+ "incr optimism 1",
+ "incr hope 1",
+ "incr curiosity 1",
+ "set doneTalking true"
+ ]
+ },
+
+ {
+ "id" : "sourResponse",
+ "choiceLabel" : "\"Really? A conspiracy?\"",
+ "content" : "\"So let me get this straight, there are hundreds of thousands of scientist around the world who dedicate their lives to studying climate change, and your mother claims they're all lying? 95% of those scientist can prove, using real data that they or their peers worked hard to collect, that the Earth's climate is changing.\"",
+ "effects" : [
+ "decr skepticCuriosity 2",
+ "set doneTalking true"
+ ]
+ },
+
+ {
+ "id" : "valueResponse",
+ "choiceLabel" : "\"Your mom is biased\"",
+ "content" : "\"Big oil companies like Tysoncorp are one of the leading causes of climate change. If laws and regulations passed to limit their carbon emissions, then it would probably hurt their profits. So of course your mother would say it's a conspiracy. But the facts don't lie.\"",
+ "effects" : [
+ "incr optimism 1",
+ "incr curiosity 1",
+ "set doneTalking true"
+ ]
+ },
{
"id" : "franklinFollowUp",
@@ -528,50 +530,50 @@ Todo:
]
},
- {
- "id": "followUpAnswer1",
- "choiceLabel": "\"The changes are more impactful than you think.\"",
- "content": "\"Well, {ifStateCondition|concentration lt 5|uhhh,|}the impact of climate change is much larger than you think. {ifStateCondition|concentration lt 5|If I remember correctly... |}The sea level has been steadily rising for the past 200 years. It is projected to rise another 1 to 4 feet in the next century. That is enough to cause many low sea level areas to flood. We're also seeing stronger, more frequent hurricanes, which I'm sure is something you'd rather avoid.\"",
- "effects": [
- "decr optimism 1",
- "decr hope 1"
- ],
- "choices": [{
- "gotoId": "establishStudents"
- }]
- },
-
- {
- "id": "followUpAnswer2",
- "choiceLabel": "\"It is still our home.\"",
- "content": "\"We only have this planet, so it's our duty to take care of it. You don't burn down your house when you're moving out because you want it to be clean for the next family. We won't be the last generation living here and it is our job to make sure the planet survives for many more generations.\"",
- "effects": [
- "incr optimism 1",
- "incr hope 1"
- ],
- "choices": [{
- "gotoId": "establishStudents"
- }]
- },
-
- {
- "id": "followUpAnswer3",
- "choiceLabel": "\"Well, you don't have to care.\"",
- "content": "\"Whether you care or not is up to you. You're right, we won't be around to see all of the arctic ice melt and swallow up coastal cities, or feel the temperature increase to unbearable levels. But if each of us does our part, we can help prevent our decendants from experiencing the slow death of our planet.\"",
- "effects": [
- "decr optimism 1",
- "decr curiosity 1"
- ],
- "choices": [{
- "gotoId": "establishStudents"
- }]
- },
+ {
+ "id": "followUpAnswer1",
+ "choiceLabel": "\"The changes are more impactful than you think.\"",
+ "content": "\"Well, {ifStateCondition|concentration lt 5|uhhh,|}the impact of climate change is much larger than you think. {ifStateCondition|concentration lt 5|If I remember correctly... |}The sea level has been steadily rising for the past 200 years. It is projected to rise another 1 to 4 feet in the next century. That is enough to cause many low sea level areas to flood. We're also seeing stronger, more frequent hurricanes, which I'm sure is something you'd rather avoid.\"",
+ "effects": [
+ "decr optimism 1",
+ "decr hope 1"
+ ],
+ "choices": [{
+ "gotoId": "establishStudents"
+ }]
+ },
+
+ {
+ "id": "followUpAnswer2",
+ "choiceLabel": "\"It is still our home.\"",
+ "content": "\"We only have this planet, so it's our duty to take care of it. You don't burn down your house when you're moving out because you want it to be clean for the next family. We won't be the last generation living here and it is our job to make sure the planet survives for many more generations.\"",
+ "effects": [
+ "incr optimism 1",
+ "incr hope 1"
+ ],
+ "choices": [{
+ "gotoId": "establishStudents"
+ }]
+ },
+
+ {
+ "id": "followUpAnswer3",
+ "choiceLabel": "\"Well, you don't have to care.\"",
+ "content": "\"Whether you care or not is up to you. You're right, we won't be around to see all of the arctic ice melt and swallow up coastal cities, or feel the temperature increase to unbearable levels. But if each of us does our part, we can help prevent our decendants from experiencing the slow death of our planet.\"",
+ "effects": [
+ "decr optimism 1",
+ "decr curiosity 1"
+ ],
+ "choices": [{
+ "gotoId": "establishStudents"
+ }]
+ },
//--------Franklin (POSITIVE)------------------------------------------
{
"id" : "franklinIntroOptimistic",
- "unavailableChoiceLabel" : "Already called on {name|skepticStudent}.",
+ "unavailableChoiceLabel" : "Already called on {name|student1}.",
"choiceLabel" : "\"Yes, {name|student1}?\"",
"content" : "\"My mom runs the energy division of TysonCorp, and she told me that most of the climate change stuff in the news is exaggerated, and that corporations will get it under control, once it's profitable for them to do so. What do you think of that?\"",
"choices" : [
@@ -587,25 +589,25 @@ Todo:
]
},
- {
- "id" : "optLogicResponse",
- "choiceLabel" : "Turn to the facts.",
- "content" : "\"Well, corporations are the largest contributors to climate change, so they have a critical role to play in reducing emissions. However, having regulations in place that can enforce reductions means the mandate can't come from PR or profitability, but public welfare.\"",
- "effects" : [
- "incr optimism 1",
- "incr hope 1",
- "incr curiosity 1"
- ]
- },
-
- {
- "id" : "optSourResponse",
- "choiceLabel" : "\"Really? We should trust corporations?\"",
- "content" : "You can't believe {name|skepticStudent}'s actually this naive. \"So let me get this straight: we should rely on the profitability of avoiding mass extinction events to drive public action? Call me skeptical, but given those same corporations are largely responsible for this predicament, I don't think we can rely on them to get us out of it.\"",
- "effects" : [
- "decr skepticCuriosity 2"
- ]
- },
+ {
+ "id" : "optLogicResponse",
+ "choiceLabel" : "Turn to the facts.",
+ "content" : "\"Well, corporations are the largest contributors to climate change, so they have a critical role to play in reducing emissions. However, having regulations in place that can enforce reductions means the mandate can't come from PR or profitability, but public welfare.\"",
+ "effects" : [
+ "incr optimism 1",
+ "incr hope 1",
+ "incr curiosity 1"
+ ]
+ },
+
+ {
+ "id" : "optSourResponse",
+ "choiceLabel" : "\"Really? We should trust corporations?\"",
+ "content" : "You can't believe {name|student1}'s actually this naive. \"So let me get this straight: we should rely on the profitability of avoiding mass extinction events to drive public action? Call me skeptical, but given those same corporations are largely responsible for this predicament, I don't think we can rely on them to get us out of it.\"",
+ "effects" : [
+ "decr skepticCuriosity 2"
+ ]
+ },
{
"id" : "optFranklinFollowUp",
@@ -630,31 +632,31 @@ Todo:
]
},
- {
- "id": "optFollowUpAnswer1",
- "choiceLabel": "\"Small changes snowball.\"",
- "content": "\"It may seem like it's not a lot, but if all of us are recycling, and especially if we're supporting businesses that are working to combat climate change, those effects snowball. And, I suppose, it sends a signal to people like your mother, to hopefully help them set their company's mandate.\"",
- "effects": [
- "incr optimism 1",
- "incr hope 1"
- ],
- "choices": [{
- "gotoId": "establishStudents"
- }]
- },
-
- {
- "id": "optFollowUpAnswer2",
- "choiceLabel": "\"It's still our home.\"",
- "content": "\"We only have this planet, so it's our duty to take care of it. You don't burn down your house when you're moving out because you want it to be clean for the next family. We won't be the last generation living here and it is our job to make sure the planet survives for many more generations. We each have to do our part.\"",
- "effects": [
- "incr optimism 1",
- "incr hope 1"
- ],
- "choices": [{
- "gotoId": "establishStudents"
- }]
- },
+ {
+ "id": "optFollowUpAnswer1",
+ "choiceLabel": "\"Small changes snowball.\"",
+ "content": "\"It may seem like it's not a lot, but if all of us are recycling, and especially if we're supporting businesses that are working to combat climate change, those effects snowball. And, I suppose, it sends a signal to people like your mother, to hopefully help them set their company's mandate.\"",
+ "effects": [
+ "incr optimism 1",
+ "incr hope 1"
+ ],
+ "choices": [{
+ "gotoId": "establishStudents"
+ }]
+ },
+
+ {
+ "id": "optFollowUpAnswer2",
+ "choiceLabel": "\"It's still our home.\"",
+ "content": "\"We only have this planet, so it's our duty to take care of it. You don't burn down your house when you're moving out because you want it to be clean for the next family. We won't be the last generation living here and it is our job to make sure the planet survives for many more generations. We each have to do our part.\"",
+ "effects": [
+ "incr optimism 1",
+ "incr hope 1"
+ ],
+ "choices": [{
+ "gotoId": "establishStudents"
+ }]
+ },
//---------ELIKA (POSITIVE)----------------------------
@@ -691,58 +693,58 @@ Todo:
]
},
-{
- "id" : "encouragingResponse",
- "choiceLabel" : "Yeah, absolutely!",
- "content" : "{ifStateCondition|concentration gte 5|Looking around at all the bored and unconvinced faces, you decide to say |You have absolutely no idea how to tell Élika that she's got some of her facts wrong, so you stammer out} \"That is an excellent point, Élika. Carbon capture and storage is likely to reduce fossil fuel emissions by quite a lot, which would help with the acidity rise in the oceans.\"
{name|student3} beams, though you notice faces that aren't as happy.",
- "effects" : [
- "incr optimism 1",
- "incr hope 1",
- "decr curiosity 1",
- ],
- "choices" : [
- {"gotoId" : "elikaFollowUp"}
- ]
-},
-
-{
- "id" : "gentleResponse",
- "choiceLabel" : "It's actually a bit more complicated than that.",
- "content" : "{ifStateCondition|concentration gte 5|\"It's not exactly taking carbon dioxide out of the air itself - it's capturing the CO2 at the energy plants before it's released into the atmosphere,\" you explain. \"Carbon capture actually takes a significant amount of energy - which would mean some of a plant's regular output would also be lost.\"
Élika's face turns thoughtful. |\"See, carbon capture - like, the actual capturing of... carbon... that is, taking it from um, the gas, or the coal itself, you know, at the factories - the power plants, sorry - takes a lot of energy - oh, and CCS is actually done inside power plants.\" You halt awkwardly. \"Yeah.\"
Élika blinks at you. Then blinks again. \"...huh?\"}",
- "effects" : [
- "decr optimism 1",
- "incr hope 1",
- "incr curiosity 1",
- "incr concentration 1"
- ],
- "choices" : [
- {"gotoId" : "elikaFollowUp"}
- ]
-},
-
-{
- "id" : "bluntResponse",
- "choiceLabel" : "No, you've got your facts wrong.",
- "content" : "\"If we could physically take the CO2 out of our atmosphere like a tree does, that would be spectacular,\" you say. \"But don't believe the hype. It's actually done at the power plants, either before or after the coal gets burned - and it would take a lot of energy, reducing the plant's output, so it's not likely to be adopted as the technology currently stands.\"",
- "effects" : [
- "decr optimism 2",
- "decr hope 1",
- "decr curiosity 1",
- "decr concentration 1"
- ],
- "choices" : [
- {"gotoId" : "bluntResponse2"}
- ]
-},
-
-{
- "id" : "bluntResponse2",
- "choiceLabel" : "Continue",
- "content" : "\"And frankly,\" you continue, \"it would be way better if we stuck to cleaner energies that already exist then trying to make coal 'clean'.\"
{name|student3}'s smile had faded from her face a long time ago. As well as many others'.",
- "choices" : [
- {"gotoId" : "elikaFollowUp"}
- ]
-},
+ {
+ "id" : "encouragingResponse",
+ "choiceLabel" : "Yeah, absolutely!",
+ "content" : "{ifStateCondition|concentration gte 5|Looking around at all the bored and unconvinced faces, you decide to say |You have absolutely no idea how to tell Élika that she's got some of her facts wrong, so you stammer out} \"That is an excellent point, Élika. Carbon capture and storage is likely to reduce fossil fuel emissions by quite a lot, which would help with the acidity rise in the oceans.\"
{name|student3} beams, though you notice faces that aren't as happy.",
+ "effects" : [
+ "incr optimism 1",
+ "incr hope 1",
+ "decr curiosity 1",
+ ],
+ "choices" : [
+ {"gotoId" : "elikaFollowUp"}
+ ]
+ },
+
+ {
+ "id" : "gentleResponse",
+ "choiceLabel" : "It's actually a bit more complicated than that.",
+ "content" : "{ifStateCondition|concentration gte 5|\"It's not exactly taking carbon dioxide out of the air itself - it's capturing the CO2 at the energy plants before it's released into the atmosphere,\" you explain. \"Carbon capture actually takes a significant amount of energy - which would mean some of a plant's regular output would also be lost.\"
Élika's face turns thoughtful. |\"See, carbon capture - like, the actual capturing of... carbon... that is, taking it from um, the gas, or the coal itself, you know, at the factories - the power plants, sorry - takes a lot of energy - oh, and CCS is actually done inside power plants.\" You halt awkwardly. \"Yeah.\"
Élika blinks at you. Then blinks again. \"...huh?\"}",
+ "effects" : [
+ "decr optimism 1",
+ "incr hope 1",
+ "incr curiosity 1",
+ "incr concentration 1"
+ ],
+ "choices" : [
+ {"gotoId" : "elikaFollowUp"}
+ ]
+ },
+
+ {
+ "id" : "bluntResponse",
+ "choiceLabel" : "No, you've got your facts wrong.",
+ "content" : "\"If we could physically take the CO2 out of our atmosphere like a tree does, that would be spectacular,\" you say. \"But don't believe the hype. It's actually done at the power plants, either before or after the coal gets burned - and it would take a lot of energy, reducing the plant's output, so it's not likely to be adopted as the technology currently stands.\"",
+ "effects" : [
+ "decr optimism 2",
+ "decr hope 1",
+ "decr curiosity 1",
+ "decr concentration 1"
+ ],
+ "choices" : [
+ {"gotoId" : "bluntResponse2"}
+ ]
+ },
+
+ {
+ "id" : "bluntResponse2",
+ "choiceLabel" : "Continue",
+ "content" : "\"And frankly,\" you continue, \"it would be way better if we stuck to cleaner energies that already exist then trying to make coal 'clean'.\"
{name|student3}'s smile had faded from her face a long time ago. As well as many others'.",
+ "choices" : [
+ {"gotoId" : "elikaFollowUp"}
+ ]
+ },
{
"id" : "elikaFollowUp",
@@ -754,15 +756,15 @@ Todo:
],
},
-{
- "id": "questionBridge",
- "choiceLabel": "Call on another student.",
- "content": "You check the clock. {ifStateCondition|concentration lt 3|Your heart jumps in your chest. You're running out of time.|A good place to move on, you decide.} You look around the room for more questions.",
- "repeatable" : "true",
- "choices" : [
- {"gotoId" : "establishStudents"}
- ]
-},
+ {
+ "id": "questionBridge",
+ "choiceLabel": "Call on another student.",
+ "content": "You check the clock. {ifStateCondition|concentration lt 3|Your heart jumps in your chest. You're running out of time.|A good place to move on, you decide.} You look around the room for more questions.",
+ "repeatable" : "true",
+ "choices" : [
+ {"gotoId" : "establishStudents"}
+ ]
+ },
{
"id" : "elikaQuestion2",
@@ -779,47 +781,47 @@ Todo:
]
},
-{
- "id" : "positiveResponse",
- "choiceLabel" : "I think so.",
- "content" : "\"I mean, we've already come so far with technology and science,\" you say. \"I'm sure that--now that we're aware of the problems CO2 is causing--we can fix them.\"
{name|student3}'s eyes brighten.'",
- "effects" : [
- "incr optimism 1",
- "incr hope 1",
- "decr curiosity 1",
- ],
- "choices" : [
- {"gotoId" : "establishStudents"}
- ]
-},
-
-{
- "id" : "negativeResponse",
- "choiceLabel" : "I doubt it.",
- "content" : "\"As far as we've come with technology and science, change takes course over a long period of time,\" you say. \"We'll have to undo a lot of effects we've already caused, and sometimes fixing's more difficult to do.\"
{name|student3} looks down, but nods in what you hope is understanding.",
- "effects" : [
- "decr optimism 1",
- "decr hope 1",
- "incr curiosity 1",
- "incr concentration 1"
- ],
- "choices" : [
- {"gotoId" : "establishStudents"}
- ]
-},
-
-{
- "id" : "curtResponse",
- "choiceLabel" : "Don't be ridiculous.",
- "content" : "\"I mean, if you think about it, we've come so far with technology and science that a lot of damage has already been done,\" you say. \"Not to mention it's hard to convince people to give up the comfort and convenience of things like cars to try and make a difference in the amount of CO2 we already release daily.\"
{name|student3} avoids your gaze.",
- "effects" : [
- "decr concentration 1",
- "decr hope 1"
- ],
- "choices" : [
- {"gotoId" : "establishStudents"}
- ]
-},
+ {
+ "id" : "positiveResponse",
+ "choiceLabel" : "I think so.",
+ "content" : "\"I mean, we've already come so far with technology and science,\" you say. \"I'm sure that--now that we're aware of the problems CO2 is causing--we can fix them.\"
{name|student3}'s eyes brighten.'",
+ "effects" : [
+ "incr optimism 1",
+ "incr hope 1",
+ "decr curiosity 1",
+ ],
+ "choices" : [
+ {"gotoId" : "establishStudents"}
+ ]
+ },
+
+ {
+ "id" : "negativeResponse",
+ "choiceLabel" : "I doubt it.",
+ "content" : "\"As far as we've come with technology and science, change takes course over a long period of time,\" you say. \"We'll have to undo a lot of effects we've already caused, and sometimes fixing's more difficult to do.\"
{name|student3} looks down, but nods in what you hope is understanding.",
+ "effects" : [
+ "decr optimism 1",
+ "decr hope 1",
+ "incr curiosity 1",
+ "incr concentration 1"
+ ],
+ "choices" : [
+ {"gotoId" : "establishStudents"}
+ ]
+ },
+
+ {
+ "id" : "curtResponse",
+ "choiceLabel" : "Don't be ridiculous.",
+ "content" : "\"I mean, if you think about it, we've come so far with technology and science that a lot of damage has already been done,\" you say. \"Not to mention it's hard to convince people to give up the comfort and convenience of things like cars to try and make a difference in the amount of CO2 we already release daily.\"
{name|student3} avoids your gaze.",
+ "effects" : [
+ "decr concentration 1",
+ "decr hope 1"
+ ],
+ "choices" : [
+ {"gotoId" : "establishStudents"}
+ ]
+ },
//-----------ELIKA (NEGATIVE)-------------------------------------------------
@@ -977,320 +979,320 @@ Todo:
//-----------AIDEN (optimistic)-------------------------------------------------
- {
- "id" : "aidenIntro",
- "unavailableChoiceLabel" : "Already called on Aiden.",
- "choiceLabel" : "\"Yes, {name|student2}?\"",
- "content" : "{name|student2} looks ready to crawl under their desk when your attention turns to them. \"U-um, uh, I- I get that the ac- that the rise in acidity is a problem, but...\" they gesture, as if trying to pluck the right word from the air. \"What can we do about it?\"",
- "choices" : [
- {"gotoId" : "aidenNext"},
- ],
- "effects" : [
- "set student2 true",
- "incr optimisticStudent 1"
- ],
- "conditions" : [
- "questionsLeft gt 0"
- ]
- },
+{
+ "id" : "aidenIntro",
+ "unavailableChoiceLabel" : "Already called on Aiden.",
+ "choiceLabel" : "\"Yes, {name|student2}?\"",
+ "content" : "{name|student2} looks ready to crawl under their desk when your attention turns to them. \"U-um, uh, I- I get that the ac- that the rise in acidity is a problem, but...\" they gesture, as if trying to pluck the right word from the air. \"What can we do about it?\"",
+ "choices" : [
+ {"gotoId" : "aidenNext"},
+ ],
+ "effects" : [
+ "set student2 true",
+ "incr optimisticStudent 1"
+ ],
+ "conditions" : [
+ "questionsLeft gt 0"
+ ]
+},
- {
- "id" : "aidenNext",
- "choiceLabel" : "Continue",
- "content" : "Their eyes fall upon their desk. \"Even if more people ride bikes or whatever, there are still so many cars pumping all that carbon dioxide into the air - sometimes I look out the window and just see the millions of cars in traffic and think, 'Geez, we've gone too far to turn back now. No one wants to give up their car.'\"",
- "choices" : [
- {"gotoId" : "hopefulResponse"},
- {"gotoId" : "pessimisticResponse"},
- {"gotoId" : "harshResponse"}
- ],
- "effects" : [
-
- ],
- },
+{
+ "id" : "aidenNext",
+ "choiceLabel" : "Continue",
+ "content" : "Their eyes fall upon their desk. \"Even if more people ride bikes or whatever, there are still so many cars pumping all that carbon dioxide into the air - sometimes I look out the window and just see the millions of cars in traffic and think, 'Geez, we've gone too far to turn back now. No one wants to give up their car.'\"",
+ "choices" : [
+ {"gotoId" : "hopefulResponse"},
+ {"gotoId" : "pessimisticResponse"},
+ {"gotoId" : "harshResponse"}
+ ],
+ "effects" : [
+
+ ],
+ },
- {
- "id" : "hopefulResponse",
- "choiceLabel" : "There's still hope.",
- "content" : "\"True, the amount of carbon dioxide released into the atmosphere is making a noticeable impact on our planet,\" you say. \"But we're acknowledging these problems, right?
For example, did you know that 16.9% of energy generation in 2016 comes from renewable energy? Which may not seem much until you compare it to the 13% just the year before.",
- "effects" : [
- "incr optimism 1",
- "incr hope 1",
- "incr curiosity 1",
- "incr concentration 1"
- ],
- "choices" : [
- {"gotoId" : "hopefulResponse2"},
- ],
- },
+ {
+ "id" : "hopefulResponse",
+ "choiceLabel" : "There's still hope.",
+ "content" : "\"True, the amount of carbon dioxide released into the atmosphere is making a noticeable impact on our planet,\" you say. \"But we're acknowledging these problems, right?
For example, did you know that 16.9% of energy generation in 2016 comes from renewable energy? Which may not seem much until you compare it to the 13% just the year before.",
+ "effects" : [
+ "incr optimism 1",
+ "incr hope 1",
+ "incr curiosity 1",
+ "incr concentration 1"
+ ],
+ "choices" : [
+ {"gotoId" : "hopefulResponse2"},
+ ],
+ },
- {
- "id" : "hopefulResponse2",
- "choiceLabel" : "Continue",
- "content" : "You smile at {name|student2}. \"We're making progress, and that's the most important thing to hold on to. After all, if we just stop doing anything, nothing will ever change. Then there's zero chance anything will get better.\"",
- "choices" : [
- {"gotoId" : "aidenFollowUp"}
- ]
- },
+ {
+ "id" : "hopefulResponse2",
+ "choiceLabel" : "Continue",
+ "content" : "You smile at {name|student2}. \"We're making progress, and that's the most important thing to hold on to. After all, if we just stop doing anything, nothing will ever change. Then there's zero chance anything will get better.\"",
+ "choices" : [
+ {"gotoId" : "aidenFollowUp"}
+ ]
+ },
- {
- "id" : "pessimisticResponse",
- "choiceLabel" : "Humans can never change.",
- "content" : "\"True, it's not looking good for us, sadly. {ifStateCondition|concentration lt 3|Humans are selfish and...and greedy creatures who won't change because we're too busy thinking about ourselves to realize this impacts us too!|Even if we magically stopped emitting greenhouse gases, the earth would still warm at least a degree Celcius, so...}\"
You stop abruptly, noticing {name|student2}'s face crumple.",
- "effects" : [
- "decr optimism 1",
- "decr hope 1",
- "decr curiosity 1",
- ],
- "choices" : [
- {"gotoId" : "aidenFollowUp"}
- ]
- },
+ {
+ "id" : "pessimisticResponse",
+ "choiceLabel" : "Humans can never change.",
+ "content" : "\"True, it's not looking good for us, sadly. {ifStateCondition|concentration lt 3|Humans are selfish and...and greedy creatures who won't change because we're too busy thinking about ourselves to realize this impacts us too!|Even if we magically stopped emitting greenhouse gases, the earth would still warm at least a degree Celcius, so...}\"
You stop abruptly, noticing {name|student2}'s face crumple.",
+ "effects" : [
+ "decr optimism 1",
+ "decr hope 1",
+ "decr curiosity 1",
+ ],
+ "choices" : [
+ {"gotoId" : "aidenFollowUp"}
+ ]
+ },
- {
- "id" : "harshResponse",
- "choiceLabel" : "Geez, don't be such a downer.",
- "content" : "\"That attitude's the reason change is so slow - it's because we sit around complaining about how we've ruined things instead of actually cleaning up the mess.\"
You notice {name|student2} shrinking back. You may have been a little too harsh. And unprofessional. Whoops.",
- "effects" : [
- "incr optimism 1",
- "incr hope 1",
- "incr curiosity 1",
- "decr concentration 1"
- ],
- "choices" : [
- {"gotoId" : "harshResponse2"}
- ]
- },
+ {
+ "id" : "harshResponse",
+ "choiceLabel" : "Geez, don't be such a downer.",
+ "content" : "\"That attitude's the reason change is so slow - it's because we sit around complaining about how we've ruined things instead of actually cleaning up the mess.\"
You notice {name|student2} shrinking back. You may have been a little too harsh. And unprofessional. Whoops.",
+ "effects" : [
+ "incr optimism 1",
+ "incr hope 1",
+ "incr curiosity 1",
+ "decr concentration 1"
+ ],
+ "choices" : [
+ {"gotoId" : "harshResponse2"}
+ ]
+ },
- {
- "id" : "harshResponse2",
- "choiceLabel" : "Continue",
- "content" : "{ifStateCondition|concentration gte 5|\"The point is,\" you continue, a bit more gently, \"Change is still possible. Keep your chin up.\"|\"The point is,\" you say, fumbling a bit, \"We can still do something about it. We just need to - well, actually do something.\"}",
- "choices" : [
- {"gotoId" : "aidenFollowUp"}
- ]
- },
+ {
+ "id" : "harshResponse2",
+ "choiceLabel" : "Continue",
+ "content" : "{ifStateCondition|concentration gte 5|\"The point is,\" you continue, a bit more gently, \"Change is still possible. Keep your chin up.\"|\"The point is,\" you say, fumbling a bit, \"We can still do something about it. We just need to - well, actually do something.\"}",
+ "choices" : [
+ {"gotoId" : "aidenFollowUp"}
+ ]
+ },
- {
- "id" : "aidenFollowUp",
- "choiceLabel" : "Continue",
- "content" : "{name|student2} looks like they have another question. Take it? Or call on another student?",
- "choices" : [
- {"gotoId" : "aidenQuestion2"},
- {"gotoId" : "questionBridge"}
- ],
- "conditions" : ["student2 eq true"],
- "effects" : [
- "set doneTalking true"
- ]
- },
+ {
+ "id" : "aidenFollowUp",
+ "choiceLabel" : "Continue",
+ "content" : "{name|student2} looks like they have another question. Take it? Or call on another student?",
+ "choices" : [
+ {"gotoId" : "aidenQuestion2"},
+ {"gotoId" : "questionBridge"}
+ ],
+ "conditions" : ["student2 eq true"],
+ "effects" : [
+ "set doneTalking true"
+ ]
+ },
- {
- "id" : "aidenQuestion2",
- "choiceLabel" : "Take another question.",
- "content" : "\"So, um,\" comes {name|student2}'s soft voice. \"Then - what can I> do?\"",
- "choices" : [
- {"gotoId" : "academicResponse"},
- {"gotoId" : "localResponse"},
- {"gotoId" : "hopelessResponse"}
- ],
- "effects" : [
- "set followUp true",
- "decr questionsLeft 1"
- ]
- },
+ {
+ "id" : "aidenQuestion2",
+ "choiceLabel" : "Take another question.",
+ "content" : "\"So, um,\" comes {name|student2}'s soft voice. \"Then - what can I> do?\"",
+ "choices" : [
+ {"gotoId" : "academicResponse"},
+ {"gotoId" : "localResponse"},
+ {"gotoId" : "hopelessResponse"}
+ ],
+ "effects" : [
+ "set followUp true",
+ "decr questionsLeft 1"
+ ]
+ },
- {
- "id" : "academicResponse",
- "choiceLabel" : "Educate.",
- "content" : "\"Educate yourself about what's going on and how you can help - and teach others. You can get involved in some of our research projects here...there's also the path of becoming a professor,\" you say. {name|student2} nods.",
- "effects" : [
- "incr hope 1"
- ],
- "choices" : [
- {"gotoId" : "establishStudents"}
- ]
- },
+ {
+ "id" : "academicResponse",
+ "choiceLabel" : "Educate.",
+ "content" : "\"Educate yourself about what's going on and how you can help - and teach others. You can get involved in some of our research projects here...there's also the path of becoming a professor,\" you say. {name|student2} nods.",
+ "effects" : [
+ "incr hope 1"
+ ],
+ "choices" : [
+ {"gotoId" : "establishStudents"}
+ ]
+ },
- {
- "id" : "localResponse",
- "choiceLabel" : "Find out what you can do within your community.",
- "content" : "\"Volunteer, donate, see what your local issues are, participate in local politics - sometimes it's best to start small in a place you know best.\" You can't help but remember Shelly lecturing you about this.",
- "effects" : [
- "incr hope 1"
- ],
- "choices" : [
- {"gotoId" : "establishStudents"}
- ]
- },
+ {
+ "id" : "localResponse",
+ "choiceLabel" : "Find out what you can do within your community.",
+ "content" : "\"Volunteer, donate, see what your local issues are, participate in local politics - sometimes it's best to start small in a place you know best.\" You can't help but remember Shelly lecturing you about this.",
+ "effects" : [
+ "incr hope 1"
+ ],
+ "choices" : [
+ {"gotoId" : "establishStudents"}
+ ]
+ },
- {
- "id" : "hopelessResponse",
- "choiceLabel" : "There's little you can do.",
- "content" : "You're suddenly tired of this whole conversation. \"There's not much you can do,\" you say, rubbing your eyes. \"No matter what you do. The big companies dump so much CO2 that the most we can do is educate ourselves on how to live on a slowly dying planet.\"
{name|student2} doesn't look particularly inspired. Some students start whispering amongst themselves.",
- "effects" : [
- "decr hope 2",
- "decr confidence 1"
- ],
- "choices" : [
- {"gotoId" : "establishStudents"}
- ]
- },
+ {
+ "id" : "hopelessResponse",
+ "choiceLabel" : "There's little you can do.",
+ "content" : "You're suddenly tired of this whole conversation. \"There's not much you can do,\" you say, rubbing your eyes. \"No matter what you do. The big companies dump so much CO2 that the most we can do is educate ourselves on how to live on a slowly dying planet.\"
{name|student2} doesn't look particularly inspired. Some students start whispering amongst themselves.",
+ "effects" : [
+ "decr hope 2",
+ "decr confidence 1"
+ ],
+ "choices" : [
+ {"gotoId" : "establishStudents"}
+ ]
+ },
- //----Aiden (antagonistic)---------------------------------------------------------
+ //----Aiden (antagonistic)---------------------------------------------------------
- {
- "id" : "antAidenIntro",
- "unavailableChoiceLabel" : "Already called on Aiden.",
- "choiceLabel" : "\"Yes, {name|student2}?\"",
- "content" : "{name|student2} glances around, as if looking for support. \"U-um, uh, I- I get that the...that the acidity is a problem, but...\" they gesture, as if trying to pluck the right word from the air. \"I mean, it's not like we can do anything about it?\"",
- "choices" : [
- {"gotoId" : "antAidenNext"},
- ],
- "effects" : [
- "set student2 true",
- "incr antagonisticStudent 1"
- ],
- "conditions" : [
- "questionsLeft gt 0"
- ]
- },
+{
+ "id" : "antAidenIntro",
+ "unavailableChoiceLabel" : "Already called on Aiden.",
+ "choiceLabel" : "\"Yes, {name|student2}?\"",
+ "content" : "{name|student2} glances around, as if looking for support. \"U-um, uh, I- I get that the...that the acidity is a problem, but...\" they gesture, as if trying to pluck the right word from the air. \"I mean, it's not like we can do anything about it?\"",
+ "choices" : [
+ {"gotoId" : "antAidenNext"},
+ ],
+ "effects" : [
+ "set student2 true",
+ "incr antagonisticStudent 1"
+ ],
+ "conditions" : [
+ "questionsLeft gt 0"
+ ]
+},
- {
- "id" : "antAidenNext",
- "choiceLabel" : "Continue",
- "content" : "They start talking faster as your eyebrows raise. \"Well, uh...even if more people ride bikes or whatever, there are still so many cars pumping all that carbon dioxide into the air - sometimes I look out the window and just see the millions of cars in traffic and think, 'It's already too late. There's no way to stop it now.'\"",
- "choices" : [
- {"gotoId" : "antHopefulResponse"},
- {"gotoId" : "antPessimisticResponse"},
- {"gotoId" : "antHarshResponse"}
- ],
- "effects" : [
- "decr questionsLeft 1"
- ],
- },
+{
+ "id" : "antAidenNext",
+ "choiceLabel" : "Continue",
+ "content" : "They start talking faster as your eyebrows raise. \"Well, uh...even if more people ride bikes or whatever, there are still so many cars pumping all that carbon dioxide into the air - sometimes I look out the window and just see the millions of cars in traffic and think, 'It's already too late. There's no way to stop it now.'\"",
+ "choices" : [
+ {"gotoId" : "antHopefulResponse"},
+ {"gotoId" : "antPessimisticResponse"},
+ {"gotoId" : "antHarshResponse"}
+ ],
+ "effects" : [
+ "decr questionsLeft 1"
+ ],
+ },
- {
- "id" : "antHopefulResponse",
- "choiceLabel" : "There's still hope.",
- "content" : "\"True, the amount of carbon dioxide released into the atmosphere is making a noticeable impact on our planet,\" you say. \"But we're acknowledging these problems, right?
For example, did you know that 16.9% of energy generation in 2016 comes from renewable energy? Which may not seem much until you compare it to the 13% just the year before.\"
{name|student2} is still frowning skeptically.",
- "effects" : [
- "incr optimism 1",
- "incr hope 1",
- "incr curiosity 1",
- "incr concentration 1"
- ],
- "choices" : [
- {"gotoId" : "antHopefulResponse2"},
- ],
- },
+{
+ "id" : "antHopefulResponse",
+ "choiceLabel" : "There's still hope.",
+ "content" : "\"True, the amount of carbon dioxide released into the atmosphere is making a noticeable impact on our planet,\" you say. \"But we're acknowledging these problems, right?
For example, did you know that 16.9% of energy generation in 2016 comes from renewable energy? Which may not seem much until you compare it to the 13% just the year before.\"
{name|student2} is still frowning skeptically.",
+ "effects" : [
+ "incr optimism 1",
+ "incr hope 1",
+ "incr curiosity 1",
+ "incr concentration 1"
+ ],
+ "choices" : [
+ {"gotoId" : "antHopefulResponse2"},
+ ],
+},
- {
- "id" : "antHopefulResponse2",
- "choiceLabel" : "Continue",
- "content" : "You try a smile. \"Look, we're making progress, and that's the most important thing to hold on to. After all, if we just stop doing anything, nothing will ever change. Then there's zero chance anything will get better.\"",
- "choices" : [
- {"gotoId" : "antAidenFollowUp"}
- ]
- },
+ {
+ "id" : "antHopefulResponse2",
+ "choiceLabel" : "Continue",
+ "content" : "You try a smile. \"Look, we're making progress, and that's the most important thing to hold on to. After all, if we just stop doing anything, nothing will ever change. Then there's zero chance anything will get better.\"",
+ "choices" : [
+ {"gotoId" : "antAidenFollowUp"}
+ ]
+ },
- {
- "id" : "antPessimisticResponse",
- "choiceLabel" : "You're right. Humans can never change.",
- "content" : "\"True, it's not looking good for us, sadly. {ifStateCondition|concentration lt 3|Humans are selfish and...and greedy creatures who won't change because we're too busy thinking about ourselves to realize this impacts us too!|Even if we magically stopped emitting greenhouse gases, the earth would still warm at least a degree Celcius, so...}\"
You stop abruptly, noticing {name|student2}'s face crumple.",
- "effects" : [
- "decr optimism 1",
- "decr hope 1",
- "decr curiosity 1",
- ],
- "choices" : [
- {"gotoId" : "antAidenFollowUp"}
- ]
- },
+ {
+ "id" : "antPessimisticResponse",
+ "choiceLabel" : "You're right. Humans can never change.",
+ "content" : "\"True, it's not looking good for us, sadly. {ifStateCondition|concentration lt 3|Humans are selfish and...and greedy creatures who won't change because we're too busy thinking about ourselves to realize this impacts us too!|Even if we magically stopped emitting greenhouse gases, the earth would still warm at least a degree Celcius, so...}\"
You stop abruptly, noticing {name|student2}'s face crumple.",
+ "effects" : [
+ "decr optimism 1",
+ "decr hope 1",
+ "decr curiosity 1",
+ ],
+ "choices" : [
+ {"gotoId" : "antAidenFollowUp"}
+ ]
+ },
- {
- "id" : "antHarshResponse",
- "choiceLabel" : "Geez, don't be such a downer.",
- "content" : "\"That attitude's the reason change is so slow - it's because we sit around complaining about how we've ruined things instead of actually cleaning up the mess.\"
You notice {name|student2} shrinking back. You may have been a little too harsh. And unprofessional. Whoops.",
- "effects" : [
- "incr optimism 1",
- "incr hope 1",
- "incr curiosity 1",
- "decr concentration 1"
- ],
- "choices" : [
- {"gotoId" : "antHarshResponse2"}
- ]
- },
+ {
+ "id" : "antHarshResponse",
+ "choiceLabel" : "Geez, don't be such a downer.",
+ "content" : "\"That attitude's the reason change is so slow - it's because we sit around complaining about how we've ruined things instead of actually cleaning up the mess.\"
You notice {name|student2} shrinking back. You may have been a little too harsh. And unprofessional. Whoops.",
+ "effects" : [
+ "incr optimism 1",
+ "incr hope 1",
+ "incr curiosity 1",
+ "decr concentration 1"
+ ],
+ "choices" : [
+ {"gotoId" : "antHarshResponse2"}
+ ]
+ },
- {
- "id" : "antHarshResponse2",
- "choiceLabel" : "Continue",
- "content" : "{ifStateCondition|concentration gte 5|\"The point is,\" you continue, a bit more gently, \"Change is still possible. Keep your chin up.\"|\"The point is,\" you say, fumbling a bit, \"We can still do something about it. We just need to - well, actually do something.\"}",
- "choices" : [
- {"gotoId" : "antAidenFollowUp"}
- ]
- },
+ {
+ "id" : "antHarshResponse2",
+ "choiceLabel" : "Continue",
+ "content" : "{ifStateCondition|concentration gte 5|\"The point is,\" you continue, a bit more gently, \"Change is still possible. Keep your chin up.\"|\"The point is,\" you say, fumbling a bit, \"We can still do something about it. We just need to - well, actually do something.\"}",
+ "choices" : [
+ {"gotoId" : "antAidenFollowUp"}
+ ]
+ },
- {
- "id" : "antAidenFollowUp",
- "choiceLabel" : "Continue",
- "content" : "{name|student2} looks like they have another question. Take it? Or call on another student?",
- "choices" : [
- {"gotoId" : "antAidenQuestion2"},
- {"gotoId" : "questionBridge"}
- ],
- "conditions" : ["student2 eq true"]
- },
+ {
+ "id" : "antAidenFollowUp",
+ "choiceLabel" : "Continue",
+ "content" : "{name|student2} looks like they have another question. Take it? Or call on another student?",
+ "choices" : [
+ {"gotoId" : "antAidenQuestion2"},
+ {"gotoId" : "questionBridge"}
+ ],
+ "conditions" : ["student2 eq true"]
+ },
- {
- "id" : "antAidenQuestion2",
- "choiceLabel" : "Take another question.",
- "content" : "\"So, um,\" comes {name|student2}'s soft voice. \"Then - what can I> do?\"",
- "choices" : [
- {"gotoId" : "antAcademicResponse"},
- {"gotoId" : "antLocalResponse"},
- {"gotoId" : "antHopelessResponse"}
- ],
- "effects" : [
- "set followUp true",
- "decr questionsLeft 1"
- ]
- },
+ {
+ "id" : "antAidenQuestion2",
+ "choiceLabel" : "Take another question.",
+ "content" : "\"So, um,\" comes {name|student2}'s soft voice. \"Then - what can I> do?\"",
+ "choices" : [
+ {"gotoId" : "antAcademicResponse"},
+ {"gotoId" : "antLocalResponse"},
+ {"gotoId" : "antHopelessResponse"}
+ ],
+ "effects" : [
+ "set followUp true",
+ "decr questionsLeft 1"
+ ]
+ },
- {
- "id" : "antAcademicResponse",
- "choiceLabel" : "Educate.",
- "content" : "\"Educate yourself about what's going on and how you can help - and teach others. You can get involved in some of our research projects here...there's also the path of becoming a professor,\" you say. {name|student2} nods.",
- "effects" : [
- "incr hope 1"
- ],
- "choices" : [
- {"gotoId" : "establishStudents"}
- ]
- },
+ {
+ "id" : "antAcademicResponse",
+ "choiceLabel" : "Educate.",
+ "content" : "\"Educate yourself about what's going on and how you can help - and teach others. You can get involved in some of our research projects here...there's also the path of becoming a professor,\" you say. {name|student2} nods.",
+ "effects" : [
+ "incr hope 1"
+ ],
+ "choices" : [
+ {"gotoId" : "establishStudents"}
+ ]
+ },
- {
- "id" : "antLocalResponse",
- "choiceLabel" : "Find out what you can do within your community.",
- "content" : "\"Volunteer, donate, see what your local issues are, participate in local politics - sometimes it's best to start small in a place you know best.\" You can't help but remember Shelly lecturing you about this.",
- "effects" : [
- "incr hope 1"
- ],
- "choices" : [
- {"gotoId" : "establishStudents"}
- ]
- },
+ {
+ "id" : "antLocalResponse",
+ "choiceLabel" : "Find out what you can do within your community.",
+ "content" : "\"Volunteer, donate, see what your local issues are, participate in local politics - sometimes it's best to start small in a place you know best.\" You can't help but remember Shelly lecturing you about this.",
+ "effects" : [
+ "incr hope 1"
+ ],
+ "choices" : [
+ {"gotoId" : "establishStudents"}
+ ]
+ },
- {
- "id" : "antHopelessResponse",
- "choiceLabel" : "There's little you can do.",
- "content" : "You're suddenly tired of this whole conversation. \"There's not much you can do,\" you say, rubbing your eyes. \"No matter what you do. The big companies dump so much CO2 that the most we can do is educate ourselves on how to live on a slowly dying planet.\"
{name|student2} doesn't look particularly inspired. Some students start whispering amongst themselves.",
- "effects" : [
- "decr hope 2",
- "decr confidence 1"
- ],
- "choices" : [
- {"gotoId" : "establishStudents"}
- ]
- }
+ {
+ "id" : "antHopelessResponse",
+ "choiceLabel" : "There's little you can do.",
+ "content" : "You're suddenly tired of this whole conversation. \"There's not much you can do,\" you say, rubbing your eyes. \"No matter what you do. The big companies dump so much CO2 that the most we can do is educate ourselves on how to live on a slowly dying planet.\"
{name|student2} doesn't look particularly inspired. Some students start whispering amongst themselves.",
+ "effects" : [
+ "decr hope 2",
+ "decr confidence 1"
+ ],
+ "choices" : [
+ {"gotoId" : "establishStudents"}
+ ]
+ }
]
\ No newline at end of file
diff --git a/StoryAssembler/editor.html b/StoryAssembler/editor.html
index 3b130b2..8a20223 100644
--- a/StoryAssembler/editor.html
+++ b/StoryAssembler/editor.html
@@ -11,6 +11,8 @@
height:1500px;
width:100%;
}
+ #statsContainer, #gameContainer, #sceneIntro, #blackout, #hiddenKnobs { display: none; }
+
diff --git a/StoryAssembler/editor/editor-main-rewrite.js b/StoryAssembler/editor/editor-main-rewrite.js
index 1a274d8..4a1ea66 100644
--- a/StoryAssembler/editor/editor-main-rewrite.js
+++ b/StoryAssembler/editor/editor-main-rewrite.js
@@ -136,13 +136,16 @@ requirejs(
cycola( cytoscape, cola ); // register extension
regCose( cytoscape );
+ var wait = true;
+
var levelData;
var globalData;
var story;
+
var graphData = [];
var leftToVisit = [];
var playThroughs = [];
- var currentScene = "finalBeach"; //starting scene (you can change this in the UI from the dropdown)
+ var currentScene = "finalLecture"; //starting scene (you can change this in the UI from the dropdown)
var stories = Coordinator.getStorySpec("all");
var testStories = HanSON.parse(testData);
@@ -234,45 +237,65 @@ requirejs(
}
}
- var simulateRunthroughs = function() {
- resetStory();
-
- addToGraph([]);
- stepStory([]);
- console.log("iterStep = " + iterStep);
- return graphData;
- }
-
//resets the story and goes to first node, usually called before clicking to re-traverse the choices
- var resetStory = function() {
+ var resetStory = function(_callback) {
+ var processedWishlist = State.get("processedWishlist");
+ var knobsWishlistStateSettingsCache = State.get("knobsWishlistStateSettingsCache");
+
State.reset();
State.set("displayType", "editor");
-
- Display.processWishlistSettings(Coordinator, currentScene); //extra bit to load dynamic wishlists
+ if (typeof processedWishlist == "undefined") { //if we haven't processed the wishlist before...process it
+ $('body').append("");
+ Display.createKnobs(currentScene, "hiddenKnobs");
+ Display.populateKnobs(currentScene, Coordinator, State, State.get("scenes"));
+ setTimeout(function (){
+ Display.processWishlistSettings(Coordinator, currentScene); //extra bit to load dynamic wishlists
+ Display.initSceneScreen();
+ Coordinator.loadAvatars(currentScene);
+ Coordinator.loadStoryMaterials(currentScene);
+
+ $("#storyDiagnostics").hide();
+ $("#storyDiagnosticsButton").hide();
+ console.log("we're cool");
+ _callback();
+ }, 500);
+ }
+
+ else { //otherwise, restore the cached settings
+ State.set("processedWishlist", processedWishlist); //preserve for future
+ State.set("knobsWishlistStateSettingsCache", knobsWishlistStateSettingsCache); //preserve for future
+ State.set("dynamicWishlist", true);
+ for (var x=0; x < knobsWishlistStateSettingsCache.length; x++) {
+ var setting = knobsWishlistStateSettingsCache[x];
+ State.set(setting.key, setting.value);
+ }
+ Display.initSceneScreen();
+ Coordinator.loadAvatars(currentScene);
+ Coordinator.loadStoryMaterials(currentScene);
+
+ $("#storyDiagnostics").hide();
+ $("#storyDiagnosticsButton").hide();
+ console.log("we're cool");
+ _callback();
+ }
- Coordinator.loadAvatars(currentScene);
- Coordinator.loadStoryMaterials(currentScene);
- $("#storyDiagnostics").hide();
- $("#storyDiagnosticsButton").hide();
}
/*
resets game and clicks through until it makes the choice you've passed in
(bound as right-click action for nodes in the graph so you can click to go to them)
*/
- var gotoChoice = function(clickPath, story, levelData, globalData) {
+ var gotoChoice = function(clickPath, story, levelData, globalData, _callback) {
- resetStory(); //reset story and load first node
-
- for (var x=0; x < clickPath.length; x++) {
- //addToGraph(clickPath); //add node to graph again (so that we can collapse lines with weight)
- clickChoice(clickPath[x].clickNum); //click the choice
- }
+ resetStory(function(){
+ for (var x=0; x < clickPath.length; x++) { clickChoice(clickPath[x].clickNum); } //return to where you were before
+ addToGraph(clickPath); //add the node you're on
+ if (typeof _callback !== "undefined") { _callback(); }
+ }); //reset story and load first node
- addToGraph(clickPath);
}
//steps the story
@@ -283,8 +306,10 @@ requirejs(
iterStep++;
console.log(logMsg);
var nextNode = leftToVisit.shift();
- gotoChoice(nextNode.clickPath, story, levelData, globalData);
- stepStory(nextNode.clickPath);
+ gotoChoice(nextNode.clickPath, story, levelData, globalData, function() {
+ stepStory(nextNode.clickPath);
+ });
+
}
}
@@ -292,8 +317,7 @@ requirejs(
if (typeof uniqueNodeId == "undefined") { uniqueNodeId = graphData[graphData.length-2].data.id; } //if it wasn't a node, grab next one up
var newChoices = checkForNewChoices(graphData, clickPath); //check and see if there are any new choices
- //console.log("Haw haw haw", State.get("processedWishlist"));
- console.log("Haw", StoryAssembler.wishlist);
+
newChoices.forEach(function(newChoice, pos) { //copy them to the leftToVisit with the path to them
var choiceClickPath = clickPath.slice(0); //clone array
choiceClickPath.push({source: uniqueNodeId, dest: newChoice.chunkId, clickNum: newChoice.choiceNum+1, choiceText: newChoice.text});
@@ -555,10 +579,19 @@ requirejs(
//creates the graph of paths in the narrative scene
var createGraph = function() {
- graphElements = simulateRunthroughs();
+ //graphElements = simulateRunthroughs();
+
+ resetStory(function(){ //reset story and go to first node
+ addToGraph([]); //add that node to graph
+ stepStory([]); //step the story and continue adding to graph until iterations is exhausted
+
+ graphElements = graphData;
+
console.log("GraphElements", graphElements);
console.log("leftToVisit", leftToVisit);
+ $('body').append("");
+
cytoGraph = cytoscape({
container : $("#cyto"),
elements : graphElements,
@@ -713,7 +746,7 @@ requirejs(
{
content: 'Goto Here',
select: function(ele){
- gotoChoice(ele.data().clickPath, story, levelData, globalData, "stepTo");
+ gotoChoice(ele.data().clickPath, story, levelData, globalData, function() {stepStory(ele.data().clickPath);});
$("#storyContainer.editor").show();
}
},
@@ -749,7 +782,7 @@ requirejs(
collapseEdges(cytoGraph); //convert multiple identical edges to one edge with a thicker stroke
createDropdown(); //create scene selector dropdown menu
-
+ });
}
/*
@@ -869,7 +902,7 @@ requirejs(
//highlight the paths to this node on the graph
if (type == "pathsToHere") {
$("#popup .goto").click(function() {
- gotoChoice(ele.data().clickPath, story, levelData, globalData, "stepTo");
+ gotoChoice(ele.data().clickPath, story, levelData, globalData, function() {stepStory(ele.data().clickPath);});
$("#storyContainer.editor").show();
});
}
@@ -933,7 +966,7 @@ requirejs(
$('body').append(instructionHtml + "");
createUI();
- createGraph();
+ createGraph();
});
\ No newline at end of file
diff --git a/StoryAssembler/js/Templates.js b/StoryAssembler/js/Templates.js
index 8bf0181..c9f0e40 100644
--- a/StoryAssembler/js/Templates.js
+++ b/StoryAssembler/js/Templates.js
@@ -178,6 +178,18 @@ define(["util", "Condition", "State"], function(util, Condition, State) {
return params[3];
},
+ // {stateVar|effort|lots} //returns value of effort, or lots if no value found
+ "stateVar": function(params, text) {
+ if (params.length !==2) {
+ console.error("Template command 'stateVarAdd' must have 2 params, in text '" + text + "'.");
+ return "(stateVar)";
+ }
+ var value = State.get(params[0]);
+ if (typeof value == "undefined") {
+ return params[1];
+ }
+ else { return value; }
+ },
// {stateVarAdd|effort|2} (returns the value of effort + 2)
"stateVarAdd": function(params, text) {
if (params.length !==2) {
diff --git a/js/Display.js b/js/Display.js
index 18c495d..f7926ea 100644
--- a/js/Display.js
+++ b/js/Display.js
@@ -4,7 +4,7 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
var Coordinator;
var gameModeChosen = ""; //holder for if game is chosen through UI knobs for scene
- var interfaceMode = "normal"; //how scenes progress...a timeline that's returned to ("timeline"), or progress scene-to-scene ("normal")
+ var interfaceMode = "timeline"; //how scenes progress...a timeline that's returned to ("timeline"), or progress scene-to-scene ("normal")
//initializes our copy of State and Coordinator
var init = function(_Coordinator, _State) {
@@ -18,8 +18,12 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
class: 'titleLink',
});
+ var linkId = id;
+ if (id.indexOf(":") > -1) { linkId = id.split(":")[1]; }
+
$('', {
href: target,
+ id: "startScene_" + linkId,
text: content,
click: function() {
$( "#blackout" ).fadeIn( "slow", function() {
@@ -33,8 +37,10 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
var startScene = function(_coordinator, id, loadIntro) {
- if (id.substring(0,5) == "intro:") { //if we're just using the intro as an interstitial scene, not actually running the game...
+ if (id.substring(0,6) == "intro:") { //if we're just using the intro as an interstitial scene, not actually running the game...
+ initSceneScreen(State, bg, id);
_coordinator.loadSceneIntro(id);
+ State.set("currentScene", id);
}
else {
_coordinator.cleanState(id);
@@ -53,7 +59,7 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
init(_Coordinator, _State); //initialize our copy of the coordinator and state
$('', {
- text: 'Climate Change Prototype',
+ text: "Emma's Journey",
id: 'title'
}).appendTo('body');
@@ -67,6 +73,17 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
}
}).appendTo('body');
+ if (localStorage.getItem("playerIdentifier") == null) { setPlayerIdentifier(); }
+ var identifier = $('', {
+ html: 'Identifier: ' + localStorage.getItem("playerIdentifier") + "
(click to regenerate)",
+ id: 'trackingId',
+ style: 'margin-bottom: 300px',
+ click: function() {
+ setPlayerIdentifier();
+ $("#trackingId").html('Identifier: ' + localStorage.getItem("playerIdentifier") + "
(click to regenerate)");
+ }
+ }).appendTo('body');
+
$('', {
text: 'Scene Selection',
id: 'sceneSelectTitle'
@@ -137,15 +154,10 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
activateBegins(_Coordinator, _State, scenes);
//if we haven't sent form data yet, send it
- if (Coordinator.recordPlaythroughs && localStorage.getItem('playthroughScene') !== null) {
- postToGoogleForm();
- localStorage.removeItem("playthroughScene");
- localStorage.removeItem("playthroughData");
- if (localStorage.getItem("playerIdentifier") == null) {
- setPlayerIdentifier();
- }
- }
+ postTrackingStats();
+ //if we don't have a unique tracking identifier for the player, set it
+ if (localStorage.getItem("playerIdentifier") == null) { setPlayerIdentifier(); }
}
var returnToTimelineScreen = function(scenes) {
@@ -200,11 +212,7 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
activateBegins(Coordinator, State, scenes);
//if we haven't sent form data yet, send it
- if (Coordinator.recordPlaythroughs && localStorage.getItem('playthroughScene') !== null) {
- postToGoogleForm();
- localStorage.removeItem("playthroughScene");
- localStorage.removeItem("playthroughData");
- }
+ postTrackingStats();
}
//process the wishlist for the passed in story according to its current settings in the UI
@@ -213,6 +221,7 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
var knobList = [];
var widgetNum = 0;
var story = _Coordinator.getStorySpec(id);
+ var knobsWishlistStateSettingsCache = []; //a cache we store in case we need to use it later (just used for viz right now)
for (var x=0; x < story.wishlist.length; x++) {
if (story.wishlist[x].condition.includes("[") && !story.wishlist[x].condition.includes("game_mode")) {
@@ -228,6 +237,7 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
if (stateSetter) {
var key = story.wishlist[x].condition.replace("state:","").trim().split(" ")[1];
State.set(key, value);
+ knobsWishlistStateSettingsCache.push({"type" : "stateSetter", "key" : key, "value" : value});
}
else {
story.wishlist[x].condition = story.wishlist[x].condition.replace(/\[.*?\]/g, value);
@@ -239,6 +249,7 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
if (stateSetter) {
var key = story.wishlist[x].condition.replace("state:","").trim().split(" ")[1];
State.set(key, value);
+ knobsWishlistStateSettingsCache.push({"type" : "stateSetter", "key" : key, "value" : value});
}
else {
story.wishlist[x].condition = story.wishlist[x].condition.replace(/\[.*?\]/g, value);
@@ -270,6 +281,7 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
}
State.set("processedWishlist", story.wishlist);
+ State.set("knobsWishlistStateSettingsCache", knobsWishlistStateSettingsCache);
}
//activate begin links in timeline
@@ -284,7 +296,7 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
}
var initMetaKnobs = function(_Coordinator, _State) {
- //TODO doof
+ //TODO
}
var createKnobs = function(sceneId, targetDivId) {
@@ -636,18 +648,33 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
//sets the intro screen for each scene
var setSceneIntro = function(sceneText, id) {
$("#blackout").show();
- $("#sceneIntro").html("" + sceneText + "
");
- Coordinator.startGame(id, true, true); //start intro game
+ $("#sceneIntro").html("" + sceneText + "
");
+ if (id.substring(0,6) == "intro:") {
+ $("#sceneIntro").html("" + sceneText + "
");
+ }
+ var linkText = "";
+ if (id.substring(0,6) !== "intro:") { //if we're not using the intro as an interstitial scene, start game...
+ Coordinator.startGame(id, true, true); //start intro game
+ linkText = "Begin";
+ }
+ else { linkText = "Continue"; }
var begin = $('', {
- text: 'Begin',
+ text: linkText,
click: function() {
- if (id.substring(0,5) == "intro:") {
-
+ if (id.substring(0,6) == "intro:") { //if this is interstitial, clicking the link starts the next scene
+ initTitleScreen(Coordinator, State, State.get("scenes"), State.get("scenes")); //reinitialize title screen (terrible)
+ var nextIndex = Coordinator.getNextScene(State.get("currentScene"));
+ var nextScene = State.get("scenes")[nextIndex];
+ if (nextScene.indexOf(":") > 0) { nextScene = nextScene.split(":")[1]; }
+ setTimeout(function (){
+ $("#startScene_" + nextScene).click();
+ }, 500);
+
}
- else {
+ else { //otherwise, it closes the intro window and starts the scene
Coordinator.startGame(id); //start real game
$("#sceneIntro").fadeOut( "slow" );
$("#blackout").fadeOut( "slow" );
@@ -662,6 +689,7 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
var setSceneOutro = function(endText) {
var nextIndex = Coordinator.getNextScene(State.get("currentScene"));
+ var nextScene = State.get("scenes")[nextIndex];
$( "#blackout" ).delay(1600).fadeIn( "slow", function() {
$("#sceneIntro").html(endText);
@@ -692,11 +720,20 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
var begin = $('', {
text: 'Next',
click: function() {
+
+ postTrackingStats(); //post tracking stats
+
if (interfaceMode == "timeline") { //if timeline, return there
returnToTimelineScreen(State.get("scenes"));
}
else { //otherwise, start next scene
- startScene(Coordinator, State.get("scenes")[nextIndex], true);
+ $('body').append("");
+ createKnobs(nextScene, "hiddenKnobs");
+ populateKnobs(nextScene, Coordinator, State, State.get("scenes"));
+ setTimeout(function (){ //gotta put in some lag for the knobs to populate
+ startScene(Coordinator, nextScene, true);
+ }, 500);
+
}
}
}).appendTo("#sceneIntro");
@@ -918,6 +955,15 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
.appendTo("#ASPEditor");
}
+ //posts tracking stats if we have any unsent ones
+ var postTrackingStats = function() {
+ if (Coordinator.recordPlaythroughs && localStorage.getItem('playthroughScene') !== null) {
+ postToGoogleForm();
+ localStorage.removeItem("playthroughScene");
+ localStorage.removeItem("playthroughData");
+ }
+ }
+
var postToGoogleForm = function() {
if (State.get("displayType") !== "editor") {
@@ -940,7 +986,7 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
var setPlayerIdentifier = function() {
var emotions = ['understanding','great','playful','calm','confident','courageous','peaceful','reliable','joyous','energetic','lucky','liberated','comfortable','amazed','fortunate','optimistic','pleased','free','delighted','provocative','encouraged','sympathetic','overjoyed','impulsive'];
- var colors = ['amber','amethyst','apricot','aqua','aquamarine','auburn','azure','beige','black','blue','bronze','brown','cardinal','carmine','celadon','cerise','cerulean','charcoal','chartreuse','chocolate','cinnamon','color','copper','coral','cream','crimson','cyan','denim','ebony','ecru','eggplant','emerald','fuchsia','gold','goldenrod','gray','green','indigo','ivory','jade','jet','khaki','lavender','lemon','light','lilac','lime','magenta','mahogany','maroon','mauve','mustard','ocher','olive','orange','orchid','pale','pastel','peach','periwinkle'];
+ var colors = ['amber','amethyst','apricot','aqua','aquamarine','auburn','azure','beige','black','blue','bronze','brown','cardinal','carmine','celadon','cerise','cerulean','charcoal','chartreuse','chocolate','cinnamon','scarlet','copper','coral','cream','crimson','cyan','denim','ebony','ecru','eggplant','emerald','fuchsia','gold','goldenrod','gray','green','indigo','ivory','jade','jet','khaki','lavender','lemon','light','lilac','lime','magenta','mahogany','maroon','mauve','mustard','ocher','olive','orange','orchid','pale','pastel','peach','periwinkle'];
var animals = ['alligator','ant','bear','bee','bird','bull','camel','cat','cheetah','chicken','chimpanzee','cow','crocodile','deer','dog','dolphin','duck','eagle','elephant','fish','fly','fox','frog','giraffe','goat','goldfish','gorilla','hamster','hippopotamus','horse','kangaroo','kitten','lion','lobster','monkey','octopus','owl','panda','pig','puppy','rabbit','rat','scorpion','seal','shark','sheep','snail','snake','spider','squirrel','swan','tiger','turtle','wolf','wren','zebra','pale','pastel','peach','periwinkle'];
var letters = ['A','B','C','D','E','F','G','H','I','J','H'];
var identifier = "";
@@ -1001,6 +1047,8 @@ define(["Game", "jsonEditor", "HealthBar", "text!avatars", "jQuery", "jQueryUI"]
initSceneScreen : initSceneScreen,
setAvatars : setAvatars,
createStats : createStats,
+ createKnobs : createKnobs,
+ populateKnobs : populateKnobs,
setStats : setStats,
setSceneIntro : setSceneIntro,
setSceneOutro : setSceneOutro,