Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DFhack lua script - Reveal designated tiles to prevent warm stone cancellations  (Read 2668 times)

gameboy17

  • Escaped Lunatic
    • View Profile

Warm stone is a pain to deal with. Either you put up with having to redo your designations every few tiles, or you manually reveal all the tiles with tiletypes (which is a pain with uneven designations). There used to be a utility to patch DF to prevent it from cancelling designations in the first place, but that hasn't been up-to-date in ages.

Today I got sick of dealing with it and wrote a script to reveal all designated tiles on the current layer (or a few layers up).

Usage is fairly straightforward: Designate the area you want to dig out, run revealdesignated on the same z-level, and those tiles will be revealed. Provide a numerical argument to reveal tiles in multiple layers (e.g. revealdesignated 2 would reveal tiles in the current layer and the layer above it). If you make a mistake, run unrevealdesignated with the same arguments to reverse it.

Let me know if you find this helpful!


revealdesignated.lua
Spoiler (click to show/hide)

unrevealdesignated.lua
Spoiler (click to show/hide)
Logged

Rusty_knight

  • Bay Watcher
    • View Profile

You can probably make a script to automatically clear mining designation based on the tile's temperature.
Logged
Crazy-ass weirdo beaver is my totem animal!

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile

Nice idea. The unrevealdesignated has an use beyond just reversal, of course, with constructed walls covering up after gem clusters.

gameboy17

  • Escaped Lunatic
    • View Profile

You can probably make a script to automatically clear mining designation based on the tile's temperature.
The idea is you already know the tiles are going to be warm and want them dug out anyway. That sounds like it would accomplish the opposite of that.
Logged

Rusty_knight

  • Bay Watcher
    • View Profile

You can probably make a script to automatically clear mining designation based on the tile's temperature.
The idea is you already know the tiles are going to be warm and want them dug out anyway. That sounds like it would accomplish the opposite of that.
Oh, I see.
Logged
Crazy-ass weirdo beaver is my totem animal!

PatrikLundell

  • Bay Watcher
    • View Profile

Typical cases where you want a "I know it's warm/wet, but I want to dig anyway, dammit!" designation is when you're trying to make a workshop above the magma sea or dig below a (cavern) lake/pool/river. You know about the future warnings, and you know that they're not actually warning about danger.
Logged

Merlota

  • Bay Watcher
    • View Profile

Thanks for this, very helpful.
Logged

Penumbra

  • Escaped Lunatic
    • View Profile

Note to spelunkers using this technique -- to avoid spoilers, don't use this to reveal your adamantine ... FUN was had.
Logged

funkydwarf

  • Bay Watcher
    • View Profile

Thanks so much! I just found this right when I needed it! I was dreading building on my last layer above the magma! A breeze now!
Logged

BeorTheOld

  • Escaped Lunatic
    • View Profile

I don't have any experience with DF hack. What lines do I edit and what do i copy/paste?
Logged

lethosor

  • Bay Watcher
    • View Profile

The code in the original post should be saved in two separate files in the hack/scripts folder with the names indicated in the post - revealdesignated.lua and unrevealdesignated.lua (or pick different filenames, but you'll have to type in different commands to match). Make sure you don't include a .txt extension.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

BeorTheOld

  • Escaped Lunatic
    • View Profile

Thank you for helping me lethosor.
Logged

BloodyDaft

  • Escaped Lunatic
    • View Profile

Thanks for saving me lots of frustration!
Logged