[gd_scene load_steps=10 format=3 uid="uid://b0world00001"]

[ext_resource type="Script" path="res://scenes/world/world_manager.gd" id="1"]
[ext_resource type="PackedScene" uid="uid://b0player00001" path="res://scenes/entities/player/player.tscn" id="2"]
[ext_resource type="PackedScene" uid="uid://b0village001" path="res://scenes/entities/village/village.tscn" id="3"]
[ext_resource type="Script" path="res://systems/health_system.gd" id="4"]
[ext_resource type="Script" path="res://systems/shield_system.gd" id="5"]
[ext_resource type="Script" path="res://systems/respawn_system.gd" id="6"]
[ext_resource type="Script" path="res://systems/cooldown_system.gd" id="7"]
[ext_resource type="Script" path="res://systems/role_system.gd" id="8"]
[ext_resource type="Script" path="res://systems/effect_system.gd" id="9"]
[ext_resource type="Script" path="res://systems/element_system.gd" id="10"]
[ext_resource type="Script" path="res://systems/aggro_system.gd" id="11"]
[ext_resource type="Script" path="res://systems/combat/ability_system.gd" id="12"]
[ext_resource type="Script" path="res://systems/combat/auto_attack_system.gd" id="13"]
[ext_resource type="Script" path="res://systems/spawn_system.gd" id="14"]
[ext_resource type="Script" path="res://systems/wave_system.gd" id="15"]
[ext_resource type="Script" path="res://systems/invasion_system.gd" id="16"]
[ext_resource type="Script" path="res://systems/xp_system.gd" id="17"]
[ext_resource type="Script" path="res://systems/loot_system.gd" id="18"]
[ext_resource type="Script" path="res://systems/inventory_system.gd" id="19"]
[ext_resource type="Script" path="res://systems/crafting_system.gd" id="20"]
[ext_resource type="Script" path="res://systems/building_system.gd" id="21"]
[ext_resource type="Script" path="res://systems/npc_system.gd" id="22"]
[ext_resource type="Script" path="res://systems/dialog_system.gd" id="23"]
[ext_resource type="Script" path="res://systems/chat_system.gd" id="24"]
[ext_resource type="Script" path="res://systems/map_system.gd" id="25"]
[ext_resource type="PackedScene" uid="uid://b0hud00001" path="res://scenes/hud/hud.tscn" id="26"]
[ext_resource type="Script" path="res://systems/audio_system.gd" id="27"]

[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_1"]
sky_top_color = Color(0.4, 0.55, 0.8, 1)
sky_horizon_color = Color(0.7, 0.7, 0.6, 1)
ground_horizon_color = Color(0.65, 0.55, 0.4, 1)
ground_bottom_color = Color(0.2, 0.2, 0.2, 1)

[sub_resource type="Sky" id="Sky_1"]
sky_material = SubResource("ProceduralSkyMaterial_1")

[sub_resource type="Environment" id="Environment_1"]
background_mode = 2
sky = SubResource("Sky_1")
ambient_light_source = 3
ambient_light_color = Color(0.6, 0.6, 0.7, 1)
ambient_light_energy = 0.5
tonemap_mode = 2

[sub_resource type="PlaneMesh" id="PlaneMesh_1"]
size = Vector2(200, 200)
subdivide_width = 4
subdivide_depth = 4

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_Ground"]
albedo_color = Color(0.35, 0.55, 0.3, 1)

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

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

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.866, -0.354, 0.354, 0, 0.707, 0.707, -0.5, -0.612, 0.612, 0, 30, 0)
light_energy = 1.2
shadow_enabled = true

[node name="Ground" type="StaticBody3D" parent="."]
collision_layer = 1
collision_mask = 0

[node name="GroundMesh" type="MeshInstance3D" parent="Ground"]
mesh = SubResource("PlaneMesh_1")
surface_material_override/0 = SubResource("StandardMaterial3D_Ground")

[node name="GroundShape" type="CollisionShape3D" parent="Ground"]

[node name="NavigationRegion" type="NavigationRegion3D" parent="."]

[node name="Systems" type="Node" parent="."]

[node name="HealthSystem" type="Node" parent="Systems"]
script = ExtResource("4")

[node name="ShieldSystem" type="Node" parent="Systems"]
script = ExtResource("5")

