[gd_scene load_steps=26 format=3]

[ext_resource type="Terrain3DAssets" path="res://terrain/jajce/assets.tres" id="1_assets"]
[ext_resource type="PackedScene" path="res://world/resource_nodes/ResourceNode.tscn" id="2_resource"]
[ext_resource type="Script" path="res://world/jajce/jajce_world.gd" id="3_world"]
[ext_resource type="PackedScene" path="res://world/jajce/StylizedTree.tscn" id="4_tree"]
[ext_resource type="PackedScene" path="res://world/jajce/FortressBlockout.tscn" id="5_fortress"]
[ext_resource type="PackedScene" path="res://world/jajce/StylizedHouse.tscn" id="6_house"]
[ext_resource type="PackedScene" path="res://world/jajce/StylizedMill.tscn" id="7_mill"]
[ext_resource type="PackedScene" path="res://world/jajce/BridgeBlockout.tscn" id="8_bridge"]
[ext_resource type="PackedScene" path="res://world/jajce/WaterBody.tscn" id="9_water"]
[ext_resource type="PackedScene" path="res://world/jajce/WaterfallBody.tscn" id="10_waterfall"]
[ext_resource type="PackedScene" path="res://world/jajce/WaterfallMist.tscn" id="11_mist"]
[ext_resource type="PackedScene" path="res://world/jajce/ChimneySmoke.tscn" id="12_smoke"]
[ext_resource type="Script" path="res://world/jajce/day_night_cycle.gd" id="13_daynight"]
[ext_resource type="PackedScene" path="res://world/storage/StorageNode.tscn" id="14_storage"]
[ext_resource type="Script" path="res://world/activity/ActivitySite.gd" id="15_activity"]

[sub_resource type="Terrain3DMaterial" id="Terrain3DMaterial_jajce"]
_shader_parameters = {
"auto_base_texture": 1,
"auto_overlay_texture": 0,
"auto_slope": 0.72,
"blend_sharpness": 0.82,
"enable_macro_variation": true,
"macro_variation1": Color(0.9, 0.94, 0.82, 1),
"macro_variation2": Color(0.76, 0.81, 0.7, 1),
"macro_variation_slope": 0.38
}
world_background = 0
auto_shader = true

[sub_resource type="NavigationMesh" id="NavigationMesh_greybox"]
vertices = PackedVector3Array(-14.5, 0.5, 0, -1, 0.5, 0, -1, 0.5, -0.75, 0, 0.5, -1, 0, 0.5, -14.5, -14.5, 0.5, -14.5, 0.75, 0.5, -1, 0.75, 0.75, -0.5, 14.5, 0.5, -0.5, 14.5, 0.5, -14.5, 0.75, 0.75, 0, 0, 1, 0, 0, 0.75, 0.75, -0.5, 0.75, 0.75, -0.5, 0.5, 14.5, 14.5, 0.5, 14.5, -1, 0.5, 0.75, -14.5, 0.5, 14.5)
polygons = [PackedInt32Array(2, 1, 0), PackedInt32Array(3, 2, 4), PackedInt32Array(4, 2, 5), PackedInt32Array(5, 2, 0), PackedInt32Array(6, 3, 4), PackedInt32Array(8, 7, 6), PackedInt32Array(8, 6, 9), PackedInt32Array(9, 6, 4), PackedInt32Array(12, 11, 10), PackedInt32Array(10, 7, 8), PackedInt32Array(14, 13, 12), PackedInt32Array(10, 8, 12), PackedInt32Array(12, 8, 14), PackedInt32Array(14, 8, 15), PackedInt32Array(0, 1, 16), PackedInt32Array(16, 13, 14), PackedInt32Array(14, 17, 16), PackedInt32Array(16, 17, 0)]

[sub_resource type="StandardMaterial3D" id="Material_ground"]
albedo_color = Color(0.24, 0.48, 0.25, 1)

[sub_resource type="BoxMesh" id="Mesh_ground"]
material = SubResource("Material_ground")
size = Vector3(64, 0.2, 64)

[sub_resource type="BoxShape3D" id="Shape_ground"]
size = Vector3(64, 0.2, 64)

[sub_resource type="ProceduralSkyMaterial" id="SkyMaterial_jajce"]
sky_top_color = Color(0.23, 0.43, 0.62, 1)
sky_horizon_color = Color(0.82, 0.68, 0.5, 1)
ground_bottom_color = Color(0.12, 0.17, 0.12, 1)
ground_horizon_color = Color(0.62, 0.55, 0.42, 1)
sun_angle_max = 18.0

