Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Automated Cave In Defense - A new defense system  (Read 2696 times)

ulspa

  • Escaped Lunatic
    • View Profile
Automated Cave In Defense - A new defense system
« on: February 18, 2014, 09:26:03 am »

Urist McPickswinger (and many Overseer) knows that the danger of cave in is not based on crushing of an opponent under the ceiling  only, but also in the dust is capable to knock out dwarf and to push him around in an arbitrary direction.  The new trap design utilises the dust to push an opponent into a pit.

The reminding of the post is structured as followed.  First I will discuss the condition for a cave in to occur. Afterwards I introduce the heart of my defence - a  Cave in Facilty (CF) that does not rely on support, but casts an obsidian wall over open space.  The next section discusses an Automated CF (ACF) and at the end a conclusion and outlook is given.



The Cave-In

As everyone knows, a cave-in occurs if a single tile has no support. In the following figure a single tile produces a cave-in.

Code: [Select]
$$$        $$$        $$$           '$' wall
$$ $$      $$ $$      $$^$$          ' ' open space/ downward ramp
$   $      $ 1 $      $^ ^$          '1' wall that caves in
$$ $$      $$ $$      $$^$$          '^' floor or upward ramp
 $$$        $$$        $$$
 z=1        z=0        z=-1 

Cave-in Facility (CF)

To cast the wall that caves in, I use two pumps to pump exactly 7 units of water/magma from an 1x1 large fluid reservoir to the same tile.

I guess I don't have to mention that this design is susceptible to the build ordering in time of the buildings.  Both pumps have to be activated at the same tick.  Initial failures tests indicates that the magma pump has to be build before the water pump. Building the water pump first, may result in an atomsmasher for magma, but the water accumulates at bottom of the structure.  Usually I build both pumps at the end, after the power supply and the mechanics finished to perform all relevant linking tasks .

Code: [Select]
side view
   #####                 '#' wall
 ###   ###      z=1      ' ' open space
   %% %%        z=0      '~' a stack of 7 magma/water
 #~#   #~#      z=-1     
 #### ####               '%' hanging pump

Automated Cave-in Facility (ACF)

To build an automatised version of the CF a complete cycle has to be made: activate pumps - deactivate pumps - fill reservoir open floodgate - close floodgate - reset the trigger that activated the pumps.  In contrast to the figure above, I use floodgates to separate between the 1x1 fluid reservoirs and the fluid baths. Here I use the term fluid bath as an infinite large area filled with magma or water i.e. taking 14 unit [7 for the reservoir and 7 gets atomsmashed by the floodgate] of the fluid does not alter the state of the bath.

The cycle of the ACF requires that the power transmission to the pumps switch off before the floodgates open and it is offline until the floodgates close. In principle the first one, to turn off the pumps  might be possible by linking a pressure plate that measures the content of the reservoir, to a gear assembly directly which transmit power to the pumps.  But latter, the repowering of the pumps requires a timer. Here I show simple minecart in the loop with impulse ramps as timer.


To start the discussion of a cycle, imagine a volunteer goblin triggers a pressure plate (not shown) that activates the gear assembly a in the ACF.  The pressure plate [pP] [0-6 fluid triggers] measures the fluid amount. Once the pump empties the reservoir the plate [pP] opens hatch cover [cC] in the Timer and opens the adjoining floodgate X. Because the floodgate opens 60 ticks after it receive the signal, the minecart in the timer, located on C, has enough time to fall down and start its loop. It will roll over the (impulse) ramps (0-3-4-0), over the pressure plate q and thereby toggles the gear assembly b in the ACF. This will disconnect the pumps from the energy source. As long as at least one reservoir does not contain 7 units of fluid either the hatch cover C or c is open and the minecart continues its loop over the impulse ramps and the pressure plate. As soon both hatch cover close the minecart stays on the z=z_0 level till it reaches the closed hatch cover C where it stops. Depending on the state of gear a another cave in occur or the trap waits for the next volunteer. 


Code: [Select]

The ACF
---------------------------------------------
Side view
   #####                 '#' wall
 ###   ###               ' ' open space
   %% %%                 'p/P' pressure plate with 0-6 fluid triggers
 Xp#   #PX->to bath      'X' Floodgates to separate the 1x1 reservoir from the bath
 #### ####               '%' hanging pump
----------------------------------------


Top view
   #####a#       'a' gear assembly (default: off)
  ##*═══b##           'b' gear assembly (default: on)
  #~%% %%~#           '*' gear assembly (always on)
  #### ####
     ###   
------------------------------------------


===========================================

The Timer      (impulse ramps do not have a matching downward slope)
-----------------------------------
z=z_0

 ######  'C' hatch cover (over 0)
##╔═c╗#  'c' hatch cover (over 4)
#╔C#╔╝#  'q' plate, minecart triggers
#╚q═╝▼#  5=NW impulse ramp
##5═6╝#  6=SW impulse ramp
 ######
