Restructured files and worked on more complex quest progression

This commit is contained in:
2025-08-11 02:16:39 -04:00
parent 434216ca29
commit 95a7db036b
47 changed files with 475 additions and 53 deletions

1
data/items/accessory.gd Normal file
View File

@@ -0,0 +1 @@
extends Equipment

View File

@@ -0,0 +1 @@
uid://cgj83ykwblo6h

1
data/items/armor.gd Normal file
View File

@@ -0,0 +1 @@
extends Equipment

1
data/items/armor.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://br7m0m1b3pt7u

1
data/items/blueprint.gd Normal file
View File

@@ -0,0 +1 @@
extends Item

View File

@@ -0,0 +1 @@
uid://bsacg2p5p52i6

1
data/items/consumable.gd Normal file
View File

@@ -0,0 +1 @@
class_name Consumable extends Item

View File

@@ -0,0 +1 @@
uid://u4b5geefms0g

1
data/items/equipment.gd Normal file
View File

@@ -0,0 +1 @@
class_name Equipment extends Item

View File

@@ -0,0 +1 @@
uid://8rqg7oxmunog

1
data/items/item.gd Normal file
View File

@@ -0,0 +1 @@
class_name Item extends Object

1
data/items/item.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://dir7x2m1stwg2

1
data/items/recipe.gd Normal file
View File

@@ -0,0 +1 @@
extends Item

1
data/items/recipe.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://dng2w33raj38l

1
data/items/resource.gd Normal file
View File

@@ -0,0 +1 @@
extends Item

View File

@@ -0,0 +1 @@
uid://cjbonsakj28qs

1
data/items/weapon.gd Normal file
View File

@@ -0,0 +1 @@
extends Equipment

1
data/items/weapon.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://bgn8ipx38g28o

View File

@@ -1 +0,0 @@
Aseir, Haseid, Kheed, Zasheir, Fodel, Glar, Grigor, Igan, Ivor, Kosef, Mival, Pavel, Sergor, Darvin, Dorn, Evendur, Gorstag, Helm, Morn, Randal, Stedd, Ander, Blath, Bran, Frath, Geth, Lander, Luth, Malcer, Stor, Taman, Bareris, Kethoth, Mumed, Urhur, Borivik, Faurgar, Jandar, Kanithar, Madislak, Ralmevik, Shaumar, Vladislak, Chen, Chi, Fai, Jiang, Jun, Lian, Long, Meng, Shan, Wen, Anton, Diero, Marcon, Pieron, Rimardo, Romero, Salazar, Umbero, Atala, Ceidil, Hama, Jasmal, Meilil, Yasheira, Zasheida, Arveene, Esvele, Jhessail, Kerri, Lureene, Miri, Rowan, Tessele, Alethra, Kara, Katernin, Mara, Natali, Olma, Tana, Zora Betha, Cefrey, Kethra, Mara, Olga, Silifrey, Westra, Arizima, Chathi, Nephis, Nulara, Murithi, Sefris, Thola, Umara, Zolis, Hulmarra, Immith, Imzel, Navarra, Shevarra, Tammith. Yuldra, Bai, Chao, Jia, Lei, Mei, Qiao, Shui, Tai, Balama, Dona, Faila, Jalana, Luisa, Marta, Quara, Selise, Vonda

BIN
graphics/pom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