[sub_resource type="Sky" id="Sky_jajce"]
sky_material = SubResource("SkyMaterial_jajce")

[sub_resource type="Environment" id="Environment_greybox"]
background_mode = 2
sky = SubResource("Sky_jajce")
background_energy_multiplier = 0.9
ambient_light_source = 3
ambient_light_color = Color(0.91, 0.85, 0.72, 1)
ambient_light_energy = 0.7
reflected_light_source = 2
tonemap_mode = 2
glow_enabled = true
glow_normalized = true
glow_intensity = 0.34
glow_strength = 0.75
glow_bloom = 0.08
fog_enabled = true
fog_light_color = Color(0.82, 0.78, 0.66, 1)
fog_light_energy = 0.72
fog_density = 0.002
fog_height = -2.0
fog_height_density = 0.08
fog_aerial_perspective = 0.35
fog_sky_affect = 0.28
volumetric_fog_enabled = true
volumetric_fog_density = 0.006
volumetric_fog_albedo = Color(0.9, 0.84, 0.72, 1)
volumetric_fog_emission = Color(0.08, 0.065, 0.04, 1)
volumetric_fog_emission_energy = 0.18
volumetric_fog_length = 96.0
volumetric_fog_detail_spread = 1.6
adjustment_enabled = true
adjustment_brightness = 1.04
adjustment_contrast = 1.03
adjustment_saturation = 1.1

[sub_resource type="StandardMaterial3D" id="Material_guard"]
albedo_color = Color(0.55, 0.45, 0.35, 1)
roughness = 0.8

[sub_resource type="StandardMaterial3D" id="Material_study"]
albedo_color = Color(0.45, 0.35, 0.22, 1)
roughness = 0.82

[sub_resource type="StandardMaterial3D" id="Material_rest"]
albedo_color = Color(0.35, 0.28, 0.22, 1)
roughness = 0.88

[sub_resource type="CylinderMesh" id="Mesh_guard_post"]
material = SubResource("Material_guard")
top_radius = 0.35
bottom_radius = 0.4
height = 2.5

[sub_resource type="BoxMesh" id="Mesh_study_desk"]
material = SubResource("Material_study")
size = Vector3(2.0, 0.25, 1.2)

[sub_resource type="BoxMesh" id="Mesh_rest_bench"]
material = SubResource("Material_rest")
size = Vector3(2.8, 0.3, 0.9)

[node name="JajceWorld" type="Node3D"]
script = ExtResource("3_world")

[node name="NavigationRegion3D" type="NavigationRegion3D" parent="."]
navigation_mesh = SubResource("NavigationMesh_greybox")

[node name="GreyboxGround" type="StaticBody3D" parent="NavigationRegion3D"]

[node name="Mesh" type="MeshInstance3D" parent="NavigationRegion3D/GreyboxGround"]
visible = false
mesh = SubResource("Mesh_ground")

[node name="Collision" type="CollisionShape3D" parent="NavigationRegion3D/GreyboxGround"]
shape = SubResource("Shape_ground")

[node name="TerrainRoot" type="Node3D" parent="."]

[node name="Terrain3D" type="Terrain3D" parent="TerrainRoot"]
data_directory = "res://terrain/jajce/data"
material = SubResource("Terrain3DMaterial_jajce")
assets = ExtResource("1_assets")
collision_mask = 3
collision_mode = 0
top_level = true

[node name="FortressBlockout" type="Node3D" parent="."]
position = Vector3(-25, 7, 9)

[node name="Keep" parent="FortressBlockout" instance=ExtResource("5_fortress")]

[node name="WaterRoot" type="Node3D" parent="."]

[node name="RiverSurface" parent="WaterRoot" instance=ExtResource("9_water")]

[node name="WaterfallBody" parent="WaterRoot" instance=ExtResource("10_waterfall")]

[node name="WaterfallMist" parent="WaterRoot" instance=ExtResource("11_mist")]

[node name="VillageRoot" type="Node3D" parent="."]

[node name="House_01" parent="VillageRoot" instance=ExtResource("6_house")]
position = Vector3(-15, 2, 7)

[node name="Smoke" parent="VillageRoot/House_01" instance=ExtResource("12_smoke")]
position = Vector3(0, 4.5, 0)

[node name="House_02" parent="VillageRoot" instance=ExtResource("6_house")]
position = Vector3(-8, 2, 2)

