[gd_scene load_steps=35 format=3 uid="uid://dw0lbkh31rofd"]

[ext_resource type="Script" uid="uid://bmywk4wvcp0lr" path="res://addons/sky_3d/src/Sky3D.gd" id="1_1jhfv"]
[ext_resource type="Texture2D" uid="uid://bpamrp14tk2cp" path="res://assets/textures/terrain/sand_albedo_height.png" id="1_7iny7"]
[ext_resource type="NavigationMesh" uid="uid://b6foidbd4r8qv" path="res://src/resources/level_navigation_mesh.res" id="1_juj6f"]
[ext_resource type="Script" uid="uid://dj5vsww5nehm7" path="res://src/scripts/levels/level.gd" id="1_m8n0u"]
[ext_resource type="Texture2D" uid="uid://dpq5k4rlimus8" path="res://assets/textures/terrain/sand_normal_roughness.png" id="2_cxs0p"]
[ext_resource type="PackedScene" uid="uid://b1fe4n68iivfm" path="res://assets/models/environment/rock_cliff_env_03.glb" id="2_d2tjv"]
[ext_resource type="Script" uid="uid://27fj74ofndim" path="res://addons/sky_3d/src/Skydome.gd" id="2_juj6f"]
[ext_resource type="Script" uid="uid://bm0hx4mklpml" path="res://addons/sky_3d/src/TimeOfDay.gd" id="3_0eo66"]
[ext_resource type="Texture2D" uid="uid://qnc3xba5b375" path="res://assets/textures/terrain/rock62_albedo_height.png" id="4_m8n0u"]
[ext_resource type="PackedScene" uid="uid://cc8f6ggvpabbi" path="res://assets/models/environment/wall_stone_gate_bldg_01.glb" id="5_0eo66"]
[ext_resource type="Texture2D" uid="uid://dfe7k5rhns8ce" path="res://assets/textures/terrain/rock62_normal_roughness.png" id="5_tbe37"]
[ext_resource type="PackedScene" uid="uid://blv7opxftdc6o" path="res://assets/models/environment/stone_wall_bldg_04.glb" id="6_dn2un"]
[ext_resource type="PackedScene" uid="uid://cwvrti8hmxj0k" path="res://src/scenes/characters/enemy.tscn" id="6_uvsco"]
[ext_resource type="PackedScene" uid="uid://dqkuaw84gl1t2" path="res://assets/models/environment/turret_square_bldg_02.glb" id="7_7iny7"]
[ext_resource type="PackedScene" uid="uid://dv1316xdw1rxm" path="res://assets/models/environment/house_modular_01.glb" id="8_cxs0p"]
[ext_resource type="PackedScene" uid="uid://8iicuufue8k5" path="res://src/scenes/structures/chest.tscn" id="9_856t6"]
[ext_resource type="PackedScene" uid="uid://6dmbuecqolod" path="res://src/scenes/structures/fire_pit.tscn" id="10_juj6f"]
[ext_resource type="PackedScene" uid="uid://cyhw4ocljvikh" path="res://src/scenes/ui/currency_icon.tscn" id="10_vltgv"]
[ext_resource type="PackedScene" uid="uid://yp4mabfdyo6h" path="res://src/scenes/ui/armor_icon.tscn" id="11_b2fxt"]
[ext_resource type="PackedScene" uid="uid://yyxkltwrme4l" path="res://src/scenes/ui/weapon_icon.tscn" id="12_htor1"]
[ext_resource type="PackedScene" uid="uid://jf0abtmnencg" path="res://src/scenes/environment/water.tscn" id="15_0slur"]

[sub_resource type="Gradient" id="Gradient_0eo66"]
offsets = PackedFloat32Array(0.2, 1)
colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1)

[sub_resource type="FastNoiseLite" id="FastNoiseLite_dn2un"]
noise_type = 2
frequency = 0.03
cellular_jitter = 3.0
cellular_return_type = 0
domain_warp_enabled = true
domain_warp_type = 1
domain_warp_amplitude = 50.0
domain_warp_fractal_type = 2
domain_warp_fractal_lacunarity = 1.5
domain_warp_fractal_gain = 1.0