40
graphics/pom.png.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dcrhry67g00vk"
path="res://.godot/imported/pom.png-b0a176fce3fc3f408ca2ec22564352a4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/pom.png"
dest_files=["res://.godot/imported/pom.png-b0a176fce3fc3f408ca2ec22564352a4.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

68
scenes/start_menu.tscn Normal file
View File

@@ -0,0 +1,68 @@
[gd_scene load_steps=2 format=3 uid="uid://cnvl7f3066u7o"]
[ext_resource type="Script" uid="uid://dco3n63irwntu" path="res://scripts/start_menu.gd" id="1_ouf4f"]
[node name="Start Menu" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_ouf4f")
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 1)
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -630.0
offset_top = -247.0
offset_right = 630.0
offset_bottom = -39.0
grow_horizontal = 2
grow_vertical = 2
[node name="Label" type="Label" parent="VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 100
text = "PomChronicles:"
horizontal_alignment = 1
[node name="Label2" type="Label" parent="VBoxContainer"]
modulate = Color(0.45840502, 0.45840508, 0.45840502, 1)
layout_mode = 2
theme_override_font_sizes/font_size = 48
text = "We're going to be the bestest guild ever, right? Right?!?"
horizontal_alignment = 1
[node name="Button" type="Button" parent="."]
modulate = Color(4.415934, 4.415934, 4.415934, 1)
custom_minimum_size = Vector2(1000, 250)
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -75.5
offset_top = 154.5
offset_right = 75.5
offset_bottom = 229.5
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 48
text = "START"
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]

View File

@@ -27,6 +27,7 @@ var job : JobData
var stats : StatBlock var stats : StatBlock
var gold : int = 0 var gold : int = 0
var quest : Quest var quest : Quest
var inventory : Dictionary[Vector2, Item] = {}
func _init() -> void: func _init() -> void:
stats = StatBlock.new() stats = StatBlock.new()
@@ -53,6 +54,20 @@ func assign_quest(quest : Quest) -> void:
func full_name() -> String: func full_name() -> String:
return given_name + " " + surname return given_name + " " + surname
func gain_level() -> void:
level += 1
#TODO: Make stats improve based on job
Game.notice("%s has reached level %d!" % [full_name(), level])
func gain_exp(amount : int) -> void:
exp += amount
while exp >= get_tnl():
exp -= get_tnl()
gain_level()
func gain_gold(amount :int) -> void:
gold += amount
func get_tnl() -> int: func get_tnl() -> int:
if job: if job:
return job.get_tnl(level) return job.get_tnl(level)

View File

@@ -6,14 +6,11 @@ var quest_log : QuestLog = null
var top_menu : TopMenu = null var top_menu : TopMenu = null
var active : bool = true var active : bool = true
var end_shift_confirmation : ConfirmationDialog var end_shift_confirmation : ConfirmationDialog
var end_shift_confirm_template = preload("res://end_shift_confirmation.tscn") var end_shift_confirm_template = preload("res://templates/end_shift_confirmation.tscn")
func _ready() -> void: func _ready() -> void:
DisplayServer.register_additional_output(self) DisplayServer.register_additional_output(self)
end_shift_confirmation = end_shift_confirm_template.instantiate() end_shift_confirmation = end_shift_confirm_template.instantiate()
add_child(end_shift_confirmation) add_child(end_shift_confirmation)
#var file =FileAccess.open("res://name.txt",FileAccess.READ)
#var text =file.get_line()
#var nmnames = text.remove_chars(" ").split(",")
func _process(delta: float) -> void: func _process(delta: float) -> void:
if active and Input.is_action_just_pressed("switch modes"): if active and Input.is_action_just_pressed("switch modes"):

View File

@@ -15,8 +15,7 @@ func generate_quest() -> void:
func update_quest_window() -> void: func update_quest_window() -> void:
if quest: if quest:
%NameField.text = quest.name %NameField.text = quest.name
match(quest.difficulty): %DifficultyField.text = quest.difficulty_name()
1: %DifficultyField.text = "Trivial"
%LocationField.text = quest.location %LocationField.text = quest.location
#for reward in quest.rewards.: #for reward in quest.rewards.:

View File

@@ -3,8 +3,8 @@ extends Node
const visitors = { const visitors = {
"test": { "test": {
"data":preload("res://test_adventurer.tscn"), "data":preload("res://templates/test_adventurer.tscn"),
"sprite":preload("res://test_adventurer_sprite.tscn") "sprite":preload("res://templates/test_adventurer_sprite.tscn")
} }
} }

View File

@@ -1,7 +1,7 @@
class_name GamePanel extends MarginContainer class_name GamePanel extends MarginContainer
const notice_template = preload("res://notice_panel.tscn") const notice_template = preload("res://templates/notice_panel.tscn")
const quest_progress_bar_template = preload("res://quest_progress_bar.tscn") const quest_progress_bar_template = preload("res://templates/quest_progress_bar.tscn")
signal time_changed(time : float) signal time_changed(time : float)
@@ -15,8 +15,8 @@ func _process(delta: float) -> void:
func add_quest_progress_bar(quest : Quest) -> void: func add_quest_progress_bar(quest : Quest) -> void:
var qpb : QuestProgressBar = quest_progress_bar_template.instantiate() var qpb : QuestProgressBar = quest_progress_bar_template.instantiate()
qpb.setup(quest)
%QuestList.add_child(qpb) %QuestList.add_child(qpb)
qpb.setup(quest)
#TODO: Change the hero portrait to match #TODO: Change the hero portrait to match
if quest.steps > 1: if quest.steps > 1:
for i in range(quest.steps-1): for i in range(quest.steps-1):

View File

@@ -1,6 +1,6 @@
extends PanelContainer extends PanelContainer
const npc_profile_window_template = preload("res://npc_profile_window.tscn") const npc_profile_window_template = preload("res://templates/npc_profile_window.tscn")
var _enabled: bool var _enabled: bool
var enabled: bool: var enabled: bool:
get: get:

View File

@@ -1,6 +1,6 @@
class_name Npc extends Person class_name Npc extends Person
const popup_template = preload("res://profile_popup.tscn") const popup_template = preload("res://templates/profile_popup.tscn")
var profile_popup var profile_popup
@export var is_player : bool = false @export var is_player : bool = false

View File

@@ -6,9 +6,27 @@ enum Status{
TAKEN, TAKEN,
IN_PROGRESS, IN_PROGRESS,
COMPLETED, COMPLETED,
FAILED FAILED,
CLOSED
} }
class Event:
enum Type{
WAIT,
COMBAT,
CHOICE
}
var type : Type = Type.WAIT
var enemies : Array[String] = []
var time : float = 1
var time_elapsed
signal completed()
func process(delta : float) -> void:
#TODO: Make quest combat work
time_elapsed += delta
if time_elapsed >= time:
completed.emit()
var name : String = "A Basic Quest" var name : String = "A Basic Quest"
var desc : String = "The default quest, with no special anything." var desc : String = "The default quest, with no special anything."
@@ -17,10 +35,7 @@ var location : String
var steps : int = 1 var steps : int = 1
var rewards : Dictionary var rewards : Dictionary
var length : float = 10 var length : float = 10
var step_outcomes : Array = [ var events : Array[Event] = []
{"pass":"I succeeded!", "fail":"I failed!"}
]
var progress : float = 0 var progress : float = 0
@@ -57,6 +72,8 @@ func complete() -> void:
#else it's a guild item they'll bring back for us #else it's a guild item they'll bring back for us
Game.notice("%s completed the quest '%s'!" % [questor.full_name(), name]) Game.notice("%s completed the quest '%s'!" % [questor.full_name(), name])
func num_events() -> int:
return len(events)
#TODO: Put in quest requirements #TODO: Put in quest requirements
func is_eligible(member : AdventurerData) -> bool: func is_eligible(member : AdventurerData) -> bool:
return !taken return !taken