[node name="Smoke" parent="VillageRoot/House_02" instance=ExtResource("12_smoke")]
position = Vector3(0, 4.5, 0)

[node name="House_03" parent="VillageRoot" instance=ExtResource("6_house")]
position = Vector3(-15, 2, -4)

[node name="Smoke" parent="VillageRoot/House_03" instance=ExtResource("12_smoke")]
position = Vector3(0, 4.5, 0)

[node name="Mill" parent="VillageRoot" instance=ExtResource("7_mill")]
position = Vector3(19, 2, 7)

[node name="Bridge" parent="VillageRoot" instance=ExtResource("8_bridge")]
position = Vector3(25, 0.5, 0)

[node name="FoliageRoot" type="Node3D" parent="."]

[node name="Tree_West_01" parent="FoliageRoot" instance=ExtResource("4_tree")]
position = Vector3(-33, 0, -15)
scale = Vector3(1.25, 1.25, 1.25)

[node name="Tree_West_02" parent="FoliageRoot" instance=ExtResource("4_tree")]
position = Vector3(-29, 0, -21)
scale = Vector3(0.9, 0.9, 0.9)

[node name="Tree_West_03" parent="FoliageRoot" instance=ExtResource("4_tree")]
position = Vector3(-38, 0, 2)
scale = Vector3(1.4, 1.4, 1.4)

[node name="Tree_North_01" parent="FoliageRoot" instance=ExtResource("4_tree")]
position = Vector3(-2, 0, 25)

[node name="Tree_North_02" parent="FoliageRoot" instance=ExtResource("4_tree")]
position = Vector3(7, 0, 28)
scale = Vector3(1.2, 1.2, 1.2)

[node name="Tree_North_03" parent="FoliageRoot" instance=ExtResource("4_tree")]
position = Vector3(15, 0, 24)
scale = Vector3(0.85, 0.85, 0.85)

[node name="Tree_South_01" parent="FoliageRoot" instance=ExtResource("4_tree")]
position = Vector3(-16, 0, -27)
scale = Vector3(1.15, 1.15, 1.15)

[node name="Tree_South_02" parent="FoliageRoot" instance=ExtResource("4_tree")]
position = Vector3(-4, 0, -30)

[node name="Tree_River_01" parent="FoliageRoot" instance=ExtResource("4_tree")]
position = Vector3(19, 0, 18)
scale = Vector3(0.9, 0.9, 0.9)

[node name="Tree_River_02" parent="FoliageRoot" instance=ExtResource("4_tree")]
position = Vector3(31, 0, 14)
scale = Vector3(1.25, 1.25, 1.25)

[node name="WorldObjects" type="Node3D" parent="."]

[node name="ResourceNodes" type="Node3D" parent="WorldObjects"]

[node name="BerryBush_01" parent="WorldObjects/ResourceNodes" instance=ExtResource("2_resource")]
position = Vector3(-6, 0, -8)
node_id = &"berry_bush_01"
safety_risk = 0.05
comfort_distance = 18.0
discovery_priority = 1.0

[node name="BerryBush_02" parent="WorldObjects/ResourceNodes" instance=ExtResource("2_resource")]
position = Vector3(-10, 0, -4)
node_id = &"berry_bush_02"
initial_amount = 8.0
safety_risk = 0.08
comfort_distance = 20.0
discovery_priority = 0.5

[node name="BerryPatch_River_01" parent="WorldObjects/ResourceNodes" instance=ExtResource("2_resource")]
position = Vector3(12, 0, 10)
node_id = &"berry_patch_river_01"
initial_amount = 6.0
yield_per_action = 1.5
safety_risk = 0.18
comfort_distance = 22.0
discovery_priority = 0.25

[node name="AnimalCamp_01" parent="WorldObjects/ResourceNodes" instance=ExtResource("2_resource")]
position = Vector3(-12, 0, 8)
node_id = &"animal_camp_01"
initial_amount = 5.0
yield_per_action = 1.0
safety_risk = 0.35
comfort_distance = 24.0
discovery_priority = -0.5

[node name="Tree_01" parent="WorldObjects/ResourceNodes" instance=ExtResource("2_resource")]
position = Vector3(6, 0, -8)
node_id = &"tree_01"
action_id = &"gather_wood"
resource_id = &"wood"
initial_amount = 15.0
yield_per_action = 3.0
safety_risk = 0.12
comfort_distance = 24.0

