This commit is contained in:
Matteo Sonaglioni
2026-06-27 17:47:15 +02:00
parent 58f9188794
commit ed5eb706a1
13 changed files with 123 additions and 25 deletions

View File

@@ -6,12 +6,55 @@
[ext_resource type="PackedScene" uid="uid://c5rccx22gs6jt" path="res://core/ai/agents/cat/Cat_rig.fbx" id="2_rohxe"]
[ext_resource type="Script" uid="uid://bngfthvt04ivv" path="res://core/ai/framework/patrol_state.gd" id="3_0jm3k"]
[ext_resource type="Script" uid="uid://dty1p02kqviwf" path="res://core/ai/framework/sit_state.gd" id="3_scd7t"]
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="7_rxsfd"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_1rb57"]
render_priority = 0
shader = ExtResource("7_rxsfd")
shader_parameter/albedo_color = Color(0.7389186, 0.53468716, 0.19165063, 1)
shader_parameter/use_texture = true
shader_parameter/uv_scale = Vector2(1, 1)
shader_parameter/palette_shift_y = 0.0
shader_parameter/gradient_start_y = 0.0
shader_parameter/gradient_end_y = 10.0
shader_parameter/light_steps = 3.0
shader_parameter/step_softness = 0.1
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
shader_parameter/shadow_offset = 0.0
shader_parameter/cast_shadow_strength = 0.6
shader_parameter/use_ghibli_glint = true
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
shader_parameter/glint_intensity = 1.0
shader_parameter/glint_sharpness = 32.0
shader_parameter/emission_color = Color(0, 0, 0, 1)
shader_parameter/emission_energy = 0.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_42ie3"]
render_priority = 0
shader = ExtResource("7_rxsfd")
shader_parameter/albedo_color = Color(0.099985994, 0.09998601, 0.099985965, 1)
shader_parameter/use_texture = true
shader_parameter/uv_scale = Vector2(1, 1)
shader_parameter/palette_shift_y = 0.0
shader_parameter/gradient_start_y = 0.0
shader_parameter/gradient_end_y = 10.0
shader_parameter/light_steps = 3.0
shader_parameter/step_softness = 0.1
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
shader_parameter/shadow_offset = 0.0
shader_parameter/cast_shadow_strength = 0.6
shader_parameter/use_ghibli_glint = true
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
shader_parameter/glint_intensity = 1.0
shader_parameter/glint_sharpness = 32.0
shader_parameter/emission_color = Color(0, 0, 0, 1)
shader_parameter/emission_energy = 0.0
[node name="AiCat" unique_id=1228675528 node_paths=PackedStringArray("mesh", "anim_player") instance=ExtResource("1_85o24")]
script = ExtResource("2_cat_script")
mesh = NodePath("Cat_rig/Rig_Cat/Skeleton3D/Cat")
fur_colors = Array[Color]([])
eye_colors = Array[Color]([])
fur_colors = Array[Color]([Color(0.8716863, 0.762116, 0.1809479, 1)])
eye_colors = Array[Color]([Color(0.12955844, 0.12955847, 0.12955844, 1), Color(0.6901961, 0.3019608, 0.12156863, 1), Color(0.6830768, 0.6830776, 0.68307686, 1), Color(0.6273405, 0.15743047, 0, 1)])
fur_material_index = 0
eye_material_index = 1
anim_player = NodePath("Cat_rig/AnimationPlayer")
@@ -43,7 +86,7 @@ exit_on_action_finished = true
[node name="Cat_rig" parent="." index="3" unique_id=1332997618 instance=ExtResource("2_rohxe")]
[node name="Skeleton3D" parent="Cat_rig/Rig_Cat" parent_id_path=PackedInt32Array(1332997618, 656824407) index="0" unique_id=1952223098]
[node name="Skeleton3D" parent="Cat_rig/Rig_Cat" parent_id_path=PackedInt32Array(1332997618, 1024066488) index="0" unique_id=1455145313]
bones/1/position = Vector3(1.6719584e-08, 0.23547882, 0.34218493)
bones/1/rotation = Quaternion(0.12769094, -0.6954821, -0.12769029, 0.69548184)
bones/2/rotation = Quaternion(-1.5819447e-07, -1.9079575e-07, -0.5904159, 0.8070992)
@@ -72,4 +115,8 @@ bones/27/rotation = Quaternion(-8.140452e-08, 1.1560887e-07, -0.47071794, 0.8822
bones/28/position = Vector3(0.18089616, -0.000116375166, 0.011642809)
bones/28/rotation = Quaternion(4.5638826e-05, -8.8217595e-05, 0.5290293, 0.84860367)
[node name="Cat" parent="Cat_rig/Rig_Cat/Skeleton3D" index="0" unique_id=869144045]
surface_material_override/0 = SubResource("ShaderMaterial_1rb57")
surface_material_override/1 = SubResource("ShaderMaterial_42ie3")
[editable path="Cat_rig"]

View File

@@ -15,12 +15,14 @@ initial_state = NodePath("WaitTrainState")
[node name="WaitTrainState" type="Node" parent="StateMachine" index="0" unique_id=1000000000]
script = ExtResource("3_wait")
fly_distance_threshold = 10.0
state_id = &"wait"
next_state_id = &"fly"
animation_name = "Idle_Crow"
[node name="FlyAwayState" type="Node" parent="StateMachine" index="1" unique_id=1000000001]
script = ExtResource("4_fly")
destroy_after_seconds = 20.0
state_id = &"fly"
animation_name = "Fly_Crow"

View File

@@ -10,7 +10,7 @@ entity_name = "Farmer"
allowed_biomes = Array[String](["countryside"])
[node name="StateMachine" parent="." index="1" unique_id=1286404264 node_paths=PackedStringArray("initial_state")]
initial_state = NodePath("GatherState")
initial_state = NodePath("IdleState")
[node name="PatrolState" type="Node" parent="StateMachine" index="0" unique_id=930272128]
script = ExtResource("3_2oda6")
@@ -35,7 +35,40 @@ next_state_id = &"patrol"
animation_name = "custom/idle"
[node name="Skeleton3D" parent="BaseMesh/BaseMesh" parent_id_path=PackedInt32Array(1846171523, 1363988051) index="0" unique_id=1848874512]
bones/8/rotation = Quaternion(-0.6173422, -0.37346625, 0.5666242, -0.3979305)
bones/46/rotation = Quaternion(0.059241787, 0.12928401, 0.9836761, -0.110261135)
bones/0/position = Vector3(-0.0015795716, 0.9761277, 0.0012886743)
bones/0/rotation = Quaternion(0.008345705, 0.02440254, -0.0222881, 0.999419)
bones/1/rotation = Quaternion(-0.033856627, 0.0019547925, 0.01148837, 0.9993588)
bones/2/rotation = Quaternion(0.003385691, 0.0057030413, 0.004773842, 0.9999666)
bones/3/rotation = Quaternion(0.0033856947, 0.0057030534, 0.0047738357, 0.9999666)
bones/4/rotation = Quaternion(0.03554347, -0.0036022358, -0.01067691, 0.9993046)
bones/5/rotation = Quaternion(0.023500564, -0.0268053, 0.016007349, 0.9992362)
bones/8/rotation = Quaternion(-0.677935, -0.3162402, 0.5391133, -0.3869797)
bones/9/rotation = Quaternion(0.33057448, -0.0144906035, -0.024771411, 0.9433436)
bones/10/rotation = Quaternion(0.071588665, 0.16423635, 0.26876602, 0.9463965)
bones/11/rotation = Quaternion(-0.11033899, 0.19317266, 0.18225361, 0.95775425)
bones/12/rotation = Quaternion(0.28979003, -0.100065045, 0.021221647, 0.95160836)
bones/13/rotation = Quaternion(-0.01075587, -0.003262491, 0.085242614, 0.9962969)
bones/17/rotation = Quaternion(0.372185, -0.04203017, 0.003265603, 0.9272007)
bones/18/rotation = Quaternion(0.6449709, -0.022805, 0.11591787, 0.7550203)
bones/22/rotation = Quaternion(0.5152635, -0.09862117, 0.07484319, 0.8480425)
bones/23/rotation = Quaternion(0.7634141, -0.01797779, 0.14009176, 0.63027775)
bones/27/rotation = Quaternion(0.6460654, -0.34361044, 0.58023506, 0.35757324)
bones/28/rotation = Quaternion(0.3564352, 0.033001784, 0.1479881, 0.9219352)
bones/29/rotation = Quaternion(0.10407414, -0.119882874, -0.20823832, 0.96510804)
bones/30/rotation = Quaternion(-0.040577345, -0.20657076, -0.14159827, 0.96728075)
bones/31/rotation = Quaternion(0.18718895, 0.11185156, -0.005364931, 0.97592044)
bones/32/rotation = Quaternion(0.077440694, -0.18545257, 0.02808432, 0.9791944)
bones/36/rotation = Quaternion(0.33726785, 0.06133867, 0.07482985, 0.93642324)
bones/37/rotation = Quaternion(0.5483169, 0.027307179, -0.058035128, 0.83380747)
bones/41/rotation = Quaternion(0.4086348, 0.09420283, 0.037183065, 0.90706164)
bones/42/rotation = Quaternion(0.59161603, 0.030198008, -0.037664413, 0.8047733)
bones/46/rotation = Quaternion(0.060233127, 0.24369022, 0.966249, -0.05787964)
bones/47/rotation = Quaternion(-0.56581247, 0.0105282655, -0.0027436528, 0.8244622)
bones/48/rotation = Quaternion(0.46872035, 0.0146656195, -0.0033694527, 0.88321847)
bones/49/rotation = Quaternion(0.49349385, 0.06718427, -0.01829647, 0.86695755)
bones/52/rotation = Quaternion(-0.0765912, 0.12600712, 0.988389, -0.03665043)
bones/53/rotation = Quaternion(-0.25056988, -0.06629382, 0.018621337, 0.96564656)
bones/54/rotation = Quaternion(0.549743, -0.041815143, -0.046032935, 0.83301574)
bones/55/rotation = Quaternion(0.3627838, -0.05369254, 0.01255593, 0.9302406)
[editable path="BaseMesh"]

Binary file not shown.

Binary file not shown.

View File

@@ -40,10 +40,10 @@ offset_right = 0.0
offset_bottom = 0.0
[node name="MarginContainer" parent="Photo/ColorRect" index="0" unique_id=1141643525]
theme_override_constants/margin_left = 56
theme_override_constants/margin_top = 60
theme_override_constants/margin_right = 56
theme_override_constants/margin_bottom = 200
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 30
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 185
[connection signal="gui_input" from="Panel" to="." method="_on_panel_gui_input"]

View File

@@ -3,10 +3,11 @@
[ext_resource type="Script" uid="uid://dsey5dvc11vpq" path="res://core/game_menu/photo.gd" id="1_u0arp"]
[node name="Photo" type="Button" unique_id=1451980505]
custom_minimum_size = Vector2(132, 154)
custom_minimum_size = Vector2(132, 154.02)
anchors_preset = -1
anchor_right = 0.06875
anchor_bottom = 0.1425926
offset_bottom = 0.020004272
pivot_offset_ratio = Vector2(0.5, 0.5)
script = ExtResource("1_u0arp")
metadata/_edit_use_anchors_ = true
@@ -34,9 +35,9 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 14
theme_override_constants/margin_top = 15
theme_override_constants/margin_right = 14
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 50
[node name="PhotoTexture" type="TextureRect" parent="ColorRect/MarginContainer" unique_id=506844785]
@@ -45,7 +46,7 @@ layout_mode = 2
size_flags_vertical = 3
mouse_filter = 2
expand_mode = 1
stretch_mode = 5
stretch_mode = 6
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]