View File

@@ -1,7 +1,7 @@
class_name QuestBoardEntry extends Button class_name QuestBoardEntry extends Button
const quest_window_template = preload("res://quest_window.tscn") const quest_window_template = preload("res://templates/quest_window.tscn")
var quest : Quest = null var quest : Quest = null
@onready var tex_icon : TextureRect = %Icon @onready var tex_icon : TextureRect = %Icon
@onready var name_label : Label = %NameLabel @onready var name_label : Label = %NameLabel

View File

@@ -1,6 +1,6 @@
class_name QuestBoardWindow extends Popup class_name QuestBoardWindow extends Popup
const entry_template = preload("res://quest_board_entry.tscn") const entry_template = preload("res://templates/quest_board_entry.tscn")
@onready var entry_list : VBoxContainer = %Entries @onready var entry_list : VBoxContainer = %Entries

View File

@@ -0,0 +1,45 @@
extends Window
@onready var nameLabel : Label = %NameLabel
@onready var difficultyLabel : Label = %DifficultyLabel
@onready var locationLabel : Label = %LocationLabel
@onready var advRewardList : GridContainer = %AdventurerRewardList
@onready var guildRewardList : GridContainer = %GuildRewardList
var quest : Quest
func setup(qst : Quest) -> void:
quest = qst
quest.status_changed.connect(_on_quest_changed)
update()
#TODO: Show quest rewards
func update() -> void:
nameLabel.text = quest.name
difficultyLabel.text = quest.difficulty_name()
locationLabel.text = quest.location
#TODO: Show the current status of the quest
func close() -> void:
hide()
queue_free()
func _on_quest_changed(status : Quest.Status) -> void:
if status == Quest.Status.CLOSED:
close()
else:
update()
func _on_remove_quest_confirm() -> void:
Guild.remove_quest(quest)
close()
func _on_remove_quest_cancel() -> void:
%ConfirmDialog.hide()
func _on_remove_button_pressed() -> void:
pass
func _on_back_button_pressed() -> void:
close()