[node name="Tree_02" parent="WorldObjects/ResourceNodes" instance=ExtResource("2_resource")]
position = Vector3(10, 0, -4)
node_id = &"tree_02"
action_id = &"gather_wood"
resource_id = &"wood"
initial_amount = 12.0
yield_per_action = 3.0
safety_risk = 0.16
comfort_distance = 26.0

[node name="Tree_North_Outskirts_01" parent="WorldObjects/ResourceNodes" instance=ExtResource("2_resource")]
position = Vector3(6, 0, 12)
node_id = &"tree_north_outskirts_01"
action_id = &"gather_wood"
resource_id = &"wood"
initial_amount = 10.0
yield_per_action = 2.0
safety_risk = 0.2
comfort_distance = 28.0
discovery_priority = 0.25

[node name="Tree_South_Edge_01" parent="WorldObjects/ResourceNodes" instance=ExtResource("2_resource")]
position = Vector3(-12, 0, -12)
node_id = &"tree_south_edge_01"
action_id = &"gather_wood"
resource_id = &"wood"
initial_amount = 9.0
yield_per_action = 2.0
safety_risk = 0.24
comfort_distance = 26.0

[node name="StorageSites" type="Node3D" parent="WorldObjects"]

[node name="VillagePantry" parent="WorldObjects/StorageSites" instance=ExtResource("14_storage")]
position = Vector3(0, 0, -8)

[node name="ActivitySites" type="Node3D" parent="WorldObjects"]

[node name="GuardPost" type="Node3D" parent="WorldObjects/ActivitySites"]
position = Vector3(0, 0, 8)
script = ExtResource("15_activity")
site_id = &"guard_post"
action_id = &"patrol"
display_name = "Guard Post"
capacity = 2

[node name="GuardTowerVisual" type="MeshInstance3D" parent="WorldObjects/ActivitySites/GuardPost"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.25, 0)
mesh = SubResource("Mesh_guard_post")

[node name="InteractionPoint" type="Marker3D" parent="WorldObjects/ActivitySites/GuardPost"]

[node name="DebugLabel" type="Label3D" parent="WorldObjects/ActivitySites/GuardPost"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.8, 0)
billboard = 1
no_depth_test = true
font_size = 18
outline_modulate = Color(0, 0, 0, 1)
outline_size = 4
text = "Guard Post"

[node name="StudyDesk" type="Node3D" parent="WorldObjects/ActivitySites"]
position = Vector3(-6, 0, 6)
script = ExtResource("15_activity")
site_id = &"study_desk"
action_id = &"study"
display_name = "Study Desk"

[node name="StudyDeskVisual" type="MeshInstance3D" parent="WorldObjects/ActivitySites/StudyDesk"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.125, 0)
mesh = SubResource("Mesh_study_desk")

[node name="InteractionPoint" type="Marker3D" parent="WorldObjects/ActivitySites/StudyDesk"]

[node name="DebugLabel" type="Label3D" parent="WorldObjects/ActivitySites/StudyDesk"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.1, 0)
billboard = 1
no_depth_test = true
font_size = 18
outline_modulate = Color(0, 0, 0, 1)
outline_size = 4
text = "Study Desk"

[node name="RestBench" type="Node3D" parent="WorldObjects/ActivitySites"]
position = Vector3(4, 0, 5)
script = ExtResource("15_activity")
site_id = &"rest_bench"
action_id = &"rest"
display_name = "Rest Bench"
capacity = 2

[node name="RestBenchVisual" type="MeshInstance3D" parent="WorldObjects/ActivitySites/RestBench"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.15, 0)
mesh = SubResource("Mesh_rest_bench")

[node name="InteractionPoint" type="Marker3D" parent="WorldObjects/ActivitySites/RestBench"]

[node name="DebugLabel" type="Label3D" parent="WorldObjects/ActivitySites/RestBench"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.1, 0)
billboard = 1
no_depth_test = true
font_size = 18
outline_modulate = Color(0, 0, 0, 1)
outline_size = 4
text = "Rest Bench"

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
rotation_degrees = Vector3(-55, -35, 0)
light_color = Color(1, 0.87, 0.72, 1)
light_energy = 1.45
shadow_enabled = true
directional_shadow_max_distance = 180.0

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_greybox")

[node name="DayNightCycle" type="Node" parent="." node_paths=PackedStringArray("directional_light", "world_environment")]
script = ExtResource("13_daynight")
directional_light = NodePath("../DirectionalLight3D")
world_environment = NodePath("../WorldEnvironment")
