Skip to content

Commit c0b77a9

Browse files
committed
Add tutorial quest
Resolves #2123
1 parent 9a949de commit c0b77a9

32 files changed

Lines changed: 2424 additions & 11 deletions

scenes/menus/title/components/title_screen.gd

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: MPL-2.0
33
extends Control
44

5-
@export_file("*.tscn") var intro_scene: String
5+
@export var tutorial_quest: Quest
66

77
@onready var main_menu: Control = %MainMenu
88
@onready var options: Control = %Options
@@ -15,7 +15,7 @@ func _ready() -> void:
1515
if saved_scene["scene_path"]:
1616
SceneSwitcher.change_to_file(saved_scene["scene_path"], saved_scene["spawn_point"])
1717
else:
18-
SceneSwitcher.change_to_file(intro_scene)
18+
_on_start_pressed()
1919

2020

2121
func _input(event: InputEvent) -> void:
@@ -39,14 +39,10 @@ func _on_main_menu_continue_pressed() -> void:
3939
func _on_start_pressed() -> void:
4040
if GameState.can_restore():
4141
GameState.clear()
42-
(
43-
SceneSwitcher
44-
. change_to_file_with_transition(
45-
intro_scene,
46-
^"",
47-
Transition.Effect.FADE,
48-
Transition.Effect.FADE,
49-
)
42+
43+
GameState.start_quest(tutorial_quest)
44+
SceneSwitcher.change_to_file_with_transition(
45+
tutorial_quest.first_scene, ^"", Transition.Effect.FADE, Transition.Effect.FADE
5046
)
5147

5248

scenes/menus/title/title_screen.tscn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[ext_resource type="Theme" uid="uid://cvitou84ni7qe" path="res://scenes/ui_elements/components/theme.tres" id="1_kj1pq"]
44
[ext_resource type="Script" uid="uid://c6nc0jka32ow2" path="res://scenes/menus/title/components/title_screen.gd" id="2_0vy2n"]
5+
[ext_resource type="Resource" uid="uid://0dcffjdxn6g2" path="res://scenes/quests/lore_quests/quest_000/quest.tres" id="3_5uobg"]
56
[ext_resource type="PackedScene" uid="uid://2rbpl811wlv1" path="res://scenes/game_elements/props/background_music/background_music.tscn" id="4_c6kyi"]
67
[ext_resource type="PackedScene" uid="uid://wgmdsj1sbmja" path="res://scenes/menus/title/components/main_menu.tscn" id="5_0vy2n"]
78
[ext_resource type="AudioStream" uid="uid://kc657macgib4" path="res://assets/first_party/music/Threadbare_Main_Loud.ogg" id="5_5uobg"]
@@ -20,7 +21,7 @@ grow_horizontal = 2
2021
grow_vertical = 2
2122
theme = ExtResource("1_kj1pq")
2223
script = ExtResource("2_0vy2n")
23-
intro_scene = "uid://dow5vc7yb5k2c"
24+
tutorial_quest = ExtResource("3_5uobg")
2425

2526
[node name="BackgroundMusic" parent="." unique_id=2002868584 instance=ExtResource("4_c6kyi")]
2627
stream = ExtResource("5_5uobg")
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[gd_scene format=3 uid="uid://b31v66516y4lg"]
2+
3+
[ext_resource type="Script" uid="uid://diknsuw3mtj1n" path="res://scenes/game_elements/props/decoration/decoration.gd" id="1_36ann"]
4+
[ext_resource type="Texture2D" uid="uid://be3845r07rhkm" path="res://scenes/game_elements/props/buildings/house/components/House_Wool_Red_Stage3.png" id="2_uhn7e"]
5+
6+
[sub_resource type="RectangleShape2D" id="RectangleShape2D_sr1lu"]
7+
size = Vector2(62.7499, 97.0001)
8+
9+
[node name="RuinedHouse" type="Node2D" unique_id=2016829349]
10+
editor_description = "This house has no light effect at night."
11+
script = ExtResource("1_36ann")
12+
13+
[node name="StaticBody2D" type="StaticBody2D" parent="." unique_id=143281131]
14+
position = Vector2(1, -98)
15+
collision_layer = 16
16+
collision_mask = 0
17+
18+
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D" unique_id=477180314]
19+
position = Vector2(-0.999973, 65.3749)
20+
rotation = -1.5708
21+
shape = SubResource("RectangleShape2D_sr1lu")
22+
23+
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1147973925]
24+
unique_name_in_owner = true
25+
position = Vector2(0, -72)
26+
texture = ExtResource("2_uhn7e")
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SPDX-FileCopyrightText: The Threadbare Authors
2+
# SPDX-License-Identifier: MPL-2.0
3+
~ start
4+
StoryWeaver: Where am I? What happened?
5+
StoryWeaver: I should explore to see if I can find anyone else.
6+
=> END
7+
8+
~ townie
9+
Arun: StoryWeaver, I'm so glad you've come.
10+
Arun: This was once a thriving village, until the Void came.
11+
Arun: It was gradual at first, so I didn't pay much attention...
12+
Arun: ...and then, before I knew it, I was the only one left.
13+
Arun: If only I could get to Fray's End, I'm sure the Elders would know what to do.
14+
Arun: I'm afraid to make the journey alone. Will you come with me to Fray's End?
15+
- Yes!
16+
- OK...
17+
Arun: Great! Follow me!
18+
do start_townie_walking()
19+
=> END
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[remap]
2+
3+
importer="dialogue_manager"
4+
importer_version=15
5+
type="Resource"
6+
uid="uid://c1s10t3ts8or2"
7+
path="res://.godot/imported/ruined_village.dialogue-b8cf64f58f8148b80c3b5c7093173b16.tres"
8+
9+
[deps]
10+
11+
source_file="res://scenes/quests/lore_quests/quest_000/1_ruined_village/components/ruined_village.dialogue"
12+
dest_files=["res://.godot/imported/ruined_village.dialogue-b8cf64f58f8148b80c3b5c7093173b16.tres"]
13+
14+
[params]
15+
16+
defaults=true
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-FileCopyrightText: The Threadbare Authors
2+
# SPDX-License-Identifier: MPL-2.0
3+
extends Node2D
4+
# Variables/methods in this file are accessed from dialogue.
5+
6+
@onready var townie_interact_area: InteractArea = %InteractArea
7+
@onready var bridge_blocker: StaticBody2D = %BridgeBlocker
8+
@onready var path_walk_behavior: PathWalkBehavior = %PathWalkBehavior
9+
10+
11+
func is_townie_walking() -> bool:
12+
return townie_interact_area.disabled
13+
14+
15+
func start_townie_walking() -> void:
16+
# Prevent talking a second time
17+
townie_interact_area.disabled = true
18+
# Allow the player to cross the bridge
19+
bridge_blocker.collision_layer = 0
20+
# Start the townie walking
21+
path_walk_behavior.process_mode = Node.PROCESS_MODE_INHERIT
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uid://c2nnjybwiickt