View File

@@ -0,0 +1 @@
uid://cip5x34n08ilk

View File

@@ -1,6 +1,6 @@
class_name QuestLog extends Control class_name QuestLog extends Control
const entry_template = preload("res://quest_log_entry.tscn") const entry_template = preload("res://templates/quest_log_entry.tscn")
@onready var entry_list : VBoxContainer = %Entries @onready var entry_list : VBoxContainer = %Entries
var entries : Array[QuestLogEntry] = [] var entries : Array[QuestLogEntry] = []

View File

@@ -1,5 +1,6 @@
extends PanelContainer extends PanelContainer
const quest_info_window_template = preload("res://templates/quest_info_window.tscn")
var _enabled: bool var _enabled: bool
var enabled: bool: var enabled: bool:
@@ -30,7 +31,10 @@ func setup(qst : Quest) -> void:
func _on_gui_input(event: InputEvent) -> void: func _on_gui_input(event: InputEvent) -> void:
var evt = event as InputEventMouseButton var evt = event as InputEventMouseButton
if evt and evt.button_index == MOUSE_BUTTON_LEFT and evt.pressed: if evt and evt.button_index == MOUSE_BUTTON_LEFT and evt.pressed:
print("Quest clicked!") var wnd = quest_info_window_template.instantiate()
add_child(wnd)
wnd.setup(quest)
wnd.popup_centered()
func _on_quest_status_changed(status: Quest.Status) -> void: func _on_quest_status_changed(status: Quest.Status) -> void:
match(status): match(status):

View File