View File

@@ -34,9 +34,9 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 14
theme_override_constants/margin_top = 15
theme_override_constants/margin_right = 14
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 50
[node name="PhotoTexture" type="TextureRect" parent="ColorRect/MarginContainer" unique_id=1754898569]
@@ -45,4 +45,4 @@ layout_mode = 2
size_flags_vertical = 3
mouse_filter = 2
expand_mode = 1
stretch_mode = 5
stretch_mode = 6

View File

@@ -105,8 +105,8 @@ geometry_source_geometry_mode = 2
geometry_source_group_name = &"FieldNav"
[sub_resource type="NavigationMesh" id="NavigationMesh_uf36e"]
vertices = PackedVector3Array(0.9999995, 0.45649529, -1.499999, 0.9999995, 0.45649529, -9.499999, -1.0000005, 0.45649529, -9.499999, 1.2499995, 0.45649529, 1.000001, 9.5, 0.45649529, 1.000001, 9.5, 0.45649529, -1.249999, -1.0000005, 0.45649529, 9.500001, 1.2499995, 0.45649529, 9.500001)
polygons = [PackedInt32Array(2, 1, 0), PackedInt32Array(4, 3, 5), PackedInt32Array(5, 3, 0), PackedInt32Array(7, 6, 3), PackedInt32Array(3, 6, 0), PackedInt32Array(0, 6, 2)]
vertices = PackedVector3Array(1.295435, 0.45649529, 0.98768234, 9.545435, 0.45649529, 0.98768234, 9.545435, 0.45649529, -1.0123177, 1.295435, 0.45649529, -1.0123177, 1.045435, 0.45649529, -9.512318, -1.454565, 0.45649529, -9.262318, -1.204565, 0.45649529, 9.487682, 1.045435, 0.45649529, 9.487682)
polygons = [PackedInt32Array(3, 2, 0), PackedInt32Array(0, 2, 1), PackedInt32Array(7, 6, 0), PackedInt32Array(0, 6, 3), PackedInt32Array(3, 6, 5), PackedInt32Array(3, 5, 4)]
geometry_source_geometry_mode = 2
geometry_source_group_name = &"RoadNav"
@@ -148,7 +148,7 @@ surface_material_override/1 = ExtResource("6_7dsci")
surface_material_override/0 = ExtResource("6_7dsci")
surface_material_override/1 = ExtResource("5_v716w")
[node name="MSH_Staccioanta_1_007" parent="." index="8" unique_id=914751003]
[node name="MSH_Staccioanta_1_007" parent="." index="8" unique_id=914751003 groups=["RoadNav"]]
surface_material_override/0 = ExtResource("7_2mkp7")
[node name="PaliLuci_003" parent="." index="9" unique_id=860093688 groups=["weather_node"]]
@@ -420,3 +420,6 @@ allowed_type = 2
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9.302983, 0.08556163, -0.19890785)
script = ExtResource("40_uf36e")
allowed_type = 4
[node name="Camera3D" type="Camera3D" parent="." index="46" unique_id=279832393]
transform = Transform3D(0.9723699, -0.22059396, 0.07638751, 0, 0.3272179, 0.9449489, -0.23344538, -0.9188399, 0.31817684, 1.081, 13.657, 5.307)

