masterwork-dwarf-fortress icon indicating copy to clipboard operation
masterwork-dwarf-fortress copied to clipboard

Overhaul orcish cisterns

Open pjf opened this issue 10 years ago • 5 comments

Right now they're kinda lame, you have to deconstruct the building to get the water.

Investigate if we can run a script to spawn liquids directly on the tile. These could be 1/7 for buckets/flasks, 4/7 for boulders, etc.

Liquid above 4/7 may panic the worker, and so is probably not recommended for spawning.

Check:

  • [ ] Can cisterns be created on grates? That's the ideal situation for liquids to flow downloads.

pjf avatar Dec 28 '13 00:12 pjf

Can you use the same script the warlocks use for their water/lava wells?

PaulMaynard avatar Feb 21 '14 17:02 PaulMaynard

@ppeng: Quite possibly. I haven't looked into how warlocks work at all. But if they have a solution that sucks less than what we have now, then that would be grand. :)

Do you know which script gets used? I know there's an interactive DFHack script for placing liquids, but I have no idea if that's callable in a non-interactive way from a reaction.

pjf avatar Feb 21 '14 23:02 pjf

It looks like they use this script here: eruption.lua It seem like some people are getting errors when they try to use it, though:

[DF folder]\hack\scripts/eruption.lua:69: attempt to perform arithmetic on local 'ry' (a nil value)
stack traceback:
[DF folder]\hack\scripts/eruption.lua:69: in function 'eruption'
[DF folder]\hack\scripts/eruption.lua:125: in main chunk
(...tail calls...)

PaulMaynard avatar Feb 22 '14 19:02 PaulMaynard

Here's a reaction using it:

    [REACTION:WARLOCK_MAGMA_S]
    [NAME:Cast Lesser Summoning of Magma]
    [BUILDING:MAGMA_WELL:CUSTOM_A]
[PRODUCT:0:1:BOULDER:NONE:INORGANIC:ERUPTION_MAGMA_S]
...
[INORGANIC:ERUPTION_MAGMA_S]
[USE_MATERIAL_TEMPLATE:STONE_VAPOR_TEMPLATE]
    [STATE_NAME_ADJ:ALL:Magma (radius2)]
[MATERIAL_VALUE:0]
      [SYNDROME][SYN_CLASS:ERUPTION][SYN_CLASS:\AUTO_SYNDROME]
[SYN_CLASS:\COMMAND][SYN_CLASS:eruption][SYN_CLASS:magma][SYN_CLASS:\WORKER_ID][SYN_CLASS:2][SYN_CLASS:0][SYN_CLASS:7]

PaulMaynard avatar Feb 22 '14 19:02 PaulMaynard

Oh goodness, that's perfect. Yes, we can definitely use that! Thank you!

I'm currently in transit, so I won't be able to make any changes here myself, but that code looks pretty much perfect for the cistern/fountain reactions. (I'll happily accept pull requests, though!)

pjf avatar Feb 23 '14 05:02 pjf