Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Waterwheel exploit: water movement not necessary  (Read 1474 times)

morgoththegreat

  • Bay Watcher
    • View Profile
Waterwheel exploit: water movement not necessary
« on: August 17, 2010, 06:41:48 pm »

I recently noticed a strange phenomenon regarding waterwheels and pumped water (by accident, but where would we be without accidents?). I was experimenting with building a self-powered pumping station in which waterwheels powering the pumps in an aqueduct-type system (moving water from the ocean to my fort) are put in the aqueduct itself, instead of what I had usually done which was build a power plant separate from the aqueduct. However, when I closed a gate at the end of my aqueduct to work on my drainage system, the waterwheels kept turning and the pumps kept pumping, even though there was now 7/7 water in every tile and no exit (so the pumps weren't actually moving any water, the level was full).

I had previously believed that waterwheels required water to "spread out" underneath them, i.e. a 7/7 tile moving to equalize with a 5/7 tile, not water "teleporting," in order to provide power, so I started to experiment with my new (strange) discovery.

1. Unlinking the waterwheels from the pumps did nothing, the waterwheels still provided just as much power as ever (more, when you consider that the pumps were no longer using it).

2. I drained the system and put a gate in between the wheels and the pumps, then refilled the system and closed the gate. The wheels still turned. De-powering the pumps didn't change a thing.

3. I powered the pump by hand, filled the system, and closed the gate. Same thing, the wheels still turn and produce power.

4. The power generation is conserved across save/loads, the game doesn't "forget" that those motionless 7/7 tiles are moving your waterwheels.

All this happened in 40d, but as I write this I have an embark running in 2010 with the sole purpose of testing this exploit and it's working great. I've got a 7x3 enclosure set up right next to a brook, with 7 waterwheels inside it (a set of 4 and a set of 3, at right angles to each other, supported by two gears) and a manual pump inputting water, with a 1-tile space (with walls around it, of course) between the pump output and the start of the 7x3 so I could throw in a floodgate for completeness.
I told a dwarf to pump and he did, quickly filling the 7x3 enclosure and starting all the waterwheels, at which point I turned off the pump. Then I closed the floodgate, and deconstructed the pump.
My stack of 4 wheels is generating 400 power and using 45, 5 for the gear and 10 per wheel. My stack of 3 is generating 300 and using 35, 5 for the gear and 10 per wheel.

This is more efficient than any design I've ever seen for power plants, because it removes the necessity of powering a pump anywhere in the system. Furthermore, there's no water pathing going on at all, because all the tiles of water are 7/7 and don't have anywhere to go.

To recap, use a pump to fill a closed space that has a waterwheel in it. The waterwheel should produce power and continue to do so after the space has filled. Then just stop powering the pump (deconstruct it if you want to, and included in your design the means to do so). The waterwheel should continue to produce power forever, as long as that water stays 7/7 everywhere (so no outside scorching biomes).

The major thing I'd like to test now is whether or not dropping a cave-in between the pump and the wheels somehow ruins the effect (I'm guessing not, considerig that the floodgate doesn't), because I'd like to see building-destroyer-proof permanently-sealed perpetual power plant.

Also, why is this happening?
Logged

jfsh

  • Bay Watcher
    • View Profile
Re: Waterwheel exploit: water movement not necessary
« Reply #1 on: August 17, 2010, 06:49:41 pm »

I'd like to see you try this with water that didn't come from a brook, river, or aqueduct - those all have intrinsic "flow" even when stationary, and its possible that the flow transfers over (maybe you tried this and I missed it).  I would test it with a murky pool or water from the caves and see what happens.

morgoththegreat

  • Bay Watcher
    • View Profile
Re: Waterwheel exploit: water movement not necessary
« Reply #2 on: August 17, 2010, 07:11:05 pm »

Regarding the "brooks have intrinsic flow" possibility, I just did it in a murky pool with the same results, and I've done it in an ocean before. I'm guessing it has something to do with how the game "pumps" water. I need to try it with a "naturally" filled enclosure, like draining a murky pool into a walled-up waterwheel a z-level down, to see if that's any different.
Logged

Foehamster

  • Bay Watcher
  • Zig Frostrushes The Speachless Eater of Saints
    • View Profile
Re: Waterwheel exploit: water movement not necessary
« Reply #3 on: August 17, 2010, 07:16:01 pm »

I've done this in 40d as well. However, I never disconnected the pumps from the 7/7 pool underneath the wheels.
Logged

morgoththegreat

  • Bay Watcher
    • View Profile
Re: Waterwheel exploit: water movement not necessary
« Reply #4 on: August 17, 2010, 07:22:39 pm »

I just did one now where I dug a 1x3 hole a z-level below the water of a murky pool, built a waterwheel in it, and punctured to the pool so the water would drain out over the hole. It did, filling the hole to 7/7 while the excess drained out across the countryside. The waterwheel is still spinning. A 1x3 hole in the dirt, filled by draining a murky pool, is providing me with power for eternity.
Logged

gtmattz

  • Bay Watcher
  • [PREFSTRING:BEARD]
    • View Profile
Re: Waterwheel exploit: water movement not necessary
« Reply #5 on: August 17, 2010, 08:02:04 pm »

Do/did you have any naturally flowing water (river/brook/stream) on the same Z level anywhere else on the map?  There is a known situation where pretty much any water on the same z level as a natural flowing source of water will have flow.  I am going to guess that with your murky pool experiment you are on hilly terrain and you drained the water down to the same level as brook.

If this isn't the case, I would really like to see the save file so I could examine your setup a little closer.
« Last Edit: August 17, 2010, 08:33:17 pm by gtmattz »
Logged
Quote from: Hyndis
Just try it! Its not like you die IRL if Urist McMiner falls into magma.

morgoththegreat

  • Bay Watcher
    • View Profile
Re: Waterwheel exploit: water movement not necessary
« Reply #6 on: August 17, 2010, 08:37:59 pm »

Do/did you have any naturally flowing water (river/brook/stream) on the same Z level anywhere else on the map?  There is a known situation where pretty much any water on the same z level as a natural flowing source of water will have flow.  I am going to guess that with your murky pool experiment you are on hilly terrain and you drained the water down to the same level as brook.

If this isn't the case, I would really like to see the save file so I could examine your setup a little closer.

I have 3 different setups on my embark right now, one big one a z-level above the brook water, and two more 5 or six z-levels above the brook, which I made from a murky pool.

Here's a link to the save, if you want to play around with it: http://dffd.wimbli.com/file.php?id=2965
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Waterwheel exploit: water movement not necessary
« Reply #7 on: August 17, 2010, 08:47:03 pm »

I remember seeing this before - You can actually start it with just buckets and a pond designation.  As long as water flows back and forth at some point, because it isn't a level 7/7 in all the tiles, it can get locked in a state where the water is considered "flowing", even if it isn't really going anywhere.  This seems to have to do with the hydrostatic pressure coding, where tiles of water get grouped into "bodies of water", and there is a boolean flag for whether the water is "flowing" or not.  The root of the problem is probably a lack of checking on the part of the game for the water NOT flowing anymore - once it is set to flowing, it never is "un-flowing", which means this probably does belong on the bug tracker, now that I think about it.  (Haven't checked to see if it's there...)

You can probably search for this in this forum, I'm sure it was on this forum that I saw this.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

gtmattz

  • Bay Watcher
  • [PREFSTRING:BEARD]
    • View Profile
Re: Waterwheel exploit: water movement not necessary
« Reply #8 on: August 17, 2010, 11:33:09 pm »

I am still convinced this is related to the flow from the brook, and possibly it is anything above the brook has flow.  Try doing this with water from a murky pool on a map with no brook and it doesn't work at all, or try it a few Z levels below the brook and it doesn't work either.
Logged
Quote from: Hyndis
Just try it! Its not like you die IRL if Urist McMiner falls into magma.

Shinziril

  • Bay Watcher
  • !!SCIENCE!!
    • View Profile
Re: Waterwheel exploit: water movement not necessary
« Reply #9 on: August 17, 2010, 11:49:04 pm »

The brook is the key.  Specifically, there has to be a brook or some sort of river *somewhere on the map*.  As long as there is, any aboveground pit filled with water seems to provide power to waterwheels.  You can even power a waterwheel with a single tile channeled out and filled with water by hand, with absolutely no water moving ever.  It's a bit ridiculous, really.
Logged
Quote from: lolghurt
Quote from: Urist McTaverish
why is Dwarven science always on fire?
Because normal science is boring

Urist Imiknorris

  • Bay Watcher
  • In the flesh, on the phone and in your account...
    • View Profile
Re: Waterwheel exploit: water movement not necessary
« Reply #10 on: August 18, 2010, 06:56:54 am »

I've done this a few times before. It really makes for a nice-looking dynamo.
Logged
Quote from: LordSlowpoke
I don't know how it works. It does.
Quote from: Jim Groovester
YOU CANT NOT HAVE SUSPECTS IN A GAME OF MAFIA

ITS THE WHOLE POINT OF THE GAME
Quote from: Cheeetar
If Tiruin redirected the lynch, then this means that, and... the Illuminati! Of course!