Restructured files and worked on more complex quest progression
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=11 format=4 uid="uid://cd08dp16bixfv"]
|
||||
[gd_scene load_steps=14 format=4 uid="uid://cd08dp16bixfv"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ccorfvcfa84gf" path="res://scripts/guildhall.gd" id="1_lsinl"]
|
||||
[ext_resource type="TileSet" uid="uid://6im0g3eg6sr4" path="res://test_tiles.tres" id="1_qel1r"]
|
||||
@@ -7,6 +7,9 @@
|
||||
[ext_resource type="Texture2D" uid="uid://cg6ptmynq0aq0" path="res://graphics/basic-sprite.png" id="4_l3mu1"]
|
||||
[ext_resource type="PackedScene" uid="uid://cf6nnjyp8kv78" path="res://templates/receptionist.tscn" id="5_l3mu1"]
|
||||
[ext_resource type="PackedScene" uid="uid://b3mksvn2jf7e0" path="res://templates/quest_board.tscn" id="7_hph4e"]
|
||||
[ext_resource type="Script" uid="uid://bh54wpqgau8hc" path="res://scripts/npc.gd" id="8_nhrwr"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcrhry67g00vk" path="res://graphics/pom.png" id="9_4bidn"]
|
||||
[ext_resource type="PackedScene" uid="uid://jbqw0n6dlj08" path="res://templates/speech_bubble.tscn" id="10_6hdsl"]
|
||||
|
||||
[sub_resource type="NavigationPolygon" id="NavigationPolygon_w7eqs"]
|
||||
vertices = PackedVector2Array(591.3203, 170.54688, 591.3125, 170.53906, 614.1094, 159.47656, 694.9531, 80.92969, 694.9375, 80.921875, 702.6406, 67, 1053, 67, 1053, 605, 665.27344, 134.64063, 35, 605, 578.35156, 176.85938, 512.60156, 177.99219, 445.89844, 179.14063, 35, 35, 432.14063, 172.14844, 432.14063, 172.14063, 406.6172, 159.21875, 368.17188, 139.71875, 368.17188, 139.71094, 357.59375, 134.42969, 326.3125, 77.5625, 324.82813, 35, 325.8828, 65.21875)
|
||||
@@ -81,4 +84,25 @@ navigation_polygon = SubResource("NavigationPolygon_l3mu1")
|
||||
[node name="Quest Board" parent="." instance=ExtResource("7_hph4e")]
|
||||
position = Vector2(935, 32)
|
||||
|
||||
[node name="Npc" type="CharacterBody2D" parent="."]
|
||||
z_index = 1
|
||||
position = Vector2(400, 27)
|
||||
script = ExtResource("8_nhrwr")
|
||||
metadata/_custom_type_script = "uid://bh54wpqgau8hc"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Npc"]
|
||||
position = Vector2(1, 16)
|
||||
rotation = 1.5707964
|
||||
shape = SubResource("CapsuleShape2D_l3mu1")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Npc"]
|
||||
texture = ExtResource("9_4bidn")
|
||||
|
||||
[node name="SpeechBubble" parent="Npc" instance=ExtResource("10_6hdsl")]
|
||||
position = Vector2(44, -93)
|
||||
|
||||
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="Npc"]
|
||||
path_desired_distance = 30.0
|
||||
avoidance_enabled = true
|
||||
|
||||
[editable path="Sprites/Receptionist"]
|
||||
|
||||
@@ -106,7 +106,10 @@ layout_mode = 2
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_q6wja")
|
||||
text = "Show Quests"
|
||||
|
||||
[node name="QuestProgressList" type="ScrollContainer" parent="VBoxContainer"]
|
||||
[node name="Panel" type="PanelContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="QuestProgressList" type="ScrollContainer" parent="VBoxContainer/Panel"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
clip_contents = false
|
||||
@@ -114,7 +117,7 @@ custom_minimum_size = Vector2(260, 100)
|
||||
layout_mode = 2
|
||||
horizontal_scroll_mode = 0
|
||||
|
||||
[node name="QuestList" type="VBoxContainer" parent="VBoxContainer/QuestProgressList"]
|
||||
[node name="QuestList" type="VBoxContainer" parent="VBoxContainer/Panel/QuestProgressList"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(300, 100)
|
||||
layout_mode = 2
|
||||
|
||||
131
templates/quest_info_window.tscn
Normal file
131
templates/quest_info_window.tscn
Normal file
@@ -0,0 +1,131 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://map4n3vxmud3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cip5x34n08ilk" path="res://scripts/quest_info_window.gd" id="1_87ctw"]
|
||||
[ext_resource type="Texture2D" uid="uid://bldpiytpdrge6" path="res://graphics/icon.svg" id="2_isnli"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_fkhvq"]
|
||||
outline_size = 2
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_cyayr"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_w0qqq"]
|
||||
outline_size = 3
|
||||
|
||||
[node name="Quest Info Window" type="Window"]
|
||||
oversampling_override = 1.0
|
||||
title = "Quest Information"
|
||||
size = Vector2i(500, 620)
|
||||
wrap_controls = true
|
||||
unresizable = true
|
||||
popup_window = true
|
||||
script = ExtResource("1_87ctw")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
anchors_preset = -1
|
||||
offset_right = 500.0
|
||||
offset_bottom = 620.0
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("2_isnli")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Quest Name"
|
||||
label_settings = SubResource("LabelSettings_fkhvq")
|
||||
|
||||
[node name="NameLabel" type="Label" parent="VBoxContainer/HBoxContainer2/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(0.6542321, 0.6542321, 0.654232, 1)
|
||||
custom_minimum_size = Vector2(365, 35)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
text = "A Simple Task"
|
||||
label_settings = SubResource("LabelSettings_cyayr")
|
||||
|
||||
[node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer2/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Difficulty"
|
||||
label_settings = SubResource("LabelSettings_w0qqq")
|
||||
|
||||
[node name="DifficultyLabel" type="Label" parent="VBoxContainer/HBoxContainer2/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(0.6542321, 0.6542321, 0.654232, 1)
|
||||
custom_minimum_size = Vector2(365, 35)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
text = "(Difficulty)"
|
||||
|
||||
[node name="Label3" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Location"
|
||||
label_settings = SubResource("LabelSettings_w0qqq")
|
||||
|
||||
[node name="LocationLabel" type="Label" parent="VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(0.6542321, 0.6542321, 0.654232, 1)
|
||||
custom_minimum_size = Vector2(480, 35)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
text = "(Location)"
|
||||
|
||||
[node name="Label4" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Adventurer Reward"
|
||||
label_settings = SubResource("LabelSettings_w0qqq")
|
||||
|
||||
[node name="AdventurerRewardPanel" type="PanelContainer" parent="VBoxContainer"]
|
||||
custom_minimum_size = Vector2(480, 150)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="AdventurerRewardList" type="GridContainer" parent="VBoxContainer/AdventurerRewardPanel"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label5" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Guild Reward"
|
||||
label_settings = SubResource("LabelSettings_w0qqq")
|
||||
|
||||
[node name="GuildRewardPanel" type="PanelContainer" parent="VBoxContainer"]
|
||||
custom_minimum_size = Vector2(480, 150)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="GuildRewardList" type="GridContainer" parent="VBoxContainer/GuildRewardPanel"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="RemoveButton" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(248, 60)
|
||||
layout_mode = 2
|
||||
text = "REMOVE"
|
||||
|
||||
[node name="BackButton" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(248, 60)
|
||||
layout_mode = 2
|
||||
text = "BACK"
|
||||
|
||||
[node name="ConfirmDialog" type="ConfirmationDialog" parent="."]
|
||||
unique_name_in_owner = true
|
||||
oversampling_override = 1.0
|
||||
title = "Remove Quest"
|
||||
size = Vector2i(329, 100)
|
||||
visible = true
|
||||
ok_button_text = "Yes, Remove it"
|
||||
dialog_text = "Do you really wish to remove this quest?"
|
||||
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/RemoveButton" to="." method="_on_remove_button_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/BackButton" to="." method="_on_back_button_pressed"]
|
||||
[connection signal="canceled" from="ConfirmDialog" to="." method="_on_remove_quest_cancel"]
|
||||
[connection signal="confirmed" from="ConfirmDialog" to="." method="_on_remove_quest_confirm"]
|
||||
@@ -52,6 +52,16 @@ pivot_offset = Vector2(125, 0)
|
||||
size_flags_horizontal = 4
|
||||
script = ExtResource("1_3w4v3")
|
||||
|
||||
[node name="HeroLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 30.0
|
||||
offset_top = 2.0
|
||||
offset_right = 223.0
|
||||
offset_bottom = 25.0
|
||||
text = "Hero Name Here"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="ProgressBar" type="TextureProgressBar" parent="."]
|
||||
custom_minimum_size = Vector2(213, 14)
|
||||
layout_mode = 0
|
||||
@@ -143,7 +153,9 @@ position = Vector2(-1, -12)
|
||||
texture = ExtResource("6_lufuo")
|
||||
script = ExtResource("7_nby1n")
|
||||
|
||||
[node name="UpdateBubble" type="NinePatchRect" parent="ProgressBar/Hero"]
|
||||
[node name="SpeechBubble" type="NinePatchRect" parent="ProgressBar/Hero"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
clip_contents = true
|
||||
anchors_preset = -1
|
||||
anchor_left = 1.0
|
||||
@@ -168,7 +180,7 @@ axis_stretch_horizontal = 1
|
||||
axis_stretch_vertical = 1
|
||||
script = ExtResource("9_pq74m")
|
||||
|
||||
[node name="Label" type="Label" parent="ProgressBar/Hero/UpdateBubble"]
|
||||
[node name="Label" type="Label" parent="ProgressBar/Hero/SpeechBubble"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 5.0
|
||||
@@ -182,7 +194,7 @@ text = "testing one 1 2 3"
|
||||
vertical_alignment = 1
|
||||
autowrap_mode = 2
|
||||
|
||||
[node name="Timer" type="Timer" parent="ProgressBar/Hero/UpdateBubble"]
|
||||
[node name="Timer" type="Timer" parent="ProgressBar/Hero/SpeechBubble"]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="Container" type="Container" parent="ProgressBar"]
|
||||
@@ -199,4 +211,4 @@ offset_top = 34.0
|
||||
offset_right = 231.0
|
||||
offset_bottom = 54.0
|
||||
|
||||
[connection signal="timeout" from="ProgressBar/Hero/UpdateBubble/Timer" to="ProgressBar/Hero/UpdateBubble" method="_on_timer_timeout"]
|
||||
[connection signal="timeout" from="ProgressBar/Hero/SpeechBubble/Timer" to="ProgressBar/Hero/SpeechBubble" method="_on_timer_timeout"]
|
||||
|
||||
@@ -155,6 +155,7 @@ text = "Generate Quest"
|
||||
|
||||
[node name="GenerateQuestDialog" type="Control" parent="."]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@@ -182,7 +183,6 @@ grow_vertical = 2
|
||||
|
||||
[node name="GenerateQuest" type="VBoxContainer" parent="GenerateQuestDialog/Window"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="GenerateQuestDialog/Window/GenerateQuest"]
|
||||
@@ -300,6 +300,7 @@ text = "BACK"
|
||||
|
||||
[node name="PostQuest" type="VBoxContainer" parent="GenerateQuestDialog/Window"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="GenerateQuestDialog/Window/PostQuest"]
|
||||
|
||||
Reference in New Issue
Block a user