Add DeployToSteamOS and Procedural Dungeon Generation addons

This commit is contained in:
2024-08-22 16:51:05 -07:00
parent 6a6be038e8
commit 5c81398c83
108 changed files with 17406 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
[gd_scene load_steps=5 format=3 uid="uid://cq6rrn2gpph6y"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_i6opq"]
[ext_resource type="Texture2D" uid="uid://i7rtr0ewxm5j" path="res://addons/SimpleDungeons/sample_assets/blue-checkerboard-cc0.png" id="2_6nsgb"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_b5q7u"]
albedo_texture = ExtResource("2_6nsgb")
uv1_triplanar = true
[sub_resource type="GDScript" id="GDScript_3qcmr"]
script/source = "@tool
extends Node
func remove_unused_doors():
for door in $\"..\".get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()
func _on_dungeon_done_generating():
remove_unused_doors()
"
[node name="BlueRoom" type="Node3D"]
script = ExtResource("1_i6opq")
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -5.68248e-07, 0, 0)
material_override = SubResource("StandardMaterial3D_b5q7u")
use_collision = true
size = Vector3(10, 10, 10)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(9.5, 9.5, 9.5)
[node name="DOOR?_F_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, -5.25)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_R_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 5, -2.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -5, -2.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_B_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, 5)
operation = 2
size = Vector3(2, 4, 1)
[node name="RemoveUnusedDoors" type="Node" parent="."]
script = SubResource("GDScript_3qcmr")
[node name="PlayerSpawnPoint" type="Node3D" parent="." groups=["player_spawn_point"]]
[connection signal="dungeon_done_generating" from="." to="RemoveUnusedDoors" method="_on_dungeon_done_generating"]

View File

@@ -0,0 +1,59 @@
[gd_scene load_steps=5 format=3 uid="uid://b2t06bycrtldn"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_qqrlr"]
[ext_resource type="Texture2D" uid="uid://dqvyc0ok7chld" path="res://addons/SimpleDungeons/sample_assets/kenney-grey-checkerboard-cc0.png" id="2_jdiqu"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_oj2cm"]
albedo_texture = ExtResource("2_jdiqu")
uv1_triplanar = true
[sub_resource type="GDScript" id="GDScript_ldqn2"]
script/source = "@tool
extends Node
func remove_unused_doors():
for door in $\"..\".get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()
func _on_dungeon_done_generating():
remove_unused_doors()
"
[node name="Corridor" type="Node3D"]
script = ExtResource("1_qqrlr")
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -5.68248e-07, 0, 0)
material_override = SubResource("StandardMaterial3D_oj2cm")
use_collision = true
size = Vector3(10, 10, 10)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(9.5, 9.5, 9.5)
[node name="DOOR?_F_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, -5.25)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_R_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 5, -2.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -5, -2.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_B_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, 5)
operation = 2
size = Vector3(2, 4, 1)
[node name="RemoveUnusedDoors" type="Node" parent="."]
script = SubResource("GDScript_ldqn2")
[connection signal="dungeon_done_generating" from="." to="RemoveUnusedDoors" method="_on_dungeon_done_generating"]

View File

@@ -0,0 +1,39 @@
@tool
extends DungeonGenerator3D
func _ready():
self.custom_get_rooms_function = custom_get_rand_rooms
super._ready()
func _process(delta):
super._process(delta)
func custom_get_rand_rooms(room_instances : Array[DungeonRoom3D], rng_seeded : RandomNumberGenerator) -> Array[DungeonRoom3D]:
var num_blue_rooms : int = 30
var num_red_rooms : int = 30
var blue_room = room_instances.filter(func(r): return r.name == "BlueRoom")[0]
var red_room = room_instances.filter(func(r): return r.name == "RedRoom")[0]
var rooms : Array[DungeonRoom3D] = []
while num_red_rooms > 0:
var inst = red_room.create_clone_and_make_virtual_unless_visualizing()
rooms.push_back(inst)
# Set room_rotations before set_position_by_grid_pos as it is set by AABB positon. May change when rotated.
inst.room_rotations = rng_seeded.randi()
inst.set_position_by_grid_pos(
Vector3i(
(rng_seeded.randi() % dungeon_size.x) / 2,
rng_seeded.randi() % dungeon_size.y,
rng_seeded.randi() % dungeon_size.z))
num_red_rooms -= 1
while num_blue_rooms > 0:
var inst = blue_room.create_clone_and_make_virtual_unless_visualizing()
rooms.push_back(inst)
# Set room_rotations before set_position_by_grid_pos as it is set by AABB positon. May change when rotated.
inst.room_rotations = rng_seeded.randi()
inst.set_position_by_grid_pos(
Vector3i(
(rng_seeded.randi() % dungeon_size.x) / 2 + dungeon_size.x / 2,
rng_seeded.randi() % dungeon_size.y,
rng_seeded.randi() % dungeon_size.z))
num_blue_rooms -= 1
return rooms

View File

@@ -0,0 +1,12 @@
[gd_scene load_steps=6 format=3 uid="uid://d1k8jtivamexj"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/sample_dungeons/custom_random_room_function_example/dungeon_generator_3d_custom.gd" id="1_smyj4"]
[ext_resource type="PackedScene" uid="uid://cq6rrn2gpph6y" path="res://addons/SimpleDungeons/sample_dungeons/custom_random_room_function_example/blue_room.tscn" id="2_rfqbn"]
[ext_resource type="PackedScene" uid="uid://dh2i3dk3g0icv" path="res://addons/SimpleDungeons/sample_dungeons/custom_random_room_function_example/red_room.tscn" id="3_hfdry"]
[ext_resource type="PackedScene" uid="uid://br3pjd5mcjj11" path="res://addons/SimpleDungeons/sample_dungeons/custom_random_room_function_example/stairs.tscn" id="4_2jnyt"]
[ext_resource type="PackedScene" uid="uid://b2t06bycrtldn" path="res://addons/SimpleDungeons/sample_dungeons/custom_random_room_function_example/corridor.tscn" id="5_5efio"]
[node name="DungeonGenerator3dInheritedClass" type="Node3D"]
script = ExtResource("1_smyj4")
room_scenes = Array[PackedScene]([ExtResource("2_rfqbn"), ExtResource("3_hfdry"), ExtResource("4_2jnyt")])
corridor_room_scene = ExtResource("5_5efio")

View File

@@ -0,0 +1,59 @@
[gd_scene load_steps=5 format=3 uid="uid://dh2i3dk3g0icv"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_ruwq1"]
[ext_resource type="Texture2D" uid="uid://dydd6x64uxryr" path="res://addons/SimpleDungeons/sample_assets/kenney-red-checkerboard-cc0.png" id="2_270m7"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_yl5wx"]
albedo_texture = ExtResource("2_270m7")
uv1_triplanar = true
[sub_resource type="GDScript" id="GDScript_mnevw"]
script/source = "@tool
extends Node
func remove_unused_doors():
for door in $\"..\".get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()
func _on_dungeon_done_generating():
remove_unused_doors()
"
[node name="RedRoom" type="Node3D"]
script = ExtResource("1_ruwq1")
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -5.68248e-07, 0, 0)
material_override = SubResource("StandardMaterial3D_yl5wx")
use_collision = true
size = Vector3(10, 10, 10)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(9.5, 9.5, 9.5)
[node name="DOOR?_F_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, -5.25)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_R_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 5, -2.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -5, -2.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_B_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, 5)
operation = 2
size = Vector3(2, 4, 1)
[node name="RemoveUnusedDoors" type="Node" parent="."]
script = SubResource("GDScript_mnevw")
[connection signal="dungeon_done_generating" from="." to="RemoveUnusedDoors" method="_on_dungeon_done_generating"]

View File

@@ -0,0 +1,42 @@
[gd_scene load_steps=5 format=3 uid="uid://br3pjd5mcjj11"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_pixse"]
[ext_resource type="Texture2D" uid="uid://dqvyc0ok7chld" path="res://addons/SimpleDungeons/sample_assets/kenney-grey-checkerboard-cc0.png" id="2_bdw51"]
[ext_resource type="PackedScene" uid="uid://bak8ltrhbmlv5" path="res://addons/SimpleDungeons/utils/CSGStairMaker3D.tscn" id="3_dobr2"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_6cnww"]
albedo_texture = ExtResource("2_bdw51")
uv1_triplanar = true
uv1_world_triplanar = true
[node name="Stairs" type="Node3D"]
script = ExtResource("1_pixse")
size_in_voxels = Vector3i(2, 2, 1)
max_count = 20
is_stair_room = true
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
material_override = SubResource("StandardMaterial3D_6cnww")
use_collision = true
size = Vector3(20, 20, 10)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(19.5, 19.5, 9.5)
[node name="DOOR?_R_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 9.8, -7.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -9.9, 2.25, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="CSGStairMaker3D" parent="." instance=ExtResource("3_dobr2")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.75, -4.75, 0)
use_collision = true
size = Vector3(14, 10, 9.5)
num_stairs = 32

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,25 @@
@tool
extends DungeonRoom3D
# Called when the node enters the scene tree for the first time.
func _ready():
super._ready()
dungeon_done_generating.connect(remove_unused_doors_and_walls)
func remove_unused_doors_and_walls():
if RandomNumberGenerator.new().randf_range(0,10) > 2.5: $Models/F_WALL/torch_001.queue_free()
if RandomNumberGenerator.new().randf_range(0,10) > 2.5: $Models/B_WALL/torch_001.queue_free()
if RandomNumberGenerator.new().randf_range(0,10) > 2.5: $Models/R_WALL/torch_001.queue_free()
if RandomNumberGenerator.new().randf_range(0,10) > 2.5: $Models/L_WALL/torch_001.queue_free()
if get_door_by_node($"CSGBox3D/DOOR?_F_CUT").get_room_leads_to() != null: $Models/F_WALL.queue_free()
else: $Models/F_WALL.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_R_CUT").get_room_leads_to() != null: $Models/R_WALL.queue_free()
else: $Models/R_WALL.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_B_CUT").get_room_leads_to() != null: $Models/B_WALL.queue_free()
else: $Models/B_WALL.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_L_CUT").get_room_leads_to() != null: $Models/L_WALL.queue_free()
else: $Models/L_WALL.visible = true
for door in get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,23 @@
@tool
extends DungeonRoom3D
# Called when the node enters the scene tree for the first time.
func _ready():
super._ready()
dungeon_done_generating.connect(remove_unused_doors_and_walls)
func remove_unused_doors_and_walls():
if get_door_by_node($"CSGBox3D/DOOR?_B_CUT").get_room_leads_to() == null: $Models/B_DOOR.queue_free(); $Models/B_WALL.visible = true
else: $Models/B_WALL.queue_free(); $Models/B_DOOR.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_RB_CUT").get_room_leads_to() == null: $Models/RB_DOOR.queue_free(); $Models/RB_WALL.visible = true
else: $Models/RB_WALL.queue_free(); $Models/RB_DOOR.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_RF_CUT").get_room_leads_to() == null: $Models/RF_DOOR.queue_free(); $Models/RF_WALL.visible = true
else: $Models/RF_WALL.queue_free(); $Models/RF_DOOR.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_LB_CUT").get_room_leads_to() == null: $Models/LB_DOOR.queue_free(); $Models/LB_WALL.visible = true
else: $Models/LB_WALL.queue_free(); $Models/LB_DOOR.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_LF_CUT").get_room_leads_to() == null: $Models/LF_DOOR.queue_free(); $Models/LF_WALL.visible = true
else: $Models/LF_WALL.queue_free(); $Models/LF_DOOR.visible = true
for door in get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,25 @@
@tool
extends DungeonRoom3D
# Called when the node enters the scene tree for the first time.
func _ready():
super._ready()
dungeon_done_generating.connect(remove_unused_doors_and_walls)
func remove_unused_doors_and_walls():
if RandomNumberGenerator.new().randf_range(0,10) > 2.5: $Models/F_WALL/torch_001.queue_free()
if RandomNumberGenerator.new().randf_range(0,10) > 2.5: $Models/B_WALL/torch_001.queue_free()
if RandomNumberGenerator.new().randf_range(0,10) > 2.5: $Models/R_WALL/torch_001.queue_free()
if RandomNumberGenerator.new().randf_range(0,10) > 2.5: $Models/L_WALL/torch_001.queue_free()
if get_door_by_node($"CSGBox3D/DOOR?_F_CUT").get_room_leads_to() != null: $Models/F_WALL.queue_free()
else: $Models/F_WALL.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_R_CUT").get_room_leads_to() != null: $Models/R_WALL.queue_free()
else: $Models/R_WALL.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_B_CUT").get_room_leads_to() != null: $Models/B_WALL.queue_free()
else: $Models/B_WALL.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_L_CUT").get_room_leads_to() != null: $Models/L_WALL.queue_free()
else: $Models/L_WALL.visible = true
for door in get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,23 @@
@tool
extends DungeonRoom3D
# Called when the node enters the scene tree for the first time.
func _ready():
super._ready()
dungeon_done_generating.connect(remove_unused_doors_and_walls)
func remove_unused_doors_and_walls():
if get_door_by_node($"CSGBox3D/DOOR?_B_CUT").get_room_leads_to() == null: $Models/B_DOOR.queue_free(); $Models/B_WALL.visible = true
else: $Models/B_WALL.queue_free(); $Models/B_DOOR.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_RB_CUT").get_room_leads_to() == null: $Models/RB_DOOR.queue_free(); $Models/RB_WALL.visible = true
else: $Models/RB_WALL.queue_free(); $Models/RB_DOOR.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_RF_CUT").get_room_leads_to() == null: $Models/RF_DOOR.queue_free(); $Models/RF_WALL.visible = true
else: $Models/RF_WALL.queue_free(); $Models/RF_DOOR.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_LB_CUT").get_room_leads_to() == null: $Models/LB_DOOR.queue_free(); $Models/LB_WALL.visible = true
else: $Models/LB_WALL.queue_free(); $Models/LB_DOOR.visible = true
if get_door_by_node($"CSGBox3D/DOOR?_LF_CUT").get_room_leads_to() == null: $Models/LF_DOOR.queue_free(); $Models/LF_WALL.visible = true
else: $Models/LF_WALL.queue_free(); $Models/LF_DOOR.visible = true
for door in get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,35 @@
@tool
extends Node3D
@export var dungeon_generator : DungeonGenerator3D
@export var show_delay_ms := 1000
var done_time
var done = false
func _update_to_dungeon():
if not dungeon_generator:
return
var realsize = Vector3(dungeon_generator.dungeon_size) * dungeon_generator.voxel_scale
$HouseWalls/InsideCut.size = realsize
$HouseWalls.size = realsize + Vector3(5,5,5)
$Roof.mesh.size = realsize + Vector3(10,10,10)
$Roof.mesh.size.y = 20
$Roof.position.y = realsize.y / 2 + 10 + 2.5
if not done_time and dungeon_generator.stage == DungeonGenerator3D.BuildStage.DONE:
done_time = Time.get_ticks_msec()
if not done and done_time and Time.get_ticks_msec() - done_time > show_delay_ms:
done = true
var entrance = dungeon_generator.get_node("MansionEntranceRoom")
var xform_to_global = dungeon_generator.global_transform * entrance.get_xform_to(DungeonRoom3D.SPACE.LOCAL_GRID, DungeonRoom3D.SPACE.DUNGEON_SPACE)
var corner_of_room = xform_to_global * Vector3(0,0,3)
$Entrance.position = corner_of_room
$Entrance/FrontDoorCut.reparent($HouseWalls)
self.visible = done
func _ready():
_update_to_dungeon()
func _process(delta):
_update_to_dungeon()

View File

@@ -0,0 +1,86 @@
[gd_scene load_steps=13 format=3 uid="uid://bv23twweurssv"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/sample_dungeons/mansion/house_exterior.gd" id="1_d4jd8"]
[ext_resource type="PackedScene" uid="uid://bak8ltrhbmlv5" path="res://addons/SimpleDungeons/utils/CSGStairMaker3D.tscn" id="1_wv7fx"]
[ext_resource type="Texture2D" uid="uid://bwe02yta75ooa" path="res://addons/SimpleDungeons/sample_assets/kenney-green-checkerboar-cc0.png" id="2_dgnpe"]
[sub_resource type="Gradient" id="Gradient_0gfbx"]
colors = PackedColorArray(0.19, 0.0988, 0.0988, 1, 0.356863, 0.607843, 1, 1)
[sub_resource type="FastNoiseLite" id="FastNoiseLite_ay5m5"]
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_ikcx8"]
color_ramp = SubResource("Gradient_0gfbx")
noise = SubResource("FastNoiseLite_ay5m5")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_cjtu7"]
albedo_texture = SubResource("NoiseTexture2D_ikcx8")
[sub_resource type="Gradient" id="Gradient_ks6gq"]
colors = PackedColorArray(0.352941, 0.25098, 0, 1, 0.190162, 0.128887, 0, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_f0vc6"]
gradient = SubResource("Gradient_ks6gq")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_570wq"]
albedo_texture = SubResource("GradientTexture2D_f0vc6")
uv1_triplanar = true
uv1_triplanar_sharpness = 0.00158643
uv1_world_triplanar = true
[sub_resource type="PrismMesh" id="PrismMesh_urnwm"]
material = SubResource("StandardMaterial3D_570wq")
size = Vector3(110, 20, 110)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_42bcn"]
albedo_texture = ExtResource("2_dgnpe")
[node name="HouseExterior" type="Node3D"]
script = ExtResource("1_d4jd8")
[node name="HouseWalls" type="CSGBox3D" parent="."]
material_override = SubResource("StandardMaterial3D_cjtu7")
use_collision = true
size = Vector3(105, 105, 105)
[node name="InsideCut" type="CSGBox3D" parent="HouseWalls"]
operation = 2
size = Vector3(100, 100, 100)
[node name="Roof" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 63, 0)
mesh = SubResource("PrismMesh_urnwm")
[node name="Entrance" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, -30, 50)
[node name="CSGStairMaker3D" parent="Entrance" instance=ExtResource("1_wv7fx")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 10, -10, 12.5)
use_collision = true
size = Vector3(20, 20, 20)
num_stairs = 42
[node name="CSGBox3D" type="CSGBox3D" parent="Entrance"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -20.5, 25)
use_collision = true
size = Vector3(66, 1, 45)
[node name="CSGBox3D2" type="CSGBox3D" parent="Entrance"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12.5, -13.5, 9)
material_override = SubResource("StandardMaterial3D_42bcn")
use_collision = true
size = Vector3(5, 14, 5)
[node name="CSGBox3D3" type="CSGBox3D" parent="Entrance"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 32.5, -13.5, 9)
material_override = SubResource("StandardMaterial3D_42bcn")
use_collision = true
size = Vector3(5, 14, 5)
[node name="PlayerSpawnPoint" type="Node3D" parent="Entrance" groups=["player_spawn_point"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, -14, 41)
[node name="FrontDoorCut" type="CSGBox3D" parent="Entrance"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 5, 0)
operation = 2
size = Vector3(20, 10, 10)

View File

@@ -0,0 +1,86 @@
[gd_scene load_steps=9 format=3 uid="uid://b3tl36squaoel"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_1qelf"]
[ext_resource type="Texture2D" uid="uid://wvh1xmoax4ok" path="res://addons/SimpleDungeons/sample_assets/kenney-dark-grey-grid-cc0.png" id="7_x4518"]
[ext_resource type="PackedScene" uid="uid://bak8ltrhbmlv5" path="res://addons/SimpleDungeons/utils/CSGStairMaker3D.tscn" id="8_tpxey"]
[ext_resource type="Texture2D" uid="uid://dydd6x64uxryr" path="res://addons/SimpleDungeons/sample_assets/kenney-red-checkerboard-cc0.png" id="9_68bqd"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_cy7sd"]
albedo_texture = ExtResource("7_x4518")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_inmcr"]
albedo_color = Color(0.252028, 0.252028, 0.252028, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_geohb"]
albedo_color = Color(0.223103, 0.223103, 0.223103, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0fi8r"]
albedo_texture = ExtResource("9_68bqd")
[node name="MansionEntranceRoom" type="Node3D"]
script = ExtResource("1_1qelf")
size_in_voxels = Vector3i(2, 4, 3)
[node name="CSGBox3D" type="CSGBox3D" parent="."]
material_override = SubResource("StandardMaterial3D_cy7sd")
use_collision = true
size = Vector3(20, 40, 30)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(19, 39, 29)
[node name="CSGBox3D3" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.75, 13)
operation = 2
size = Vector3(19, 29.5, 7)
[node name="DOOR_R" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 9.25, -5, -9.95)
operation = 2
size = Vector3(9.2, 9.2, 2)
[node name="DOOR_L" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -9.75, -5, -9.95)
operation = 2
size = Vector3(9.2, 9.2, 2)
[node name="DOOR_R2" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 9.25, -5, 10.05)
operation = 2
size = Vector3(9.2, 9.2, 2)
[node name="DOOR_L2" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -9.75, -5, 10.05)
operation = 2
size = Vector3(9.2, 9.2, 2)
[node name="CSGStairMaker3D" parent="." instance=ExtResource("8_tpxey")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 8.74228e-08, -14.9, 0)
material_override = SubResource("StandardMaterial3D_inmcr")
use_collision = true
size = Vector3(10, 10, 10)
num_stairs = 42
[node name="CSGBox3D4" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -14.5, -9.75)
use_collision = true
size = Vector3(19.8, 10, 9.5)
material = SubResource("StandardMaterial3D_geohb")
[node name="CSGBox3D5" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.5, -9.95, 5)
use_collision = true
size = Vector3(4, 0.7, 20)
material = SubResource("StandardMaterial3D_geohb")
[node name="CSGBox3D6" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.5, -9.95, 5)
use_collision = true
size = Vector3(4, 0.7, 20)
material = SubResource("StandardMaterial3D_geohb")
[node name="CSGBox3D2" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -19.9, 10)
size = Vector3(6, 1, 9)
material = SubResource("StandardMaterial3D_0fi8r")

View File

@@ -0,0 +1,103 @@
[gd_scene load_steps=10 format=3 uid="uid://crr6031qmir35"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_1c8qy"]
[sub_resource type="Gradient" id="Gradient_omn5o"]
[sub_resource type="GradientTexture2D" id="GradientTexture2D_ls0we"]
gradient = SubResource("Gradient_omn5o")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1b4dt"]
albedo_texture = SubResource("GradientTexture2D_ls0we")
uv1_triplanar = true
uv1_world_triplanar = true
[sub_resource type="GDScript" id="GDScript_4tekc"]
script/source = "extends Node
func _ready():
$\"..\".connect(\"dungeon_done_generating\", remove_unused_doors)
func remove_unused_doors():
for door in $\"..\".get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()
"
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_sva35"]
albedo_color = Color(1, 0.44, 0.44, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8485v"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1qq54"]
albedo_color = Color(0.5, 0.243333, 0.225, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ca5kw"]
albedo_color = Color(0.5, 0.243333, 0.225, 1)
[node name="Bedroom" type="Node3D"]
script = ExtResource("1_1c8qy")
size_in_voxels = Vector3i(3, 1, 3)
min_count = 5
max_count = 10
[node name="CSGBox3D" type="CSGBox3D" parent="."]
use_collision = true
size = Vector3(30, 10, 30)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(29, 9, 29)
[node name="DOOR" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.5, 0, -14.5)
operation = 2
size = Vector3(10, 9, 2)
[node name="CSGBox3D3" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.42782, 0)
operation = 2
size = Vector3(29, 0.2, 29)
material = SubResource("StandardMaterial3D_1b4dt")
[node name="RemoveUnusedDoors" type="Node" parent="."]
script = SubResource("GDScript_4tekc")
[node name="CSGCombiner3D" type="CSGCombiner3D" parent="."]
use_collision = true
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.5, -3, 0)
size = Vector3(8, 1, 8)
material = SubResource("StandardMaterial3D_sva35")
[node name="CSGBox3D9" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9.5, -3, 0)
size = Vector3(4, 1, 8)
material = SubResource("StandardMaterial3D_8485v")
[node name="CSGBox3D4" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.91372, -3.3, 0)
size = Vector3(13.1274, 1, 8.3)
material = SubResource("StandardMaterial3D_1qq54")
[node name="CSGBox3D3" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, -2, 0)
size = Vector3(1, 3, 8)
material = SubResource("StandardMaterial3D_ca5kw")
[node name="CSGBox3D5" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, -4.3, 3.5)
material = SubResource("StandardMaterial3D_ca5kw")
[node name="CSGBox3D6" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.3, 3.5)
material = SubResource("StandardMaterial3D_ca5kw")
[node name="CSGBox3D7" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, -4.3, -3.63669)
material = SubResource("StandardMaterial3D_ca5kw")
[node name="CSGBox3D8" type="CSGBox3D" parent="CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.3, -3.63669)
material = SubResource("StandardMaterial3D_ca5kw")

View File

@@ -0,0 +1,76 @@
[gd_scene load_steps=9 format=3 uid="uid://bn6lta2vs6qh8"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_m0wvh"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8tlf5"]
albedo_color = Color(0, 0, 0, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4tt88"]
albedo_color = Color(0.176419, 0.176419, 0.176419, 1)
[sub_resource type="Gradient" id="Gradient_nd35r"]
offsets = PackedFloat32Array(0.276119, 1)
colors = PackedColorArray(0.301961, 0, 0, 1, 0.555762, 0.29171, 0.357937, 1)
[sub_resource type="FastNoiseLite" id="FastNoiseLite_4grxn"]
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_4g5kp"]
color_ramp = SubResource("Gradient_nd35r")
noise = SubResource("FastNoiseLite_4grxn")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ovx52"]
albedo_texture = SubResource("NoiseTexture2D_4g5kp")
[sub_resource type="GDScript" id="GDScript_nl3oo"]
script/source = "extends Node
func _ready():
$\"..\".connect(\"dungeon_done_generating\", remove_unused_doors)
func remove_unused_doors():
for door in $\"..\".get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()
"
[node name="Corridor" type="Node3D"]
script = ExtResource("1_m0wvh")
[node name="CSGBox3D" type="CSGBox3D" parent="."]
use_collision = true
size = Vector3(10, 10, 10)
material = SubResource("StandardMaterial3D_8tlf5")
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(9, 9, 9)
material = SubResource("StandardMaterial3D_4tt88")
[node name="CSGBox3D3" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.52714, 0)
operation = 2
size = Vector3(9, 0.096, 9)
material = SubResource("StandardMaterial3D_ovx52")
[node name="DOOR?" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -5)
operation = 2
size = Vector3(9, 9, 3)
[node name="DOOR?2" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 5)
operation = 2
size = Vector3(9, 9, 3)
[node name="DOOR?3" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 4, 0, 0)
operation = 2
size = Vector3(9, 9, 3)
[node name="DOOR?4" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -4, 0, 0)
operation = 2
size = Vector3(9, 9, 3)
[node name="RemoveUnusedDoors" type="Node" parent="."]
script = SubResource("GDScript_nl3oo")

View File

@@ -0,0 +1,158 @@
[gd_scene load_steps=9 format=3 uid="uid://bnxjj8dpefmfd"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_vbc11"]
[ext_resource type="Texture2D" uid="uid://i7rtr0ewxm5j" path="res://addons/SimpleDungeons/sample_assets/blue-checkerboard-cc0.png" id="2_1ufaf"]
[sub_resource type="Shader" id="Shader_vq8fj"]
code = "// NOTE: Shader automatically converted from Godot Engine 4.2.2.stable's StandardMaterial3D.
shader_type spatial;
render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx;
uniform vec4 albedo : source_color;
uniform sampler2D texture_albedo : source_color,filter_linear_mipmap,repeat_enable;
uniform float point_size : hint_range(0,128);
uniform float roughness : hint_range(0,1);
uniform sampler2D texture_metallic : hint_default_white,filter_linear_mipmap,repeat_enable;
uniform vec4 metallic_texture_channel;
uniform sampler2D texture_roughness : hint_roughness_r,filter_linear_mipmap,repeat_enable;
uniform float specular;
uniform float metallic;
varying vec3 uv1_triplanar_pos;
uniform float uv1_blend_sharpness;
varying vec3 uv1_power_normal;
uniform vec3 uv1_scale;
uniform vec3 uv1_offset;
uniform vec3 uv2_scale;
uniform vec3 uv2_offset;
void vertex() {
vec3 normal = MODEL_NORMAL_MATRIX * NORMAL;
TANGENT = vec3(0.0,0.0,-1.0) * abs(normal.x);
TANGENT+= vec3(1.0,0.0,0.0) * abs(normal.y);
TANGENT+= vec3(1.0,0.0,0.0) * abs(normal.z);
TANGENT = inverse(MODEL_NORMAL_MATRIX) * normalize(TANGENT);
BINORMAL = vec3(0.0,1.0,0.0) * abs(normal.x);
BINORMAL+= vec3(0.0,0.0,-1.0) * abs(normal.y);
BINORMAL+= vec3(0.0,1.0,0.0) * abs(normal.z);
BINORMAL = inverse(MODEL_NORMAL_MATRIX) * normalize(BINORMAL);
uv1_power_normal=pow(abs(normal),vec3(uv1_blend_sharpness));
uv1_triplanar_pos = (MODEL_MATRIX * vec4(VERTEX, 1.0f)).xyz * uv1_scale + uv1_offset + TIME * 0.01;
uv1_power_normal/=dot(uv1_power_normal,vec3(1.0));
uv1_triplanar_pos *= vec3(1.0,-1.0, 1.0);
}
vec4 triplanar_texture(sampler2D p_sampler,vec3 p_weights,vec3 p_triplanar_pos) {
vec4 samp=vec4(0.0);
samp+= texture(p_sampler,p_triplanar_pos.xy) * p_weights.z;
samp+= texture(p_sampler,p_triplanar_pos.xz) * p_weights.y;
samp+= texture(p_sampler,p_triplanar_pos.zy * vec2(-1.0,1.0)) * p_weights.x;
return samp;
}
void fragment() {
vec4 albedo_tex = triplanar_texture(texture_albedo,uv1_power_normal,uv1_triplanar_pos);
ALBEDO = albedo.rgb * albedo_tex.rgb;
float metallic_tex = dot(triplanar_texture(texture_metallic,uv1_power_normal,uv1_triplanar_pos),metallic_texture_channel);
METALLIC = metallic_tex * metallic;
vec4 roughness_texture_channel = vec4(1.0,0.0,0.0,0.0);
float roughness_tex = dot(triplanar_texture(texture_roughness,uv1_power_normal,uv1_triplanar_pos),roughness_texture_channel);
ROUGHNESS = roughness_tex * roughness;
SPECULAR = specular;
}
"
[sub_resource type="FastNoiseLite" id="FastNoiseLite_fe7vc"]
noise_type = 2
frequency = 0.0165
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_bispe"]
seamless = true
noise = SubResource("FastNoiseLite_fe7vc")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_g7p6c"]
render_priority = 0
shader = SubResource("Shader_vq8fj")
shader_parameter/albedo = Color(1, 1, 1, 1)
shader_parameter/point_size = 1.0
shader_parameter/roughness = 1.0
shader_parameter/metallic_texture_channel = null
shader_parameter/specular = 0.5
shader_parameter/metallic = 0.0
shader_parameter/uv1_blend_sharpness = 1.0
shader_parameter/uv1_scale = Vector3(0.08, 0.08, 0.08)
shader_parameter/uv1_offset = Vector3(0, 0, 0)
shader_parameter/uv2_scale = Vector3(1, 1, 1)
shader_parameter/uv2_offset = Vector3(0, 0, 0)
shader_parameter/texture_albedo = SubResource("NoiseTexture2D_bispe")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_07mhj"]
albedo_texture = ExtResource("2_1ufaf")
[sub_resource type="GDScript" id="GDScript_17gef"]
script/source = "extends Node
func remove_unused_doors():
for door in $\"..\".get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()
func _on_living_room_dungeon_done_generating():
remove_unused_doors()
"
[node name="LivingRoom" type="Node3D"]
script = ExtResource("1_vbc11")
size_in_voxels = Vector3i(3, 1, 2)
min_count = 5
max_count = 10
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 2.49155e-06, 0, 0)
material_override = SubResource("ShaderMaterial_g7p6c")
use_collision = true
size = Vector3(30, 10, 20)
[node name="CSGBox3D3" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(29.5, 9.5, 19.5)
[node name="DOOR?_B_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, 9.75)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_R2_CUT2" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 15, -2.75, -5)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_R1_CUT2" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 15, -2.75, 5)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L2_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -15, -2.75, -5)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L1_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -15, -2.75, 5)
operation = 2
size = Vector3(2, 4, 1)
[node name="CSGBox3D2" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 2.49155e-06, -4.825, 0)
material_override = SubResource("StandardMaterial3D_07mhj")
use_collision = true
size = Vector3(8, 0.2, 13)
[node name="RemoveUnusedDoors" type="Node" parent="."]
script = SubResource("GDScript_17gef")
[connection signal="dungeon_done_generating" from="." to="RemoveUnusedDoors" method="_on_living_room_dungeon_done_generating"]

View File

@@ -0,0 +1,90 @@
[gd_scene load_steps=12 format=3 uid="uid://najwcu57f6bc"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_ht4j3"]
[ext_resource type="PackedScene" uid="uid://bak8ltrhbmlv5" path="res://addons/SimpleDungeons/utils/CSGStairMaker3D.tscn" id="3_1hkio"]
[sub_resource type="Gradient" id="Gradient_n7jmt"]
colors = PackedColorArray(1, 1, 1, 1, 0.5832, 0.5832, 0.81, 1)
[sub_resource type="FastNoiseLite" id="FastNoiseLite_xy5n2"]
noise_type = 2
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_wo5pc"]
color_ramp = SubResource("Gradient_n7jmt")
noise = SubResource("FastNoiseLite_xy5n2")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0vchj"]
albedo_texture = SubResource("NoiseTexture2D_wo5pc")
uv1_scale = Vector3(4.165, 4.165, 4.165)
uv1_triplanar = true
uv1_world_triplanar = true
[sub_resource type="Gradient" id="Gradient_i80ea"]
offsets = PackedFloat32Array(0, 0.442623)
colors = PackedColorArray(0, 0, 0, 1, 0.52, 0.1872, 0.275947, 1)
[sub_resource type="FastNoiseLite" id="FastNoiseLite_805tn"]
noise_type = 3
seed = 16
frequency = 0.029
fractal_type = 0
fractal_octaves = 1
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_wr6uy"]
in_3d_space = true
generate_mipmaps = false
seamless = true
color_ramp = SubResource("Gradient_i80ea")
noise = SubResource("FastNoiseLite_805tn")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_hudx1"]
albedo_texture = SubResource("NoiseTexture2D_wr6uy")
uv1_scale = Vector3(0.705, 0.705, 0.705)
uv1_triplanar = true
uv1_world_triplanar = true
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_i5qk8"]
albedo_texture = SubResource("NoiseTexture2D_wr6uy")
uv1_scale = Vector3(0.705, 0.705, 0.705)
uv1_triplanar = true
uv1_world_triplanar = true
[node name="Stair" type="Node3D"]
script = ExtResource("1_ht4j3")
size_in_voxels = Vector3i(2, 2, 1)
min_count = 5
max_count = 30
is_stair_room = true
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
material_override = SubResource("StandardMaterial3D_0vchj")
use_collision = true
size = Vector3(20, 20, 10)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(19.5, 19.5, 9.5)
[node name="DOOR?_R_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 9.8, -7.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -9.9, 2.25, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="CSGStairMaker3D" parent="." instance=ExtResource("3_1hkio")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.75, -4.75, 0)
material_override = SubResource("StandardMaterial3D_hudx1")
use_collision = true
size = Vector3(14, 10, 9.5)
num_stairs = 32
[node name="CSGBox3D2" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.98486, -9.75, 0)
material_override = SubResource("StandardMaterial3D_i5qk8")
use_collision = true
size = Vector3(5.96973, 0.1, 4.2)

View File

@@ -0,0 +1,59 @@
[gd_scene load_steps=5 format=3 uid="uid://bsvhllycm8t4i"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_8cd2g"]
[ext_resource type="Texture2D" uid="uid://bwe02yta75ooa" path="res://addons/SimpleDungeons/sample_assets/kenney-green-checkerboar-cc0.png" id="2_ylbpf"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_orb45"]
albedo_texture = ExtResource("2_ylbpf")
uv1_triplanar = true
[sub_resource type="GDScript" id="GDScript_8geu6"]
script/source = "@tool
extends Node
func remove_unused_doors():
for door in $\"..\".get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()
func _on_corridor_dungeon_done_generating():
remove_unused_doors()
"
[node name="Corridor" type="Node3D"]
script = ExtResource("1_8cd2g")
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -5.68248e-07, 0, 0)
material_override = SubResource("StandardMaterial3D_orb45")
use_collision = true
size = Vector3(10, 10, 10)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(9.5, 9.5, 9.5)
[node name="DOOR?_F_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, -5.25)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_R_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 5, -2.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -5, -2.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_B_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, 5)
operation = 2
size = Vector3(2, 4, 1)
[node name="RemoveUnusedDoors" type="Node" parent="."]
script = SubResource("GDScript_8geu6")
[connection signal="dungeon_done_generating" from="." to="RemoveUnusedDoors" method="_on_corridor_dungeon_done_generating"]

View File

@@ -0,0 +1,93 @@
[gd_scene load_steps=9 format=3 uid="uid://54kdovp1yfl5"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_defih"]
[ext_resource type="Texture2D" uid="uid://bwe02yta75ooa" path="res://addons/SimpleDungeons/sample_assets/kenney-green-checkerboar-cc0.png" id="2_lnti6"]
[ext_resource type="Texture2D" uid="uid://djhy80eyqjqpv" path="res://addons/SimpleDungeons/sample_assets/kenney-dark-grey-checkboard-cc0.png" id="3_yqsq5"]
[ext_resource type="Texture2D" uid="uid://i7rtr0ewxm5j" path="res://addons/SimpleDungeons/sample_assets/blue-checkerboard-cc0.png" id="4_h1rri"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_76ghj"]
albedo_texture = ExtResource("2_lnti6")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_x7cu1"]
albedo_texture = ExtResource("3_yqsq5")
[sub_resource type="GDScript" id="GDScript_17gef"]
script/source = "extends Node
func remove_unused_doors():
for door in $\"..\".get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()
func _on_living_room_dungeon_done_generating():
remove_unused_doors()
"
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ao0hg"]
transparency = 1
depth_draw_mode = 1
albedo_color = Color(1, 1, 1, 0.454902)
albedo_texture = ExtResource("4_h1rri")
clearcoat_roughness = 1.0
uv1_triplanar = true
uv1_world_triplanar = true
[node name="GreenRoom" type="Node3D"]
script = ExtResource("1_defih")
size_in_voxels = Vector3i(3, 1, 2)
min_count = 5
max_count = 15
[node name="CSGBox3D2" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 2.49155e-06, -4.74656, 0)
material_override = SubResource("StandardMaterial3D_76ghj")
use_collision = true
size = Vector3(30, 0.496826, 20)
[node name="CSGBox3D3" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 2.49155e-06, 4.75344, 0)
material_override = SubResource("StandardMaterial3D_x7cu1")
use_collision = true
size = Vector3(30, 0.496826, 20)
[node name="RemoveUnusedDoors" type="Node" parent="."]
script = SubResource("GDScript_17gef")
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 2.49155e-06, 0, 0)
material_override = SubResource("StandardMaterial3D_ao0hg")
use_collision = true
size = Vector3(30, 10, 20)
[node name="CSGBox3D3" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(29.5, 9.5, 19.5)
[node name="DOOR?_R2_CUT2" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 15, -2.75, -5)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_R1_CUT2" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 15, -2.75, 5)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L2_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -15, -2.75, -5)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L1_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -15, -2.75, 5)
operation = 2
size = Vector3(2, 4, 1)
[node name="CSGBox3D4" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 0, 4.65546e-15)
operation = 1
size = Vector3(32, 9, 21)
[node name="PlayerSpawnPoint" type="Node3D" parent="." groups=["player_spawn_point"]]
[connection signal="dungeon_done_generating" from="." to="RemoveUnusedDoors" method="_on_living_room_dungeon_done_generating"]

View File

@@ -0,0 +1,40 @@
[gd_scene load_steps=5 format=3 uid="uid://cdffbslc7qhgi"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_13awt"]
[ext_resource type="Texture2D" uid="uid://i7rtr0ewxm5j" path="res://addons/SimpleDungeons/sample_assets/blue-checkerboard-cc0.png" id="2_tjfvs"]
[ext_resource type="PackedScene" uid="uid://bak8ltrhbmlv5" path="res://addons/SimpleDungeons/utils/CSGStairMaker3D.tscn" id="3_ldwg4"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_wrp25"]
albedo_texture = ExtResource("2_tjfvs")
[node name="Stair" type="Node3D"]
script = ExtResource("1_13awt")
size_in_voxels = Vector3i(2, 2, 1)
max_count = 50
is_stair_room = true
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
material_override = SubResource("StandardMaterial3D_wrp25")
use_collision = true
size = Vector3(20, 20, 10)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(19.5, 19.5, 9.5)
[node name="DOOR?_R_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 9.8, -7.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -9.9, 2.25, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="CSGStairMaker3D" parent="." instance=ExtResource("3_ldwg4")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.75, -4.75, 0)
use_collision = true
size = Vector3(14, 10, 9.5)
num_stairs = 32

View File

@@ -0,0 +1,45 @@
[gd_scene load_steps=6 format=3 uid="uid://c74pq22tm4lts"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_xaivw"]
[ext_resource type="Texture2D" uid="uid://djhy80eyqjqpv" path="res://addons/SimpleDungeons/sample_assets/kenney-dark-grey-checkboard-cc0.png" id="2_n22k3"]
[ext_resource type="Texture2D" uid="uid://dqvyc0ok7chld" path="res://addons/SimpleDungeons/sample_assets/kenney-grey-checkerboard-cc0.png" id="3_x6cl1"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jbl8u"]
albedo_texture = ExtResource("2_n22k3")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_p3xxc"]
albedo_texture = ExtResource("3_x6cl1")
uv1_triplanar = true
uv1_world_triplanar = true
[node name="BridgeRoom" type="Node3D"]
script = ExtResource("1_xaivw")
size_in_voxels = Vector3i(1, 1, 2)
[node name="bridge" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, -4.775, 0)
material_override = SubResource("StandardMaterial3D_jbl8u")
operation = 2
use_collision = true
size = Vector3(2, 0.1, 19.5)
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
material_override = SubResource("StandardMaterial3D_p3xxc")
use_collision = true
size = Vector3(10, 10, 20)
[node name="CSGBox3D3" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.25, 0)
operation = 2
size = Vector3(9.5, 9, 19.5)
[node name="DOOR_B_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.27374e-13, -2.75, 9.75)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR_F_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, -10.25)
operation = 2
size = Vector3(2, 4, 1)

View File

@@ -0,0 +1,59 @@
[gd_scene load_steps=5 format=3 uid="uid://c30fpfkorbyl6"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_6msra"]
[ext_resource type="Texture2D" uid="uid://bxbtgil61x5sx" path="res://addons/SimpleDungeons/sample_assets/kenney-orange-checkerboard-cc0.png" id="2_6nmer"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_orb45"]
albedo_texture = ExtResource("2_6nmer")
uv1_triplanar = true
[sub_resource type="GDScript" id="GDScript_8geu6"]
script/source = "@tool
extends Node
func remove_unused_doors():
for door in $\"..\".get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()
func _on_corridor_dungeon_done_generating():
remove_unused_doors()
"
[node name="Corridor" type="Node3D"]
script = ExtResource("1_6msra")
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -5.68248e-07, 0, 0)
material_override = SubResource("StandardMaterial3D_orb45")
use_collision = true
size = Vector3(10, 10, 10)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(9.5, 9.5, 9.5)
[node name="DOOR?_F_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, -5.25)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_R_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 5, -2.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -5, -2.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_B_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, 5)
operation = 2
size = Vector3(2, 4, 1)
[node name="RemoveUnusedDoors" type="Node" parent="."]
script = SubResource("GDScript_8geu6")
[connection signal="dungeon_done_generating" from="." to="RemoveUnusedDoors" method="_on_corridor_dungeon_done_generating"]

View File

@@ -0,0 +1,50 @@
[gd_scene load_steps=6 format=3 uid="uid://jcrublu8sywn"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_0k746"]
[ext_resource type="Texture2D" uid="uid://wvh1xmoax4ok" path="res://addons/SimpleDungeons/sample_assets/kenney-dark-grey-grid-cc0.png" id="2_y8cer"]
[ext_resource type="Texture2D" uid="uid://bxbtgil61x5sx" path="res://addons/SimpleDungeons/sample_assets/kenney-orange-checkerboard-cc0.png" id="3_b5jl3"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_57r0k"]
albedo_texture = ExtResource("2_y8cer")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_k8fsj"]
albedo_texture = ExtResource("3_b5jl3")
uv1_triplanar = true
uv1_world_triplanar = true
[node name="EntranceRoom" type="Node3D"]
script = ExtResource("1_0k746")
min_count = 1
max_count = 1
[node name="FrontDoor" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -1.83588e-06, -2.75, -4.5)
material_override = SubResource("StandardMaterial3D_57r0k")
size = Vector3(5, 4, 0.5)
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -1.44248e-06, 0, 0)
material_override = SubResource("StandardMaterial3D_k8fsj")
use_collision = true
size = Vector3(10, 10, 10)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(9.5, 9.5, 9.5)
[node name="DOOR_F_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, -5)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR_R_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 5, -2.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR_L_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -5, -2.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="PlayerSpawnPoint" type="Node3D" parent="." groups=["player_spawn_point"]]

View File

@@ -0,0 +1,75 @@
[gd_scene load_steps=7 format=3 uid="uid://b8bnbf7bch1s0"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_y1oj8"]
[ext_resource type="Texture2D" uid="uid://dqvyc0ok7chld" path="res://addons/SimpleDungeons/sample_assets/kenney-grey-checkerboard-cc0.png" id="2_bphhi"]
[ext_resource type="Texture2D" uid="uid://djhy80eyqjqpv" path="res://addons/SimpleDungeons/sample_assets/kenney-dark-grey-checkboard-cc0.png" id="3_edxhr"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_n0t7s"]
albedo_texture = ExtResource("2_bphhi")
uv1_triplanar = true
uv1_world_triplanar = true
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_x7cu1"]
albedo_texture = ExtResource("3_edxhr")
[sub_resource type="GDScript" id="GDScript_17gef"]
script/source = "extends Node
func remove_unused_doors():
for door in $\"..\".get_doors():
if door.get_room_leads_to() == null:
door.door_node.queue_free()
func _on_living_room_dungeon_done_generating():
remove_unused_doors()
"
[node name="LivingRoom" type="Node3D"]
script = ExtResource("1_y1oj8")
size_in_voxels = Vector3i(3, 1, 2)
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 2.49155e-06, 0, 0)
material_override = SubResource("StandardMaterial3D_n0t7s")
use_collision = true
size = Vector3(30, 10, 20)
[node name="CSGBox3D3" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(29.5, 9.5, 19.5)
[node name="DOOR?_B_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.75, 9.75)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_R2_CUT2" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 15, -2.75, -5)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_R1_CUT2" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 15, -2.75, 5)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L2_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -15, -2.75, -5)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L1_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -15, -2.75, 5)
operation = 2
size = Vector3(2, 4, 1)
[node name="CSGBox3D2" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 2.49155e-06, -4.825, 0)
material_override = SubResource("StandardMaterial3D_x7cu1")
use_collision = true
size = Vector3(8, 0.2, 13)
[node name="RemoveUnusedDoors" type="Node" parent="."]
script = SubResource("GDScript_17gef")
[connection signal="dungeon_done_generating" from="." to="RemoveUnusedDoors" method="_on_living_room_dungeon_done_generating"]

View File

@@ -0,0 +1,42 @@
[gd_scene load_steps=5 format=3 uid="uid://dxmljn5pbp0b1"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_6obq4"]
[ext_resource type="Texture2D" uid="uid://dqvyc0ok7chld" path="res://addons/SimpleDungeons/sample_assets/kenney-grey-checkerboard-cc0.png" id="2_s2snu"]
[ext_resource type="PackedScene" uid="uid://bak8ltrhbmlv5" path="res://addons/SimpleDungeons/utils/CSGStairMaker3D.tscn" id="3_icb60"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ddeon"]
albedo_texture = ExtResource("2_s2snu")
uv1_triplanar = true
uv1_world_triplanar = true
[node name="Stair" type="Node3D"]
script = ExtResource("1_6obq4")
size_in_voxels = Vector3i(2, 2, 1)
max_count = 15
is_stair_room = true
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
material_override = SubResource("StandardMaterial3D_ddeon")
use_collision = true
size = Vector3(20, 20, 10)
[node name="CSGBox3D2" type="CSGBox3D" parent="CSGBox3D"]
operation = 2
size = Vector3(19.5, 19.5, 9.5)
[node name="DOOR?_R_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 9.8, -7.75, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="DOOR?_L_CUT" type="CSGBox3D" parent="CSGBox3D"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -9.9, 2.25, 0)
operation = 2
size = Vector3(2, 4, 1)
[node name="CSGStairMaker3D" parent="." instance=ExtResource("3_icb60")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.75, -4.75, 0)
use_collision = true
size = Vector3(14, 10, 9.5)
num_stairs = 32