scenes/quests/lore_quests/quest_000/1_ruined_village/ruined_village.tscn

Lines changed: 300 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# SPDX-FileCopyrightText: The Threadbare Authors
2+
# SPDX-License-Identifier: MPL-2.0
3+
~ start
4+
Arun: The path to Fray's End is through these caves.
5+
Arun: The caves are full of StoryVores, I'm sorry to say.
6+
Arun: Move quickly, and don't let them spot you!
7+
Arun: I'll see you on the other side, StoryWeaver.
8+
=> END
9+
10+
~ walk_through
11+
% Arun: You can run by holding Shift or LB!
12+
% Arun: Go through the caves, and don't let the StoryVores spot you!
13+
% Arun: Watch how the StoryVores patrol, and find spaces to hide.
14+
% Arun: You might meet a KnitWitch along the way.
15+
=> END
16+
17+
~ well_done
18+
if memory_thread.revealed:
19+
=> again
20+
Arun: Congratulations, StoryWeaver. You made it through the caves unscathed.
21+
StoryWeaver: Wait, how did you get over here without me seeing you?
22+
Arun: Never mind that!
23+
Arun: As you go through the world, you'll come across threads of Memory, Imagination, and Spirit.
24+
do wait(0.5)
25+
do hud.show
26+
do memory_thread.reveal()
27+
do wait(0.5)
28+
=> collect_the_thread
29+
30+
~ again
31+
StoryWeaver: But really: how did you get here?
32+
% Arun: Sometimes in a game you have to suspend disbelief.
33+
% Arun: Check the scene tree in Godot!
34+
% Arun: That's for me to know and you to find out.
35+
=> collect_the_thread
36+
37+
~ collect_the_thread
38+
Arun: Collect the thread of Memory before we move on!
39+
=> END
40+
41+
~ thread_collected
42+
Arun: Onwards!
43+
=> END
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[remap]
2+
3+
importer="dialogue_manager"
4+
importer_version=15
5+
type="Resource"
6+
uid="uid://bvxfbfjv2oleg"
7+
path="res://.godot/imported/tutorial_stealth.dialogue-fa594ff07aac253bfd433f0d58bf2860.tres"
8+
9+
[deps]
10+
11+
source_file="res://scenes/quests/lore_quests/quest_000/2a_stealth/components/tutorial_stealth.dialogue"
12+
dest_files=["res://.godot/imported/tutorial_stealth.dialogue-fa594ff07aac253bfd433f0d58bf2860.tres"]
13+
14+
[params]
15+
16+
defaults=true

0 commit comments

Comments
 (0)