Extensive work on the sideview and initial work on player profiles, inventory display, and renaming adventurerdata vs adventurer to adventurer vs adventurersprite
This commit is contained in:
@@ -7,7 +7,7 @@ extends DialogicLayoutBase
|
||||
@export var follow_viewport: bool = false
|
||||
|
||||
@export_subgroup("Global")
|
||||
@export var global_bg_color: Color = Color(0, 0, 0, 0.9)
|
||||
@export var global_bg_color: Color = Color(0.0, 0.0, 0.0, 0.9)
|
||||
@export var global_font_color: Color = Color("white")
|
||||
@export_file('*.ttf', '*.tres') var global_font: String = ""
|
||||
@export var global_font_size: int = 18
|
||||
@@ -17,5 +17,3 @@ func _apply_export_overrides() -> void:
|
||||
# apply layer
|
||||
set(&'layer', canvas_layer)
|
||||
set(&'follow_viewport_enabled', follow_viewport)
|
||||
|
||||
|
||||
|
||||
19
data/statblock.gd
Normal file
19
data/statblock.gd
Normal file
@@ -0,0 +1,19 @@
|
||||
class_name StatBlock extends Resource
|
||||
|
||||
@export var STR : int = 1
|
||||
@export var DEX : int = 1
|
||||
@export var INT : int = 1
|
||||
@export var CHA : int = 1
|
||||
@export var FAI : int = 1
|
||||
@export var LUK : int = 1
|
||||
|
||||
|
||||
static func copy(block : StatBlock) -> StatBlock:
|
||||
var b = StatBlock.new()
|
||||
b.STR = block.STR
|
||||
b.DEX = block.DEX
|
||||
b.INT = block.INT
|
||||
b.CHA = block.CHA
|
||||
b.FAI = block.FAI
|
||||
b.LUK = block.LUK
|
||||
return b
|
||||
1
data/statblock.gd.uid
Normal file
1
data/statblock.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://727tgvtmq4nb
|
||||
2
dialogic/timelines/letter.dtl
Normal file
2
dialogic/timelines/letter.dtl
Normal file
@@ -0,0 +1,2 @@
|
||||
[style]
|
||||
I never imagined that one day I'd be in charge of a guild. To be honest, I never really imagined what my future would look like. I've never been very good at anything. I just lived every day working the best I could and hoping that somehow, someway, the world would show me what to do. And then my grandma died.
|
||||
1
dialogic/timelines/letter.dtl.uid
Normal file
1
dialogic/timelines/letter.dtl.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://3kgohx1vl354
|
||||
BIN
external/test-qsvchar.gif
vendored
Normal file
BIN
external/test-qsvchar.gif
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
external/test-qsvchar.png
vendored
Normal file
BIN
external/test-qsvchar.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.9 KiB |
BIN
graphics/questview/goo.png
Normal file
BIN
graphics/questview/goo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
40
graphics/questview/goo.png.import
Normal file
40
graphics/questview/goo.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://1mkagt2y0jah"
|
||||
path="res://.godot/imported/goo.png-1a22a17096d99476fbfdfc170eeb38f0.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://graphics/questview/goo.png"
|
||||
dest_files=["res://.godot/imported/goo.png-1a22a17096d99476fbfdfc170eeb38f0.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
|
||||
BIN
graphics/ui/time-frame.png
Normal file
BIN
graphics/ui/time-frame.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 333 B |
40
graphics/ui/time-frame.png.import
Normal file
40
graphics/ui/time-frame.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bwaiuy7yf7tu3"
|
||||
path="res://.godot/imported/time-frame.png-dff508c214f219e3e4e3d466b31d166b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://graphics/ui/time-frame.png"
|
||||
dest_files=["res://.godot/imported/time-frame.png-dff508c214f219e3e4e3d466b31d166b.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
|
||||
@@ -28,7 +28,8 @@ directories/dch_directory={
|
||||
"pom": "res://dialogic/characters/pom.dch"
|
||||
}
|
||||
directories/dtl_directory={
|
||||
"intro": "res://dialogic/timelines/intro.dtl"
|
||||
"intro": "res://dialogic/timelines/intro.dtl",
|
||||
"letter": "res://dialogic/timelines/letter.dtl"
|
||||
}
|
||||
glossary/default_case_sensitive=true
|
||||
extensions_folder="res://addons/dialogic_additions"
|
||||
@@ -93,6 +94,11 @@ dialogic_default_action={
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
profile={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":80,"key_label":0,"unicode":112,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[limbo_ai]
|
||||
|
||||
|
||||
252
scenes/letter.tscn
Normal file
252
scenes/letter.tscn
Normal file
@@ -0,0 +1,252 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dytxmk3tg3jg7"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hfigq"]
|
||||
bg_color = Color(0.47, 0.34466666, 0, 0.38431373)
|
||||
corner_detail = 1
|
||||
expand_margin_left = 1.0
|
||||
expand_margin_top = 1.0
|
||||
expand_margin_right = 1.0
|
||||
expand_margin_bottom = 1.0
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ColorRect2" type="ColorRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 426.99997
|
||||
offset_top = 362.0
|
||||
offset_right = 1527.0
|
||||
offset_bottom = 762.0
|
||||
rotation = 0.063534126
|
||||
color = Color(0.75, 0.615, 0.48, 1)
|
||||
|
||||
[node name="ColorRect3" type="ColorRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 491.99997
|
||||
offset_top = 104.0
|
||||
offset_right = 1361.0
|
||||
offset_bottom = 1114.0
|
||||
rotation = -0.09339391
|
||||
color = Color(0, 0, 0, 0.3764706)
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 467.99997
|
||||
offset_top = 77.99999
|
||||
offset_right = 1338.0
|
||||
offset_bottom = 1078.0
|
||||
rotation = -0.09339391
|
||||
color = Color(1, 0.92333335, 0.77, 1)
|
||||
|
||||
[node name="Label" type="Label" parent="ColorRect"]
|
||||
layout_mode = 0
|
||||
offset_left = 17.0
|
||||
offset_top = 100.0
|
||||
offset_right = 850.0
|
||||
offset_bottom = 985.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "To My Dear Grandchild:
|
||||
|
||||
If you're receiving this letter, you should know I've either been declared
|
||||
dead or missing. Try not to cry dear, it will only embarrass us both if I
|
||||
show back up later. I'm sure you don't remember me too well. That's
|
||||
mostly my fault. I've always been an adventurer at heart and regret
|
||||
never spending as much time on my family as my adventurers.
|
||||
|
||||
Enough of that. Of all of my family, you are the child I have decided
|
||||
to leave the charter to my guild gate. I know, I know, you have never
|
||||
been an adventurer. Neither was I when I started! Truly, every story
|
||||
your parents told me about you only convinced me more that you
|
||||
(yes YOU) were the grandchild most like me. You haven't always been
|
||||
very dedicated or good at staying on task. Me neither! But as I think
|
||||
you will learn, sometimes caring for the needs of others is the recipe
|
||||
for figuring out how to make progress on the things that matter to us.
|
||||
It was for me and I hope it will be for you as well.
|
||||
|
||||
|
||||
|
||||
PS: Fill out the magic guild card I included with this letter.
|
||||
It will register you in the adventurer's guild!
|
||||
|
||||
PPS: Also pay the bill! Sorry, nana wasn't good with numbers. XOXO"
|
||||
|
||||
[node name="Label2" type="Label" parent="ColorRect"]
|
||||
layout_mode = 0
|
||||
offset_left = 533.0
|
||||
offset_top = 764.0
|
||||
offset_right = 670.0
|
||||
offset_bottom = 835.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "All My Love,
|
||||
Nana "
|
||||
horizontal_alignment = 2
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="ColorRect"]
|
||||
layout_mode = 0
|
||||
offset_left = 1.2114974
|
||||
offset_top = 351.64548
|
||||
offset_right = 871.2115
|
||||
offset_bottom = 355.64548
|
||||
theme_override_styles/separator = SubResource("StyleBoxFlat_hfigq")
|
||||
|
||||
[node name="HSeparator2" type="HSeparator" parent="ColorRect"]
|
||||
layout_mode = 0
|
||||
offset_left = 1.207931
|
||||
offset_top = 684.094
|
||||
offset_right = 871.20795
|
||||
offset_bottom = 688.094
|
||||
theme_override_styles/separator = SubResource("StyleBoxFlat_hfigq")
|
||||
|
||||
[node name="Control" type="Control" parent="."]
|
||||
visible = false
|
||||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="ColorRect2" type="ColorRect" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 523.0
|
||||
offset_top = 319.0
|
||||
offset_right = 1423.0
|
||||
offset_bottom = 819.0
|
||||
color = Color(0, 0, 0, 0.44705883)
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 499.0
|
||||
offset_top = 298.0
|
||||
offset_right = 1399.0
|
||||
offset_bottom = 798.0
|
||||
color = Color(0.92, 0.7918133, 0.5704, 1)
|
||||
|
||||
[node name="PortraitSpot" type="ColorRect" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 523.0
|
||||
offset_top = 320.0
|
||||
offset_right = 651.0
|
||||
offset_bottom = 448.0
|
||||
color = Color(0.63, 0.63, 0.63, 1)
|
||||
|
||||
[node name="Label" type="Label" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 662.0
|
||||
offset_top = 317.0
|
||||
offset_right = 713.0
|
||||
offset_bottom = 340.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "Guild Member Registration"
|
||||
|
||||
[node name="Label2" type="Label" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 662.0
|
||||
offset_top = 338.0
|
||||
offset_right = 917.0
|
||||
offset_bottom = 361.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "Name: _____________________________"
|
||||
|
||||
[node name="Label3" type="Label" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 662.0
|
||||
offset_top = 365.0
|
||||
offset_right = 917.0
|
||||
offset_bottom = 388.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "Pronouns"
|
||||
|
||||
[node name="Label4" type="Label" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 533.0
|
||||
offset_top = 727.0
|
||||
offset_right = 788.0
|
||||
offset_bottom = 750.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "Signature: _______________________________________________________________________________________"
|
||||
|
||||
[node name="Label5" type="Label" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 533.0
|
||||
offset_top = 507.0
|
||||
offset_right = 1214.0
|
||||
offset_bottom = 530.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "I do solemnly swear to adventure safely but surely, to defend wisely
|
||||
but truly, and to meet every challenge with the valor and dignity of
|
||||
my station."
|
||||
|
||||
[node name="Label6" type="Label" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 525.0
|
||||
offset_top = 459.0
|
||||
offset_right = 1206.0
|
||||
offset_bottom = 482.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "Branch: Nestor's Village"
|
||||
|
||||
[node name="OptionButton" type="OptionButton" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 662.0
|
||||
offset_top = 392.0
|
||||
offset_right = 694.0
|
||||
offset_bottom = 412.0
|
||||
selected = 0
|
||||
item_count = 4
|
||||
popup/item_0/text = "She"
|
||||
popup/item_0/id = 1
|
||||
popup/item_1/text = "He"
|
||||
popup/item_1/id = 0
|
||||
popup/item_2/text = "They"
|
||||
popup/item_2/id = 2
|
||||
popup/item_3/text = "It"
|
||||
popup/item_3/id = 3
|
||||
|
||||
[node name="OptionButton2" type="OptionButton" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 746.0
|
||||
offset_top = 392.0
|
||||
offset_right = 822.0
|
||||
offset_bottom = 423.0
|
||||
selected = 0
|
||||
item_count = 4
|
||||
popup/item_0/text = "Her"
|
||||
popup/item_0/id = 1
|
||||
popup/item_1/text = "Him"
|
||||
popup/item_1/id = 0
|
||||
popup/item_2/text = "Them"
|
||||
popup/item_2/id = 2
|
||||
popup/item_3/text = "It"
|
||||
popup/item_3/id = 3
|
||||
|
||||
[node name="OptionButton3" type="OptionButton" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 835.0
|
||||
offset_top = 392.0
|
||||
offset_right = 915.0
|
||||
offset_bottom = 423.0
|
||||
selected = 0
|
||||
allow_reselect = true
|
||||
item_count = 4
|
||||
popup/item_0/text = "Hers"
|
||||
popup/item_0/id = 1
|
||||
popup/item_1/text = "His"
|
||||
popup/item_1/id = 0
|
||||
popup/item_2/text = "Theirs"
|
||||
popup/item_2/id = 2
|
||||
popup/item_3/text = "Its"
|
||||
popup/item_3/id = 3
|
||||
|
||||
[node name="PortraitSpot2" type="ColorRect" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 1239.0
|
||||
offset_top = 638.0
|
||||
offset_right = 1367.0
|
||||
offset_bottom = 766.0
|
||||
color = Color(0.63, 0.63, 0.63, 1)
|
||||
@@ -1,74 +1,74 @@
|
||||
class_name Adventurer extends Npc
|
||||
class_name Adventurer extends Node
|
||||
|
||||
func _ready() -> void:
|
||||
nav_agent.navigation_finished.connect(_on_nav_agent_finished)
|
||||
pass
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if nav_agent.is_navigation_finished():
|
||||
if interaction_target:
|
||||
try_interact(interaction_target)
|
||||
#If they have an interaction target within range
|
||||
#clear the target
|
||||
#try_interact
|
||||
enum Gender{
|
||||
MASC,
|
||||
FEMME,
|
||||
NONBINARY
|
||||
}
|
||||
|
||||
var given_name : String = "Test"
|
||||
var surname : String = "Testing"
|
||||
var gender : Gender = Gender.MASC
|
||||
var life : int = 1
|
||||
var max_life : int = 1
|
||||
var energy : int = 1
|
||||
var max_energy : int = 1
|
||||
var level : int = 1
|
||||
var exp : int = 0
|
||||
var job : JobData
|
||||
var stats : StatBlock
|
||||
var gold : int = 0
|
||||
var quest : Quest
|
||||
var weapon : Weapon
|
||||
var armor : Armor
|
||||
var accessory : Accessory
|
||||
var inventory : Dictionary[Vector2, Item] = {}
|
||||
var inventory_size : Vector2i = Vector2i(6,1)
|
||||
|
||||
var quest_sprite : QuestSprite
|
||||
|
||||
func _init() -> void:
|
||||
stats = StatBlock.new()
|
||||
|
||||
func generate() -> void:
|
||||
if job == null:
|
||||
return
|
||||
var curr_pos: Vector2 = global_position
|
||||
var next_path_pos: Vector2 = nav_agent.get_next_path_position()
|
||||
stats.STR = randi_range(job.min_STR, job.max_STR)
|
||||
stats.DEX = randi_range(job.min_DEX, job.max_DEX)
|
||||
stats.INT = randi_range(job.min_INT, job.max_INT)
|
||||
stats.CHA = randi_range(job.min_CHA, job.max_CHA)
|
||||
stats.FAI = randi_range(job.min_FAI, job.max_FAI)
|
||||
stats.LUK = randi_range(job.min_LUK, job.max_LUK)
|
||||
|
||||
velocity = curr_pos.direction_to(next_path_pos) * movement_speed
|
||||
move_and_slide()
|
||||
#If they virtually didn't move
|
||||
if !stuck:
|
||||
if (global_position - last_position).length_squared() < 5:
|
||||
stuck = true
|
||||
stuck_time_remaining = 1
|
||||
max_life = stats.STR * 10 + stats.CHA * 10
|
||||
max_energy = stats.INT * 10 + stats.FAI * 10
|
||||
life = max_life
|
||||
energy = max_energy
|
||||
|
||||
func assign_quest(quest : Quest) -> void:
|
||||
self.quest = quest
|
||||
quest.initiate(self)
|
||||
|
||||
func full_name() -> String:
|
||||
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:
|
||||
if job:
|
||||
return job.get_tnl(level)
|
||||
else:
|
||||
if stuck_time_remaining > 0:
|
||||
stuck_time_remaining -= delta
|
||||
if stuck_time_remaining <= 0:
|
||||
nav_agent.target_position = global_position
|
||||
navigation_failed.emit()
|
||||
last_position = global_position
|
||||
|
||||
func approach(pos : Vector2) -> void:
|
||||
stuck = false
|
||||
var rid = get_world_2d().get_navigation_map()
|
||||
var point : Vector2 = NavigationServer2D.map_get_closest_point(rid, pos)
|
||||
set_movement_target(point)
|
||||
|
||||
func approach_and_interact(obj : Interactable) -> void:
|
||||
set_movement_target(obj.global_position)
|
||||
nav_agent.target_desired_distance = interaction_range - 5
|
||||
interaction_target = obj
|
||||
|
||||
func try_interact(obj : Interactable) -> void:
|
||||
var df = obj.global_position - global_position
|
||||
if df.length() > interaction_range:
|
||||
approach_and_interact(obj)
|
||||
else:
|
||||
interact(obj)
|
||||
interaction_target = null
|
||||
|
||||
func interact(obj : Interactable) -> void:
|
||||
obj.interact(self)
|
||||
|
||||
func set_movement_target(target : Vector2) -> void:
|
||||
nav_agent.target_position = target
|
||||
|
||||
func show_speech_bubble(bubble_type : String) -> void:
|
||||
bubble.try_show_speech(bubble_type)
|
||||
|
||||
|
||||
|
||||
func _on_nav_agent_finished() -> void:
|
||||
navigation_finished.emit()
|
||||
|
||||
|
||||
func _on_mouse_entered() -> void:
|
||||
profile_popup = popup_template.instantiate()
|
||||
add_child(profile_popup)
|
||||
profile_popup.setup(data.name, data.level, data.job.name, activity)
|
||||
|
||||
|
||||
func _on_mouse_exited() -> void:
|
||||
profile_popup.queue_free()
|
||||
return level * 10
|
||||
|
||||
@@ -1 +1 @@
|
||||
uid://cjqumk0kw2vte
|
||||
uid://0jl2qbvtmsik
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
class_name AdventurerData extends Node
|
||||
|
||||
class StatBlock:
|
||||
var STR : int = 1
|
||||
var DEX : int = 1
|
||||
var INT : int = 1
|
||||
var CHA : int = 1
|
||||
var FAI : int = 1
|
||||
var LUK : int = 1
|
||||
|
||||
enum Gender{
|
||||
MASC,
|
||||
FEMME,
|
||||
NONBINARY
|
||||
}
|
||||
|
||||
var given_name : String = "Test"
|
||||
var surname : String = "Testing"
|
||||
var gender : Gender = Gender.MASC
|
||||
var life : int = 1
|
||||
var max_life : int = 1
|
||||
var energy : int = 1
|
||||
var max_energy : int = 1
|
||||
var level : int = 1
|
||||
var exp : int = 0
|
||||
var job : JobData
|
||||
var stats : StatBlock
|
||||
var gold : int = 0
|
||||
var quest : Quest
|
||||
var weapon : Weapon
|
||||
var armor : Armor
|
||||
var accessory : Accessory
|
||||
var inventory : Dictionary[Vector2, Item] = {}
|
||||
var inventory_size : Vector2i = Vector2i(6,1)
|
||||
func _init() -> void:
|
||||
stats = StatBlock.new()
|
||||
|
||||
func generate() -> void:
|
||||
if job == null:
|
||||
return
|
||||
stats.STR = randi_range(job.min_STR, job.max_STR)
|
||||
stats.DEX = randi_range(job.min_DEX, job.max_DEX)
|
||||
stats.INT = randi_range(job.min_INT, job.max_INT)
|
||||
stats.CHA = randi_range(job.min_CHA, job.max_CHA)
|
||||
stats.FAI = randi_range(job.min_FAI, job.max_FAI)
|
||||
stats.LUK = randi_range(job.min_LUK, job.max_LUK)
|
||||
|
||||
max_life = stats.STR * 10 + stats.CHA * 10
|
||||
max_energy = stats.INT * 10 + stats.FAI * 10
|
||||
life = max_life
|
||||
energy = max_energy
|
||||
|
||||
func assign_quest(quest : Quest) -> void:
|
||||
self.quest = quest
|
||||
quest.initiate(self)
|
||||
|
||||
func full_name() -> String:
|
||||
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:
|
||||
if job:
|
||||
return job.get_tnl(level)
|
||||
else:
|
||||
return level * 10
|
||||
@@ -1 +0,0 @@
|
||||
uid://0jl2qbvtmsik
|
||||
40
scripts/adventurer_profile_window.gd
Normal file
40
scripts/adventurer_profile_window.gd
Normal file
@@ -0,0 +1,40 @@
|
||||
class_name AdventurerProfileWindow extends ProfileWindow
|
||||
|
||||
var data : Adventurer
|
||||
@onready var nameLabel = %NameLabel
|
||||
@onready var jobLabel = %JobLabel
|
||||
@onready var expLabel : Label = %ExpLabel
|
||||
@onready var levelLabel :Label = %LevelLabel
|
||||
@onready var lifeLabel :Label = %LifeLabel
|
||||
@onready var energyLabel :Label = %EnergyLabel
|
||||
|
||||
@onready var strLabel :Label = %STRLabel
|
||||
@onready var dexLabel :Label = %DEXLabel
|
||||
@onready var intLabel :Label = %INTLabel
|
||||
@onready var chaLabel :Label = %CHALabel
|
||||
@onready var faiLabel :Label = %FAILabel
|
||||
@onready var lukLabel :Label = %LUKLabel
|
||||
|
||||
|
||||
func setup(adv : Adventurer) -> void:
|
||||
data = adv
|
||||
nameLabel.text = data.full_name()
|
||||
if data.job:
|
||||
jobLabel.text = data.job.name
|
||||
else:
|
||||
jobLabel.text = "ERROR"
|
||||
levelLabel.text = str(data.level)
|
||||
expLabel.text = "Exp: %d/%d" % [data.exp, data.get_tnl()]
|
||||
lifeLabel.text = "Life: " + str(data.life) + "/" + str(data.max_life)
|
||||
energyLabel.text = "Energy: " + str(data.energy) + "/" + str(data.max_energy)
|
||||
strLabel.text = str(data.stats.STR)
|
||||
dexLabel.text = str(data.stats.DEX)
|
||||
intLabel.text = str(data.stats.INT)
|
||||
chaLabel.text = str(data.stats.CHA)
|
||||
faiLabel.text = str(data.stats.FAI)
|
||||
lukLabel.text = str(data.stats.LUK)
|
||||
#TODO: Show equipment
|
||||
populate_items()
|
||||
|
||||
func populate_items() -> void:
|
||||
pass
|
||||
1
scripts/adventurer_profile_window.gd.uid
Normal file
1
scripts/adventurer_profile_window.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c0adqs12cwkkc
|
||||
74
scripts/adventurer_sprite.gd
Normal file
74
scripts/adventurer_sprite.gd
Normal file
@@ -0,0 +1,74 @@
|
||||
class_name AdventurerSprite extends Npc
|
||||
|
||||
func _ready() -> void:
|
||||
nav_agent.navigation_finished.connect(_on_nav_agent_finished)
|
||||
pass
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if nav_agent.is_navigation_finished():
|
||||
if interaction_target:
|
||||
try_interact(interaction_target)
|
||||
#If they have an interaction target within range
|
||||
#clear the target
|
||||
#try_interact
|
||||
return
|
||||
var curr_pos: Vector2 = global_position
|
||||
var next_path_pos: Vector2 = nav_agent.get_next_path_position()
|
||||
|
||||
velocity = curr_pos.direction_to(next_path_pos) * movement_speed
|
||||
move_and_slide()
|
||||
#If they virtually didn't move
|
||||
if !stuck:
|
||||
if (global_position - last_position).length_squared() < 5:
|
||||
stuck = true
|
||||
stuck_time_remaining = 1
|
||||
else:
|
||||
if stuck_time_remaining > 0:
|
||||
stuck_time_remaining -= delta
|
||||
if stuck_time_remaining <= 0:
|
||||
nav_agent.target_position = global_position
|
||||
navigation_failed.emit()
|
||||
last_position = global_position
|
||||
|
||||
func approach(pos : Vector2) -> void:
|
||||
stuck = false
|
||||
var rid = get_world_2d().get_navigation_map()
|
||||
var point : Vector2 = NavigationServer2D.map_get_closest_point(rid, pos)
|
||||
set_movement_target(point)
|
||||
|
||||
func approach_and_interact(obj : Interactable) -> void:
|
||||
set_movement_target(obj.global_position)
|
||||
nav_agent.target_desired_distance = interaction_range - 5
|
||||
interaction_target = obj
|
||||
|
||||
func try_interact(obj : Interactable) -> void:
|
||||
var df = obj.global_position - global_position
|
||||
if df.length() > interaction_range:
|
||||
approach_and_interact(obj)
|
||||
else:
|
||||
interact(obj)
|
||||
interaction_target = null
|
||||
|
||||
func interact(obj : Interactable) -> void:
|
||||
obj.interact(self)
|
||||
|
||||
func set_movement_target(target : Vector2) -> void:
|
||||
nav_agent.target_position = target
|
||||
|
||||
func show_speech_bubble(bubble_type : String) -> void:
|
||||
bubble.try_show_speech(bubble_type)
|
||||
|
||||
|
||||
|
||||
func _on_nav_agent_finished() -> void:
|
||||
navigation_finished.emit()
|
||||
|
||||
|
||||
func _on_mouse_entered() -> void:
|
||||
profile_popup = popup_template.instantiate()
|
||||
add_child(profile_popup)
|
||||
profile_popup.setup(data.name, data.level, data.job.name, activity)
|
||||
|
||||
|
||||
func _on_mouse_exited() -> void:
|
||||
profile_popup.queue_free()
|
||||
1
scripts/adventurer_sprite.gd.uid
Normal file
1
scripts/adventurer_sprite.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cjqumk0kw2vte
|
||||
7
scripts/enemy.gd
Normal file
7
scripts/enemy.gd
Normal file
@@ -0,0 +1,7 @@
|
||||
class_name Enemy extends QuestSprite
|
||||
|
||||
|
||||
|
||||
|
||||
func set_animation(anim_name : String) -> void:
|
||||
anim_player.play(anim_name)
|
||||
1
scripts/enemy.gd.uid
Normal file
1
scripts/enemy.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://fxixa11vqdrn
|
||||
@@ -2,20 +2,27 @@ extends Node
|
||||
|
||||
var player : Player = null
|
||||
var panel : GamePanel = null
|
||||
var player_profile : Window = null
|
||||
var quest_log : QuestLog = null
|
||||
var top_menu : TopMenu = null
|
||||
var active : bool = true
|
||||
var open : bool = true
|
||||
var end_shift_confirmation : ConfirmationDialog
|
||||
var end_shift_confirm_template = preload("res://templates/end_shift_confirmation.tscn")
|
||||
var player_profile_template = preload("res://templates/player_profile_window.tscn")
|
||||
|
||||
func _ready() -> void:
|
||||
DisplayServer.register_additional_output(self)
|
||||
end_shift_confirmation = end_shift_confirm_template.instantiate()
|
||||
add_child(end_shift_confirmation)
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if active and Input.is_action_just_pressed("switch modes"):
|
||||
if open:
|
||||
if Input.is_action_just_pressed("profile"):
|
||||
toggle_player_profile()
|
||||
if Input.is_action_just_pressed("switch modes"):
|
||||
confirm_end_shift()
|
||||
|
||||
|
||||
func add_quest_progress_bar(quest : Quest) -> void:
|
||||
panel.add_quest_progress_bar(quest)
|
||||
|
||||
@@ -26,9 +33,21 @@ func setup_visitor_ui(spawner: VisitorSpawner)-> void:
|
||||
if panel:
|
||||
panel.connect_visitor_spawner(spawner)
|
||||
|
||||
func toggle_player_profile():
|
||||
if player_profile != null:
|
||||
player_profile.queue_free()
|
||||
player_profile = null
|
||||
else:
|
||||
player_profile = player_profile_template.instantiate()
|
||||
add_child(player_profile)
|
||||
player_profile.setup(player.data)
|
||||
|
||||
|
||||
func end_shift() -> void:
|
||||
active = false
|
||||
panel.switch_panel(active)
|
||||
open = false
|
||||
if player_profile != null:
|
||||
toggle_player_profile()
|
||||
panel.switch_panel(open)
|
||||
var window = get_window()
|
||||
window.mode = Window.MODE_WINDOWED
|
||||
var size = DisplayServer.screen_get_size()
|
||||
@@ -45,7 +64,11 @@ func end_shift() -> void:
|
||||
top_menu.hide()
|
||||
panel.get_parent().global_position = Vector2i(5,5)
|
||||
window.size = Vector2i(415,700)
|
||||
panel.populate_quest_views()
|
||||
panel.populate_quest_bars()
|
||||
|
||||
func notice(msg : String, time : float = 1) -> void:
|
||||
panel.notice(msg, time)
|
||||
|
||||
func calculate_kill_exp(killer : QuestSprite, killed : QuestSprite) -> int:
|
||||
return clamp(1, (killed.level - killer.level) * 5, 100)
|
||||
|
||||
@@ -20,7 +20,7 @@ const job_list = [
|
||||
|
||||
var jobs : Dictionary[String, JobData] = {}
|
||||
|
||||
var members : Array[AdventurerData] = []
|
||||
var members : Array[Adventurer] = []
|
||||
var quests : Dictionary[Quest,bool] = {}
|
||||
var hall : Guildhall = null
|
||||
var visitor_spawner : VisitorSpawner = null
|
||||
@@ -55,14 +55,14 @@ func _ready() -> void:
|
||||
for job : JobData in job_list:
|
||||
jobs[job.name] = job
|
||||
|
||||
func register_guild_member(member : AdventurerData, first : bool = false) -> void:
|
||||
func register_guild_member(member : Adventurer, first : bool = false) -> void:
|
||||
members.append(member)
|
||||
Game.top_menu.add_member(member)
|
||||
changed.emit()
|
||||
if first:
|
||||
Game.notice("%s has joined the guild!" % member.name, 5)
|
||||
|
||||
func has_guild_member(member : AdventurerData) -> bool:
|
||||
func has_guild_member(member : Adventurer) -> bool:
|
||||
if member == null:
|
||||
return false
|
||||
return members.has(member)
|
||||
@@ -72,13 +72,13 @@ func add_quest(quest : Quest) -> void:
|
||||
Game.top_menu.add_quest(quest)
|
||||
#Game.quest_log.add_entry(quest)
|
||||
|
||||
func assign_quest(member : AdventurerData, quest : Quest) -> void:
|
||||
func assign_quest(member : Adventurer, quest : Quest) -> void:
|
||||
member.assign_quest(quest)
|
||||
quests[quest] = true #Mark it as active
|
||||
|
||||
func spawn_visitor(pos : Vector2) -> void:
|
||||
var data : AdventurerData = visitors["test"].data.instantiate()
|
||||
var sprite : Adventurer = visitors["test"].sprite.instantiate()
|
||||
var data : Adventurer = visitors["test"].data.instantiate()
|
||||
var sprite : AdventurerSprite = visitors["test"].sprite.instantiate()
|
||||
var r = randf()
|
||||
if r > 0.8:
|
||||
data.gender = 2 #Nonbinary
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class_name GuildEmployee extends Adventurer
|
||||
class_name GuildEmployee extends AdventurerSprite
|
||||
|
||||
@export var speech :String
|
||||
@onready var queue : GuildQueue = $Queue
|
||||
|
||||
@@ -4,27 +4,27 @@ var length : int :
|
||||
get:
|
||||
return len(members)
|
||||
@export var direction : Vector2 = Vector2.ZERO
|
||||
var members : Array[Adventurer] = []
|
||||
var members : Array[AdventurerSprite] = []
|
||||
|
||||
var front : Adventurer :
|
||||
var front : AdventurerSprite :
|
||||
get: return null if len(members) == 0 else members[0]
|
||||
|
||||
signal advanced()
|
||||
|
||||
func add_member(member : Adventurer) -> void:
|
||||
func add_member(member : AdventurerSprite) -> void:
|
||||
members.append(member)
|
||||
|
||||
func remove_member(member : Adventurer) -> void:
|
||||
func remove_member(member : AdventurerSprite) -> void:
|
||||
members.erase(member)
|
||||
|
||||
|
||||
func try_advance() -> Adventurer:
|
||||
func try_advance() -> AdventurerSprite:
|
||||
if length > 0:
|
||||
return advance()
|
||||
else:
|
||||
return null
|
||||
|
||||
func advance() -> Adventurer:
|
||||
func advance() -> AdventurerSprite:
|
||||
advanced.emit()
|
||||
return front
|
||||
|
||||
|
||||
@@ -19,5 +19,5 @@ func register_employee(employee: GuildEmployee) -> void:
|
||||
func register_interactables(equipment: Interactable) -> void:
|
||||
interactables[equipment.name] = equipment
|
||||
|
||||
func add_sprite(sprite : Adventurer) -> void:
|
||||
func add_sprite(sprite : AdventurerSprite) -> void:
|
||||
sprite_node.add_child(sprite)
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
extends Control
|
||||
class_name ItemSlot extends Control
|
||||
|
||||
#var item_display_window_template = preload("res://templates/item_display_window.tscn")
|
||||
var dragging : bool = false
|
||||
var last_click : int = 0
|
||||
var item : Item
|
||||
@onready var item_sprite : TextureRect = $Item
|
||||
|
||||
func assign(itm : Item) -> void:
|
||||
item = item
|
||||
item_sprite.texture = item.image
|
||||
|
||||
func swap(item_slot : ItemSlot) -> void:
|
||||
var itm = item
|
||||
assign(itm)
|
||||
item_slot.assign(itm)
|
||||
|
||||
func _on_gui_input(event: InputEvent) -> void:
|
||||
var mmevt = event as InputEventMouseMotion
|
||||
var mbevt = event as InputEventMouseButton
|
||||
|
||||
@@ -2,6 +2,7 @@ class_name GamePanel extends MarginContainer
|
||||
|
||||
const notice_template = preload("res://templates/notice_panel.tscn")
|
||||
const quest_progress_bar_template = preload("res://templates/quest_progress_bar.tscn")
|
||||
const quest_view_template = preload("res://templates/quest_view.tscn")
|
||||
|
||||
signal time_changed(time : float)
|
||||
|
||||
@@ -18,12 +19,20 @@ func add_quest_progress_bar(quest : Quest) -> void:
|
||||
var qpb : QuestProgressBar = quest_progress_bar_template.instantiate()
|
||||
%QuestList.add_child(qpb)
|
||||
qpb.setup(quest)
|
||||
|
||||
#TODO: Change the hero portrait to match
|
||||
if quest.steps > 1:
|
||||
for i in range(quest.steps-1):
|
||||
qpb.add_waypoint(float(i) / quest.steps, quest.step_messages[i])
|
||||
|
||||
|
||||
func add_quest_view(quest : Quest, visible : bool) -> void:
|
||||
var qv : QuestView = quest_view_template.instantiate()
|
||||
qv.visible = visible
|
||||
%QuestView.add_child(qv)
|
||||
qv.setup(quest)
|
||||
|
||||
|
||||
func switch_panel(active : bool) -> void:
|
||||
%OpenShift.visible = active
|
||||
%WorkingShift.visible = !active
|
||||
@@ -47,6 +56,14 @@ func connect_visitor_spawner(spawner : VisitorSpawner) -> void:
|
||||
func update_visitor_count(current : int, total : int) -> void:
|
||||
%OpenList/VisitorsLabel.text = "Visitors: %d/%d" % [current, total]
|
||||
|
||||
func populate_quest_views() -> void:
|
||||
var count : int = 0
|
||||
for quest in Guild.quests:
|
||||
if quest.is_taken():
|
||||
count+=1
|
||||
add_quest_view(quest, count == 1)
|
||||
%QuestViewerButton.disabled = (count == 0)
|
||||
|
||||
func populate_quest_bars() -> void:
|
||||
|
||||
var count : int = 0
|
||||
@@ -64,6 +81,7 @@ func notice(msg : String, time : float) -> void:
|
||||
|
||||
var dragging : bool = false
|
||||
var drag_pos : Vector2
|
||||
|
||||
func _on_drag_region_gui_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton:
|
||||
if event.button_index == MOUSE_BUTTON_LEFT:
|
||||
|
||||
@@ -8,7 +8,7 @@ var enabled: bool:
|
||||
set(value):
|
||||
enable(value)
|
||||
|
||||
var data : AdventurerData
|
||||
var data : Adventurer
|
||||
|
||||
|
||||
func enable(en: bool) -> void:
|
||||
@@ -18,7 +18,7 @@ func enable(en: bool) -> void:
|
||||
else:
|
||||
mouse_filter=Control.MOUSE_FILTER_IGNORE
|
||||
|
||||
func setup(member : AdventurerData) -> void:
|
||||
func setup(member : Adventurer) -> void:
|
||||
data = member
|
||||
%NameLabel.text = data.given_name + " " + data.surname
|
||||
%LevelLabel.text = str(data.level)
|
||||
|
||||
@@ -9,7 +9,7 @@ var profile_popup
|
||||
@onready var movement_target_position : Vector2 = global_position
|
||||
@onready var nav_agent : NavigationAgent2D = $NavigationAgent2D
|
||||
|
||||
var data : AdventurerData = null
|
||||
var data : Adventurer = null
|
||||
var interaction_target = null
|
||||
var last_position : Vector2 = Vector2.ZERO
|
||||
var stuck : bool = false
|
||||
|
||||
@@ -1,49 +1 @@
|
||||
extends Window
|
||||
|
||||
var dragging : bool = false
|
||||
var data : AdventurerData
|
||||
@onready var nameLabel = %NameLabel
|
||||
@onready var jobLabel = %JobLabel
|
||||
@onready var expLabel : Label = %ExpLabel
|
||||
@onready var levelLabel :Label = %LevelLabel
|
||||
@onready var lifeLabel :Label = %LifeLabel
|
||||
@onready var energyLabel :Label = %EnergyLabel
|
||||
|
||||
@onready var strLabel :Label = %STRLabel
|
||||
@onready var dexLabel :Label = %DEXLabel
|
||||
@onready var intLabel :Label = %INTLabel
|
||||
@onready var chaLabel :Label = %CHALabel
|
||||
@onready var faiLabel :Label = %FAILabel
|
||||
@onready var lukLabel :Label = %LUKLabel
|
||||
|
||||
|
||||
func setup(adv : AdventurerData) -> void:
|
||||
data = adv
|
||||
nameLabel.text = data.full_name()
|
||||
if data.job:
|
||||
jobLabel.text = data.job.name
|
||||
else:
|
||||
jobLabel.text = "ERROR"
|
||||
levelLabel.text = str(data.level)
|
||||
expLabel.text = "Exp: %d/%d" % [data.exp, data.get_tnl()]
|
||||
lifeLabel.text = "Life: " + str(data.life) + "/" + str(data.max_life)
|
||||
energyLabel.text = "Energy: " + str(data.energy) + "/" + str(data.max_energy)
|
||||
strLabel.text = str(data.stats.STR)
|
||||
dexLabel.text = str(data.stats.DEX)
|
||||
intLabel.text = str(data.stats.INT)
|
||||
chaLabel.text = str(data.stats.CHA)
|
||||
faiLabel.text = str(data.stats.FAI)
|
||||
lukLabel.text = str(data.stats.LUK)
|
||||
#TODO: Show equipment
|
||||
|
||||
func _on_close_requested() -> void:
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_drag_region_gui_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton:
|
||||
if event.button_index == MOUSE_BUTTON_LEFT:
|
||||
dragging = event.pressed
|
||||
elif dragging and event is InputEventMouseMotion:
|
||||
position += Vector2i(event.screen_relative)
|
||||
|
||||
class_name NpcProfileWindow extends AdventurerProfileWindow
|
||||
|
||||
@@ -7,11 +7,11 @@ class_name Player extends Person
|
||||
var interaction_target = null
|
||||
@export var interaction_range : float = 75
|
||||
@export var stop_range : float = 25
|
||||
var data : AdventurerData
|
||||
var data : Adventurer
|
||||
|
||||
func _ready() -> void:
|
||||
Game.player = self
|
||||
data = AdventurerData.new()
|
||||
data = Adventurer.new()
|
||||
data.name = "Player"
|
||||
setup.call_deferred()
|
||||
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
extends Window
|
||||
class_name ProfileWindow extends Window
|
||||
|
||||
var dragging : bool = false
|
||||
|
||||
|
||||
func _on_close_button_pressed() -> void:
|
||||
func _on_close_requested() -> void:
|
||||
queue_free()
|
||||
|
||||
func _on_drag_region_gui_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton:
|
||||
if event.button_index == MOUSE_BUTTON_LEFT:
|
||||
dragging = event.pressed
|
||||
elif dragging and event is InputEventMouseMotion:
|
||||
position += Vector2i(event.screen_relative)
|
||||
|
||||
|
||||
129
scripts/quest.gd
129
scripts/quest.gd
@@ -1,6 +1,7 @@
|
||||
class_name Quest extends Object
|
||||
|
||||
|
||||
|
||||
enum Status{
|
||||
OPEN,
|
||||
TAKEN,
|
||||
@@ -11,25 +12,48 @@ enum Status{
|
||||
}
|
||||
|
||||
class Event:
|
||||
var enemy_types: Dictionary[String, PackedScene] = {
|
||||
"goo": preload("res://templates/enemies/goo.tscn")
|
||||
}
|
||||
enum Type{
|
||||
WAIT,
|
||||
COMBAT,
|
||||
CHOICE
|
||||
}
|
||||
|
||||
enum CombatState{
|
||||
FIGHTING,
|
||||
VICTORY,
|
||||
DEFEAT
|
||||
}
|
||||
var type : Type = Type.WAIT
|
||||
var enemies : Array[String] = []
|
||||
var time : float = 1
|
||||
var time_elapsed
|
||||
signal completed()
|
||||
signal failed()
|
||||
|
||||
var participants : Array = []
|
||||
var turn_queue : Array = []
|
||||
var busy_list : Array = []
|
||||
var combat_state
|
||||
var dex_speed : int
|
||||
var start(quest : Quest) -> void:
|
||||
func start(quest : Quest) -> void:
|
||||
match(type):
|
||||
Type.WAIT:
|
||||
pass
|
||||
return
|
||||
Type.COMBAT:
|
||||
combat_state = CombatState.FIGHTING
|
||||
var enemy_list = []
|
||||
for enemy_name in enemies:
|
||||
enemy_list.append(enemy_types[enemy_name].instantiate())
|
||||
quest.questview.set_questor_animation("idle")
|
||||
for enemy in enemy_list:
|
||||
quest.questview.pause_setting()
|
||||
quest.questview.place_enemy(enemy)
|
||||
quest.questview.set_enemy_animation(enemy, "idle")
|
||||
start_combat([quest.questor.quest_sprite], enemy_list)
|
||||
|
||||
func start_combat(adventurers : Array, enemies : Array) -> void:
|
||||
participants = []
|
||||
participants.append_array(adventurers)
|
||||
@@ -38,22 +62,90 @@ class Event:
|
||||
var c_order : Array = []
|
||||
var dex_speed = 0
|
||||
for p in participants:
|
||||
c_order.append([p, p.stats.dex])
|
||||
if p.stats.dex > dex_speed:
|
||||
dex_speed = p.stats.dex
|
||||
c_order.append([p, p.stats.DEX])
|
||||
if p.stats.DEX > dex_speed:
|
||||
dex_speed = p.stats.DEX
|
||||
|
||||
c_order.sort_custom(func(a,b): return a[1] > b[1])
|
||||
var delay = 5
|
||||
var last_time = 0
|
||||
for c in c_order:
|
||||
c[0].busy.connect(_on_busy.bind(c[0]))
|
||||
c[0].action_complete.connect(_on_combat_action_complete.bind(c[0]))
|
||||
c[0].died.connect(_on_death.bind(c[0]))
|
||||
var time = delay * dex_speed / c[1]
|
||||
turn_queue.append({"combatant":c[0], "time": time - last_time})
|
||||
last_time = time
|
||||
|
||||
func execute_attack(combatant, target) -> void:
|
||||
busy_list.append(target)
|
||||
#TODO: Make the combatant execute an attack
|
||||
#TODO: Make the target take damage
|
||||
func execute_attack(combatant : QuestSprite, target : QuestSprite) -> void:
|
||||
var tween = combatant.create_tween()
|
||||
tween.tween_interval(.25)
|
||||
tween.tween_callback(combatant.attack.bind(target))
|
||||
|
||||
func add_to_turn_queue(combatant) -> void:
|
||||
#Calculate time
|
||||
var time = dex_speed / combatant.stats.DEX
|
||||
#Walk through list to find insertion point
|
||||
var idx = -1
|
||||
for i in range(len(turn_queue)):
|
||||
if turn_queue[i].time > time:
|
||||
idx = i
|
||||
break
|
||||
else:
|
||||
time -= turn_queue[i].time
|
||||
var entry = {"combatant":combatant, "time":time}
|
||||
if idx == -1:
|
||||
turn_queue.append(entry)
|
||||
else:
|
||||
turn_queue[idx].time -= time
|
||||
turn_queue.insert(idx,entry)
|
||||
|
||||
func _on_busy(combatant : QuestSprite) -> void:
|
||||
busy_list.append(combatant)
|
||||
|
||||
func _on_death(killer : QuestSprite, combatant : QuestSprite) -> void:
|
||||
busy_list.erase(combatant)
|
||||
remove_from_queue(combatant)
|
||||
participants.erase(combatant)
|
||||
if killer != combatant:
|
||||
var xp = Game.calculate_kill_exp(killer, combatant)
|
||||
print("%s has earned %d exp" % [killer.name, xp])
|
||||
killer.exp += xp
|
||||
var enemy_list : Array = get_enemy_list(killer)
|
||||
if len(enemy_list) == 0:
|
||||
if killer is QuestorSprite:
|
||||
victory()
|
||||
else:
|
||||
defeat()
|
||||
|
||||
func victory():
|
||||
print("Questor won!")
|
||||
combat_state = CombatState.VICTORY
|
||||
for p : QuestorSprite in participants:
|
||||
p.check_levelup()
|
||||
#TODO: Notify player if level up occurs
|
||||
time = 10
|
||||
|
||||
func defeat():
|
||||
print("Questor lost!")
|
||||
combat_state = CombatState.DEFEAT
|
||||
failed.emit()
|
||||
|
||||
func remove_from_queue(combatant : QuestSprite) -> void:
|
||||
var idx = -1
|
||||
for i in range(len(turn_queue)):
|
||||
if turn_queue[i].combatant == combatant:
|
||||
idx = i
|
||||
break
|
||||
if idx != -1:
|
||||
turn_queue.remove_at(idx)
|
||||
else:
|
||||
printerr("Tried to remove someone not in the turn queue")
|
||||
|
||||
func _on_combat_action_complete(requeue : bool, combatant : QuestSprite) -> void:
|
||||
busy_list.erase(combatant)
|
||||
if requeue:
|
||||
add_to_turn_queue(combatant)
|
||||
|
||||
func execute_action(combatant) -> void:
|
||||
busy_list = [combatant]
|
||||
@@ -74,18 +166,26 @@ class Event:
|
||||
|
||||
func process(delta : float) -> void:
|
||||
#TODO: Make quest combat work
|
||||
if type == Type.COMBAT:
|
||||
match(type):
|
||||
Type.COMBAT:
|
||||
match(combat_state):
|
||||
CombatState.FIGHTING:
|
||||
if len(busy_list) < 1:
|
||||
if len(turn_queue) > 0:
|
||||
turn_queue[0].time -= delta
|
||||
if turn_queue[0].time <= 0:
|
||||
var c = turn_queue.pop_front()
|
||||
print("%s taking a turn!" % [c.combatant.name])
|
||||
if len(turn_queue) > 0:
|
||||
turn_queue[0].time += c.time
|
||||
execute_action(c.combatant)
|
||||
else:
|
||||
resolve_combat()
|
||||
|
||||
CombatState.VICTORY:
|
||||
time_elapsed += delta
|
||||
if time_elapsed >= time:
|
||||
completed.emit()
|
||||
Type.WAIT:
|
||||
time_elapsed += delta
|
||||
if time_elapsed >= time:
|
||||
completed.emit()
|
||||
@@ -104,14 +204,15 @@ var progress : float = 0
|
||||
var current_step : int = 0
|
||||
var taken : bool = false
|
||||
var status : Status = Status.OPEN
|
||||
var questview : QuestView = null
|
||||
|
||||
var questor : AdventurerData = null
|
||||
var questor : Adventurer = null
|
||||
signal status_changed(status : Status)
|
||||
|
||||
func _init() -> void:
|
||||
pass
|
||||
|
||||
func initiate(member : AdventurerData) -> void:
|
||||
func initiate(member : Adventurer) -> void:
|
||||
questor = member
|
||||
status = Status.TAKEN
|
||||
status_changed.emit(Status.TAKEN)
|
||||
@@ -138,7 +239,7 @@ func num_events() -> int:
|
||||
return len(events)
|
||||
|
||||
#TODO: Put in quest requirements
|
||||
func is_eligible(member : AdventurerData) -> bool:
|
||||
func is_eligible(member : Adventurer) -> bool:
|
||||
return !taken
|
||||
|
||||
func is_taken() -> bool:
|
||||
|
||||
@@ -15,6 +15,7 @@ var quest : Quest = null
|
||||
var current_event : Quest.Event = null
|
||||
var time_elapsed : float = 0
|
||||
var next_waypoint = 0
|
||||
var failed : bool = false
|
||||
#signal value_changed(value : float)
|
||||
#var min_value
|
||||
#var max_value
|
||||
@@ -29,9 +30,10 @@ func _ready() -> void:
|
||||
hero.position = hero_offset + Vector2(length * bar.value / bar.max_value, 0)
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if failed:
|
||||
return
|
||||
if time_elapsed < quest.length:
|
||||
if current_event != null:
|
||||
if current_event.type != Quest.Event.Type.COMBAT:
|
||||
current_event.process(delta)
|
||||
else:
|
||||
time_elapsed += delta
|
||||
@@ -69,7 +71,8 @@ func update_waypoints(value : float) -> void:
|
||||
func start_event(event : Quest.Event, offset : float) -> void:
|
||||
current_event = event
|
||||
current_event.completed.connect(_on_event_complete)
|
||||
current_event.start()
|
||||
current_event.failed.connect(_on_event_failed)
|
||||
current_event.start(quest)
|
||||
event.time_elapsed = offset
|
||||
|
||||
func setup(quest : Quest) -> void:
|
||||
@@ -93,10 +96,26 @@ func progress_quest() -> void:
|
||||
quest.complete()
|
||||
update_waypoints(bar.value)
|
||||
|
||||
func set_fill_color(color : Color) -> void:
|
||||
%Start/Fill.self_modulate = color
|
||||
%End/Fill.self_modulate = color
|
||||
$ProgressBar.tint_progress = color
|
||||
for wp : Waypoint in waypoints:
|
||||
wp.fill_color = color
|
||||
|
||||
func _on_event_complete() -> void:
|
||||
#TODO: Show event message!
|
||||
speech_bubble.show_message("Event complete!")
|
||||
if current_event.type == Quest.Event.Type.COMBAT:
|
||||
quest.questview.unpause_setting()
|
||||
for p : QuestorSprite in current_event.participants:
|
||||
p.set_animation("running")
|
||||
waypoints[next_waypoint].blink(false)
|
||||
next_waypoint += 1
|
||||
current_event = null
|
||||
|
||||
func _on_event_failed() -> void:
|
||||
failed = true
|
||||
set_fill_color(Color.RED)
|
||||
quest.fail()
|
||||
|
||||
|
||||
38
scripts/quest_sprite.gd
Normal file
38
scripts/quest_sprite.gd
Normal file
@@ -0,0 +1,38 @@
|
||||
class_name QuestSprite extends Control
|
||||
|
||||
var life : int = 1
|
||||
var max_life : int = 1
|
||||
var energy : int = 1
|
||||
var max_energy : int = 1
|
||||
var level : int = 1
|
||||
var exp : int = 0
|
||||
|
||||
@export var stats : StatBlock
|
||||
var gold : int = 0
|
||||
|
||||
|
||||
@onready var anim_player : AnimationPlayer = $AnimationPlayer
|
||||
signal died(killer :QuestSprite)
|
||||
signal action_complete(requeue : bool)
|
||||
signal busy()
|
||||
|
||||
|
||||
func attack(target : QuestSprite) -> void:
|
||||
print("Attack by %s to %s" % [name, target.name])
|
||||
target.take_damage(self, 10)
|
||||
action_complete.emit(true)
|
||||
|
||||
func take_damage(source : QuestSprite, amount : int) -> void:
|
||||
busy.emit()
|
||||
life = clampi(life - amount, 0, max_life)
|
||||
if life == 0:
|
||||
print("%s killed %s!" % [source.name, name])
|
||||
die(source)
|
||||
else:
|
||||
print("%s hit %s for %d damage!" % [source.name, name, amount])
|
||||
action_complete.emit(false)
|
||||
|
||||
|
||||
func die(killer : QuestSprite) -> void:
|
||||
died.emit(killer)
|
||||
queue_free()
|
||||
1
scripts/quest_sprite.gd.uid
Normal file
1
scripts/quest_sprite.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c7tmerbioa0vn
|
||||
33
scripts/quest_view.gd
Normal file
33
scripts/quest_view.gd
Normal file
@@ -0,0 +1,33 @@
|
||||
class_name QuestView extends Panel
|
||||
|
||||
const questor_template = preload("res://templates/questor_sprite.tscn")
|
||||
|
||||
@onready var questorSprite : QuestorSprite
|
||||
@onready var setting = $Setting
|
||||
var quest : Quest
|
||||
|
||||
|
||||
func setup(qst : Quest) -> void:
|
||||
quest = qst
|
||||
quest.questview = self
|
||||
questorSprite = questor_template.instantiate()
|
||||
questorSprite.setup(quest.questor)
|
||||
add_child(questorSprite)
|
||||
questorSprite.global_position = $QuestorPosition.global_position
|
||||
|
||||
|
||||
func set_questor_animation(anim_name : String) -> void:
|
||||
questorSprite.set_animation(anim_name)
|
||||
|
||||
func set_enemy_animation(enemy : Enemy, anim_name : String) -> void:
|
||||
enemy.set_animation(anim_name)
|
||||
|
||||
func place_enemy(enemy : Enemy) -> void:
|
||||
add_child(enemy)
|
||||
enemy.global_position = $EnemyPosition.global_position
|
||||
|
||||
func pause_setting() -> void:
|
||||
setting.process_mode = Node.PROCESS_MODE_DISABLED
|
||||
|
||||
func unpause_setting() -> void:
|
||||
setting.process_mode = Node.PROCESS_MODE_INHERIT
|
||||
1
scripts/quest_view.gd.uid
Normal file
1
scripts/quest_view.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bm4826vxrmuqh
|
||||
33
scripts/questor_sprite.gd
Normal file
33
scripts/questor_sprite.gd
Normal file
@@ -0,0 +1,33 @@
|
||||
class_name QuestorSprite extends QuestSprite
|
||||
|
||||
|
||||
var data : Adventurer = null
|
||||
|
||||
func _ready() -> void:
|
||||
if data:
|
||||
life = data.life
|
||||
max_life = data.max_life
|
||||
energy = data.energy
|
||||
max_energy = data.max_energy
|
||||
level = data.level
|
||||
exp = data.exp
|
||||
stats = StatBlock.copy(data.stats)
|
||||
gold = data.gold
|
||||
|
||||
func set_animation(anim_name : String) -> void:
|
||||
anim_player.play(anim_name)
|
||||
|
||||
func setup(adv : Adventurer) -> void:
|
||||
data = adv
|
||||
life = data.life
|
||||
max_life = data.max_life
|
||||
energy = data.energy
|
||||
max_energy = data.max_energy
|
||||
level = data.level
|
||||
exp = data.exp
|
||||
stats = StatBlock.copy(data.stats)
|
||||
gold = data.gold
|
||||
adv.quest_sprite = self
|
||||
|
||||
func check_levelup() -> void:
|
||||
data.gain_exp(exp)
|
||||
1
scripts/questor_sprite.gd.uid
Normal file
1
scripts/questor_sprite.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://ce0vugvrwvppb
|
||||
@@ -1,14 +1,19 @@
|
||||
extends Node2D
|
||||
var test_adv = preload("res://templates/test_adventurer.tscn")
|
||||
|
||||
@onready var door_player : AudioStreamPlayer = $AudioStreamPlayer
|
||||
func _ready() -> void:
|
||||
#var adv : AdventurerData = test_adv.instantiate() as AdventurerData
|
||||
#var adv : Adventurer = test_adv.instantiate() as Adventurer
|
||||
#Guild.register_guild_member(adv)
|
||||
var quest : Quest = Quest.new()
|
||||
var evt : Quest.Event = Quest.Event.new()
|
||||
evt.type = Quest.Event.Type.COMBAT
|
||||
evt.enemies = ["goo"]
|
||||
evt.time = 10
|
||||
quest.events.append(evt)
|
||||
Guild.add_quest(quest)
|
||||
Guild.assign_quest(Game.player.data, quest)
|
||||
#Game.end_shift()
|
||||
#var tween = create_tween()
|
||||
#tween.tween_interval(3)
|
||||
#tween.tween_callback(Callable($DoorLight/AnimationPlayer.play).bind("open"))
|
||||
|
||||
@@ -29,7 +29,7 @@ func _on_quests_button_pressed() -> void:
|
||||
for child in quest_list.get_children():
|
||||
child.enabled = quests.visible
|
||||
|
||||
func add_member(member : AdventurerData) -> void:
|
||||
func add_member(member : Adventurer) -> void:
|
||||
var entry = member_panel_entry_template.instantiate()
|
||||
entry.setup(member)
|
||||
members_list.add_child(entry)
|
||||
|
||||
@@ -12,6 +12,11 @@ var fill: bool :
|
||||
if value != filled:
|
||||
set_fill(value)
|
||||
|
||||
var fill_color: Color :
|
||||
get: return $Fill.self_modulate
|
||||
set(value):
|
||||
$Fill.self_modulate = value
|
||||
|
||||
func blink(blnk : bool) -> void:
|
||||
if blinking == blnk:
|
||||
return
|
||||
|
||||
21
templates/enemies/goo.tscn
Normal file
21
templates/enemies/goo.tscn
Normal file
@@ -0,0 +1,21 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://c31w28fcqw4ra"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://fxixa11vqdrn" path="res://scripts/enemy.gd" id="1_82j8k"]
|
||||
[ext_resource type="Texture2D" uid="uid://1mkagt2y0jah" path="res://graphics/questview/goo.png" id="2_87tms"]
|
||||
[ext_resource type="Script" uid="uid://727tgvtmq4nb" path="res://data/statblock.gd" id="2_fehp8"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_bfuvr"]
|
||||
script = ExtResource("2_fehp8")
|
||||
metadata/_custom_type_script = "uid://727tgvtmq4nb"
|
||||
|
||||
[node name="Goo" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
script = ExtResource("1_82j8k")
|
||||
stats = SubResource("Resource_bfuvr")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
position = Vector2(5, -47)
|
||||
texture = ExtResource("2_87tms")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
@@ -63,14 +63,12 @@ offset = Vector2(0, -80)
|
||||
polygon = PackedVector2Array(-86, -160, -152, -160, -152, -107, -148, -75, -128, -35, -57, 0, 56, 0, 127, -34, 148, -75, 152, -107, 152, -160, 86, -160, 86, -115, 75, -93, 52, -81, -51, -81, -75, -92, -86, -114)
|
||||
|
||||
[node name="Receptionist" parent="Sprites" instance=ExtResource("5_l3mu1")]
|
||||
visible = false
|
||||
position = Vector2(457, 32)
|
||||
|
||||
[node name="Queue" parent="Sprites/Receptionist" index="3"]
|
||||
position = Vector2(0, 97)
|
||||
|
||||
[node name="Player" type="CharacterBody2D" parent="Sprites"]
|
||||
visible = false
|
||||
position = Vector2(451, 430)
|
||||
script = ExtResource("2_5n4iw")
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://c8ofw6na082gv"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://c8ofw6na082gv"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dhw85vqlvw33s" path="res://scripts/main_panel.gd" id="1_pdekv"]
|
||||
[ext_resource type="Script" uid="uid://4jrp67ckp7vt" path="res://scripts/timer_label.gd" id="2_5rs2c"]
|
||||
[ext_resource type="StyleBox" uid="uid://by1jk8r2avjp4" path="res://styles/open_shift_panel.tres" id="2_b7y1i"]
|
||||
[ext_resource type="Texture2D" uid="uid://bwaiuy7yf7tu3" path="res://graphics/ui/time-frame.png" id="3_7oi8q"]
|
||||
[ext_resource type="StyleBox" uid="uid://b7vjpwageyi6m" path="res://styles/working_shift_panel.tres" id="4_b7y1i"]
|
||||
[ext_resource type="Texture2D" uid="uid://cs7bvpn6jgofn" path="res://graphics/ui/options.png" id="5_6vw8v"]
|
||||
[ext_resource type="PackedScene" uid="uid://du4hyv7egc7ny" path="res://templates/quest_view_window.tscn" id="6_er2tk"]
|
||||
@@ -43,6 +44,19 @@ custom_minimum_size = Vector2(401, 216)
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = ExtResource("2_b7y1i")
|
||||
|
||||
[node name="NinePatchRect" type="NinePatchRect" parent="VBoxContainer/OpenShift"]
|
||||
layout_mode = 0
|
||||
offset_left = 9.0
|
||||
offset_top = 54.0
|
||||
offset_right = 200.0
|
||||
offset_bottom = 76.5
|
||||
scale = Vector2(2, 2)
|
||||
texture = ExtResource("3_7oi8q")
|
||||
patch_margin_left = 7
|
||||
patch_margin_top = 7
|
||||
patch_margin_right = 7
|
||||
patch_margin_bottom = 7
|
||||
|
||||
[node name="Margin" type="MarginContainer" parent="VBoxContainer/OpenShift"]
|
||||
layout_mode = 0
|
||||
offset_left = 74.0
|
||||
@@ -106,6 +120,20 @@ offset_right = 391.0
|
||||
offset_bottom = 44.0
|
||||
texture_normal = ExtResource("5_6vw8v")
|
||||
|
||||
[node name="NinePatchRect" type="NinePatchRect" parent="VBoxContainer/WorkingShift"]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_left = 9.0
|
||||
offset_top = 86.0
|
||||
offset_right = 200.0
|
||||
offset_bottom = 108.5
|
||||
scale = Vector2(2, 2)
|
||||
texture = ExtResource("3_7oi8q")
|
||||
patch_margin_left = 7
|
||||
patch_margin_top = 7
|
||||
patch_margin_right = 7
|
||||
patch_margin_bottom = 7
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/WorkingShift"]
|
||||
layout_mode = 0
|
||||
offset_left = 13.0
|
||||
@@ -184,8 +212,6 @@ layout_mode = 2
|
||||
stream = ExtResource("6_osxme")
|
||||
volume_db = -10.31
|
||||
|
||||
[connection signal="time_changed" from="." to="VBoxContainer/OpenShift/Margin/OpenList/TimerLabel" method="_on_time_changed"]
|
||||
[connection signal="time_changed" from="." to="VBoxContainer/WorkingShift/MarginContainer/WorkingList/TimerLabel" method="_on_time_changed"]
|
||||
[connection signal="pressed" from="VBoxContainer/OpenShift/Margin/OpenList/Button" to="." method="_on_end_shift_pressed"]
|
||||
[connection signal="gui_input" from="VBoxContainer/WorkingShift/DragRegion" to="." method="_on_drag_region_gui_input"]
|
||||
[connection signal="pressed" from="VBoxContainer/WorkingShift/MarginContainer/WorkingList/HBoxContainer/QuestViewerButton" to="." method="_on_quest_viewer_button_pressed"]
|
||||
|
||||
839
templates/player_profile_window.tscn
Normal file
839
templates/player_profile_window.tscn
Normal file
@@ -0,0 +1,839 @@
|
||||
[gd_scene load_steps=16 format=3 uid="uid://bg23lrwwpi3xi"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ccsiubi5y75qg" path="res://scripts/npc_profile_window.gd" id="1_mjwm2"]
|
||||
[ext_resource type="Texture2D" uid="uid://cbt6po52ad37x" path="res://external/profile-window.png" id="2_p33nb"]
|
||||
[ext_resource type="Texture2D" uid="uid://bldpiytpdrge6" path="res://graphics/icon.svg" id="3_8aeex"]
|
||||
[ext_resource type="FontFile" uid="uid://bfkgcmorncykx" path="res://fonts/Bagnard.tres" id="3_mjwm2"]
|
||||
[ext_resource type="Texture2D" uid="uid://bblr27slj6ap0" path="res://graphics/portraits/farmer_f.png" id="4_cdnuw"]
|
||||
[ext_resource type="Theme" uid="uid://dlobmn4esosk3" path="res://styles/stat_font.tres" id="5_kiyqa"]
|
||||
[ext_resource type="FontFile" uid="uid://cju0vb3cw5qoj" path="res://fonts/Bagnard.otf" id="6_0icff"]
|
||||
[ext_resource type="Texture2D" uid="uid://bnyl6eaynixm5" path="res://graphics/ui/gear-heading.png" id="7_la6dy"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjjtgrr56guj0" path="res://graphics/ui/item-slot.png" id="8_c770f"]
|
||||
[ext_resource type="Texture2D" uid="uid://blt2b7f6iqb8j" path="res://graphics/questview/test-char.png" id="9_cq03q"]
|
||||
[ext_resource type="Texture2D" uid="uid://d1btg2hfnjx6r" path="res://graphics/ui/inventory-heading.png" id="10_rldp4"]
|
||||
[ext_resource type="Script" uid="uid://cw6yo5opbrpr8" path="res://scripts/item_slot.gd" id="11_b43fo"]
|
||||
|
||||
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_ktflt"]
|
||||
blend_mode = 3
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_1nmd1"]
|
||||
offsets = PackedFloat32Array(0.2754717, 0.36226416, 0.43773586)
|
||||
colors = PackedColorArray(1, 1, 1, 1, 0.46274376, 0.4643005, 0.5605066, 1, 1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_bj16a"]
|
||||
gradient = SubResource("Gradient_1nmd1")
|
||||
width = 100
|
||||
height = 49
|
||||
fill_to = Vector2(0, 1)
|
||||
|
||||
[node name="Profile Window" type="Window"]
|
||||
transparent_bg = true
|
||||
oversampling_override = 1.0
|
||||
initial_position = 1
|
||||
size = Vector2i(707, 857)
|
||||
wrap_controls = true
|
||||
unresizable = true
|
||||
borderless = true
|
||||
always_on_top = true
|
||||
transparent = true
|
||||
popup_window = true
|
||||
script = ExtResource("1_mjwm2")
|
||||
|
||||
[node name="CloseButton" type="Button" parent="."]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
anchors_preset = -1
|
||||
offset_left = 586.0
|
||||
offset_top = 15.0
|
||||
offset_right = 625.0
|
||||
offset_bottom = 54.0
|
||||
|
||||
[node name="DragRegion" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
offset_left = 2.0
|
||||
offset_top = 11.0
|
||||
offset_right = 584.0
|
||||
offset_bottom = 56.0
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
anchors_preset = -1
|
||||
offset_right = 635.0
|
||||
offset_bottom = 843.0
|
||||
texture = ExtResource("2_p33nb")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
anchors_preset = -1
|
||||
offset_left = 112.0
|
||||
offset_top = 14.0
|
||||
offset_right = 262.0
|
||||
offset_bottom = 54.0
|
||||
color = Color(0.4745098, 0.34509805, 0.23529412, 1)
|
||||
|
||||
[node name="Label5" type="Label" parent="."]
|
||||
anchors_preset = -1
|
||||
offset_left = 190.0
|
||||
offset_top = 17.0
|
||||
offset_right = 275.0
|
||||
offset_bottom = 61.0
|
||||
theme_override_colors/font_color = Color(0.88235295, 0.7764706, 0.5058824, 1)
|
||||
theme_override_fonts/font = ExtResource("3_mjwm2")
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "Player"
|
||||
|
||||
[node name="HSeparator" type="Control" parent="."]
|
||||
custom_minimum_size = Vector2(0, 100)
|
||||
layout_mode = 3
|
||||
offset_left = 3.0
|
||||
offset_top = 4.0
|
||||
offset_right = 629.0
|
||||
offset_bottom = 839.0
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="."]
|
||||
anchors_preset = -1
|
||||
offset_left = 3.0
|
||||
offset_top = 4.0
|
||||
offset_right = 629.0
|
||||
offset_bottom = 839.0
|
||||
|
||||
[node name="PortraitFrame" type="TextureRect" parent="."]
|
||||
self_modulate = Color(1, 1, 1, 0)
|
||||
clip_contents = true
|
||||
custom_minimum_size = Vector2(153, 153)
|
||||
anchors_preset = -1
|
||||
offset_left = 27.0
|
||||
offset_top = 103.0
|
||||
offset_right = 180.0
|
||||
offset_bottom = 256.0
|
||||
texture = ExtResource("3_8aeex")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="Portrait" type="TextureRect" parent="PortraitFrame"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_right = 76.5
|
||||
offset_bottom = 76.5
|
||||
scale = Vector2(2, 2)
|
||||
texture = ExtResource("4_cdnuw")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="NameLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
anchors_preset = -1
|
||||
offset_left = 74.0
|
||||
offset_top = 54.0
|
||||
offset_right = 178.0
|
||||
offset_bottom = 104.0
|
||||
theme_override_colors/font_color = Color(0.33, 0.17600001, 0, 1)
|
||||
theme_override_constants/line_spacing = 0
|
||||
theme_override_font_sizes/font_size = 36
|
||||
text = "Name"
|
||||
|
||||
[node name="JobLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
anchors_preset = -1
|
||||
offset_left = 188.0
|
||||
offset_top = 100.0
|
||||
offset_right = 272.0
|
||||
offset_bottom = 134.0
|
||||
theme_override_colors/font_color = Color(0.33, 0.17600001, 0, 1)
|
||||
theme_override_constants/line_spacing = 0
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "Class"
|
||||
|
||||
[node name="LevelLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
anchors_preset = -1
|
||||
offset_left = 188.0
|
||||
offset_top = 127.0
|
||||
offset_right = 272.0
|
||||
offset_bottom = 161.0
|
||||
theme_override_colors/font_color = Color(0.33, 0.17600001, 0, 1)
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "Lv ##"
|
||||
|
||||
[node name="ExpLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
anchors_preset = -1
|
||||
offset_left = 188.0
|
||||
offset_top = 156.0
|
||||
offset_right = 314.0
|
||||
offset_bottom = 190.0
|
||||
theme_override_colors/font_color = Color(0.33, 0.17600001, 0, 1)
|
||||
theme_override_constants/line_spacing = 0
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "Exp: ##/##"
|
||||
|
||||
[node name="LifeLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(100, 0)
|
||||
anchors_preset = -1
|
||||
offset_left = 26.0
|
||||
offset_top = 273.0
|
||||
offset_right = 652.0
|
||||
offset_bottom = 307.0
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "Life: ####/####"
|
||||
|
||||
[node name="EnergyLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
anchors_preset = -1
|
||||
offset_left = 234.0
|
||||
offset_top = 273.0
|
||||
offset_right = 860.0
|
||||
offset_bottom = 307.0
|
||||
theme_override_constants/line_spacing = 0
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "Energy: ####/####"
|
||||
|
||||
[node name="STRLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_children = 2
|
||||
anchors_preset = -1
|
||||
offset_left = 110.0
|
||||
offset_top = 302.0
|
||||
offset_right = 210.0
|
||||
offset_bottom = 346.0
|
||||
theme = ExtResource("5_kiyqa")
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
|
||||
theme_override_constants/shadow_offset_x = 1
|
||||
theme_override_constants/shadow_offset_y = 1
|
||||
theme_override_constants/outline_size = 1
|
||||
theme_override_fonts/font = ExtResource("6_0icff")
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "457"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="STRLabel"]
|
||||
material = SubResource("CanvasItemMaterial_ktflt")
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_right = 100.0
|
||||
offset_bottom = 64.0
|
||||
texture = SubResource("GradientTexture2D_bj16a")
|
||||
|
||||
[node name="INTLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_children = 2
|
||||
anchors_preset = -1
|
||||
offset_left = 110.0
|
||||
offset_top = 364.0
|
||||
offset_right = 210.0
|
||||
offset_bottom = 408.0
|
||||
theme = ExtResource("5_kiyqa")
|
||||
text = "9999"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="INTLabel"]
|
||||
material = SubResource("CanvasItemMaterial_ktflt")
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_right = 100.0
|
||||
offset_bottom = 64.0
|
||||
texture = SubResource("GradientTexture2D_bj16a")
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
modulate = Color(0.4, 0.22666667, 0, 1)
|
||||
anchors_preset = -1
|
||||
offset_left = 65.0
|
||||
offset_top = 405.0
|
||||
offset_right = 139.0
|
||||
offset_bottom = 450.0
|
||||
theme_override_constants/outline_size = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "ATK"
|
||||
|
||||
[node name="Label2" type="Label" parent="."]
|
||||
modulate = Color(0.4, 0.22666667, 0, 1)
|
||||
anchors_preset = -1
|
||||
offset_left = 201.0
|
||||
offset_top = 405.0
|
||||
offset_right = 275.0
|
||||
offset_bottom = 450.0
|
||||
theme_override_constants/outline_size = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "MAG"
|
||||
|
||||
[node name="Label3" type="Label" parent="."]
|
||||
modulate = Color(0.4, 0.22666667, 0, 1)
|
||||
anchors_preset = -1
|
||||
offset_left = 330.0
|
||||
offset_top = 405.0
|
||||
offset_right = 408.0
|
||||
offset_bottom = 450.0
|
||||
theme_override_constants/outline_size = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "PDEF"
|
||||
|
||||
[node name="Label4" type="Label" parent="."]
|
||||
modulate = Color(0.4, 0.22666667, 0, 1)
|
||||
anchors_preset = -1
|
||||
offset_left = 481.0
|
||||
offset_top = 405.0
|
||||
offset_right = 569.0
|
||||
offset_bottom = 450.0
|
||||
theme_override_constants/outline_size = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "MDEF"
|
||||
|
||||
[node name="ATKLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_children = 2
|
||||
anchors_preset = -1
|
||||
offset_left = 43.0
|
||||
offset_top = 436.0
|
||||
offset_right = 143.0
|
||||
offset_bottom = 480.0
|
||||
theme = ExtResource("5_kiyqa")
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
|
||||
theme_override_constants/shadow_offset_x = 1
|
||||
theme_override_constants/shadow_offset_y = 1
|
||||
theme_override_constants/outline_size = 1
|
||||
theme_override_fonts/font = ExtResource("6_0icff")
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "457"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="ATKLabel"]
|
||||
material = SubResource("CanvasItemMaterial_ktflt")
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_right = 100.0
|
||||
offset_bottom = 64.0
|
||||
texture = SubResource("GradientTexture2D_bj16a")
|
||||
|
||||
[node name="MAGLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_children = 2
|
||||
anchors_preset = -1
|
||||
offset_left = 188.0
|
||||
offset_top = 435.0
|
||||
offset_right = 288.0
|
||||
offset_bottom = 479.0
|
||||
theme = ExtResource("5_kiyqa")
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
|
||||
theme_override_constants/shadow_offset_x = 1
|
||||
theme_override_constants/shadow_offset_y = 1
|
||||
theme_override_constants/outline_size = 1
|
||||
theme_override_fonts/font = ExtResource("6_0icff")
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "457"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="MAGLabel"]
|
||||
material = SubResource("CanvasItemMaterial_ktflt")
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_right = 100.0
|
||||
offset_bottom = 64.0
|
||||
texture = SubResource("GradientTexture2D_bj16a")
|
||||
|
||||
[node name="PDEFLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_children = 2
|
||||
anchors_preset = -1
|
||||
offset_left = 316.0
|
||||
offset_top = 435.0
|
||||
offset_right = 416.0
|
||||
offset_bottom = 479.0
|
||||
theme = ExtResource("5_kiyqa")
|
||||
text = "9999"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="PDEFLabel"]
|
||||
material = SubResource("CanvasItemMaterial_ktflt")
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_right = 100.0
|
||||
offset_bottom = 64.0
|
||||
texture = SubResource("GradientTexture2D_bj16a")
|
||||
|
||||
[node name="MDEFLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_children = 2
|
||||
anchors_preset = -1
|
||||
offset_left = 471.0
|
||||
offset_top = 435.0
|
||||
offset_right = 571.0
|
||||
offset_bottom = 479.0
|
||||
theme = ExtResource("5_kiyqa")
|
||||
text = "9999"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="MDEFLabel"]
|
||||
material = SubResource("CanvasItemMaterial_ktflt")
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_right = 100.0
|
||||
offset_bottom = 64.0
|
||||
texture = SubResource("GradientTexture2D_bj16a")
|
||||
|
||||
[node name="DEXLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_children = 2
|
||||
anchors_preset = -1
|
||||
offset_left = 111.0
|
||||
offset_top = 333.0
|
||||
offset_right = 211.0
|
||||
offset_bottom = 377.0
|
||||
theme = ExtResource("5_kiyqa")
|
||||
text = "9999"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="DEXLabel"]
|
||||
material = SubResource("CanvasItemMaterial_ktflt")
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_right = 100.0
|
||||
offset_bottom = 64.0
|
||||
texture = SubResource("GradientTexture2D_bj16a")
|
||||
|
||||
[node name="CHALabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_children = 2
|
||||
anchors_preset = -1
|
||||
offset_left = 254.0
|
||||
offset_top = 302.0
|
||||
offset_right = 354.0
|
||||
offset_bottom = 346.0
|
||||
theme = ExtResource("5_kiyqa")
|
||||
text = "9999"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="CHALabel"]
|
||||
material = SubResource("CanvasItemMaterial_ktflt")
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_right = 100.0
|
||||
offset_bottom = 64.0
|
||||
texture = SubResource("GradientTexture2D_bj16a")
|
||||
|
||||
[node name="FAILabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_children = 2
|
||||
anchors_preset = -1
|
||||
offset_left = 254.0
|
||||
offset_top = 333.0
|
||||
offset_right = 354.0
|
||||
offset_bottom = 377.0
|
||||
theme = ExtResource("5_kiyqa")
|
||||
text = "9999"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="FAILabel"]
|
||||
material = SubResource("CanvasItemMaterial_ktflt")
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_right = 100.0
|
||||
offset_bottom = 64.0
|
||||
texture = SubResource("GradientTexture2D_bj16a")
|
||||
|
||||
[node name="LUKLabel" type="Label" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_children = 2
|
||||
anchors_preset = -1
|
||||
offset_left = 254.0
|
||||
offset_top = 364.0
|
||||
offset_right = 354.0
|
||||
offset_bottom = 408.0
|
||||
theme = ExtResource("5_kiyqa")
|
||||
text = "9999"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="LUKLabel"]
|
||||
material = SubResource("CanvasItemMaterial_ktflt")
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_right = 100.0
|
||||
offset_bottom = 64.0
|
||||
texture = SubResource("GradientTexture2D_bj16a")
|
||||
|
||||
[node name="GearBanner" type="TextureRect" parent="."]
|
||||
anchors_preset = -1
|
||||
offset_left = -89.0
|
||||
offset_top = 485.0
|
||||
offset_right = 382.0
|
||||
offset_bottom = 509.0
|
||||
texture = ExtResource("7_la6dy")
|
||||
|
||||
[node name="Sideview" type="NinePatchRect" parent="."]
|
||||
anchors_preset = -1
|
||||
offset_left = 13.0
|
||||
offset_top = 543.0
|
||||
offset_right = 238.0
|
||||
offset_bottom = 768.0
|
||||
texture = ExtResource("8_c770f")
|
||||
patch_margin_left = 6
|
||||
patch_margin_top = 6
|
||||
patch_margin_right = 6
|
||||
patch_margin_bottom = 6
|
||||
|
||||
[node name="TempChar" type="TextureRect" parent="Sideview"]
|
||||
layout_mode = 0
|
||||
offset_left = 47.0
|
||||
offset_top = 55.0
|
||||
offset_right = 175.0
|
||||
offset_bottom = 183.0
|
||||
texture = ExtResource("9_cq03q")
|
||||
|
||||
[node name="GearGrid" type="GridContainer" parent="."]
|
||||
anchors_preset = -1
|
||||
offset_left = 241.0
|
||||
offset_top = 545.0
|
||||
offset_right = 462.0
|
||||
offset_bottom = 766.0
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="GearGrid"]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="GearGrid"]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="TextureRect3" type="TextureRect" parent="GearGrid"]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="."]
|
||||
modulate = Color(1.2044971, 0.7664488, 0.43147072, 1)
|
||||
custom_minimum_size = Vector2(0, 275)
|
||||
anchors_preset = -1
|
||||
offset_left = 314.0
|
||||
offset_top = 512.0
|
||||
offset_right = 318.0
|
||||
offset_bottom = 812.0
|
||||
scale = Vector2(2, 1)
|
||||
|
||||
[node name="InventoryBanner" type="TextureRect" parent="."]
|
||||
anchors_preset = -1
|
||||
offset_left = 236.0
|
||||
offset_top = 485.0
|
||||
offset_right = 707.0
|
||||
offset_bottom = 509.0
|
||||
texture = ExtResource("10_rldp4")
|
||||
|
||||
[node name="InventoryGrid" type="GridContainer" parent="."]
|
||||
anchors_preset = -1
|
||||
offset_left = 325.0
|
||||
offset_top = 513.0
|
||||
offset_right = 621.0
|
||||
offset_bottom = 809.0
|
||||
columns = 4
|
||||
|
||||
[node name="ItemSlot" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot2" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot2"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot2"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot3" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot3"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot3"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot4" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot4"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot4"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot5" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot5"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot5"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot6" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot6"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot6"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot7" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot7"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot7"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot8" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot8"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot8"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot9" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot9"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot9"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot10" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot10"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot10"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot11" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot11"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot11"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot12" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot12"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot12"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot13" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot13"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot13"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot14" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot14"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot14"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot15" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot15"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot15"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[node name="ItemSlot16" type="Control" parent="InventoryGrid"]
|
||||
custom_minimum_size = Vector2(71, 71)
|
||||
layout_mode = 2
|
||||
script = ExtResource("11_b43fo")
|
||||
|
||||
[node name="Square" type="TextureRect" parent="InventoryGrid/ItemSlot16"]
|
||||
layout_mode = 0
|
||||
offset_right = 71.0
|
||||
offset_bottom = 71.0
|
||||
texture = ExtResource("8_c770f")
|
||||
|
||||
[node name="Item" type="TextureRect" parent="InventoryGrid/ItemSlot16"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 3.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = 67.0
|
||||
|
||||
[connection signal="close_requested" from="." to="." method="_on_close_requested"]
|
||||
[connection signal="focus_exited" from="." to="." method="_on_close_requested"]
|
||||
[connection signal="pressed" from="CloseButton" to="." method="_on_close_requested"]
|
||||
[connection signal="gui_input" from="DragRegion" to="." method="_on_drag_region_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot" to="InventoryGrid/ItemSlot" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot2" to="InventoryGrid/ItemSlot2" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot3" to="InventoryGrid/ItemSlot3" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot4" to="InventoryGrid/ItemSlot4" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot5" to="InventoryGrid/ItemSlot5" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot6" to="InventoryGrid/ItemSlot6" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot7" to="InventoryGrid/ItemSlot7" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot8" to="InventoryGrid/ItemSlot8" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot9" to="InventoryGrid/ItemSlot9" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot10" to="InventoryGrid/ItemSlot10" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot11" to="InventoryGrid/ItemSlot11" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot12" to="InventoryGrid/ItemSlot12" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot13" to="InventoryGrid/ItemSlot13" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot14" to="InventoryGrid/ItemSlot14" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot15" to="InventoryGrid/ItemSlot15" method="_on_gui_input"]
|
||||
[connection signal="gui_input" from="InventoryGrid/ItemSlot16" to="InventoryGrid/ItemSlot16" method="_on_gui_input"]
|
||||
89
templates/quest_view.tscn
Normal file
89
templates/quest_view.tscn
Normal file
@@ -0,0 +1,89 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://ytfwb1vyrmsx"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bm4826vxrmuqh" path="res://scripts/quest_view.gd" id="1_gmxj1"]
|
||||
[ext_resource type="Texture2D" uid="uid://b7jry0kqho7y7" path="res://graphics/questview/forest-back.png" id="2_0cnce"]
|
||||
[ext_resource type="Texture2D" uid="uid://bu18dxqnd3hf6" path="res://graphics/questview/forest-back2.png" id="3_dvgqk"]
|
||||
[ext_resource type="Texture2D" uid="uid://ci7ngqo1sh7ao" path="res://graphics/questview/ground.png" id="4_0yhlr"]
|
||||
[ext_resource type="Texture2D" uid="uid://cr0sb3p1r7bdq" path="res://graphics/questview/forest-mid.png" id="5_h4ad0"]
|
||||
|
||||
[node name="QuestView" type="Panel"]
|
||||
custom_minimum_size = Vector2(375, 325)
|
||||
anchors_preset = -1
|
||||
offset_left = 12.0
|
||||
offset_right = 387.0
|
||||
offset_bottom = 325.0
|
||||
script = ExtResource("1_gmxj1")
|
||||
|
||||
[node name="Setting" type="Control" parent="."]
|
||||
clip_contents = true
|
||||
layout_mode = 1
|
||||
offset_right = 375.0
|
||||
offset_bottom = 325.0
|
||||
|
||||
[node name="Control" type="Control" parent="Setting"]
|
||||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="StageParallax" type="Parallax2D" parent="Setting/Control"]
|
||||
repeat_size = Vector2(750, 0)
|
||||
autoscroll = Vector2(-30, 0)
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="Background" type="TextureRect" parent="Setting/Control/StageParallax"]
|
||||
anchors_preset = -1
|
||||
offset_top = -50.0
|
||||
offset_right = 750.0
|
||||
offset_bottom = 375.0
|
||||
texture = ExtResource("2_0cnce")
|
||||
|
||||
[node name="StageParallax3" type="Parallax2D" parent="Setting/Control"]
|
||||
scale = Vector2(0.8, 0.8)
|
||||
repeat_size = Vector2(750, 0)
|
||||
autoscroll = Vector2(-35, 0)
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="Background" type="TextureRect" parent="Setting/Control/StageParallax3"]
|
||||
modulate = Color(1.179842, 1.179842, 1.179842, 1)
|
||||
anchors_preset = -1
|
||||
offset_right = 750.0
|
||||
offset_bottom = 425.0
|
||||
texture = ExtResource("3_dvgqk")
|
||||
|
||||
[node name="BackgroundParallax" type="Parallax2D" parent="Setting/Control"]
|
||||
repeat_size = Vector2(475, 0)
|
||||
autoscroll = Vector2(-45, 0)
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Setting/Control/BackgroundParallax"]
|
||||
anchors_preset = -1
|
||||
offset_top = -50.0
|
||||
offset_right = 475.0
|
||||
offset_bottom = 375.0
|
||||
texture = ExtResource("4_0yhlr")
|
||||
|
||||
[node name="StageParallax2" type="Parallax2D" parent="Setting/Control"]
|
||||
repeat_size = Vector2(750, 0)
|
||||
autoscroll = Vector2(-45, 0)
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="Foreground" type="TextureRect" parent="Setting/Control/StageParallax2"]
|
||||
anchors_preset = -1
|
||||
offset_top = -50.0
|
||||
offset_right = 750.0
|
||||
offset_bottom = 375.0
|
||||
texture = ExtResource("5_h4ad0")
|
||||
|
||||
[node name="EnemyPosition" type="Control" parent="."]
|
||||
anchors_preset = 0
|
||||
offset_left = 292.0
|
||||
offset_top = 276.0
|
||||
offset_right = 292.0
|
||||
offset_bottom = 276.0
|
||||
|
||||
[node name="QuestorPosition" type="Control" parent="."]
|
||||
layout_mode = 1
|
||||
offset_left = 89.0
|
||||
offset_top = 272.0
|
||||
offset_right = 89.0
|
||||
offset_bottom = 272.0
|
||||
@@ -1,154 +1,7 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://du4hyv7egc7ny"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b7jry0kqho7y7" path="res://graphics/questview/forest-back.png" id="1_pphhk"]
|
||||
[ext_resource type="Texture2D" uid="uid://bu18dxqnd3hf6" path="res://graphics/questview/forest-back2.png" id="2_4qpsm"]
|
||||
[ext_resource type="Texture2D" uid="uid://cr0sb3p1r7bdq" path="res://graphics/questview/forest-mid.png" id="2_mburs"]
|
||||
[ext_resource type="Texture2D" uid="uid://ci7ngqo1sh7ao" path="res://graphics/questview/ground.png" id="2_rcl5q"]
|
||||
[ext_resource type="Texture2D" uid="uid://c5d0u7ir1y0t2" path="res://graphics/testchar.png" id="5_4qpsm"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_gy3gd"]
|
||||
resource_name = "idle"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7jhts"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_5om5g"]
|
||||
resource_name = "running"
|
||||
length = 0.66667
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.06666667, 0.13333334, 0.2, 0.26666668, 0.33333334, 0.4, 0.46666667, 0.53333336, 0.6, 0.6666667),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_pylgq"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_7jhts"),
|
||||
&"idle": SubResource("Animation_gy3gd"),
|
||||
&"running": SubResource("Animation_5om5g")
|
||||
}
|
||||
[gd_scene format=3 uid="uid://du4hyv7egc7ny"]
|
||||
|
||||
[node name="QuestViewWindow" type="Panel"]
|
||||
anchors_preset = -1
|
||||
offset_left = 1.0
|
||||
offset_right = 401.0
|
||||
offset_bottom = 325.0
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
custom_minimum_size = Vector2(375, 325)
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_left = 12.0
|
||||
offset_right = 387.0
|
||||
offset_bottom = 325.0
|
||||
|
||||
[node name="Setting" type="Control" parent="Panel"]
|
||||
clip_contents = true
|
||||
layout_mode = 1
|
||||
offset_right = 375.0
|
||||
offset_bottom = 325.0
|
||||
|
||||
[node name="Control" type="Control" parent="Panel/Setting"]
|
||||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="StageParallax" type="Parallax2D" parent="Panel/Setting/Control"]
|
||||
repeat_size = Vector2(750, 0)
|
||||
autoscroll = Vector2(-30, 0)
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="Background" type="TextureRect" parent="Panel/Setting/Control/StageParallax"]
|
||||
anchors_preset = -1
|
||||
offset_top = -50.0
|
||||
offset_right = 750.0
|
||||
offset_bottom = 375.0
|
||||
texture = ExtResource("1_pphhk")
|
||||
|
||||
[node name="StageParallax3" type="Parallax2D" parent="Panel/Setting/Control"]
|
||||
scale = Vector2(0.8, 0.8)
|
||||
repeat_size = Vector2(750, 0)
|
||||
autoscroll = Vector2(-35, 0)
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="Background" type="TextureRect" parent="Panel/Setting/Control/StageParallax3"]
|
||||
modulate = Color(1.179842, 1.179842, 1.179842, 1)
|
||||
anchors_preset = -1
|
||||
offset_right = 750.0
|
||||
offset_bottom = 425.0
|
||||
texture = ExtResource("2_4qpsm")
|
||||
|
||||
[node name="BackgroundParallax" type="Parallax2D" parent="Panel/Setting/Control"]
|
||||
repeat_size = Vector2(475, 0)
|
||||
autoscroll = Vector2(-45, 0)
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Panel/Setting/Control/BackgroundParallax"]
|
||||
anchors_preset = -1
|
||||
offset_top = -50.0
|
||||
offset_right = 475.0
|
||||
offset_bottom = 375.0
|
||||
texture = ExtResource("2_rcl5q")
|
||||
|
||||
[node name="StageParallax2" type="Parallax2D" parent="Panel/Setting/Control"]
|
||||
repeat_size = Vector2(750, 0)
|
||||
autoscroll = Vector2(-45, 0)
|
||||
ignore_camera_scroll = true
|
||||
|
||||
[node name="Foreground" type="TextureRect" parent="Panel/Setting/Control/StageParallax2"]
|
||||
anchors_preset = -1
|
||||
offset_top = -50.0
|
||||
offset_right = 750.0
|
||||
offset_bottom = 375.0
|
||||
texture = ExtResource("2_mburs")
|
||||
|
||||
[node name="SideviewSprite" type="Control" parent="Panel"]
|
||||
anchors_preset = 0
|
||||
offset_left = 89.0
|
||||
offset_top = 274.0
|
||||
offset_right = 89.0
|
||||
offset_bottom = 274.0
|
||||
|
||||
[node name="Sprite" type="Sprite2D" parent="Panel/SideviewSprite"]
|
||||
position = Vector2(0, -53)
|
||||
texture = ExtResource("5_4qpsm")
|
||||
hframes = 4
|
||||
vframes = 3
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Panel/SideviewSprite"]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_pylgq")
|
||||
}
|
||||
autoplay = "running"
|
||||
|
||||
78
templates/questor_sprite.tscn
Normal file
78
templates/questor_sprite.tscn
Normal file
@@ -0,0 +1,78 @@
|
||||
[gd_scene load_steps=7 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://c5d0u7ir1y0t2" path="res://graphics/testchar.png" id="2_w1b7t"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7jhts"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_gy3gd"]
|
||||
resource_name = "idle"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_5om5g"]
|
||||
resource_name = "running"
|
||||
length = 0.66667
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.06666667, 0.13333334, 0.2, 0.26666668, 0.33333334, 0.4, 0.46666667, 0.53333336, 0.6, 0.6666667),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_pylgq"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_7jhts"),
|
||||
&"idle": SubResource("Animation_gy3gd"),
|
||||
&"running": SubResource("Animation_5om5g")
|
||||
}
|
||||
|
||||
[node name="QuestorSprite" type="Control"]
|
||||
layout_mode = 3
|
||||
offset_left = 89.0
|
||||
offset_top = 274.0
|
||||
offset_right = 89.0
|
||||
offset_bottom = 274.0
|
||||
script = ExtResource("1_0ev5i")
|
||||
|
||||
[node name="Sprite" type="Sprite2D" parent="."]
|
||||
position = Vector2(0, -53)
|
||||
texture = ExtResource("2_w1b7t")
|
||||
hframes = 4
|
||||
vframes = 3
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_pylgq")
|
||||
}
|
||||
autoplay = "running"
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://djirqtsrttqwe"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://0jl2qbvtmsik" path="res://scripts/adventurer_data.gd" id="1_jdutx"]
|
||||
[ext_resource type="Script" uid="uid://0jl2qbvtmsik" path="res://scripts/adventurer.gd" id="1_jdutx"]
|
||||
|
||||
[node name="Test Guildmember" type="Node"]
|
||||
script = ExtResource("1_jdutx")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://dew8gxu55ex6q"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cjqumk0kw2vte" path="res://scripts/adventurer.gd" id="1_kt0f0"]
|
||||
[ext_resource type="Script" uid="uid://cjqumk0kw2vte" path="res://scripts/adventurer_sprite.gd" id="1_kt0f0"]
|
||||
[ext_resource type="Texture2D" uid="uid://cg6ptmynq0aq0" path="res://graphics/basic-sprite.png" id="2_i6rus"]
|
||||
[ext_resource type="PackedScene" uid="uid://jbqw0n6dlj08" path="res://templates/speech_bubble.tscn" id="3_lqojj"]
|
||||
[ext_resource type="BehaviorTree" uid="uid://dght2flegv70i" path="res://ai/trees/adventurer.tres" id="4_86mwh"]
|
||||
|
||||
Reference in New Issue
Block a user