From 00ef506689c901847ca7681e9da477485d91ac53 Mon Sep 17 00:00:00 2001 From: Bo Thompson Date: Sat, 27 Sep 2025 18:19:22 -0400 Subject: [PATCH] Work on quest locations and the first, brokedown guildhall scene. --- dialogic/timelines/guild_entrance.dtl | 3 + external/questor-shadow.png | Bin 0 -> 345 bytes external/questor-shadow.png.import | 40 +++ scenes/active_scene.tscn | 1 + scenes/first_guildhall.tscn | 431 ++++++++++++++++++++++++++ scenes/guild_card.tscn | 46 ++- scripts/adventurer.gd | 29 +- scripts/adventurer_portrait.gd | 26 +- scripts/guild_card_scene.gd | 35 ++- scripts/portrait_customizer.gd | 33 +- scripts/quest_event_location.gd | 14 + scripts/quest_event_location.gd.uid | 1 + scripts/quest_sprite.gd | 4 + scripts/questor_sprite.gd | 1 + scripts/set_shifts.gd | 5 + templates/hero_portrait.tscn | 26 ++ templates/portrait_customizer.tscn | 134 +++----- templates/quest_event_location.tscn | 37 +++ templates/questor_sprite.tscn | 109 ++++++- 19 files changed, 854 insertions(+), 121 deletions(-) create mode 100644 external/questor-shadow.png create mode 100644 external/questor-shadow.png.import create mode 100644 scenes/first_guildhall.tscn create mode 100644 scripts/quest_event_location.gd create mode 100644 scripts/quest_event_location.gd.uid create mode 100644 templates/quest_event_location.tscn diff --git a/dialogic/timelines/guild_entrance.dtl b/dialogic/timelines/guild_entrance.dtl index b205560..f18c1de 100644 --- a/dialogic/timelines/guild_entrance.dtl +++ b/dialogic/timelines/guild_entrance.dtl @@ -1,3 +1,6 @@ +And after that, all that was left was to... just open the guild gate, I guess? +It took me a little while to find the thing in the middle of Nestor's Woods despite growing up there. I knew Guildhalls were hidden in another dimension, but I'd always pictured the Guild Gates would be more... magical looking? +do Game.switch_scenes("first_guildhall") player: (Wow this is a mess... nobody's been here for a while. I should...) - set up some lights. Hey, no touching! This isn't your home! Get out! diff --git a/external/questor-shadow.png b/external/questor-shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..e597f89667d9d42e3646837661f1ffdb0a37fd1e GIT binary patch literal 345 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSjKx9jP7LeL$-D%zg*{yyLn`LH zy=BOE$UuPQ0Qdj@#Vh<4cz86he7j|AdQ^6IVbBhcaioE3B|UNv;?I4yvH$tEP$v41 zxwqcW%p32cHj13q`Lg;#eB@G|kKTW*f2{tZbcD~|>c{FUN=JBYqd$aax^_sFeftm{ z#F@nA%ejB)6osS{TRucPapo;%PgwI(de*Nm+i&_asvmeJl2FXGVdu*G{<>eS6TW?~ zpDLVCec61=(z#5W{`H{&jH`;gCJ5DqMlh~=rtcW^BeanW23^8;?x&UidybZ((>0H# void: func generate_appearance(features=null) -> void: if features == null: - appearance = Appearance.new() + appearance = { + "hair":{ + "color":"", + "type":"" + }, + "skin":{ + "color":"", + "type":"" + }, + "eyes":{ + "color":"", + "type":"" + } + } #TODO: Handle different types of hair and eyes - appearance.hair_color = AdventurerPortrait.random_color(ColorVariant.Types.HAIR) + appearance.hair.color = AdventurerPortrait.random_color(ColorVariant.Types.HAIR) #appearance.hair_type = randi_range(0,len(job.portrait.hair_types) - 1) - appearance.eye_color = AdventurerPortrait.random_color(ColorVariant.Types.EYES) + appearance.eyes.color = AdventurerPortrait.random_color(ColorVariant.Types.EYES) #appearance.eye_type = randi_range(0,len(job.portrait.eye_types) - 1) - appearance.skin_color = AdventurerPortrait.random_color(ColorVariant.Types.SKIN) + appearance.skin.color = AdventurerPortrait.random_color(ColorVariant.Types.SKIN) changed.emit() diff --git a/scripts/adventurer_portrait.gd b/scripts/adventurer_portrait.gd index d25037a..0058235 100644 --- a/scripts/adventurer_portrait.gd +++ b/scripts/adventurer_portrait.gd @@ -22,9 +22,29 @@ func add_color_variants(list : Array) -> void: func set_appearance(appearance) -> void: - set_color(ColorVariant.Types.HAIR, appearance.hair_color) - set_color(ColorVariant.Types.SKIN, appearance.skin_color) - set_color(ColorVariant.Types.EYES, appearance.eye_color) + set_color(ColorVariant.Types.HAIR, appearance.hair.color) + #set_type(ColorVariant.Types.HAIR, appearance.hair.type) + set_color(ColorVariant.Types.SKIN, appearance.skin.color) + #set_color(ColorVariant.Types.SKIN, appearance.skin.type) + set_color(ColorVariant.Types.EYES, appearance.eyes.color) + #set_color(ColorVariant.Types.EYES, appearance.eyes.type) + +func get_random_appearance() -> Dictionary: + var app = { + "hair":{ + "type":"", + "color": random_color(ColorVariant.Types.HAIR) + }, + "skin":{ + "type":"", + "color": random_color(ColorVariant.Types.SKIN) + }, + "eyes":{ + "type":"", + "color": random_color(ColorVariant.Types.EYES) + }, + } + return app static func random_color(type : ColorVariant.Types) -> String: var lst diff --git a/scripts/guild_card_scene.gd b/scripts/guild_card_scene.gd index f986d11..33191bf 100644 --- a/scripts/guild_card_scene.gd +++ b/scripts/guild_card_scene.gd @@ -1,26 +1,39 @@ extends Control -@onready var firstEdit : TextEdit = %FirstNameEdit -@onready var lastEdit : TextEdit = %LastNameEdit -@onready var signButton : Button = %SignButton -@onready var portraitButton : TextureButton = %PortraitButton + + +@onready var first_edit : TextEdit = %FirstNameEdit +@onready var last_edit : TextEdit = %LastNameEdit +@onready var sign_button : Button = %SignButton +@onready var portrait_button : TextureButton = %PortraitButton @onready var signature : TextureRect = %Signature @onready var write_sound : AudioStreamPlayer = $AudioStreamPlayer +@onready var portrait_customizer = $PortraitCustomizer +@onready var portrait : AdventurerPortrait = %HeroPortrait +@onready var portrait_container = %PortraitContainer var first_set : bool = false var last_set : bool = false var portrait_set : bool = false func validate_signature() -> void: - signButton.disabled = !(first_set and last_set and portrait_set) - -func _on_portrait_button_pressed() -> void: - #Open the Portrait Screesn + sign_button.disabled = !(first_set and last_set and portrait_set) + +func _on_portrait_customized() -> void: + Game.player_data.appearance = portrait_customizer.appearance + portrait.set_appearance(portrait_customizer.appearance) + portrait_container.visible = true + portrait_customizer.visible = false portrait_set = true validate_signature() + +func _on_portrait_button_pressed() -> void: + #Open the Portrait Screen + portrait_customizer.visible = true + func _on_first_name_edit_text_changed() -> void: - if firstEdit.text != "": + if first_edit.text != "": first_set = true else: last_set = true @@ -28,7 +41,7 @@ func _on_first_name_edit_text_changed() -> void: func _on_last_name_edit_text_changed() -> void: - if lastEdit.text != "": + if last_edit.text != "": last_set = true else: last_set = false @@ -38,7 +51,7 @@ func update_signature_threshold(value : float) -> void: signature.set_instance_shader_parameter("threshold", value) func _on_sign_button_pressed() -> void: - signButton.visible = false + sign_button.visible = false var tween = create_tween() Game.player_data.name = %FirstNameEdit.text Game.player_data.surname = %LastNameEdit.text diff --git a/scripts/portrait_customizer.gd b/scripts/portrait_customizer.gd index eb32f73..79cab8c 100644 --- a/scripts/portrait_customizer.gd +++ b/scripts/portrait_customizer.gd @@ -1,11 +1,20 @@ extends Control @onready var portrait : AdventurerPortrait = $HeroPortrait + var option = 0 var opt_key : String = "" var choices : Array = [] +var appearance : Dictionary + +signal portrait_customized() func _ready() -> void: + if Game.player_data.appearance.size() != 0: + appearance = Game.player_data.appearance + else: + appearance = portrait.get_random_appearance() + portrait.set_appearance(appearance) choices.resize(portrait.option_sets.size()) choices.fill(0) opt_key = portrait.option_sets.keys()[option] @@ -16,7 +25,9 @@ func _on_left_button_pressed() -> void: choices[option] -= 1 if choices[option] < 0: choices[option] = portrait.option_sets[opt_key].get_child_count() - 1 - portrait.option_sets[opt_key].get_child(choices[option]).visible = true + var node = portrait.option_sets[opt_key].get_child(choices[option]) + appearance[opt_key].type = node.name + node.visible = true func _on_right_button_pressed() -> void: @@ -24,8 +35,9 @@ func _on_right_button_pressed() -> void: choices[option] += 1 if choices[option] >= portrait.option_sets[opt_key].get_child_count(): choices[option] -= portrait.option_sets[opt_key].get_child_count() - portrait.option_sets[opt_key].get_child(choices[option]).visible = true - pass # Replace with function body. + var node = portrait.option_sets[opt_key].get_child(choices[option]) + appearance[opt_key].type = node.name + node.visible = true func _on_up_button_pressed() -> void: @@ -47,4 +59,19 @@ func _on_down_button_pressed() -> void: func _on_color_pressed(slot : ColorVariant.Types, col : String) -> void: + var key : String + match(slot): + ColorVariant.Types.SKIN: key = "skin" + ColorVariant.Types.HAIR: key = "hair" + ColorVariant.Types.EYES: key = "eyes" + appearance[key].color = col portrait.set_color(slot, col) + + +func _on_accept_button_pressed() -> void: + portrait_customized.emit() + + +func _on_random_button_pressed() -> void: + appearance = portrait.get_random_appearance() + portrait.set_appearance(appearance) diff --git a/scripts/quest_event_location.gd b/scripts/quest_event_location.gd new file mode 100644 index 0000000..93243b6 --- /dev/null +++ b/scripts/quest_event_location.gd @@ -0,0 +1,14 @@ +extends Control + +var view : QuestView +var quest : Quest +var event : Quest.Event +var speed : float +func _ready(): + position.x = (quest.progress - event.progress_point) * quest.length + +func _process(delta: float) -> void: + position.x -= view.base_speed * delta + +func activate(...params): + pass diff --git a/scripts/quest_event_location.gd.uid b/scripts/quest_event_location.gd.uid new file mode 100644 index 0000000..f2fab5d --- /dev/null +++ b/scripts/quest_event_location.gd.uid @@ -0,0 +1 @@ +uid://b0majitpmpdoq diff --git a/scripts/quest_sprite.gd b/scripts/quest_sprite.gd index 13cc1da..f18c7aa 100644 --- a/scripts/quest_sprite.gd +++ b/scripts/quest_sprite.gd @@ -1,5 +1,8 @@ class_name QuestSprite extends Control + +@onready var lifebar : TextureProgressBar = $LifeBar + var life : int = 1 var max_life : int = 1 var energy : int = 1 @@ -25,6 +28,7 @@ func attack(target : QuestSprite) -> void: func take_damage(source : QuestSprite, amount : int) -> void: busy.emit() life = clampi(life - amount, 0, max_life) + lifebar.value = life * 100 / max_life if life == 0: print("%s killed %s!" % [source.name, name]) die(source) diff --git a/scripts/questor_sprite.gd b/scripts/questor_sprite.gd index d9d63e9..f8ae506 100644 --- a/scripts/questor_sprite.gd +++ b/scripts/questor_sprite.gd @@ -14,6 +14,7 @@ func _ready() -> void: exp = data.exp stats = StatBlock.copy(data.stats) gold = data.gold + data.changed.connect(_on_questor_changed) func _process(delta) -> void: if banner_lag > 0: diff --git a/scripts/set_shifts.gd b/scripts/set_shifts.gd index 7972a05..4bf1476 100644 --- a/scripts/set_shifts.gd +++ b/scripts/set_shifts.gd @@ -31,4 +31,9 @@ func _on_add_shift_button_pressed() -> void: func _on_accept_button_pressed() -> void: + var schedule = [] + for child : ShiftCycle in cycle_list: + schedule.append([child.work_shift, child.open_shift]) + Guild.shift_schedule = schedule + Game.switch_dialogue("game_start", "") pass # Replace with function body. diff --git a/templates/hero_portrait.tscn b/templates/hero_portrait.tscn index ca26880..2536896 100644 --- a/templates/hero_portrait.tscn +++ b/templates/hero_portrait.tscn @@ -117,6 +117,7 @@ layout_mode = 3 anchors_preset = 0 offset_right = 40.0 offset_bottom = 40.0 +mouse_filter = 2 script = ExtResource("1_ovplg") metadata/_custom_type_script = "uid://m86jmtwv1a22" @@ -125,6 +126,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("2_rvj82") [node name="Head" type="TextureRect" parent="."] @@ -134,6 +136,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("4_dcd5x") script = ExtResource("5_riel4") @@ -144,6 +147,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("10_3uw50") script = ExtResource("5_riel4") @@ -154,11 +158,13 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +mouse_filter = 2 [node name="A" type="Control" parent="Hair"] anchors_preset = 0 offset_right = 40.0 offset_bottom = 40.0 +mouse_filter = 2 [node name="FG Shadow" type="TextureRect" parent="Hair/A"] z_index = 4 @@ -167,6 +173,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("8_2gbpo") script = ExtResource("5_riel4") @@ -177,6 +184,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("7_nwmjm") script = ExtResource("5_riel4") type = 1 @@ -188,6 +196,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("14_wbk3e") script = ExtResource("5_riel4") type = 1 @@ -197,6 +206,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("17_m1scf") [node name="Hat FG" type="TextureRect" parent="."] @@ -205,6 +215,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("18_prh5n") [node name="Eyes" type="Control" parent="."] @@ -214,11 +225,13 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +mouse_filter = 2 [node name="A" type="Control" parent="Eyes"] anchors_preset = 0 offset_right = 40.0 offset_bottom = 40.0 +mouse_filter = 2 [node name="Eyelids" type="TextureRect" parent="Eyes/A"] z_index = 4 @@ -227,6 +240,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("13_riel4") script = ExtResource("5_riel4") @@ -235,6 +249,7 @@ visible = false anchors_preset = 0 offset_right = 40.0 offset_bottom = 40.0 +mouse_filter = 2 [node name="Eyelids" type="TextureRect" parent="Eyes/B"] z_index = 4 @@ -243,6 +258,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("14_yemgt") script = ExtResource("5_riel4") @@ -251,6 +267,7 @@ visible = false anchors_preset = 0 offset_right = 40.0 offset_bottom = 40.0 +mouse_filter = 2 [node name="Eyelids" type="TextureRect" parent="Eyes/C"] z_index = 4 @@ -259,6 +276,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("15_nwmjm") script = ExtResource("5_riel4") @@ -267,6 +285,7 @@ visible = false anchors_preset = 0 offset_right = 40.0 offset_bottom = 40.0 +mouse_filter = 2 [node name="Eyelids" type="TextureRect" parent="Eyes/D"] z_index = 4 @@ -275,6 +294,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("16_grsle") script = ExtResource("5_riel4") @@ -284,6 +304,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("11_06xpe") [node name="Irises" type="TextureRect" parent="Eyes/D"] @@ -293,6 +314,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("13_h52hx") script = ExtResource("5_riel4") type = 2 @@ -301,11 +323,13 @@ type = 2 anchors_preset = 0 offset_right = 40.0 offset_bottom = 40.0 +mouse_filter = 2 [node name="A" type="Control" parent="Brows"] anchors_preset = 0 offset_right = 40.0 offset_bottom = 40.0 +mouse_filter = 2 [node name="Brows" type="TextureRect" parent="Brows/A"] z_index = 6 @@ -314,6 +338,7 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("15_dx3tu") script = ExtResource("5_riel4") type = 1 @@ -325,5 +350,6 @@ custom_minimum_size = Vector2(512, 512) layout_mode = 0 offset_right = 512.0 offset_bottom = 512.0 +mouse_filter = 2 texture = ExtResource("9_qslms") script = ExtResource("5_riel4") diff --git a/templates/portrait_customizer.tscn b/templates/portrait_customizer.tscn index efd6568..a3f0cdb 100644 --- a/templates/portrait_customizer.tscn +++ b/templates/portrait_customizer.tscn @@ -53,6 +53,15 @@ grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_qv0tv") +[node name="ColorRect3" 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, 0.5686275) + [node name="ColorRect" type="ColorRect" parent="."] custom_minimum_size = Vector2(600, 600) layout_mode = 0 @@ -136,19 +145,13 @@ offset_bottom = 1059.0 layout_mode = 2 alignment = 1 -[node name="Button" type="Button" parent="VBoxContainer/HBoxContainer"] -layout_mode = 2 -size_flags_horizontal = 3 -theme_override_font_sizes/font_size = 100 -text = "RESET" - -[node name="Button2" type="Button" parent="VBoxContainer/HBoxContainer"] +[node name="RandomButton" type="Button" parent="VBoxContainer/HBoxContainer"] layout_mode = 2 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 100 text = "Random" -[node name="Button3" type="Button" parent="VBoxContainer"] +[node name="AcceptButton" type="Button" parent="VBoxContainer"] layout_mode = 2 theme_override_font_sizes/font_size = 100 text = "ACCEPT" @@ -186,76 +189,48 @@ theme_override_constants/h_separation = 20 theme_override_constants/v_separation = 20 columns = 5 -[node name="BlondHairButton" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] +[node name="BlondeButton" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] custom_minimum_size = Vector2(100, 100) layout_mode = 2 texture_normal = SubResource("GradientTexture1D_6y6h7") ignore_texture_size = true stretch_mode = 0 -[node name="BrownHairButton" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] +[node name="BrownButton" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] custom_minimum_size = Vector2(100, 100) layout_mode = 2 texture_normal = SubResource("GradientTexture1D_uwnmi") ignore_texture_size = true stretch_mode = 0 -[node name="RedHairButton" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] +[node name="RedButton" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] custom_minimum_size = Vector2(100, 100) layout_mode = 2 texture_normal = SubResource("GradientTexture1D_72sxj") ignore_texture_size = true stretch_mode = 0 -[node name="BlackHairButton" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] +[node name="BlackButton" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] custom_minimum_size = Vector2(100, 100) layout_mode = 2 texture_normal = SubResource("GradientTexture1D_ac3np") ignore_texture_size = true stretch_mode = 0 -[node name="BlueHairButton" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] +[node name="BlueButton" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] custom_minimum_size = Vector2(100, 100) layout_mode = 2 texture_normal = SubResource("GradientTexture1D_5l84q") ignore_texture_size = true stretch_mode = 0 -[node name="BlondHairButton2" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] +[node name="SilverButton" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] custom_minimum_size = Vector2(100, 100) layout_mode = 2 texture_normal = SubResource("GradientTexture1D_6y6h7") ignore_texture_size = true stretch_mode = 0 -[node name="BrownHairButton2" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] -custom_minimum_size = Vector2(100, 100) -layout_mode = 2 -texture_normal = SubResource("GradientTexture1D_uwnmi") -ignore_texture_size = true -stretch_mode = 0 - -[node name="RedHairButton2" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] -custom_minimum_size = Vector2(100, 100) -layout_mode = 2 -texture_normal = SubResource("GradientTexture1D_72sxj") -ignore_texture_size = true -stretch_mode = 0 - -[node name="BlackHairButton2" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] -custom_minimum_size = Vector2(100, 100) -layout_mode = 2 -texture_normal = SubResource("GradientTexture1D_ac3np") -ignore_texture_size = true -stretch_mode = 0 - -[node name="BlueHairButton2" type="TextureButton" parent="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid"] -custom_minimum_size = Vector2(100, 100) -layout_mode = 2 -texture_normal = SubResource("GradientTexture1D_5l84q") -ignore_texture_size = true -stretch_mode = 0 - [node name="SkinPanel" type="PanelContainer" parent="VBoxContainer2"] layout_mode = 2 @@ -275,79 +250,52 @@ theme_override_font_sizes/font_size = 48 text = "Skin" horizontal_alignment = 1 -[node name="HairGrid" type="GridContainer" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer"] +[node name="SkinGrid" type="GridContainer" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer"] +custom_minimum_size = Vector2(0, 220) layout_mode = 2 theme_override_constants/h_separation = 20 theme_override_constants/v_separation = 20 columns = 5 -[node name="BlondHairButton" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/HairGrid"] +[node name="PaleButton" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/SkinGrid"] custom_minimum_size = Vector2(100, 100) layout_mode = 2 texture_normal = SubResource("GradientTexture1D_6y6h7") ignore_texture_size = true stretch_mode = 0 -[node name="BrownHairButton" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/HairGrid"] -custom_minimum_size = Vector2(100, 100) -layout_mode = 2 -texture_normal = SubResource("GradientTexture1D_uwnmi") -ignore_texture_size = true -stretch_mode = 0 - -[node name="RedHairButton" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/HairGrid"] -custom_minimum_size = Vector2(100, 100) -layout_mode = 2 -texture_normal = SubResource("GradientTexture1D_72sxj") -ignore_texture_size = true -stretch_mode = 0 - -[node name="BlackHairButton" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/HairGrid"] -custom_minimum_size = Vector2(100, 100) -layout_mode = 2 -texture_normal = SubResource("GradientTexture1D_ac3np") -ignore_texture_size = true -stretch_mode = 0 - -[node name="BlueHairButton" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/HairGrid"] -custom_minimum_size = Vector2(100, 100) -layout_mode = 2 -texture_normal = SubResource("GradientTexture1D_5l84q") -ignore_texture_size = true -stretch_mode = 0 - -[node name="BlondHairButton2" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/HairGrid"] +[node name="MediumButton" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/SkinGrid"] custom_minimum_size = Vector2(100, 100) layout_mode = 2 texture_normal = SubResource("GradientTexture1D_6y6h7") ignore_texture_size = true stretch_mode = 0 -[node name="BrownHairButton2" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/HairGrid"] +[node name="OliveButton" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/SkinGrid"] custom_minimum_size = Vector2(100, 100) layout_mode = 2 -texture_normal = SubResource("GradientTexture1D_uwnmi") +texture_normal = SubResource("GradientTexture1D_6y6h7") ignore_texture_size = true stretch_mode = 0 -[node name="RedHairButton2" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/HairGrid"] +[node name="BrownButton" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/SkinGrid"] custom_minimum_size = Vector2(100, 100) layout_mode = 2 -texture_normal = SubResource("GradientTexture1D_72sxj") +texture_normal = SubResource("GradientTexture1D_6y6h7") ignore_texture_size = true stretch_mode = 0 -[node name="BlackHairButton2" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/HairGrid"] +[node name="RedButton" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/SkinGrid"] custom_minimum_size = Vector2(100, 100) layout_mode = 2 -texture_normal = SubResource("GradientTexture1D_ac3np") +texture_normal = SubResource("GradientTexture1D_6y6h7") ignore_texture_size = true stretch_mode = 0 -[node name="BlueHairButton2" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/HairGrid"] +[node name="BlueButton" type="TextureButton" parent="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/SkinGrid"] custom_minimum_size = Vector2(100, 100) layout_mode = 2 -texture_normal = SubResource("GradientTexture1D_5l84q") +texture_normal = SubResource("GradientTexture1D_6y6h7") ignore_texture_size = true stretch_mode = 0 @@ -450,13 +398,17 @@ stretch_mode = 0 [connection signal="pressed" from="UpButton" to="." method="_on_up_button_pressed"] [connection signal="pressed" from="DownButton" to="." method="_on_down_button_pressed"] [connection signal="pressed" from="RightButton" to="." method="_on_right_button_pressed"] -[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/BlondHairButton" to="." method="_on_color_pressed" binds= [1, "blonde"]] -[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/BrownHairButton" to="." method="_on_color_pressed" binds= [1, "brown"]] -[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/RedHairButton" to="." method="_on_color_pressed" binds= [1, "red"]] -[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/BlackHairButton" to="." method="_on_color_pressed" binds= [1, "black"]] -[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/BlueHairButton" to="." method="_on_color_pressed" binds= [1, "blue"]] -[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/BlondHairButton2" to="." method="_on_color_pressed" binds= [1, "blonde"]] -[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/BrownHairButton2" to="." method="_on_color_pressed" binds= [1, "brown"]] -[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/RedHairButton2" to="." method="_on_color_pressed" binds= [1, "red"]] -[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/BlackHairButton2" to="." method="_on_color_pressed" binds= [1, "black"]] -[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/BlueHairButton2" to="." method="_on_color_pressed" binds= [1, "blue"]] +[connection signal="pressed" from="VBoxContainer/HBoxContainer/RandomButton" to="." method="_on_random_button_pressed"] +[connection signal="pressed" from="VBoxContainer/AcceptButton" to="." method="_on_accept_button_pressed"] +[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/BlondeButton" to="." method="_on_color_pressed" binds= [1, "blonde"]] +[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/BrownButton" to="." method="_on_color_pressed" binds= [1, "brown"]] +[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/RedButton" to="." method="_on_color_pressed" binds= [1, "red"]] +[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/BlackButton" to="." method="_on_color_pressed" binds= [1, "black"]] +[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/BlueButton" to="." method="_on_color_pressed" binds= [1, "blue"]] +[connection signal="pressed" from="VBoxContainer2/HairPanel/MarginContainer/HBoxContainer/HairGrid/SilverButton" to="." method="_on_color_pressed" binds= [1, "silver"]] +[connection signal="pressed" from="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/SkinGrid/PaleButton" to="." method="_on_color_pressed" binds= [0, "pale"]] +[connection signal="pressed" from="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/SkinGrid/MediumButton" to="." method="_on_color_pressed" binds= [0, "medium"]] +[connection signal="pressed" from="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/SkinGrid/OliveButton" to="." method="_on_color_pressed" binds= [0, "olive"]] +[connection signal="pressed" from="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/SkinGrid/BrownButton" to="." method="_on_color_pressed" binds= [0, "brown"]] +[connection signal="pressed" from="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/SkinGrid/RedButton" to="." method="_on_color_pressed" binds= [0, "red"]] +[connection signal="pressed" from="VBoxContainer2/SkinPanel/MarginContainer/HBoxContainer/SkinGrid/BlueButton" to="." method="_on_color_pressed" binds= [0, "blue"]] diff --git a/templates/quest_event_location.tscn b/templates/quest_event_location.tscn new file mode 100644 index 0000000..c84a6ef --- /dev/null +++ b/templates/quest_event_location.tscn @@ -0,0 +1,37 @@ +[gd_scene load_steps=3 format=3 uid="uid://b4u7eih00dhdu"] + +[ext_resource type="Script" uid="uid://b0majitpmpdoq" path="res://scripts/quest_event_location.gd" id="1_1dp57"] +[ext_resource type="Texture2D" uid="uid://bldpiytpdrge6" path="res://graphics/icon.svg" id="2_dcjvv"] + +[node name="Quest Event Location" 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_1dp57") + +[node name="TextureRect" type="Sprite2D" parent="."] +visible = false +texture = ExtResource("2_dcjvv") +offset = Vector2(0, -64) + +[node name="ColorRect" type="ColorRect" parent="."] +layout_mode = 0 +offset_left = -49.0 +offset_top = -100.0 +offset_right = 51.0 +color = Color(0, 0, 0, 1) + +[node name="Label" type="Label" parent="ColorRect"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +text = "Event +Location" +horizontal_alignment = 1 +vertical_alignment = 1 diff --git a/templates/questor_sprite.tscn b/templates/questor_sprite.tscn index fdef2fe..e88ef89 100644 --- a/templates/questor_sprite.tscn +++ b/templates/questor_sprite.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=8 format=3 uid="uid://cdtpyg5ohniax"] +[gd_scene load_steps=13 format=3 uid="uid://cdtpyg5ohniax"] [ext_resource type="Script" uid="uid://ce0vugvrwvppb" path="res://scripts/questor_sprite.gd" id="1_0ev5i"] [ext_resource type="Texture2D" uid="uid://bu0e077vc8qo1" path="res://graphics/questview/lvlup-circle.png" id="2_nqdtq"] [ext_resource type="Texture2D" uid="uid://c5d0u7ir1y0t2" path="res://graphics/testchar.png" id="2_w1b7t"] +[ext_resource type="Texture2D" uid="uid://67wavev1pifc" path="res://external/questor-shadow.png" id="3_cr46e"] [sub_resource type="Animation" id="Animation_7jhts"] length = 0.001 @@ -18,6 +19,42 @@ tracks/0/keys = { "update": 1, "values": [0] } +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Sprite2D:scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(1, 1)] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Sprite2D:position") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(0, -45)] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Sprite2D:self_modulate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 1)] +} [sub_resource type="Animation" id="Animation_gy3gd"] resource_name = "idle" @@ -50,6 +87,42 @@ tracks/0/keys = { "update": 1, "values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1] } +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Sprite2D:self_modulate") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.06666667, 0.2, 0.4, 0.53333336, 0.6666667), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), +"update": 0, +"values": [Color(1, 1, 1, 0.88235295), Color(1, 1, 1, 0.78431374), Color(1, 1, 1, 1), Color(1, 1, 1, 0.78431374), Color(1, 1, 1, 1), Color(1, 1, 1, 0.88235587)] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Sprite2D:scale") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 0.06666667, 0.2, 0.4, 0.53333336, 0.6666062), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(0.9, 0.9), Vector2(1, 1), Vector2(0.9, 0.9), Vector2(1, 1), Vector2(1, 1)] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Sprite2D:position") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0, 0.06666667, 0.20000002, 0.4, 0.53333336), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1), +"update": 0, +"values": [Vector2(0, -45), Vector2(0, -40), Vector2(0, -45), Vector2(0, -40), Vector2(0, -45)] +} [sub_resource type="AnimationLibrary" id="AnimationLibrary_pylgq"] _data = { @@ -58,8 +131,25 @@ _data = { &"running": SubResource("Animation_5om5g") } +[sub_resource type="Gradient" id="Gradient_nqdtq"] +offsets = PackedFloat32Array(0) +colors = PackedColorArray(0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_36qe6"] +gradient = SubResource("Gradient_nqdtq") +width = 1 + +[sub_resource type="Gradient" id="Gradient_yy18h"] +offsets = PackedFloat32Array(1) +colors = PackedColorArray(1, 1, 1, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_3ywd1"] +gradient = SubResource("Gradient_yy18h") +width = 1 + [node name="QuestorSprite" type="Control"] layout_mode = 3 +anchors_preset = 0 offset_left = 89.0 offset_top = 274.0 offset_right = 89.0 @@ -76,6 +166,11 @@ texture = ExtResource("2_nqdtq") hframes = 4 vframes = 2 +[node name="Sprite2D" type="Sprite2D" parent="."] +modulate = Color(0, 0, 0, 0.39215687) +position = Vector2(0, -45) +texture = ExtResource("3_cr46e") + [node name="Sprite" type="Sprite2D" parent="."] position = Vector2(0, -53) texture = ExtResource("2_w1b7t") @@ -90,3 +185,15 @@ autoplay = "running" [node name="BannerOffset" type="Node2D" parent="."] position = Vector2(0, -94) + +[node name="LifeBar" type="TextureProgressBar" parent="."] +layout_mode = 0 +offset_left = -37.0 +offset_top = 16.0 +offset_right = 38.0 +offset_bottom = 26.0 +nine_patch_stretch = true +texture_under = SubResource("GradientTexture1D_36qe6") +texture_progress = SubResource("GradientTexture1D_3ywd1") +tint_over = Color(1, 0, 0, 1) +tint_progress = Color(1, 0, 0, 1)