-----------------------------------
z=z_0-1 
######   0=NS
#╔══╗#   1=NE (impulse ramp)     
#1#4╗#   2=SE (impulse ramp)
#0##2#
####0#   4=WE
   ###   

-------------------------------



Automated Cave In Defense (ACID)

To turn the whole toy into a weapon, I force the invaders to stay next to the shaft, where the cave in occurs, as long as possible by using  6 z-levels. Goblins have to move 6 z-levels down get to the next section, then they have to move 6 z-levels upward and so on.  Here you see a defense system with 2 ACF.  The 2 open  space in the middle is the shaft where the obsidian wall falls down. The dust reaches the stairway through fortifications.

Code: [Select]
  OUTSIDE
FORT
  ╔╝++╠╗+++╚═╗
  ║>>╬╩═╬>>║
  ║O═╣X+╠═O║
  ║>>╬+╬>>║
  ║++║++║^+║
  ║>>╬++╬>>║
  ║╔╦╬╦╦╬╦╗║
  ║╚╩╬╩╩╬╩╝║
  ║>>╬++╬>>║
  ║++║>+║^+║
  ║>>╬+╬>>║
  ║O═╣<+╠═O║
  ║>>╬══╬>>║
  ╚╗++++++++╔╝
   ╚════════╝



Discussion

The ACF

To deactivate the ACF, I use 2 hatch cover to prevent pumping of fluid. No malfunction should be expected when the hatch covers open while the pumps are supplied with power.

Supporting the pump that is connected to gear b is highly recommended, otherwise it may fall apart while gear b is disengaged. A vertical axle on the z=-1 level below the pump does this job.

Cave-ins may have a very brought spectrum of application. The defence system is just one application. I utilised the ACF for an dwarven gym to train their stats (strength, toughness, endurance, intuition,  focus, spatial/kinesthetic sense) by placing them next to a weapon trap (bloodthrone training axes are lethal to non armored dorfs, further testing with other material is needed).  Compared with normal work (training a dorf to an adequate swimmer increased his agility by 2),  the gym is very effective. In average it increases his strength by 10 per cave in. One note on gyms, they have to be at least 1x2 large, otherwise the gym user won't get unconciseness.  ACF has been utilised as an support replacement to produce another, larger cave in to bury FBs

ACF can be used for obsidian farming even with [TEMPERATURE:NO]

I'm sure you have much more creativity and know more Fun(ny) application.



The Automation

For complete automation you have to dig down till you reach the SMR otherwise you can must harvest obsidian.

Using this approach and pressure to refill the reservoirs I manage to produce a cave-in every 180 ticks (estimation). Because the floodgates require about 160 ticks to open and close, the optimisation of the timer my not very beneficial. Replacing the floodgates with doors does not work because the timer would be too slow to toggle gear assembly b.  As I wrote this text, I thought of an minecart powered refilling system. In principle the ACF should also work with 2 units of each fluid. I'm thinking of minecarts rolling behind the pumps, when a reservoir is empty, a track stop pops up and the minecart dumps the fluid into the reservoir.  But the minecart powered loading station would require a hermetically sealed ACF, otherwise the minecarts get pushed of the track. Are there some volunteer engineers to implement this method?  Another interesting method is to overload the energy system. I'm not sure, but I think I once drained more power than my waterwheels were able to produce, but I still saw the pumps pumping water (for 1 tick).  If someone knows how to reproduce this feature, no timer would be necessary. Otherwise this is subject to Science. 


The ACID

The chance to penetrate the defense system is depends on the path wide next to the cave in shaft. In my last fort, I had a 1 tile wide path. Nobody ever managed to penetrate the system (except of kobolds). On the drawback I had a traffic jam at the entrance to the defense system. This may reduce the change to kill all enemies.  At my current fort, I use a 2 tile wide path and about 1 attacker per siege manage to penetrate the system.  This part of the system is still subject for optimisation.

Another advantage is that you can completely shut off the ACID and wait for the goblin, to enter deeper into your fort. When cowards decide to flee, the ACID is online and will take out the remaining invaders.

The design of the defense does not require a building on the path to the fort. In principle it can be made waggon passable, though a 3 tile wide path may render inappropriate to push enemies into a pit.

Cave ins causes the game to pause. The ambushers will "announce"  themselves by causing a cave in and allowing to set the alert sate accordingly and help to avoid messages like "An Ambush! Curse them" followed by "Urist McTrapcleaner cancel cleaning trap. Interrupted by Goblin"

On the drawback it requires a lot of mandwarfpower, especially the need of water and magma makes it impossible very hard to set up the system against early attackers. In my current fort (with aquifer), next to build the trap, I didn't do a lot (almost no metal industry, rudimentary food and booze industry and 30 z magma elevator).  Nevertheless I still needed about 4 years till my main defence system was ready. Next to the fact that I  always was short on wood, I'm sure I could be faster if I didn't want smooth all walls.

My current project is an anti clown trap. Something like
Code: [Select]
  #####
  # X #
  #####