View File

@@ -188,8 +188,8 @@ geometry_source_geometry_mode = 2
geometry_source_group_name = &"FieldNav"
[sub_resource type="NavigationMesh" id="NavigationMesh_k3vly"]
vertices = PackedVector3Array(-1.8700409, 0.45649529, 2.500001, -1.8700409, 0.45649529, 5.500001, -1.1200409, 0.45649529, 5.750001, -1.1200409, 0.45649529, 2.250001, 0.8799591, 0.45649529, 9.500001, -1.1200409, 0.45649529, 9.500001, 0.8799591, 0.45649529, -9.499999, -1.1200409, 0.45649529, -9.499999, -2.370041, 0.45649529, 2.250001, -2.370041, 0.45649529, 5.750001, -8.870041, 0.45649529, -0.74999905, -8.870041, 0.45649529, 9.250001, -2.370041, 0.45649529, -0.74999905, -2.370041, 0.45649529, 9.250001)
polygons = [PackedInt32Array(0, 2, 1), PackedInt32Array(0, 3, 2), PackedInt32Array(2, 3, 4), PackedInt32Array(4, 5, 2), PackedInt32Array(7, 6, 3), PackedInt32Array(3, 6, 4), PackedInt32Array(1, 9, 0), PackedInt32Array(0, 9, 8), PackedInt32Array(8, 9, 10), PackedInt32Array(10, 9, 11), PackedInt32Array(10, 12, 8), PackedInt32Array(9, 13, 11)]
vertices = PackedVector3Array(1.1351337, 0.45649529, -9.499999, -0.86486626, 0.45649529, -9.499999, -1.1148663, 0.45649529, -8.999999, -0.86486626, 0.45649529, 2.250001, 1.1351337, 0.45649529, 9.500001, -2.1148663, 0.45649529, 2.500001, -2.1148663, 0.45649529, 5.250001, -0.86486626, 0.45649529, 5.500001, -0.86486626, 0.45649529, 9.500001, -2.3648663, 0.45649529, -0.74999905, -9.114866, 0.45649529, -0.74999905, -9.114866, 0.45649529, 9.000001, -2.3648663, 0.45649529, 9.000001)
polygons = [PackedInt32Array(1, 0, 2), PackedInt32Array(2, 0, 3), PackedInt32Array(3, 0, 4), PackedInt32Array(5, 3, 6), PackedInt32Array(6, 3, 7), PackedInt32Array(4, 7, 3), PackedInt32Array(4, 8, 7), PackedInt32Array(5, 6, 9), PackedInt32Array(9, 6, 12), PackedInt32Array(9, 12, 11), PackedInt32Array(9, 11, 10)]
geometry_source_geometry_mode = 2
geometry_source_group_name = &"RoadNav"
@@ -233,7 +233,7 @@ surface_material_override/0 = ExtResource("3_30u2s")
surface_material_override/0 = ExtResource("7_28cea")
surface_material_override/1 = ExtResource("8_hbf40")
[node name="MSH_Staccioanta_1_003" parent="." index="9" unique_id=1980961732]
[node name="MSH_Staccioanta_1_003" parent="." index="9" unique_id=1980961732 groups=["RoadNav"]]
surface_material_override/0 = ExtResource("9_mkvmp")
[node name="Rocks_001" parent="." index="10" unique_id=375547626 groups=["weather_node"]]