@@ -1,16 +1,20 @@
class_name QuestProgressBar extends Control class_name QuestProgressBar extends Control
const waypoint_template = preload("res://waypoint.tscn") const waypoint_template = preload("res://templates/waypoint.tscn")
var length : float var length : float
var waypoints : Array = [] var waypoints : Array[Waypoint] = []
@onready var hero_offset : Vector2 = %Hero.position @onready var hero_offset : Vector2 = %Hero.position
@onready var hero : HeroIcon = %Hero @onready var hero : HeroIcon = %Hero
@onready var heroLabel : Label = %HeroLabel
@onready var startpoint : Endpoint = %Start @onready var startpoint : Endpoint = %Start
@onready var endpoint : Endpoint = %End @onready var endpoint : Endpoint = %End
@onready var bar : TextureProgressBar = $ProgressBar @onready var bar : TextureProgressBar = $ProgressBar
@onready var path : Control = %Path @onready var path : Control = %Path
@onready var speech_bubble = %SpeechBubble
var quest : Quest = null var quest : Quest = null
var current_event : Quest.Event = null
var time_elapsed : float = 0 var time_elapsed : float = 0
var next_waypoint = 0
#signal value_changed(value : float) #signal value_changed(value : float)
#var min_value #var min_value
#var max_value #var max_value
@@ -22,17 +26,16 @@ var time_elapsed : float = 0
#var allow_greater #var allow_greater
func _ready() -> void: func _ready() -> void:
length = path.size.x length = path.size.x
if quest:
#Generate the waypoints
generate_waypoints()
#TODO: Change the hero's portrait
bar.value = quest.progress
hero.position = hero_offset + Vector2(length * bar.value / bar.max_value, 0) hero.position = hero_offset + Vector2(length * bar.value / bar.max_value, 0)
func _process(delta: float) -> void: func _process(delta: float) -> void:
if time_elapsed < quest.length: if time_elapsed < quest.length:
time_elapsed += delta if current_event != null:
progress_quest() if current_event.type != Quest.Event.Type.COMBAT:
current_event.process(delta)
else:
time_elapsed += delta
progress_quest()
func generate_waypoints(): func generate_waypoints():
if len(waypoints) > 0: if len(waypoints) > 0:
@@ -40,16 +43,20 @@ func generate_waypoints():
wp.queue_free() wp.queue_free()
waypoints = [] waypoints = []
for i in range(1,quest.steps): #Include the "end" in the count
var pct : float = i / float(quest.steps) var num = quest.num_events()+1
add_waypoint( pct, quest.step_outcomes[i]) for i in range(1,num):
var pct : float = i / float(num)
add_waypoint( pct, quest.events[i-1])
func add_waypoint(pct : float, msgs : Dictionary): func add_waypoint(pct : float, event : Quest.Event):
var wp = waypoint_template.instantiate() var wp = waypoint_template.instantiate()
waypoints.append(wp) waypoints.append(wp)
wp.percent = pct wp.percent = pct
#TODO: Make events matter
wp.event = event
%Waypoints.add_child(wp) %Waypoints.add_child(wp)
wp.global_position = global_position + Vector2(pct * length - 16, -9) wp.global_position = %Waypoints.global_position + Vector2(pct * length - 16, -9)
if bar.value / bar.max_value >= pct: if bar.value / bar.max_value >= pct:
wp.fill = true wp.fill = true
@@ -59,13 +66,36 @@ func update_waypoints(value : float) -> void:
wp.fill = (bar.value / bar.max_value >= wp.percent) wp.fill = (bar.value / bar.max_value >= wp.percent)
endpoint.fill = (bar.value / bar.max_value >= endpoint.percent) endpoint.fill = (bar.value / bar.max_value >= endpoint.percent)
func start_event(event : Quest.Event, offset : float) -> void:
current_event = event
current_event.completed.connect(_on_event_complete)
event.time_elapsed = offset
func setup(quest : Quest) -> void: func setup(quest : Quest) -> void:
self.quest = quest self.quest = quest
heroLabel.text = quest.questor.full_name()
time_elapsed = 0 time_elapsed = 0
#Generate the waypoints
generate_waypoints()
#TODO: Change the hero's portrait
bar.value = quest.progress
func progress_quest() -> void: func progress_quest() -> void:
bar.value = clampf(time_elapsed / quest.length, 0, bar.max_value) var pct = time_elapsed / quest.length
if next_waypoint < len(waypoints) and pct >= waypoints[next_waypoint].percent:
start_event(waypoints[next_waypoint].event, (pct - waypoints[next_waypoint].percent) * quest.length)
pct = waypoints[next_waypoint].percent
waypoints[next_waypoint].blink(true)
bar.value = clampf(pct, 0, bar.max_value)
hero.position = hero_offset + Vector2(length * bar.value / bar.max_value, 0) hero.position = hero_offset + Vector2(length * bar.value / bar.max_value, 0)
if time_elapsed >= quest.length: if time_elapsed >= quest.length:
quest.complete() quest.complete()
update_waypoints(bar.value) update_waypoints(bar.value)
func _on_event_complete() -> void:
#TODO: Show event message!
speech_bubble.show_message("Event complete!")
waypoints[next_waypoint].blink(false)
next_waypoint += 1
current_event = null

