You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a DFHack Lua script for **Dwarf Fortress (Steam version)** that automatically places constructed floors above any dug-out area. It uses a flood-fill algorithm to detect connected dug tiles on the selected Z-level, then creates planned floor constructions directly above them to seal the area. This helps prevent surface collapse and creature intrusion when mining under open ground.
5
+
6
+
Features
7
+
--------
8
+
9
+
- **Automatic Flood Fill Detection**: Finds all connected dug tiles from the cursor location.
10
+
- **Smart Floor Placement**: Builds floors one level above the dug region.
11
+
- **Buildingplan Integration**: When the `buildingplan` plugin is active, floors are added as planned constructions and will auto-assign materials.
12
+
- **Native DF Construction Support**: Falls back to native designations if `buildingplan` is unavailable.
13
+
- **Safety Checks**: Skips tiles that already have player-made constructions or any existing buildings.
14
+
- **Parameter Input**: Run `autoceiling t` to enable diagonal flood fill (8-way). Default is 4-way fill.
15
+
- **Performance Limit**: Caps flood-fill to a configurable number of tiles (default 4000) for safety.
16
+
17
+
Usage
18
+
-----
19
+
20
+
1. Move the **game cursor** to a dug-out tile at the level you want to seal the ceiling.
21
+
2. In the DFHack console, run:
22
+
23
+
```
24
+
autoceiling
25
+
```
26
+
or, for diagonal (8-way) flood fill:
27
+
```
28
+
autoceiling t
29
+
```
30
+
31
+
3. The script will automatically:
32
+
- Scan connected walkable tiles at the current Z-level.
33
+
- Attempt to place floor constructions one Z-level above.
34
+
- Report how many tiles were placed and skipped.
35
+
36
+
4. If the `buildingplan` plugin is active, you’ll see a message confirming planned floor placement. Otherwise, the script will use standard construction designations.
37
+
38
+
Notes
39
+
-----
40
+
41
+
- Ideal for use after large excavation projects to prevent breaches to the surface.
42
+
- Works well in conjunction with the **buildingplan** plugin for automatic material management.
0 commit comments