Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Removing Heavy Aquifers During World Gen, But Leaving Light Ones  (Read 2259 times)

Promethium

  • Bay Watcher
    • View Profile
Removing Heavy Aquifers During World Gen, But Leaving Light Ones
« on: February 16, 2020, 08:59:34 pm »

Is it possible to keep just Light Aquifers during world gen, but to remove heavy ones? I know it's relatively easy to do so for all aquifers, but I quite like the gameplay light ones add. Many thanks for any and all help!
Logged

friendguy13

  • Bay Watcher
    • View Profile
Re: Removing Heavy Aquifers During World Gen, But Leaving Light Ones
« Reply #1 on: February 16, 2020, 10:28:33 pm »

It is not possible to do so as both heavy and light aquifer stones/soils use the same token (i.e. [AQUIFER]).  However, fortunately most aquifers are light anyway so it shouldn't be too much of a problem.
Logged
I find it funny that until now, no one (including myself) stopped to consider the absurdity of a submarine in which the crew cabin is filled with water and the crew is drowning when everything is working properly.

Promethium

  • Bay Watcher
    • View Profile
Re: Removing Heavy Aquifers During World Gen, But Leaving Light Ones
« Reply #2 on: February 17, 2020, 12:31:10 am »

It is not possible to do so as both heavy and light aquifer stones/soils use the same token (i.e. [AQUIFER]).  However, fortunately most aquifers are light anyway so it shouldn't be too much of a problem.

Ah, that's a shame. Many thanks! On a side note, isn't there a way to manually drain an aquifer with DFhack when you embark there? Perhaps I could use this technique when embarking on heavy aquifers, if I'm not mistaken and my brain isn't just making this up.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Removing Heavy Aquifers During World Gen, But Leaving Light Ones
« Reply #3 on: February 17, 2020, 02:52:04 am »

If I wanted to avoid heavy aquifers I'd check the pre embark screen for the site before embarking and avoid the minority of the map that's heavy.
It should possible, in principle, to change aquifer tiles into non aquifer ones by disabling the "water table" flag on each tile, but I don't know of any script that does that.
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Removing Heavy Aquifers During World Gen, But Leaving Light Ones
« Reply #4 on: February 17, 2020, 06:09:40 pm »

I think it is possible with "source" http://docs.dfhack.org/en/stable/docs/_auto/base.html#source although I have not done it myself.  Might have to do it tile by tile to avoid removing magma?
Logged

fartron

  • Bay Watcher
    • View Profile
Re: Removing Heavy Aquifers During World Gen, But Leaving Light Ones
« Reply #5 on: February 19, 2020, 06:13:56 pm »

in dfhack the tiletypes tool will let you flip the aquifer tag on individual tiles or a range of tiles. i would make a copy of your save though, you can break things with it.

something like
tiletypes
p aqua 0
r 16 16
<enter>


should clear out a 16x16 square with the cursor in the upper left corner
Logged

Promethium

  • Bay Watcher
    • View Profile
Re: Removing Heavy Aquifers During World Gen, But Leaving Light Ones
« Reply #6 on: February 19, 2020, 11:31:15 pm »

Many thanks for the advice everyone!
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Removing Heavy Aquifers During World Gen, But Leaving Light Ones
« Reply #7 on: March 02, 2020, 03:23:58 am »

Based on Toady's answer in the FoTF, it ought to be reasonably easy to make a script to remove all heavy aquifers pre embark.

Edit:

Here's a script. Copy it into a new text file <df>\hack\scripts\lightaqonly.lua and call it from the DFHack console with "lightaqonly" (without the quotes).

Code: [Select]
function lightaqonly ()
  for i = 0, df.global.world.world_data.world_width - 1 do
    for k = 0, df.global.world.world_data.world_height - 1 do
      local tile = df.global.world.world_data.region_map [i]:_displace (k)
     
      if tile.drainage % 20 == 7 then
        tile.drainage = tile.drainage + 1
      end
    end
  end
end

lightaqonly ()
« Last Edit: March 02, 2020, 04:15:31 am by PatrikLundell »
Logged

janamdo

  • Bay Watcher
    • View Profile
Re: Removing Heavy Aquifers During World Gen, But Leaving Light Ones
« Reply #8 on: March 02, 2020, 01:16:36 pm »

Also dampstone prevents me from digging deeper for some last made forts
After 3 levels below i got a warning.dampstone and water is coming.
Don't know all water holding underground rock and what stategy to follow to bypass this rocks?

Perhaps that in LNP can add a new button for light aquifers?
Don't have much time for trying to dig deeper at the start of the fortress with complicated underground rock, otherwise the fortress will be run over by enemies ?   
 
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Removing Heavy Aquifers During World Gen, But Leaving Light Ones
« Reply #9 on: March 02, 2020, 04:21:49 pm »

The wiki page on aquifers contains a number of methods for dealing with aquifers, and the wiki also contains info on which kinds of rock and sol may contain aquifer (search on each of the types you encounter to check).

The LNP can not integrate this script, because the "old" method hacks the material definitions (i.e. rock and soil) to not hold any aquifers at all, while the script has to be run before embarking on an existing world.
Logged

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: Removing Heavy Aquifers During World Gen, But Leaving Light Ones
« Reply #10 on: March 02, 2020, 04:34:59 pm »

Really hope LNP doesn't add a "remove light aquifers" except on some advanced page of cheat options. There's 15 years of ingrained "whatever you do, turn off the aquifer" advice all over the net that now only applies to tiny portion of the map. Light Aquifers are a trivial, interesting obstacle. Like badgers but less dangerous, and LNP doesn't have a "remove wildlife" button on it's front page, does it?

Hope someone finds a solution which can remove heavy aquifers and keep light ones. But with the rarity of the heavy these days, I don't think they're ever going to cause a "rage destroy world, start from scratch" for blocking up the best locations any more.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Removing Heavy Aquifers During World Gen, But Leaving Light Ones
« Reply #11 on: March 02, 2020, 05:06:10 pm »

Really hope LNP doesn't add a "remove light aquifers" except on some advanced page of cheat options. There's 15 years of ingrained "whatever you do, turn off the aquifer" advice all over the net that now only applies to tiny portion of the map. Light Aquifers are a trivial, interesting obstacle. Like badgers but less dangerous, and LNP doesn't have a "remove wildlife" button on it's front page, does it?

Hope someone finds a solution which can remove heavy aquifers and keep light ones. But with the rarity of the heavy these days, I don't think they're ever going to cause a "rage destroy world, start from scratch" for blocking up the best locations any more.
Toady provided the info in the FotF, which the script above made use of. A PSV world could avoid the specific Drainage values as well.
If you somehow want it done automatically you'd have to make some auto script/plugin execution that ideally would be run only the first time a save is loaded, but I guess it could be rolled into the embark-tools plugin (in which case heavy aquifer destruction definitely shouldn't be turned on by default, as it can't be undone, although you can hack light aquifers into heavy ones it wouldn't be the same ones).
Logged