View File

@@ -2,4 +2,4 @@ extends Control
func _on_button_pressed() -> void: func _on_button_pressed() -> void:
get_tree().change_scene_to_file() get_tree().change_scene_to_file("res://scenes/active_scene.tscn")

View File

@@ -1,8 +1,11 @@
extends Node2D extends Node2D
var test_adv = preload("res://test_adventurer.tscn") var test_adv = preload("res://templates/test_adventurer.tscn")
func _ready() -> void: func _ready() -> void:
#var adv : AdventurerData = test_adv.instantiate() as AdventurerData #var adv : AdventurerData = test_adv.instantiate() as AdventurerData
#Guild.register_guild_member(adv) #Guild.register_guild_member(adv)
var quest : Quest = Quest.new() var quest : Quest = Quest.new()
var evt : Quest.Event = Quest.Event.new()
evt.time = 10
quest.events.append(evt)
Guild.add_quest(quest) Guild.add_quest(quest)

View File

@@ -1,8 +1,8 @@
class_name TopMenu extends Control class_name TopMenu extends Control
const member_panel_entry_template = preload("res://member_panel_entry.tscn") const member_panel_entry_template = preload("res://templates/member_panel_entry.tscn")
const quest_panel_entry_template = preload("res://quest_panel_entry.tscn") const quest_panel_entry_template = preload("res://templates/quest_panel_entry.tscn")
const guild_info_window_template = preload("res://guild_info_window.tscn") const guild_info_window_template = preload("res://templates/guild_info_window.tscn")
@onready var members_list = %MembersList @onready var members_list = %MembersList
@onready var members = %Members @onready var members = %Members

View File

@@ -4,7 +4,7 @@ extends NinePatchRect
@onready var timer : Timer = %Timer @onready var timer : Timer = %Timer
func _ready() -> void: func _ready() -> void:
show_message("TESTING, 1 2 3\nTESTING!!!!") pass
func show_message(msg : String, show_time : float = 1.0) -> void: func show_message(msg : String, show_time : float = 1.0) -> void:

View File

@@ -1,7 +1,10 @@
class_name Waypoint extends Control class_name Waypoint extends Control
var event : Quest.Event = null
var percent : float = 0 var percent : float = 0
var filled: bool var filled: bool
var blink_tween : Tween
var blinking : bool = false
var fill: bool : var fill: bool :
get: get:
return filled return filled
@@ -9,10 +12,22 @@ var fill: bool :
if value != filled: if value != filled:
set_fill(value) set_fill(value)
func blink(blnk : bool) -> void:
if blinking == blnk:
return
blinking = blnk
if blinking:
blink_tween = create_tween()
blink_tween.tween_property($Dot,"modulate:a", 0, .5)
blink_tween.tween_property($Dot,"modulate:a", 1, .5)
blink_tween.set_loops(-1)
else:
blink_tween.stop()
blink_tween = null
func set_fill(value : bool) -> void: func set_fill(value : bool) -> void:
filled = value filled = value
if value: if value and !blinking:
$Dot.visible = true $Dot.visible = true
$Fill.modulate = Color.SEA_GREEN $Fill.modulate = Color.SEA_GREEN
else: else:

View File