View File

@@ -8,6 +8,7 @@
render_priority = 0
shader = ExtResource("3_xsxbg")
shader_parameter/snow_edge_softness = 0.15
shader_parameter/snow_noise_scale = 0.15
shader_parameter/snow_color_variation = 0.05
shader_parameter/ripple_scale = 1.5
shader_parameter/ripple_speed = 2.0
@@ -24,6 +25,7 @@ shader_parameter/puddle_threshold = 0.45
render_priority = 0
shader = ExtResource("3_xsxbg")
shader_parameter/snow_edge_softness = 0.15
shader_parameter/snow_noise_scale = 0.15
shader_parameter/snow_color_variation = 0.05
shader_parameter/ripple_scale = 1.5
shader_parameter/ripple_speed = 2.0
@@ -40,6 +42,7 @@ shader_parameter/puddle_threshold = 0.45
render_priority = 0
shader = ExtResource("3_xsxbg")
shader_parameter/snow_edge_softness = 0.15
shader_parameter/snow_noise_scale = 0.15
shader_parameter/snow_color_variation = 0.05
shader_parameter/ripple_scale = 1.5
shader_parameter/ripple_speed = 2.0
@@ -96,6 +99,7 @@ shadow_mesh = SubResource("ArrayMesh_d4r25")
render_priority = 0
shader = ExtResource("3_xsxbg")
shader_parameter/snow_edge_softness = 0.15
shader_parameter/snow_noise_scale = 0.15
shader_parameter/snow_color_variation = 0.05
shader_parameter/ripple_scale = 1.5
shader_parameter/ripple_speed = 2.0
@@ -108,6 +112,9 @@ shader_parameter/rain_normal_strength = 0.4
shader_parameter/puddle_noise_scale = 0.08
shader_parameter/puddle_threshold = 0.45
[sub_resource type="BoxShape3D" id="BoxShape3D_8kteh"]
size = Vector3(3.4276123, 0.5996094, 0.0715332)
[node name="MSH_Staccionate" unique_id=118332436 instance=ExtResource("1_j7em5")]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0)
@@ -131,3 +138,7 @@ mesh = SubResource("ArrayMesh_h5j06")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.0379614, 0, 0)
material_override = ExtResource("2_2tbpd")
material_overlay = SubResource("ShaderMaterial_p4545")
[node name="CollisionShape3D" type="CollisionShape3D" parent="." index="5" unique_id=752765599]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.18890381, 0.29392046, 0.0010986328)
shape = SubResource("BoxShape3D_8kteh")

View File

@@ -267,6 +267,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -91.191925, 0, 539.03174)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -312.19193, 0, 349.03174)
[node name="Control" type="Control" parent="." unique_id=630650980]
visible = false
layout_mode = 3
anchors_preset = 0
offset_right = 40.0