[node name="RespawnSystem" type="Node" parent="Systems"]
script = ExtResource("6")

[node name="CooldownSystem" type="Node" parent="Systems"]
script = ExtResource("7")

[node name="RoleSystem" type="Node" parent="Systems"]
script = ExtResource("8")

[node name="EffectSystem" type="Node" parent="Systems"]
script = ExtResource("9")

[node name="ElementSystem" type="Node" parent="Systems"]
script = ExtResource("10")

[node name="AggroSystem" type="Node" parent="Systems"]
script = ExtResource("11")

[node name="AbilitySystem" type="Node" parent="Systems"]
script = ExtResource("12")

[node name="AutoAttackSystem" type="Node" parent="Systems"]
script = ExtResource("13")

[node name="SpawnSystem" type="Node" parent="Systems"]
script = ExtResource("14")

[node name="LootSystem" type="Node" parent="Systems"]
script = ExtResource("18")

[node name="XpSystem" type="Node" parent="Systems"]
script = ExtResource("17")

[node name="InventorySystem" type="Node" parent="Systems"]
script = ExtResource("19")

[node name="CraftingSystem" type="Node" parent="Systems"]
script = ExtResource("20")

[node name="BuildingSystem" type="Node" parent="Systems"]
script = ExtResource("21")

[node name="NpcSystem" type="Node" parent="Systems"]
script = ExtResource("22")

[node name="DialogSystem" type="Node" parent="Systems"]
script = ExtResource("23")

[node name="ChatSystem" type="Node" parent="Systems"]
script = ExtResource("24")

[node name="MapSystem" type="Node" parent="Systems"]
script = ExtResource("25")

[node name="AudioSystem" type="Node" parent="Systems"]
script = ExtResource("27")

[node name="WaveSystem" type="Node" parent="Systems"]
script = ExtResource("15")

[node name="InvasionSystem" type="Node" parent="Systems"]
script = ExtResource("16")

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

[node name="Village" parent="VillageRoot" instance=ExtResource("3")]

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

[node name="Players" type="Node3D" parent="EntityRoot"]

[node name="Enemies" type="Node3D" parent="EntityRoot"]

[node name="Bosses" type="Node3D" parent="EntityRoot"]

[node name="Gates" type="Node3D" parent="EntityRoot"]

[node name="Portals" type="Node3D" parent="EntityRoot"]

[node name="Buildings" type="Node3D" parent="EntityRoot"]

[node name="Loot" type="Node3D" parent="EntityRoot"]

[node name="Npcs" type="Node3D" parent="EntityRoot"]

[node name="PlayerSpawner" type="MultiplayerSpawner" parent="."]
_spawnable_scenes = PackedStringArray("res://scenes/entities/player/player.tscn")
spawn_path = NodePath("../EntityRoot/Players")

[node name="EnemySpawner" type="MultiplayerSpawner" parent="."]
_spawnable_scenes = PackedStringArray("res://scenes/entities/enemy/enemy.tscn")
spawn_path = NodePath("../EntityRoot/Enemies")

[node name="GateSpawner" type="MultiplayerSpawner" parent="."]
_spawnable_scenes = PackedStringArray("res://scenes/entities/gate/gate.tscn")
spawn_path = NodePath("../EntityRoot/Gates")

[node name="PortalSpawner" type="MultiplayerSpawner" parent="."]
_spawnable_scenes = PackedStringArray("res://scenes/entities/portal/portal.tscn")
spawn_path = NodePath("../EntityRoot/Portals")

[node name="BuildingSpawner" type="MultiplayerSpawner" parent="."]
_spawnable_scenes = PackedStringArray("res://scenes/entities/building/building.tscn")
spawn_path = NodePath("../EntityRoot/Buildings")

[node name="LootSpawner" type="MultiplayerSpawner" parent="."]
_spawnable_scenes = PackedStringArray("res://scenes/entities/loot/loot_drop.tscn")
spawn_path = NodePath("../EntityRoot/Loot")

[node name="NpcSpawner" type="MultiplayerSpawner" parent="."]
_spawnable_scenes = PackedStringArray("res://scenes/entities/npc/npc.tscn")
spawn_path = NodePath("../EntityRoot/Npcs")

[node name="HUD" parent="." instance=ExtResource("26")]
