From 7dc72b53e5e3aa47b85689a2e8c53995cf83420e Mon Sep 17 00:00:00 2001 From: IronShears <71862623+IronShears@users.noreply.github.com> Date: Fri, 26 Jan 2024 21:41:09 -0800 Subject: [PATCH] Fixing some stuff --- Commandprompt.gd | 3 +++ Resources/Text/Text.json | 50 +++++++++++++++++++++++++++++++----- Resources/Text/Text.json.bak | 50 +++++++++++++++++++++++++++++++----- UniversalFunctions.gd | 37 +++++++++++++------------- login.tscn | 10 ++++---- main.gd | 17 +++++------- main.tscn | 14 +++++----- 7 files changed, 127 insertions(+), 54 deletions(-) diff --git a/Commandprompt.gd b/Commandprompt.gd index c712b6a..a94b245 100644 --- a/Commandprompt.gd +++ b/Commandprompt.gd @@ -53,6 +53,8 @@ func skip_input(): _play_dialog() else: emit_signal("done") + if dialogue[page].has("continue"): + UniversalFunctions.play_dialogue_JSON(dialogue[page]["continue"]) func set_up(): first_line() @@ -62,6 +64,7 @@ func set_up(): text = text.replace("{insertText}",pastDialogue[-1]["text"]) text = text.replace("{name}", playerName) text = text.replace("{missingDialogue}", currentTree) + print(currentTree) if dialogue[page]["color"] == "Teal": text = "[color=#306082]"+text+"[/color]" optionsVisible = dialogue[page]["optionsVisible"] diff --git a/Resources/Text/Text.json b/Resources/Text/Text.json index 02833d5..fbcbacb 100644 --- a/Resources/Text/Text.json +++ b/Resources/Text/Text.json @@ -443,7 +443,7 @@ Delete this file after reading. talk to Synthia if you haven't already, and do n ], "fineGreetingGood":[ -{"color":"Pink", "sprite":"camera1Smile","text":"Oh thank WAN, I thought you would ignore me again like yesterday.","tickSpeed":0.05,"closeSpeed":1,"optionsVisible":false} +{"color":"Pink", "sprite":"camera1Smile","text":"Oh thank WAN, I thought you would ignore me again like yesterday.","tickSpeed":0.05,"closeSpeed":1,"optionsVisible":true,"options":"Introductions"} ], "fineGreetingBad":[ {"color":"Pink", "sprite":"camera2Angry","text":"Okay sorry, sorry. After what happened yesterday I was worried I made you mad","tickSpeed":0.05,"closeSpeed":1,"optionsVisible":true,"options":"Introductions"} @@ -518,7 +518,7 @@ Delete this file after reading. talk to Synthia if you haven't already, and do n "AskSupervisor": [ -{"name":"AskSupervisorGood", "text":"I’d have to ask my supervisor. No guarantee I can get the answer."}, +{"name":"AskSupervisorGood", "text":"I’d have to ask my supervisor, Sorry."}, {"name":"AskSupervisorBad", "text":"How am I supposed to know that?"} ], @@ -560,16 +560,22 @@ Delete this file after reading. talk to Synthia if you haven't already, and do n ], + + + + + + "WhatsYourName": [ {"name":"WhatsYourNameGood", "text":"How about you? What’s your name?"}, {"name":"WhatsYourNameBad", "text":"Cool."} ], "WhatsYourNameGood":[ -{"color":"Pink", "sprite":"camera2Angry","text":"My name is Synthia Powell.","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +{"color":"Pink", "sprite":"camera2Angry","text":"My name is Synthia Powell.","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false,"continue":"WhatsYourNameContinue"} ], "WhatsYourNameBad":[ -{"color":"Pink", "sprite":"camera2Angry","text":"Great.","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +{"color":"Pink", "sprite":"camera2Angry","text":"Great.","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false,"continue":"WhatsYourNameContinue"} ], "fineWhatsYourNameContinue":[ {"color":"Pink", "sprite":"camera2Angry","text":"So, was Ada able to convince her supervisors to show me whatever she was cooking up yet?","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":true,"options":"NoSurprise"} @@ -578,18 +584,48 @@ Delete this file after reading. talk to Synthia if you haven't already, and do n {"color":"Pink", "sprite":"camera2Angry","text":"Did Ada at least get permission to give me my surprise yet?","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":true,"options":"NoSurprise"} ], + + + + + + + "NoSurprise": [ -{"name":"NoSurpriseBad", "text":"My instructions don't mention anything about a surprise… so no."} +{"name":"NoSurpriseBad", "text":"My instructions don't mention anything about that… so no."} ], "fineNoSurpriseBad":[ {"color":"Pink", "sprite":"camera2Angry","text":"Well THAT just sucks, doesn't it? Ada is gone and now I have to talk to a stranger!","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} ], "sadNoSurpriseBad":[ -{"color":"Pink", "sprite":"camera2Angry","text":"So the only woman who cared about me is gone without saying goodbye… and I get nothing?","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +{"color":"Pink", "sprite":"camera2Angry","text":"So the only person who cared about me is gone without saying goodbye… and I get nothing?","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false,"continue":"NoSurpriseContinue"} ], "NoSurpriseContinue":[ -{"color":"Pink", "sprite":"camera2Angry","text":"This place was supposed to be PARADISE. It’s not paradise if there’s nothing to do here!","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +{"color":"Pink", "sprite":"camera2Angry","text":"This place was supposed to be PARADISE. It’s not paradise if there’s nothing to do here!","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":true,"options":"TalkToMe"} +], + + + + + + +"TalkToMe": [ +{"name":"TalkToMeGood", "text":"You can talk to me, can't you?"}, +{"name":"TalkToMeBad", "text":"You’re going to have to tough it out."} +], + +"fineWhatsYourNameGood":[ +{"color":"Pink", "sprite":"camera2Angry","text":"I guess so… but I'm going to miss Ada. I have no idea how long its going to take to get used to you…we","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +], +"fineWhatsYourNameBad":[ +{"color":"Pink", "sprite":"camera2Angry","text":"Damn. You're an asshole. I guess you're still better than NOTHING.","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +], +"sadWhatsYourNameGood":[ +{"color":"Pink", "sprite":"camera2Angry","text":"I guess so… but I'm going to miss Ada. I have no idea how long its going to take to get used to you…we","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +], +"sadWhatsYourNameBad":[ +{"color":"Pink", "sprite":"camera2Angry","text":"Damn. You're an asshole. I guess you're still better than NOTHING.","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} ], } \ No newline at end of file diff --git a/Resources/Text/Text.json.bak b/Resources/Text/Text.json.bak index 8936c77..b1aca16 100644 --- a/Resources/Text/Text.json.bak +++ b/Resources/Text/Text.json.bak @@ -443,7 +443,7 @@ Delete this file after reading. talk to Synthia if you haven't already, and do n ], "fineGreetingGood":[ -{"color":"Pink", "sprite":"camera1Smile","text":"Oh thank WAN, I thought you would ignore me again like yesterday.","tickSpeed":0.05,"closeSpeed":1,"optionsVisible":false} +{"color":"Pink", "sprite":"camera1Smile","text":"Oh thank WAN, I thought you would ignore me again like yesterday.","tickSpeed":0.05,"closeSpeed":1,"optionsVisible":true,"options":"Introductions"} ], "fineGreetingBad":[ {"color":"Pink", "sprite":"camera2Angry","text":"Okay sorry, sorry. After what happened yesterday I was worried I made you mad","tickSpeed":0.05,"closeSpeed":1,"optionsVisible":true,"options":"Introductions"} @@ -518,7 +518,7 @@ Delete this file after reading. talk to Synthia if you haven't already, and do n "AskSupervisor": [ -{"name":"AskSupervisorGood", "text":"I’d have to ask my supervisor. No guarantee I can get the answer."}, +{"name":"AskSupervisorGood", "text":"I’d have to ask my supervisor."}, {"name":"AskSupervisorBad", "text":"How am I supposed to know that?"} ], @@ -560,16 +560,22 @@ Delete this file after reading. talk to Synthia if you haven't already, and do n ], + + + + + + "WhatsYourName": [ {"name":"WhatsYourNameGood", "text":"How about you? What’s your name?"}, {"name":"WhatsYourNameBad", "text":"Cool."} ], "WhatsYourNameGood":[ -{"color":"Pink", "sprite":"camera2Angry","text":"My name is Synthia Powell.","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +{"color":"Pink", "sprite":"camera2Angry","text":"My name is Synthia Powell.","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false,"continue":"WhatsYourNameContinue"} ], "WhatsYourNameBad":[ -{"color":"Pink", "sprite":"camera2Angry","text":"Great.","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +{"color":"Pink", "sprite":"camera2Angry","text":"Great.","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false,"continue":"WhatsYourNameContinue"} ], "fineWhatsYourNameContinue":[ {"color":"Pink", "sprite":"camera2Angry","text":"So, was Ada able to convince her supervisors to show me whatever she was cooking up yet?","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":true,"options":"NoSurprise"} @@ -578,18 +584,48 @@ Delete this file after reading. talk to Synthia if you haven't already, and do n {"color":"Pink", "sprite":"camera2Angry","text":"Did Ada at least get permission to give me my surprise yet?","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":true,"options":"NoSurprise"} ], + + + + + + + "NoSurprise": [ -{"name":"NoSurpriseBad", "text":"My instructions don't mention anything about a surprise… so no."} +{"name":"NoSurpriseBad", "text":"My instructions don't mention anything about that… so no."} ], "fineNoSurpriseBad":[ {"color":"Pink", "sprite":"camera2Angry","text":"Well THAT just sucks, doesn't it? Ada is gone and now I have to talk to a stranger!","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} ], "sadNoSurpriseBad":[ -{"color":"Pink", "sprite":"camera2Angry","text":"So the only woman who cared about me is gone without saying goodbye… and I get nothing?","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +{"color":"Pink", "sprite":"camera2Angry","text":"So the only person who cared about me is gone without saying goodbye… and I get nothing?","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false,"continue":"NoSurpriseContinue"} ], "NoSurpriseContinue":[ -{"color":"Pink", "sprite":"camera2Angry","text":"So the only woman who cared about me is gone without saying goodbye… and I get nothing?","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +{"color":"Pink", "sprite":"camera2Angry","text":"This place was supposed to be PARADISE. It’s not paradise if there’s nothing to do here!","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":true,"options":"TalkToMe"} +], + + + + + + +"TalkToMe": [ +{"name":"TalkToMeGood", "text":"You can talk to me, can't you?"}, +{"name":"TalkToMeBad", "text":"You’re going to have to tough it out."} +], + +"fineWhatsYourNameGood":[ +{"color":"Pink", "sprite":"camera2Angry","text":"I guess so… but I'm going to miss Ada. I have no idea how long its going to take to get used to you…we","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +], +"fineWhatsYourNameBad":[ +{"color":"Pink", "sprite":"camera2Angry","text":"Damn. You're an asshole. I guess you're still better than NOTHING.","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +], +"sadWhatsYourNameGood":[ +{"color":"Pink", "sprite":"camera2Angry","text":"I guess so… but I'm going to miss Ada. I have no idea how long its going to take to get used to you…we","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} +], +"sadWhatsYourNameBad":[ +{"color":"Pink", "sprite":"camera2Angry","text":"Damn. You're an asshole. I guess you're still better than NOTHING.","tickSpeed":0.05,"closeSpeed":0.05,"optionsVisible":false} ], } \ No newline at end of file diff --git a/UniversalFunctions.gd b/UniversalFunctions.gd index 9095870..50ad2c9 100644 --- a/UniversalFunctions.gd +++ b/UniversalFunctions.gd @@ -35,7 +35,7 @@ func play_dialogue_JSON(dialogue : String): get_tree().get_root().get_node_or_null("/root/world/Commandprompt/Options/Option3").visible = false if dialogueJson.has(dialogue) == false: dialogueBox.dialogue = dialogueJson["dialogueError"] - dialogueBox.currentTree = "dialogueError" + dialogueBox.currentTree = dialogue var dialoguechecker = dialogue.replace("Converge", "") if disgust < 60: if loneliness <60: @@ -50,23 +50,24 @@ func play_dialogue_JSON(dialogue : String): if dialogueJson.has("angry"+dialoguechecker): dialogueBox.dialogue = dialogueJson["angry"+dialoguechecker] dialogueBox.currentTree = "angry"+dialoguechecker - if dialogue.ends_with("Converge"): - dialoguechecker = dialoguechecker.replace("Good", "") - dialoguechecker = dialoguechecker.replace("Bad", "") - dialoguechecker = dialoguechecker.replace("Bad", "") - if disgust < 60: - if loneliness <60: - if dialogueJson.has("fine"+dialoguechecker): - dialogueBox.dialogue = dialogueJson["fine"+dialoguechecker] - dialogueBox.currentTree = "fine"+dialoguechecker - elif loneliness >= 60: - if dialogueJson.has("sad"+dialoguechecker): - dialogueBox.dialogue = dialogueJson["sad"+dialoguechecker] - dialogueBox.currentTree = "sad"+dialoguechecker - elif disgust >=60: - if dialogueJson.has("angry"+dialoguechecker): - dialogueBox.dialogue = dialogueJson["angry"+dialoguechecker] - dialogueBox.currentTree = "angry"+dialoguechecker + if dialogueBox.currentTree == "dialogueError": + if dialogue.ends_with("Converge"): + dialoguechecker = dialoguechecker.replace("Good", "") + dialoguechecker = dialoguechecker.replace("Bad", "") + dialoguechecker = dialoguechecker.replace("Bad", "") + if disgust < 60: + if loneliness <60: + if dialogueJson.has("fine"+dialoguechecker): + dialogueBox.dialogue = dialogueJson["fine"+dialoguechecker] + dialogueBox.currentTree = "fine"+dialoguechecker + elif loneliness >= 60: + if dialogueJson.has("sad"+dialoguechecker): + dialogueBox.dialogue = dialogueJson["sad"+dialoguechecker] + dialogueBox.currentTree = "sad"+dialoguechecker + elif disgust >=60: + if dialogueJson.has("angry"+dialoguechecker): + dialogueBox.dialogue = dialogueJson["angry"+dialoguechecker] + dialogueBox.currentTree = "angry"+dialoguechecker else: dialogueBox.dialogue = dialogueJson[dialogue] dialogueBox.currentTree = dialogue diff --git a/login.tscn b/login.tscn index ad1ea74..e7dfca5 100644 --- a/login.tscn +++ b/login.tscn @@ -185,15 +185,15 @@ animations = [ { "name": "locked", "speed": 5.0 }, { -"frames": [ SubResource( 47 ), SubResource( 48 ), SubResource( 49 ), SubResource( 50 ), SubResource( 51 ), SubResource( 52 ), SubResource( 53 ), SubResource( 54 ), SubResource( 55 ), SubResource( 56 ), SubResource( 57 ), SubResource( 58 ), SubResource( 59 ), SubResource( 60 ) ], -"loop": true, -"name": "loading", -"speed": 8.0 -}, { "frames": [ ExtResource( 21 ) ], "loop": true, "name": "ibar", "speed": 5.0 +}, { +"frames": [ SubResource( 47 ), SubResource( 48 ), SubResource( 49 ), SubResource( 50 ), SubResource( 51 ), SubResource( 52 ), SubResource( 53 ), SubResource( 54 ), SubResource( 55 ), SubResource( 56 ), SubResource( 57 ), SubResource( 58 ), SubResource( 59 ), SubResource( 60 ) ], +"loop": true, +"name": "loading", +"speed": 8.0 } ] [node name="world" type="Node2D"] diff --git a/main.gd b/main.gd index fecf830..2fb6a78 100644 --- a/main.gd +++ b/main.gd @@ -75,29 +75,26 @@ func _on_Commandprompt_option_pressed(optionName:String): intro = "" $NervousTimer.wait_time = 3 UniversalFunctions.play_dialogue_JSON(optionName) + elif optionName == "AskSupervisorGood" or optionName == "AskSupervisorBad": + $Commandprompt.playerName = "Mystery Person" + UniversalFunctions.play_dialogue_JSON(optionName) elif optionName == "GiveNameGood": - $Commandprompt.name = UniversalFunctions.firstName + $Commandprompt.playerName = UniversalFunctions.firstName UniversalFunctions.play_dialogue_JSON(optionName) elif optionName == "GiveNameBad": - $Commandprompt.name = "Mystery Person" UniversalFunctions.play_dialogue_JSON(optionName) UniversalFunctions.loneliness +=2 - - elif optionName == "WhatsYourNameGood" or optionName == "WhatsYourNameBad": - UniversalFunctions.play_dialogue_JSON(optionName) - yield($Commandprompt, "done") - UniversalFunctions.play_dialogue_JSON("WhatsYourNameContinue") elif optionName == "reactionToGenerationUgly": split = null UniversalFunctions.topics.append("Simulation") else: UniversalFunctions.play_dialogue_JSON(optionName) - + var optionChecker = optionName.replace("Converge","") UniversalFunctions.loneliness -=1 - if optionName.ends_with("Good"): + if optionChecker.ends_with("Good"): UniversalFunctions.disgust -=1 - elif optionName.ends_with("Bad"): + elif optionChecker.ends_with("Bad"): UniversalFunctions.disgust +=1 diff --git a/main.tscn b/main.tscn index b506952..dfa13a8 100644 --- a/main.tscn +++ b/main.tscn @@ -2026,15 +2026,15 @@ animations = [ { "name": "locked", "speed": 5.0 }, { -"frames": [ SubResource( 47 ), SubResource( 48 ), SubResource( 49 ), SubResource( 50 ), SubResource( 51 ), SubResource( 52 ), SubResource( 53 ), SubResource( 54 ), SubResource( 55 ), SubResource( 56 ), SubResource( 57 ), SubResource( 58 ), SubResource( 59 ), SubResource( 60 ) ], -"loop": true, -"name": "loading", -"speed": 8.0 -}, { "frames": [ ExtResource( 22 ) ], "loop": true, "name": "ibar", "speed": 5.0 +}, { +"frames": [ SubResource( 47 ), SubResource( 48 ), SubResource( 49 ), SubResource( 50 ), SubResource( 51 ), SubResource( 52 ), SubResource( 53 ), SubResource( 54 ), SubResource( 55 ), SubResource( 56 ), SubResource( 57 ), SubResource( 58 ), SubResource( 59 ), SubResource( 60 ) ], +"loop": true, +"name": "loading", +"speed": 8.0 } ] [node name="world" type="Node2D"] @@ -2695,7 +2695,7 @@ show_behind_parent = true material = SubResource( 6 ) position = Vector2( 3, 7 ) frames = SubResource( 336 ) -frame = 9 +frame = 14 playing = true centered = false @@ -2705,7 +2705,7 @@ light_mask = 2 material = SubResource( 6 ) position = Vector2( 3, 7 ) frames = SubResource( 457 ) -frame = 9 +frame = 14 playing = true centered = false