Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions scenes/menus/title/components/title_screen.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: MPL-2.0
extends Control

@export_file("*.tscn") var intro_scene: String
@export var tutorial_quest: Quest

@onready var main_menu: Control = %MainMenu
@onready var options: Control = %Options
Expand All @@ -15,7 +15,7 @@ func _ready() -> void:
if saved_scene["scene_path"]:
SceneSwitcher.change_to_file(saved_scene["scene_path"], saved_scene["spawn_point"])
else:
SceneSwitcher.change_to_file(intro_scene)
_on_start_pressed()


func _input(event: InputEvent) -> void:
Expand All @@ -39,14 +39,10 @@ func _on_main_menu_continue_pressed() -> void:
func _on_start_pressed() -> void:
if GameState.can_restore():
GameState.clear()
(
SceneSwitcher
. change_to_file_with_transition(
intro_scene,
^"",
Transition.Effect.FADE,
Transition.Effect.FADE,
)

GameState.start_quest(tutorial_quest)
SceneSwitcher.change_to_file_with_transition(
tutorial_quest.first_scene, ^"", Transition.Effect.FADE, Transition.Effect.FADE
)


Expand Down
3 changes: 2 additions & 1 deletion scenes/menus/title/title_screen.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

[node name="BackgroundMusic" parent="." unique_id=2002868584 instance=ExtResource("4_c6kyi")]
stream = ExtResource("5_5uobg")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[gd_scene format=3 uid="uid://b31v66516y4lg"]

[ext_resource type="Script" uid="uid://diknsuw3mtj1n" path="res://scenes/game_elements/props/decoration/decoration.gd" id="1_36ann"]
[ext_resource type="Texture2D" uid="uid://be3845r07rhkm" path="res://scenes/game_elements/props/buildings/house/components/House_Wool_Red_Stage3.png" id="2_uhn7e"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_sr1lu"]
size = Vector2(62.7499, 97.0001)

[node name="RuinedHouse" type="Node2D" unique_id=2016829349]
editor_description = "This house has no light effect at night."
script = ExtResource("1_36ann")

[node name="StaticBody2D" type="StaticBody2D" parent="." unique_id=143281131]
position = Vector2(1, -98)
collision_layer = 16
collision_mask = 0

[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D" unique_id=477180314]
position = Vector2(-0.999973, 65.3749)
rotation = -1.5708
shape = SubResource("RectangleShape2D_sr1lu")

[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1147973925]
unique_name_in_owner = true
position = Vector2(0, -72)
texture = ExtResource("2_uhn7e")
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: The Threadbare Authors
# SPDX-License-Identifier: MPL-2.0
~ start
StoryWeaver: Where am I? What happened?
StoryWeaver: I should explore to see if I can find anyone else.
=> END

~ townie
Arun: StoryWeaver, I'm so glad you've come.
Arun: This was once a thriving village, until the Void came.
Arun: It was gradual at first, so I didn't pay much attention...
Arun: ...and then, before I knew it, I was the only one left.
Arun: If only I could get to Fray's End, I'm sure the Elders would know what to do.
Arun: I'm afraid to make the journey alone. Will you come with me to Fray's End?
- Yes!
- OK...
Arun: Great! Follow me!
do start_townie_walking()
=> END
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[remap]

importer="dialogue_manager"
importer_version=15
type="Resource"
uid="uid://c1s10t3ts8or2"
path="res://.godot/imported/ruined_village.dialogue-b8cf64f58f8148b80c3b5c7093173b16.tres"

[deps]

source_file="res://scenes/quests/lore_quests/quest_000/1_ruined_village/components/ruined_village.dialogue"
dest_files=["res://.godot/imported/ruined_village.dialogue-b8cf64f58f8148b80c3b5c7093173b16.tres"]

[params]

defaults=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: The Threadbare Authors
# SPDX-License-Identifier: MPL-2.0
extends Node2D
# Variables/methods in this file are accessed from dialogue.

@onready var townie_interact_area: InteractArea = %InteractArea
@onready var bridge_blocker: StaticBody2D = %BridgeBlocker
@onready var path_walk_behavior: PathWalkBehavior = %PathWalkBehavior


func is_townie_walking() -> bool:
return townie_interact_area.disabled


func start_townie_walking() -> void:
# Prevent talking a second time
townie_interact_area.disabled = true
# Allow the player to cross the bridge
bridge_blocker.collision_layer = 0
# Start the townie walking
path_walk_behavior.process_mode = Node.PROCESS_MODE_INHERIT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://c2nnjybwiickt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# SPDX-FileCopyrightText: The Threadbare Authors
# SPDX-License-Identifier: MPL-2.0
~ start
Arun: The path to Fray's End is through these caves.
Arun: The caves are full of StoryVores, I'm sorry to say.
Arun: Move quickly, and don't let them spot you!
Arun: I'll see you on the other side, StoryWeaver.
=> END

~ walk_through
% Arun: You can run by holding Shift or LB!
% Arun: Go through the caves, and don't let the StoryVores spot you!
% Arun: Watch how the StoryVores patrol, and find spaces to hide.
% Arun: You might meet a KnitWitch along the way.
=> END

~ well_done
if memory_thread.revealed:
=> again
Arun: Congratulations, StoryWeaver. You made it through the caves unscathed.
StoryWeaver: Wait, how did you get over here without me seeing you?
Arun: Never mind that!
Arun: As you go through the world, you'll come across threads of Memory, Imagination, and Spirit.
do wait(0.5)
do hud.show
do memory_thread.reveal()
do wait(0.5)
=> collect_the_thread

~ again
StoryWeaver: But really: how did you get here?
% Arun: Sometimes in a game you have to suspend disbelief.
% Arun: Check the scene tree in Godot!
% Arun: That's for me to know and you to find out.
=> collect_the_thread

~ collect_the_thread
Arun: Collect the thread of Memory before we move on!
=> END

~ thread_collected
Arun: Onwards!
=> END
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[remap]

importer="dialogue_manager"
importer_version=15
type="Resource"
uid="uid://bvxfbfjv2oleg"
path="res://.godot/imported/tutorial_stealth.dialogue-fa594ff07aac253bfd433f0d58bf2860.tres"

[deps]

source_file="res://scenes/quests/lore_quests/quest_000/2a_stealth/components/tutorial_stealth.dialogue"
dest_files=["res://.godot/imported/tutorial_stealth.dialogue-fa594ff07aac253bfd433f0d58bf2860.tres"]

[params]

defaults=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# SPDX-FileCopyrightText: The Threadbare Authors
# SPDX-License-Identifier: MPL-2.0
extends Node2D

@export var dark_sky_color: Color

var _tween: Tween

@onready var canvas_modulate: CanvasModulate = %CanvasModulate

# Used by dialogue
@onready var memory_thread: CollectibleItem = %MemoryThread
@onready var hud: CanvasLayer = %HUD


func _adjust_modulation(target: Color) -> void:
if _tween:
_tween.kill()

_tween = create_tween()
_tween.tween_property(canvas_modulate, "color", target, 0.5)


func _on_cave_lighting_body_entered(_body: Node2D) -> void:
_adjust_modulation(dark_sky_color)


func _on_cave_lighting_body_exited(_body: Node2D) -> void:
_adjust_modulation(Color.WHITE)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://t43ctefgmwif
382 changes: 382 additions & 0 deletions scenes/quests/lore_quests/quest_000/2a_stealth/tutorial_stealth.tscn

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# SPDX-FileCopyrightText: The Threadbare Authors
# SPDX-License-Identifier: MPL-2.0
extends Node2D

@export var interact_area: InteractArea
@export var talk_behavior: TalkBehavior
@export var path_walk_behavior: PathWalkBehavior
@export var cinematic: Cinematic
@export var sequence_puzzle: SequencePuzzle


func _ready() -> void:
path_walk_behavior.ending_reached.connect(_on_ending_reached)
if GameState.intro_dialogue_shown:
walk_path()
else:
cinematic.cinematic_finished.connect(walk_path, CONNECT_ONE_SHOT)


func walk_path() -> void:
# Don't let the player talk to him while walking.
interact_area.disabled = true
path_walk_behavior.process_mode = Node.PROCESS_MODE_INHERIT


func _on_ending_reached() -> void:
interact_area.disabled = false
path_walk_behavior.process_mode = Node.PROCESS_MODE_DISABLED
path_walk_behavior.character.velocity = Vector2.ZERO
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://dlnfvmc1o31rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-FileCopyrightText: The Threadbare Authors
# SPDX-License-Identifier: MPL-2.0
~ start
Arun: This way! Follow me!
=> END

~ puzzle_hints
match puzzle.get_progress()
when 0:
Arun: We'll have to tap the rocks in a particular order to open the door.
Arun: But I can't remember the sequence. Maybe those plinths are a clue?
when 1:
Arun: You're half-way there!
Arun: It looks like the second plinth has a different symbol on it...
else:
Arun: You did it!
Arun: Let's go north together.
=> END
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[remap]

importer="dialogue_manager"
importer_version=15
type="Resource"
uid="uid://bevp181alogxl"
path="res://.godot/imported/tutorial_sequence_puzzle.dialogue-9594bac0c6daeee609773d804e3e19c0.tres"

[deps]

source_file="res://scenes/quests/lore_quests/quest_000/3_sequence_puzzle/components/tutorial_sequence_puzzle.dialogue"
dest_files=["res://.godot/imported/tutorial_sequence_puzzle.dialogue-9594bac0c6daeee609773d804e3e19c0.tres"]

[params]

defaults=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: The Threadbare Authors
# SPDX-License-Identifier: MPL-2.0
extends Node2D

@export var puzzle: SequencePuzzle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://b54tkw0m252mg

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SPDX-FileCopyrightText: The Threadbare Authors
# SPDX-License-Identifier: MPL-2.0
~ start
Arun: The InkDrinkers came from the Void and consumed all the ink.
Arun: Collect the button powerup, then repel the ink they spray into the jar!
=> END

~ interact
if not GameState.has_ability(repel_powerup.ability):
Arun: Collect the button powerup, StoryWeaver!
else if fill_game_logic.barrels_completed < fill_game_logic.barrels_to_win:
Arun: Repel the ink into the barrel!
else:
Arun: Well done, StoryWeaver. Let's go north towards Fray's End.
=> END
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[remap]

importer="dialogue_manager"
importer_version=15
type="Resource"
uid="uid://on6os5i21qug"
path="res://.godot/imported/tutorial_ink_combat.dialogue-ace65191fdf95e6db4e2b3ac0012a931.tres"

[deps]

source_file="res://scenes/quests/lore_quests/quest_000/4_ink_combat/components/tutorial_ink_combat.dialogue"
dest_files=["res://.godot/imported/tutorial_ink_combat.dialogue-ace65191fdf95e6db4e2b3ac0012a931.tres"]

[params]

defaults=true
Loading
Loading