Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: The Great Carbonite Trap  (Read 7612 times)

Doktoro Reichard

  • Bay Watcher
  • Lunatic formerly known as Escaped
    • View Profile
The Great Carbonite Trap
« on: February 04, 2014, 07:14:12 pm »

The Great Carbonite Trap

  • Background
  • Mechanics
  • Prototype traps
  • Final trap

1. Background

I was "opening" my cavern using tiletypes, transforming the rock columns into floors. Those floors eventually, as expected, collapsed onto the ground. After most of the dust had cleared, I noticed that I had injured some blobs. Checked the logs and they reported being caught in ... boiling magma. What peaked my interest was that magma and obsidian really formed on the center of an underground lake where some of the floors collapsed.

Thinking it was because of the huge amount of caved-in floors, I tested that hypothesis. It failed. Then I looked again at the lake and found that underneath it (as in, the level below) stood a magma lake, that conveniently had depth 6 in the places where the walls have been formed.

I retested, dropping a single 5 tile floor from above. There were formed 4 obsidian wall tiles (because one of the tiles wasn't on top of magma) and no magma came up to the surface. So, my current understanding of this is that a single floor tile will teleport 1/7 of magma to the top. More tiles in the same (x,y) position will bring about more magma (which explains the regular form of the first obsidian created). In short, it's like a version of the Magma Piston, only with floors and water.

I assume that this, unlike the piston, which relies on the physics of the game, is a bug of sorts. But as I'm not familiar with pistons and I uncovered this recently, I find it best to gather the community's reply.



2. Mechanics

Finally got around and understood the whole mechanism behind everything about this trap. It works as a piston, except with floors. And that has some implications.

First of, the original conditions that lead to this were the following:


Side view

 ▓▓▓▓▓▓▓ - Stone wall roof
 _______ ┐
 _______ | 4 levels
 _______ | natural stone floors
 _______ ┘
 ≈≈≈≈≈≈≈ ┐ 1 level water [7/7]
 _______ ┘ natural stone floor
 ≈≈≈≈≈≈≈
 ≈≈≈≈≈≈≈ | 4 levels
 ≈≈≈≈≈≈≈ | magma [7/7]
 ≈≈≈≈≈≈≈
 ▓▓▓▓▓▓▓ - Magma flow & SMR


What happened after the floors collapsed is that the liquids teleported upwards, replacing the place where the floors were. This is relative to the amount of floors being collapsed: if I would collapse 10 floors, the liquids would teleport the whole 10 levels.

However, the floor that separates the water from the magma is perforated, which means obsidian could form in where the magma existed. The reason that never happens in this condition is due to some quirkiness of Dwarf Physics. In order for obsidian to form, one of 3 must happen:

  • Water must pour down from at least 2 levels above (how the obsidian chambers work, and also the expected behavior).
  • Magma is poured down on top of water.
  • Water is poured down on top of magma.

The last two involve the implicit generation of Steam, that means water shouldn't exist in order to form Obsidian. However, if water is "prevented" from fully turning into steam and then disappearing, it reacts with magma, forming obsidian. This is easily demonstrated by dumping a layer of magma over a trench filled with water.

There is also another quirk at work here. Any liquid will try to fall first before spreading. As soon as an obstacle is found that prevents magma from continuing downwards (magma itself doesn't count), magma will spread horizontally.

The events that lead to the formation of obsidian on the water level and none on the magma are the following: After the collapse of the floors and the teleporting, the water that still exists on its level reacts with the magma that's falling, creating the outer walls. After the creation of those walls, magma begins to spread outwards, reacting to the water that is below it. Any teleported water that didn't turn to steam and manages to fall will also turn magma into obsidian.

This also explains why this only happens on small (between 2x2 and 3x3) size floors. Any bigger and a hole with the same shape is created as consequence of the floor perforation. That hole may not have the same dimensions as the floors that perforated it, because of water that might have spread to inside and also because of water above that may have fallen.

Also, the higher the magma column being teleported (as such, the bigger the number of floors being colapsed), the more time it will have to spread and to form more obsidian outside the hole.



3. Prototype traps

Below is the old trap I designed in the beginning. It doesn't/shouldn't work as expected, as it was my earliest understanding of how everything worked.

Spoiler: Old (Wrong) Trap (click to show/hide)

After this first trap, I spent some time trying to understand how this all worked. Unfortunately, as an Obsidian casing isn't generated immediately (as I assumed initially), this loses the element of surprise the trap behold (as now they were killed by the floors falling on top of them). The best trap I could come up with until the final one is the following:


Side view

 ▓▓▓▓▓▓▓
 ▓▓▓▓▓▓▓  obsidian wall
 ▓▓▓▓▓▓▓
 _______   floor (no specific material)
 ≈≈≈≈≈≈≈ ┐ water [7/7]
 _______ ┘ floor
 _______   empty level
 ≈≈≈≈≈≈≈ ┐ magma [1/7]
 _______ ┘ floor
 ▓▓▓▓▓▓▓ - Stone floor + wall


This works as intended: the obsidian walls teleport to where the water/empty/magma levels are. The magma is now at the "walking" level and water will fall and form a perfect obsidian casing (although they are still killed by the rock falling on top of them). The problem is that this doesn't work, at least without hacking. When I was testing this, I was using DFHack and the gui/liquids tool. I didn't place any sort of floor on top of the highest obsidian floor (which is impossible in a "pure" game).

Making this in the purest of settings fails, as magma starts to evaporate itself before falling. If falls because the floor adds another level to the teleport.



4. Final trap

The final trap happened to be quite simple, due to the physics-related difficulties associated with making a more complex trap (this isn't to say they can't be done, as I did some, it just means that adding magma to a cave-in does not make a cave-in inherently any more dwarfy).


Side view

   ▓≈≈≈≈≈≈≈≈≈▓   Magma [7/7]
   ▓├-------┤▓   Retracting magma-safe bridge

 ▓▓▓▲≈≈≈≈≈≈≈▲▓▓▓ Water [2/7]
 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓


The water should be at least 2/7 on some parts. This is a requirement to prevent evaporation. If water evaporates things could get messy !!FUN!!. You can also replace water and magma, although units will only walk through magma at [1/7].

The "encased in cooling lava" death cause is announced only when a dwarf happens to see the event. As the event is quite fast, this announcement may never appear, making all other creatures Missing, until another comes digging them.

This is relatively simple to do, requiring some pump stacks, the ability to deal with magma and the skill to construct hanging features. The purpose remains the same: those goblins will never see it coming.



All in all, hope you find it interesting.
« Last Edit: February 16, 2014, 05:03:29 pm by Doktoro Reichard »
Logged
I have to write something... well here goes:
"A dwarf isn't a dwarf unless he dies the most !!FUN!! of ways", Quote unknown, possibly Armok.

Doktoro Reichard is quite pleased with making a Great Carbonite Trap

Why shouldn't you write with a broken pencil? Because it's pointless!

GoldenShadow

  • Bay Watcher
    • View Profile
Re: The Great Carbonite Trap
« Reply #1 on: February 05, 2014, 12:25:23 am »

I don't understand why you need magma and water since cavern collapses are lethal all on their own.
Logged

Jilladilla

  • Bay Watcher
  • Most Sleep Deprived
    • View Profile
Re: The Great Carbonite Trap
« Reply #2 on: February 05, 2014, 04:12:09 am »

I don't understand why you need magma

For style?

Regardless this is an interesting trap concept.
Logged

Glory to United Forenia!

If you see a 'Nemonole' on the internet elsewhere, it's probably me

Merendel

  • Bay Watcher
    • View Profile
Re: The Great Carbonite Trap
« Reply #3 on: February 05, 2014, 12:43:54 pm »

I don't understand why you need magma
Because what dwarven project isnt made better by the liberal application of magma?  This trap has 2 things going for it.  1 it involves magma.  2 its a needlessly complex way to acomplish a rather simple task.  He gets mucho bonus dwarfieness points for that one.
Logged

Di

  • Bay Watcher
    • View Profile
Re: The Great Carbonite Trap
« Reply #4 on: February 05, 2014, 03:09:58 pm »

Boiling magma in cave-ins is known mishap. Dust is considered by the game as gaseous state of stone, which is defined in
[MATERIAL_TEMPLATE:STONE_TEMPLATE] as [STATE_NAME:GAS:boiling magma]. It doubtfully has any relation to the Fiery Blood of Armok.

If by level below you mean "water and magma being separated by thin floor which can be broken by cave-in", then there's not much surprising in obsidianization of a lake, apart from the rarity of such natural formation.
Logged
Quote from: Creamcorn
Dwarf Fortress: Where you meet the limit of your imagination, moral compass, sanity and CPU processor.
http://www.bay12forums.com/smf/index.php?topic=103080.0 Fix sober vampires!
http://www.bay12forums.com/smf/index.php?topic=91442.0 Dwarven Cognitive Science

Doktoro Reichard

  • Bay Watcher
  • Lunatic formerly known as Escaped
    • View Profile
Re: The Great Carbonite Trap
« Reply #5 on: February 05, 2014, 09:43:11 pm »

I don't understand why you need magma
Because what dwarven project isnt made better by the liberal application of magma?  This trap has 2 things going for it.  1 it involves magma.  2 its a needlessly complex way to acomplish a rather simple task.  He gets mucho bonus dwarfieness points for that one.

I'll take those good points, my good dwarf. Any dwarfy dwarf knows magma is the solution for Life, the Universe, and Everything.

Boiling magma in cave-ins is known mishap. Dust is considered by the game as gaseous state of stone, which is defined in
[MATERIAL_TEMPLATE:STONE_TEMPLATE] as [STATE_NAME:GAS:boiling magma]. It doubtfully has any relation to the Fiery Blood of Armok.

If by level below you mean "water and magma being separated by thin floor which can be broken by cave-in", then there's not much surprising in obsidianization of a lake, apart from the rarity of such natural formation.

I did know about the "boiling magma" bit, hence the ellipsis in the opening statement. What I didn't know was that floors kept falling until they hit a floor above a wall (until I read the wiki, which is a bit convoluted in that remark). I wouldn't say by the way that having a lake over the magma sea is that uncommon, having seen it twice.

Anyway, I did not make a hole between the two different bodies of fluid: obsidian appears in the water level and not in the magma one, which remained nearly unchanged.

I tried to replicate the behavior by building chambers resembling the schematic for the trap. To my surprise, the results didn't match. A 1-level drop created a lot of obsidian in the magma chamber whilst creating one or 2 blocks in the edge of the water chamber, that had a "hole" of sorts. More dropped levels seemed to create just the blocks at the edge of the water chamber. The blocks at the edge could then be explained by some sort of "splatter" effect.

I then decided to replicate fully the events that lead to this, and found that underneath the magma was magma. And under it was even more magma, until I hit Semi-molten Rock. So, in order for this already-complex piece of dwarvish engineering to take place, one would, in principle, have to channel all the way to the magma sea, possibly flood the shaft with magma, hence connecting it with the SMR.

I will test this in small scale in the following days (as it's become late for me) but I wanted to check if anyone had heard about this, which seems not.
Logged
I have to write something... well here goes:
"A dwarf isn't a dwarf unless he dies the most !!FUN!! of ways", Quote unknown, possibly Armok.

Doktoro Reichard is quite pleased with making a Great Carbonite Trap

Why shouldn't you write with a broken pencil? Because it's pointless!

Chronomancer

  • Bay Watcher
  • save.us_Y2J
    • View Profile
Re: The Great Carbonite Trap
« Reply #6 on: February 05, 2014, 10:03:59 pm »

I don't understand why you need magma and water since cavern collapses are lethal all on their own.

I don't understand why you wouldn't use magma.
Logged
I LOST THE GAME

Doktoro Reichard

  • Bay Watcher
  • Lunatic formerly known as Escaped
    • View Profile
Re: The Great Carbonite Trap
« Reply #7 on: February 08, 2014, 08:57:46 pm »

Update time!

To this moment, I have yet to reproduce, in a controlled way, the events that lead to this trap working. And I've tried hard, so the error may be completely simple or there are things about SMR that I don't understand. As pictures are worth a thousand words, here are three movies detailing what I've done:

The first one is here. This was merely a test on how the whole "record a movie through DF works" and as such has little information and quality.

As you see, there's a cavern, with a 2-level lake and the magma sea underneath it. I've previously designated all stone columns top to bottom to mining. With tiletypes and the following commands I was able to turn them into stone floors:
  • filter d 1
  • paint sh floor
  • paint h 0
  • range 100 100 10
The yellow floor is not a result of mud, rather it's because of the designated flag still being on those tiles. As soon as I unpause, the collapse happens and presto, I get obsidian walls on top and not on the magma. There was a "side-effect" that the first movie doesn't show, that is that obsidian generated on both levels of the lake. This is better shown on the second movie, seen here.

There's not much difference between the process in the two, except here I was slightly more lazy and selected a bounding cube and I removed the designation from the tiles beforehand. The selection I made unfortunately coincided with a magma flow floor, and that screwed up the process, because of the way magma and water react in there.

And then comes the verification process, that unfortunately fails. It can be seen here. As you see, the setup is the following: random material down below (which means all cavern layers have been untouched), 1 layer of SMR, 1 floor of magma flow, 5 levels of magma, natural stone floor, 2 levels of water and a smaller unconnected floor.

As soon as I unpause, the process begins. However, in all but the 2nd sample, the floors manage to breach the floor dividing the water and magma.
However, and while I was writing this, it came to me that I haven't varied the number of falling floors, which may have some difference. (I didn't consider it at first because it would made this already near-impossible and implausible and absurdly complex dwarfy project already more unbelievably hard to do !!Fun!!).
Logged
I have to write something... well here goes:
"A dwarf isn't a dwarf unless he dies the most !!FUN!! of ways", Quote unknown, possibly Armok.

Doktoro Reichard is quite pleased with making a Great Carbonite Trap

Why shouldn't you write with a broken pencil? Because it's pointless!

Larix

  • Bay Watcher
    • View Profile
Re: The Great Carbonite Trap
« Reply #8 on: February 08, 2014, 09:16:37 pm »

I've never tried mixing cave-ins with liquids, i only know they get pretty strange - look at the magma piston and the cave-in-casting of obsidian in the middle of the magma sea in the "submarine" thread.

I strongly doubt i'll ever build anything like it (cave-in traps are exactly as deadly without a drop of magma involved and are quite enough of a hassle to set up and 're-load', thanks a lot), but i wish you luck with ironing out the bugs of this hilariously overkilling and effort-wasting very dwarven contraption.
Logged

gtaguy

  • Bay Watcher
  • {Curly Brace}
    • View Profile
Re: The Great Carbonite Trap
« Reply #9 on: February 08, 2014, 09:23:30 pm »

I don't understand why you need magma.
Burn the Elf! Dump magma on the heathen!
Logged
Quote from: GoldenShadow
I don't understand why you need magma.
Quote from: Duuvian
Well done OP, you've inadvertently weaponized ghosts.

Doktoro Reichard

  • Bay Watcher
  • Lunatic formerly known as Escaped
    • View Profile
Re: The Great Carbonite Trap
« Reply #10 on: February 16, 2014, 09:46:49 am »

Updated with my latest (and final) understanding on the trap. See the first post for more info.
Logged
I have to write something... well here goes:
"A dwarf isn't a dwarf unless he dies the most !!FUN!! of ways", Quote unknown, possibly Armok.

Doktoro Reichard is quite pleased with making a Great Carbonite Trap

Why shouldn't you write with a broken pencil? Because it's pointless!

ZzarkLinux

  • Bay Watcher
  • [IS_BUN:#1]
    • View Profile
Re: The Great Carbonite Trap
« Reply #11 on: February 16, 2014, 10:26:10 am »

The final trap seems good. I am partially concerned with getting the magma over the water, but I guess if you can get magma to the surface then what's another 1-2 Z levels more, right? Also keeping the water at a good level 2-3 seems tough, but I guess you can use lots of lever controlled doors/gates to control and crush water to the right level.

The style points are definitely high !

I'm considering another design for my zombie cleansing.
Doktoro is it alright if I post it and piggyback your thread to maybe get feedback?
Logged

Doktoro Reichard

  • Bay Watcher
  • Lunatic formerly known as Escaped
    • View Profile
Re: The Great Carbonite Trap
« Reply #12 on: February 16, 2014, 04:57:22 pm »

Sure, go right ahead. The main reason why I posted this was to get the community's regard into what at first looked like a bug of sorts (and then ended being an understanding on how floor pistons work).

Like I said, this is incredibly easy to make and also to maintain. You could have a central pump that controlled the magma. I would make large sets of 3 pumps each floor and 3x5 chambers, because magma is slow. As long as you always use magma-safe materials on the bridge, the mechanisms and the pump, the only major difficulty is building the frame in a sort of hanging fashion. The trench is also reusable by channeling the resulting obsidian.

The water is also easy to control. In my experience, the simplest of pump stacks pump water at a very slow rate, hence making it controllable by either controlling the output of water (with a floodgate) or the energy input (with a gear assembly). I would probably place a fortification in front of the output, as to prevent any goblin from destroying the pump.

This being said, the level is only there to prevent goblins from detouring. I've redone some tests as I wrote this and the ideal water level is around [2/7] to [3/7], as those were the levels my dummy militia was willing to cross over (any more and they complain about unreachable locations). Magma, even at [1/7], melted the militia to a crisp (although one exsanguinated).

The "encased in cooling lava" announcement does appear in the final trap, but only if someone's watching someone else's demise. All others became missing, until dug by the last remaining dwarf. Every item was preserved (i.e. no pig tail socks burned).
Logged
I have to write something... well here goes:
"A dwarf isn't a dwarf unless he dies the most !!FUN!! of ways", Quote unknown, possibly Armok.

Doktoro Reichard is quite pleased with making a Great Carbonite Trap

Why shouldn't you write with a broken pencil? Because it's pointless!

ZzarkLinux

  • Bay Watcher
  • [IS_BUN:#1]
    • View Profile
Re: The Great Carbonite Trap
« Reply #13 on: February 16, 2014, 08:24:36 pm »

My idea is similar to yours, but instead of dropping the magma, I will pump the magma directly into the water square.

Per your ElevationView above, mine would look like:
Code: [Select]
▓▓▓▓▓▓ -- Stone roof
======  -- Retracting bridge
≈≈≈≈≈≈ -- 7/7 water sitting here
▓▓▓▓▓▓ -- Floor

The PlanView of the water level would be:
(%M% is magmapump, %W% is waterpump, • is walkway with 7/7 water)
Code: [Select]
▓▓▓▓▓▓
▓•%M%▓
▓•%M%▓
▓•%M%▓
▓•%M%▓
▓•%M%▓
▓•%M%▓
▓•%M%▓
▓•%M%▓
▓•%M%▓
▓•%M%▓
▓•%M%▓
▓%▓▓▓▓
▓W▓▓▓▓
▓%▓▓▓▓

You drop the creature onto a • square. So the idea is that you have a flooded hallway of say 10X1 squares, then pump the magma directly into the square with the water and the unlucky dude. Of course, I have a lot of "bad guys" on my surface, so instead of one long hallway then I'm going to make it a winding passage with lots of time to drop them.

You mention fortifications. I'd like to place them between the pumps and the water squares, but do fortifications hold water? Do they stop water from settling on them? I hope that they only let me pump stuff through... If the fortifications prevent this from working, then I'll just add a minecart timer to trigger pumping shortly after dropbridge.

My water source will be either the aquifer or the local river.
Logged

Doktoro Reichard

  • Bay Watcher
  • Lunatic formerly known as Escaped
    • View Profile
Re: The Great Carbonite Trap
« Reply #14 on: February 18, 2014, 06:06:11 am »

The bottom view of your trap reminds me of Ice traps. One of them can bee seen here, although there are better movies with more impressive traps.

Nonetheless it's quite interesting. The reason I thought about fortifications is that goblins usually bring along Trolls, that are level 2 building destroyers. Pumps are buildings. Fortifications however are indestructible (if carved from a wall, even if the wall is constructed) and they block movement, as long as any fluid remains below [7/7].

As for your trap, consider placing the water a level lower and pump the magma from above. If all you do is capture goblins, then you shouldn't need fortifications, as they don't destroy things (I think).

I thought about a variant of that trap. Consider the following: they drop on top of a room with any level of water. But on top of them is a bridge that fills with magma, that then drops on top of them. Admitting it not original, as it falls back on my previous idea, the advantage here is the containment.
Logged
I have to write something... well here goes:
"A dwarf isn't a dwarf unless he dies the most !!FUN!! of ways", Quote unknown, possibly Armok.

Doktoro Reichard is quite pleased with making a Great Carbonite Trap

Why shouldn't you write with a broken pencil? Because it's pointless!