A furniture bites the clown. A cave in pushes them to the right and another will crush them under a collapsing ceiling. But do not
expect any results in near future.


  I'm sure that everyone is keen on reading this text. Therefore the most important facts.
  The machine I published here is capable to do
  - cave in each 180 ticks
  - completely automated
  - magma pump have to be build before water pump
  - pumps do not have to face each other, a perpendicular geometry works also



edit: added missing /font
edit: s/font(\=mono)=/code
« Last Edit: February 20, 2014, 10:26:16 am by ulspa »
Logged

gchristopher

  • Bay Watcher
    • View Profile
Re: Automated Cave In Defense - A new defense system
« Reply #1 on: February 18, 2014, 02:07:33 pm »

That's great!

I don't recall succeeding in getting an automated roll-through track stop working where the cart dumps its contents and keeps moving. Ballistic liquid delivery would probably work.

Minecart systems are sensitive to jams, and a typical problem is keeping the whole system running at a low enough minecart-per-tick rate to not jam at some point. The rate-limiting factor for continuous minecart liquid supply is the number of ticks it takes a minecart to fall after coming to a halt and ejecting its contents. It was 8-11 ticks, can't remember the exact number.

Filling is instantaneous for a minecart in 7/7 liquid. Everything else: falling onto ramp or rollers, rolling up out of the liquid pool, stopping and accelerating off a single impulse ramp, going up a cart spiral, can be made faster than the pause when the minecart fires. Using rollers to pull the cart out of the liquid bath is an effective way to keep the throughput low enough to avoid jams.

I wonder if you can leave the pumps running continuously and synchronize delivery of the 2/2 liquids to the each pump?
« Last Edit: February 18, 2014, 02:09:56 pm by gchristopher »
Logged

ulspa

  • Escaped Lunatic
    • View Profile
Re: Automated Cave In Defense - A new defense system
« Reply #2 on: February 19, 2014, 12:49:33 pm »

A cave in every 11 tick is to fast. When a pressure plate toggles the gear you will encounter 9 cave in. Therefore a continuous pumping might be possible but not desired. Or one have to artificially delay the minecarts.


Minecart systems are sensitive to jams, and a typical problem is keeping the whole system running at a low enough minecart-per-tick rate to not jam at some point. The rate-limiting factor for continuous minecart liquid supply is the number of ticks it takes a minecart to fall after coming to a halt and ejecting its contents. It was 8-11 ticks, can't remember the exact number.

I use minecarts to fill the magma bath and I never encountered a jam jet.
My roller powered loading system looks like.

Code: [Select]
side view

    R       highest speed
rrrR        lowest speed
====================
top view

z=0
   ####
   #*R#
   #▼r#
   ####
========

z=-1
######
####*#                      '*' gear
#rrrR#                     'r' roller/ 'R' roller on ramp
######


the minecart continue their way upstair on a 3x3 rectangle. The edges contains perpendicular track, the mid tiles are upward ramps. It is not very detailed but I hope sufficient to understand the basic design.


« Last Edit: February 20, 2014, 10:27:13 am by ulspa »
Logged

Larix

  • Bay Watcher
    • View Profile
Re: Automated Cave In Defense - A new defense system
« Reply #3 on: February 19, 2014, 01:03:18 pm »

Erm, what do you do with the caved-in obsidian? Unless you hacked it to be insubstantial, each cave-in is caused by the formation of one 1x1x1 obsidian block, and they stack. Two cave-ins - a two-high 1x1 pillar, five cave-ins - a five-high pillar.

Or are you creating the obsidian over an open volcano so it can fall to the bottom and be swallowed by the magma sea? In that case, you could have almost the same effect by letting water drip into the lava.

Nice concept, but i'm a bit unsure how practical this thing is.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Automated Cave In Defense - A new defense system
« Reply #4 on: February 19, 2014, 02:11:08 pm »

Your diagrams are rather difficult to read due to using variable-width fonts - enclose them in CODE tags so the rest of us can read them properly.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Crashmaster

  • Bay Watcher
  • CARP, Canada's new helth care plan for the elderly
    • View Profile

ulspa

  • Escaped Lunatic
    • View Profile
Re: Automated Cave In Defense - A new defense system
« Reply #6 on: February 20, 2014, 10:36:15 am »

Your diagrams are rather difficult to read due to using variable-width fonts - enclose them in CODE tags so the rest of us can read them properly.

thanks for the advise. I used font=mono to force a monospace family. My system has suitable aliases for those "generic font family".



I didn't know nor found this thread. Someone hat the same idea before me and published it in this thread.
But nevertheless, it's amusing to see goblin exploding rather than just crushed by bridges
Logged

Loci

  • Bay Watcher
    • View Profile
Re: Automated Cave In Defense - A new defense system
« Reply #7 on: February 20, 2014, 10:17:41 pm »

Dwarven Power Mining seems like it would dovetail nicely with this design, by providing a single-tile shaft all the way down to SMR and allowing you to cast obsidian for cave-ins without requiring a large open space. Presumably you could just dump the water and magma into the shaft (through fortifications) and let it obsidianize wherever.
Logged