@@ -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="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"] [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="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://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="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"] [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) 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")] [node name="Quest Board" parent="." instance=ExtResource("7_hph4e")]
position = Vector2(935, 32) 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"] [editable path="Sprites/Receptionist"]

View File

@@ -106,7 +106,10 @@ layout_mode = 2
theme_override_styles/normal = SubResource("StyleBoxFlat_q6wja") theme_override_styles/normal = SubResource("StyleBoxFlat_q6wja")
text = "Show Quests" 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 unique_name_in_owner = true
visible = false visible = false
clip_contents = false clip_contents = false
@@ -114,7 +117,7 @@ custom_minimum_size = Vector2(260, 100)
layout_mode = 2 layout_mode = 2
horizontal_scroll_mode = 0 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 unique_name_in_owner = true
custom_minimum_size = Vector2(300, 100) custom_minimum_size = Vector2(300, 100)
layout_mode = 2 layout_mode = 2

View 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"]

View File

@@ -52,6 +52,16 @@ pivot_offset = Vector2(125, 0)
size_flags_horizontal = 4 size_flags_horizontal = 4
script = ExtResource("1_3w4v3") 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="."] [node name="ProgressBar" type="TextureProgressBar" parent="."]
custom_minimum_size = Vector2(213, 14) custom_minimum_size = Vector2(213, 14)
layout_mode = 0 layout_mode = 0
@@ -143,7 +153,9 @@ position = Vector2(-1, -12)
texture = ExtResource("6_lufuo") texture = ExtResource("6_lufuo")
script = ExtResource("7_nby1n") 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 clip_contents = true
anchors_preset = -1 anchors_preset = -1
anchor_left = 1.0 anchor_left = 1.0
@@ -168,7 +180,7 @@ axis_stretch_horizontal = 1
axis_stretch_vertical = 1 axis_stretch_vertical = 1
script = ExtResource("9_pq74m") 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 unique_name_in_owner = true
layout_mode = 0 layout_mode = 0
offset_left = 5.0 offset_left = 5.0
@@ -182,7 +194,7 @@ text = "testing one 1 2 3"
vertical_alignment = 1 vertical_alignment = 1
autowrap_mode = 2 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 unique_name_in_owner = true
[node name="Container" type="Container" parent="ProgressBar"] [node name="Container" type="Container" parent="ProgressBar"]
@@ -199,4 +211,4 @@ offset_top = 34.0
offset_right = 231.0 offset_right = 231.0
offset_bottom = 54.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"]

View File

@@ -155,6 +155,7 @@ text = "Generate Quest"
[node name="GenerateQuestDialog" type="Control" parent="."] [node name="GenerateQuestDialog" type="Control" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
visible = false
layout_mode = 1 layout_mode = 1
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
@@ -182,7 +183,6 @@ grow_vertical = 2
[node name="GenerateQuest" type="VBoxContainer" parent="GenerateQuestDialog/Window"] [node name="GenerateQuest" type="VBoxContainer" parent="GenerateQuestDialog/Window"]
unique_name_in_owner = true unique_name_in_owner = true
visible = false
layout_mode = 2 layout_mode = 2
[node name="HBoxContainer2" type="HBoxContainer" parent="GenerateQuestDialog/Window/GenerateQuest"] [node name="HBoxContainer2" type="HBoxContainer" parent="GenerateQuestDialog/Window/GenerateQuest"]
@@ -300,6 +300,7 @@ text = "BACK"
[node name="PostQuest" type="VBoxContainer" parent="GenerateQuestDialog/Window"] [node name="PostQuest" type="VBoxContainer" parent="GenerateQuestDialog/Window"]
unique_name_in_owner = true unique_name_in_owner = true
visible = false
layout_mode = 2 layout_mode = 2
[node name="HBoxContainer2" type="HBoxContainer" parent="GenerateQuestDialog/Window/PostQuest"] [node name="HBoxContainer2" type="HBoxContainer" parent="GenerateQuestDialog/Window/PostQuest"]