Bay 12 Games Forum
Dwarf Fortress => DF Modding => Topic started by: DwarfStar on April 28, 2021, 11:53:02 pm
-
I have over 30k cave spider webs in my caverns, which is so many that my stocks screen hangs for several seconds every time I scroll past the Thread category. Any advice is welcome, really...maybe I should flood the caverns with magma...? Collecting them, just to dump them in magma, would take my dwarves years.
But I was specifically hoping someone had a script for DFHack that would just delete then all. Or, if it's relatively easy and someone could point me to the general functions I'd need, I can try to create it myself. I'd also be interested in opinions about whether it's actually possible/practical to do this with a script.
-
I would advise against dumping magma over them. The fps drop from having a cavern on fire was too much, at least for my computer, and it also led to lots of pauses due to collapsing mushrooms.
You might be able to destroy the webs with DFHack's autodump (https://docs.dfhack.org/en/stable/docs/Plugins.html#autodump) script or the clean (https://docs.dfhack.org/en/stable/docs/Plugins.html#clean) script, though I'm not sure if they affect webs. Alternatively you could try having a unit (pet, military, etc) walk over them which destroyes them.
-
Here you go:
for i = #df.global.world.items.other.ANY_WEBS-1, 0, -1 do
dfhack.items.remove(df.global.world.items.other.ANY_WEBS[i])
end
Paste this into a text editor, save it as a .lua file in the hack\scripts folder, and run from the DFHack console by entering the file name as a command.
The fps drop from having a cavern on fire was too much, at least for my computer, and it also led to lots of pauses due to collapsing mushrooms.
Just in case you're unaware, entering "extinguish -all" in the DFHack console will instantly put out all fires across the map, which should resolve the fps issue and stop trees from degrading further. See the documentation here (https://docs.dfhack.org/en/stable/docs/_auto/base.html#extinguish).
-
I didn't know about the extiguish script. Thanks AC :)
-
Hooray that worked! If someone that maintains DFHack is reading this, may I suggest this script might be useful enough to include in the standard distribution.
My favorite kind of DFHacks are the ones that primarily fix bugs in the game, and it's got to be considered a bug that the stocks screen hangs for five seconds every time you scroll thru, while it counts up 30k cave spider webs.
-
If someone that maintains DFHack is reading this, may I suggest this script might be useful enough to include in the standard distribution.
Looks like I ran across this thread after a couple months. In the future, it's best to report things like this to us directly at one of these places: https://docs.dfhack.org/en/latest/docs/Support.html
Atomic Chicken implemented this here, so it'll be in the next release: https://github.com/DFHack/scripts/pull/285