[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_7iny7"]
seamless = true
color_ramp = SubResource("Gradient_0eo66")
noise = SubResource("FastNoiseLite_dn2un")

[sub_resource type="Terrain3DMaterial" id="Terrain3DMaterial_cxs0p"]
_shader_parameters = {
&"auto_base_texture": 1,
&"auto_height_reduction": 0.1,
&"auto_overlay_texture": 0,
&"auto_slope": 5.243,
&"bias_distance": 512.0,
&"blend_sharpness": 0.87,
&"depth_blur": 0.0,
&"enable_macro_variation": true,
&"enable_projection": true,
&"height_blending": false,
&"macro_variation1": Color(1, 1, 1, 1),
&"macro_variation2": Color(1, 1, 1, 1),
&"macro_variation_slope": 0.333,
&"mipmap_bias": 1.0,
&"noise1_angle": 0.0,
&"noise1_offset": Vector2(0.5, 0.5),
&"noise1_scale": 0.04,
&"noise2_scale": 0.076,
&"noise3_scale": 0.225,
&"noise_texture": SubResource("NoiseTexture2D_7iny7"),
&"projection_angular_division": 2.0,
&"projection_threshold": 0.8,
&"world_space_normal_blend": true
}
auto_shader = true

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0slur"]
transparency = 4
cull_mode = 2
vertex_color_use_as_albedo = true
backlight_enabled = true
backlight = Color(0.5, 0.5, 0.5, 1)
distance_fade_mode = 1
distance_fade_min_distance = 128.0
distance_fade_max_distance = 96.0

[sub_resource type="Terrain3DMeshAsset" id="Terrain3DMeshAsset_856t6"]
generated_type = 1
height_offset = 0.5
material_override = SubResource("StandardMaterial3D_0slur")
last_lod = 0
last_shadow_lod = 0
lod0_range = 128.0

[sub_resource type="Terrain3DTextureAsset" id="Terrain3DTextureAsset_0slur"]
name = "sand_albedo_height"
albedo_color = Color(0.923345, 0.815778, 0.628408, 1)
albedo_texture = ExtResource("1_7iny7")
normal_texture = ExtResource("2_cxs0p")
roughness = 0.286

[sub_resource type="Terrain3DTextureAsset" id="Terrain3DTextureAsset_nedwn"]
name = "rock62_albedo_height"
id = 1
albedo_color = Color(0.93545, 0.990754, 1, 1)
albedo_texture = ExtResource("4_m8n0u")
normal_texture = ExtResource("5_tbe37")

[sub_resource type="Terrain3DAssets" id="Terrain3DAssets_vltgv"]
mesh_list = Array[Terrain3DMeshAsset]([SubResource("Terrain3DMeshAsset_856t6")])
texture_list = Array[Terrain3DTextureAsset]([SubResource("Terrain3DTextureAsset_0slur"), SubResource("Terrain3DTextureAsset_nedwn")])

[sub_resource type="PhysicalSkyMaterial" id="PhysicalSkyMaterial_dn2un"]
energy_multiplier = 4.0
use_debanding = false

[sub_resource type="Sky" id="Sky_7iny7"]
sky_material = SubResource("PhysicalSkyMaterial_dn2un")

[sub_resource type="Environment" id="Environment_cxs0p"]
background_mode = 2
sky = SubResource("Sky_7iny7")
ambient_light_source = 3
ambient_light_color = Color(0.778033, 0.693529, 0.651185, 1)
reflected_light_source = 2
tonemap_mode = 3
tonemap_white = 6.0
ssr_enabled = true
ssao_enabled = true
ssil_enabled = true
sdfgi_enabled = true

[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_0slur"]
auto_exposure_scale = 0.2

[node name="Level" type="Node3D"]
script = ExtResource("1_m8n0u")

[node name="FirePit" parent="." instance=ExtResource("10_juj6f")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 41.2201, 94.5773, -58.0352)

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

[node name="wall_stone_gate_bldg_01" parent="Castle" instance=ExtResource("5_0eo66")]
transform = Transform3D(0.749869, 0, -0.661587, 0, 1, 0, 0.661587, 0, 0.749869, 27.1497, 94.5546, -36.3422)

[node name="stone_wall_bldg_04" parent="Castle/wall_stone_gate_bldg_01" instance=ExtResource("6_dn2un")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.26476, 0, -0.0166817)

[node name="stone_wall_bldg_05" parent="Castle/wall_stone_gate_bldg_01" instance=ExtResource("6_dn2un")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10.7805, 0.0131226, -0.040226)

[node name="stone_wall_bldg_06" parent="Castle/wall_stone_gate_bldg_01" instance=ExtResource("6_dn2un")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -11.8046, 0.0131226, -0.122562)

[node name="stone_wall_bldg_07" parent="Castle/wall_stone_gate_bldg_01" instance=ExtResource("6_dn2un")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -19.7101, 0.0131226, -0.132374)

[node name="stone_wall_bldg_08" parent="Castle/wall_stone_gate_bldg_01" instance=ExtResource("6_dn2un")]
transform = Transform3D(0.958048, 0, 0.286608, 0, 1, 0, -0.286608, 0, 0.958048, -26.8721, 0.0131226, 2.09649)

[node name="turret_square_bldg_02" parent="Castle/wall_stone_gate_bldg_01" instance=ExtResource("7_7iny7")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12.0896, -1, 0.0723419)

[node name="turret_square_bldg_03" parent="Castle/wall_stone_gate_bldg_01" instance=ExtResource("7_7iny7")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12.0602, -1, 0.465519)

[node name="house_modular_01" parent="Castle" instance=ExtResource("8_cxs0p")]
transform = Transform3D(0.93598, 0, -0.352054, 0, 1, 0, 0.352054, 0, 0.93598, 45.6923, 94.5589, -70.1131)

[node name="house_modular_02" parent="Castle" instance=ExtResource("8_cxs0p")]
transform = Transform3D(0.611071, 0, -0.791576, 0, 1, 0, 0.791576, 0, 0.611071, 55.9864, 94.5589, -60.0366)

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

[node name="Chest" parent="Interactible" instance=ExtResource("9_856t6")]
transform = Transform3D(0.478554, 0, 0.878058, 0, 1, 0, -0.878058, 0, 0.478554, 47.9001, 94.6013, -69.1724)

[node name="CurrencyIcon" parent="Interactible/Chest" instance=ExtResource("10_vltgv")]
visible = false
value = 600

[node name="ArmorIcon" parent="Interactible/Chest" instance=ExtResource("11_b2fxt")]
visible = false
power = 10
armor = 1

[node name="WeaponIcon" parent="Interactible/Chest" instance=ExtResource("12_htor1")]
visible = false
power = 12

[node name="NavigationRegion3D" type="NavigationRegion3D" parent="."]
navigation_mesh = ExtResource("1_juj6f")

[node name="Terrain3D" type="Terrain3D" parent="NavigationRegion3D"]
data_directory = "res://src/resources/terrain_data/grassy_hills"
material = SubResource("Terrain3DMaterial_cxs0p")
assets = SubResource("Terrain3DAssets_vltgv")
top_level = true
metadata/_edit_lock_ = true

[node name="Sky3D" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_cxs0p")
camera_attributes = SubResource("CameraAttributesPractical_0slur")
script = ExtResource("1_1jhfv")
current_time = 8.09
reflected_energy = 4.0
metadata/_custom_type_script = "uid://bmywk4wvcp0lr"

[node name="SunLight" type="DirectionalLight3D" parent="Sky3D"]
transform = Transform3D(0, -0.643122, 0.765763, 0.80479, 0.454526, 0.381731, -0.593559, 0.616279, 0.517579, 0.765763, 0.381731, 0.517579)
light_color = Color(0.995269, 0.887171, 0.833004, 1)
shadow_enabled = true
directional_shadow_blend_splits = true

[node name="MoonLight" type="DirectionalLight3D" parent="Sky3D"]
transform = Transform3D(0, -0.563293, -0.826257, -0.588864, -0.667808, 0.455272, -0.808232, 0.486553, -0.331703, -0.826257, 0.455272, -0.331703)
light_color = Color(0.572549, 0.776471, 0.956863, 1)
light_energy = 0.0
shadow_enabled = true

[node name="Skydome" type="Node" parent="Sky3D"]
script = ExtResource("2_juj6f")
sky_visible = true
dome_radius = 10.0
tonemap_level = 0.0
exposure = 1.3
ground_color = Color(0.3, 0.3, 0.3, 1)
sky_layers = 4
sky_render_priority = -128
horizon_level = 0.0
sun_altitude = -67.559
sun_azimuth = -124.055
sun_disk_color = Color(0.996094, 0.541334, 0.140076, 1)
sun_disk_intensity = 2.0
sun_disk_size = 0.015
sun_light_path = NodePath("../SunLight")
sun_light_color = Color(1, 1, 1, 1)
sun_horizon_light_color = Color(0.98, 0.523, 0.294, 1)
sun_light_energy = 1.0
moon_altitude = -99.7047
moon_azimuth = -301.311
moon_color = Color(1, 1, 1, 1)
moon_size = 0.07
enable_set_moon_texture = false
moon_resolution = 2
moon_light_path = NodePath("../MoonLight")
moon_light_color = Color(0.572549, 0.776471, 0.956863, 1)
moon_light_energy = 0.3
deep_space_euler = Vector3(1.29154, 3.14159, 2.37438)
background_color = Color(0.709804, 0.709804, 0.709804, 0.854902)
set_background_texture = false
stars_field_color = Color(1, 1, 1, 1)
set_stars_field_texture = false
stars_scintillation = 0.75
stars_scintillation_speed = 0.01
atm_quality = 1
atm_wavelenghts = Vector3(680, 550, 440)
atm_darkness = 0.5
atm_sun_intensity = 18.0
atm_day_tint = Color(0.807843, 0.909804, 1, 1)
atm_horizon_light_tint = Color(0.980392, 0.635294, 0.462745, 1)
atm_enable_moon_scatter_mode = false
atm_night_tint = Color(0.168627, 0.2, 0.25098, 1)
atm_level_params = Vector3(1, 0, 0)
atm_thickness = 0.7
atm_mie = 0.07
atm_turbidity = 0.001
atm_sun_mie_tint = Color(1, 1, 1, 1)
atm_sun_mie_intensity = 1.0
atm_sun_mie_anisotropy = 0.8
atm_moon_mie_tint = Color(0.137255, 0.184314, 0.292196, 1)
atm_moon_mie_intensity = 0.7
atm_moon_mie_anisotropy = 0.8
fog_visible = true
fog_atm_level_params_offset = Vector3(0, 0, -1)
fog_density = 0.00015
fog_rayleigh_depth = 0.116
fog_mie_depth = 0.0001
fog_falloff = 3.0
fog_start = 0.0
fog_end = 1000.0
fog_layers = 524288
fog_render_priority = 123
clouds_thickness = 1.7
clouds_coverage = 0.0
clouds_absorption = 2.0
clouds_sky_tint_fade = 0.5
clouds_intensity = 10.0
clouds_size = 2.0
clouds_uv = Vector2(0.16, 0.11)
clouds_direction = Vector2(0.25, 0.25)
clouds_speed = 0.07
set_clouds_texture = false
clouds_cumulus_visible = true
clouds_cumulus_day_color = Color(0.823529, 0.87451, 1, 1)
clouds_cumulus_horizon_light_color = Color(0.98, 0.43, 0.15, 1)
clouds_cumulus_night_color = Color(0.090196, 0.094118, 0.129412, 1)
clouds_cumulus_thickness = 0.0243
clouds_cumulus_coverage = 0.337
clouds_cumulus_absorption = 2.0
clouds_cumulus_noise_freq = 2.7
clouds_cumulus_intensity = 0.9997
clouds_cumulus_mie_intensity = 1.0
clouds_cumulus_mie_anisotropy = 0.206
clouds_cumulus_size = 0.5
clouds_cumulus_direction = Vector3(0.25, 0.1, 0.25)
clouds_cumulus_speed = 0.05
set_clouds_cumulus_texture = false
environment = SubResource("Environment_cxs0p")

[node name="TimeOfDay" type="Node" parent="Sky3D"]
script = ExtResource("3_0eo66")
update_in_game = false
update_in_editor = false
dome_path = NodePath("../Skydome")
system_sync = false
total_cycle_in_minutes = 15.0
total_hours = 8.09
day = 1
month = 1
year = 2025
celestials_calculations = 1
compute_moon_coords = true
compute_deep_space_coords = true
latitude = 16.0
longitude = 108.0
utc = 7.0

[node name="MapBoundary" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 106.891, 0)

[node name="RockWall" parent="MapBoundary" instance=ExtResource("2_d2tjv")]
transform = Transform3D(0.917886, 0, -0.396844, 0, 1, 0, 0.396844, 0, 0.917886, -13.3334, -6.69904, -57.565)

[node name="rock_cliff_env_04" parent="MapBoundary/RockWall" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.5823, 0, 0)

[node name="rock_cliff_env_05" parent="MapBoundary/RockWall" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 16.2971, 0, 0)

[node name="RockWall4" parent="MapBoundary" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.70471, -13.9648, 44.4208)

[node name="rock_cliff_env_04" parent="MapBoundary/RockWall4" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.5823, 0, 0)

[node name="rock_cliff_env_05" parent="MapBoundary/RockWall4" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 16.2971, 0, 0)

[node name="RockWall2" parent="MapBoundary" instance=ExtResource("2_d2tjv")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -77.5486, -22.4442, 55.3362)

[node name="rock_cliff_env_04" parent="MapBoundary/RockWall2" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.5823, 0, 0)

[node name="rock_cliff_env_05" parent="MapBoundary/RockWall2" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 16.2971, 0, 0)

[node name="RockWall3" parent="MapBoundary" instance=ExtResource("2_d2tjv")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 44.2159, -9.93174, 1.0728)

[node name="rock_cliff_env_04" parent="MapBoundary/RockWall3" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8124, 0, 20.4483)

[node name="rock_cliff_env_05" parent="MapBoundary/RockWall3" instance=ExtResource("2_d2tjv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 16.2971, 0, 0)

[node name="Enemies" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 95.9516, 0)

[node name="Enemy1" parent="Enemies" instance=ExtResource("6_uvsco")]
transform = Transform3D(0.748366, 0, -0.663286, 0, 1, 0, 0.663286, 0, 0.748366, 5.25312, -4.091, -7.01228)

[node name="Enemy2" parent="Enemies" instance=ExtResource("6_uvsco")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.44962, -4.45841, -7.01217)

[node name="Enemy3" parent="Enemies" instance=ExtResource("6_uvsco")]
transform = Transform3D(0.910684, 0, 0.413104, 0, 1, 0, -0.413104, 0, 0.910684, -11.1807, -4.17409, -13.9047)

[node name="Enemy4" parent="Enemies" instance=ExtResource("6_uvsco")]
transform = Transform3D(-0.503623, 0, 0.863923, 0, 1, 0, -0.863923, 0, -0.503623, -5.81376, -6.56049, 15.3224)

[node name="Enemy5" parent="Enemies" instance=ExtResource("6_uvsco")]
transform = Transform3D(-0.849359, 0, -0.527816, 0, 1, 0, 0.527816, 0, -0.849359, 9.96593, -3.73775, -9.51454)

[node name="Enemy6" parent="Enemies" instance=ExtResource("6_uvsco")]
transform = Transform3D(-0.285538, 0, -0.958367, 0, 1, 0, 0.958367, 0, -0.285538, 12.7363, -2.84364, -18.8134)

[node name="Enemy7" parent="Enemies" instance=ExtResource("6_uvsco")]
transform = Transform3D(0.135871, 0, -0.990727, 0, 1, 0, 0.990727, 0, 0.135871, 21.2639, -1.94967, -23.2961)

[node name="Enemy8" parent="Enemies" instance=ExtResource("6_uvsco")]
transform = Transform3D(0.971759, 0, 0.235973, 0, 1, 0, -0.235973, 0, 0.971759, -8.27889, -2.71064, -26.4981)

[node name="Water" parent="." instance=ExtResource("15_0slur")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 87.9142, 0)
visible = false

[node name="Players" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 35.3396, 95.7805, -63.3113)

[node name="MultiplayerSpawner" type="MultiplayerSpawner" parent="."]
_spawnable_scenes = PackedStringArray("uid://nsv4lbw7j8mi")
spawn_path = NodePath("../Players")
spawn_limit = 10
