The automatic butchering engines I built for Pagedslipped were pretty damn complicated, probably more complicated than they needed to be. I've already figured out easier ways to build them. The original design worked as follows:
WWWWWWWWWWWWWWW
WbbbbbbbbbbbbbW
WbWhWhWhWhWhWhWW
WbW^h^h^h^h^h^hWW
WWWWWW WbWhWhWhWhWhWhW+WW
WWW WWWWWWWbW+W+W+W+W+W+WW+WWWWWWWWWWWWWWW
++^hDbb+++^+++hbh++++++++++++++++++++++++^DDh^++
WWW WWWWWWWbW+W+W+W+W+W>WW+WWWWWWWWWWWWWWW
WWWWWW WbWhWhWhWhWhWhW+WW
WbW^h^h^h^h^h^hWW
WbWhWhWhWhWhWhWW
WbbbbbbbbbbbbbW
WWWWWWWWWWWWWWW
+ = floor
W = wall
h = floor hatch
D = door
b = retracting bridge
^ = pressure plate
> = stairs down
The machine relies on several aspects of how wild animals pathfind to control their movement through the machine. Wild animals that have been around for a while eventually attempt to leave the map. They will attempt to path through doors which are set to be unlocked yet closed to animals, and will pile up at such a door. If you have a room full of wild animals with several exits locked to animals but open to dwarves, you can control which exit they crowd around by mechanically blocking and unblocking the path behind the exit door. Our machine has two such exits, one on the left and one on the right. The one on the right has two doors, one of which is open to dwarves and locked to animals, and the second of which is mechanically opened and closed by the water logic controlling the device. This exit is used to cycle the animals in and out of the counter/sorter array in the center of the machine. The exit on the left is the kill exit, used to lead excess adult animals out of the machine onto a repeating bridge over a fatal fall. Both of the exits from the machine also have a safety system consisting of a pressure plate set to trigger for any friendly unit immediately followed by a floor hatch. If a dwarf or tame animal tries to wander into the machine, the pressure plate triggers and open the hatch instantly, blocking their path. Warrens didn't exist in 40d, and don't affect animals in DF2010 anyway, so this is how I stop friendly units from wandering into the machine.
The real key to the machine is the counter/sorter mechanism in the center. This is a device which counts out exactly twelve adult animals, holds them in cells, and sends the remainder to the cull chute on the left. This machine consists of twelve cells, each of which holds one adult animal. Each cell is built as follows:
h
h^h
h
The pressure plate in the middle is set to trigger for an adult animal of the species you're putting in the machine. This requires you to look up the body size of that animal in the raws, and also means you have to know what kind of animal you're putting into the machine when you build it. This pressure plate triggers the hatches on the north and south sides of the plate. The pressure plates on the east and west side are controlled by the device mode logic. When animals are filing into the counter/sorter, these pressure plates are open, preventing animals from leaving the cells. One Z-level under these hatches there is a safe floor that leads back to a stair up to the entrance to the machine, so any animals that fall when these hatches open will land safely and be able to cycle back to the start of the machine.
When animals are going into the sorter/counter, the machine looks like so:
WWWWWWWWWWWWWWW
WbbbbbbbbbbbbbW
WbWhWhWhWhWhWhWW
WbW^ ^ ^ ^ ^ ^ WW
WWWWWW WbWhWhWhWhWhWhW+WW
WWW WWWWWWWbW+W+W+W+W+W+WW+WWWWWWWWWWWWWWW
++^hDbb+++^+++hb ++++++++++++++++++rrrrr^DDh^++
WWW WWWWWWWbW+W+W+W+W+W>WW+WWWWWWWWWWWWWWW
WWWWWW WbWhWhWhWhWhWhW+WW
WbW^ ^ ^ ^ ^ ^ WW
WbWhWhWhWhWhWhWW
WbbbbbbbbbbbbbW
WWWWWWWWWWWWWWW
Animals (rabbits in this case, but any wild non-buildingdestroyer should do) see a path to the outside through the left of the machine. They wander from their gathering point on the right and then take one of the twelve paths to the exit. Whenever an adult animal steps on one of the pressure plates, the floor hatches adjacent to the plate open and trap it there. Any animals standing on a plate when it opens fall to the catch floor one level down, and then make their way back to the stairs up to try again. This goes on until all twelve cells are full. Each cell's pressure plate is also linked to a 12-input water logic AND gate elsewhere. When all twelve cells have animals in them, a floor hatch closes, permitting passage from the center of the machine to the exit on the left. The machine now looks like so:
WWWWWWWWWWWWWWW
WbbbbbbbbbbbbbW
WbW W W W W W WW
WbWr r r r r r WW
WWWWWW WbW W W W W W W+WW
WWW WWWWWWWbW+W+W+W+W+W+WW+WWWWWWWWWWWWWWW
++^hDbb+++^+++hbh+rr++r+rrr++r++++++++++^DDh^++
WWW WWWWWWWbW+W+W+W+W+W>WW+WWWWWWWWWWWWWWW
WWWWWW WbW W W W W W W+WW
WbWr r r r r r WW
WbW W W W W W WW
WbbbbbbbbbbbbbW
WWWWWWWWWWWWWWW
Twelve rabbits are stuck on pressure plates in cells, and a handful of mixed adults and kits are wandering around the center of the machine. Baby animals try to stay near their parents, and don't leave the center of the machine. Any excess adults do try to leave, marching right out to the left side of the machine. There is a door they can't pass through on the left side, and a bridge over a deep pit with weapon traps at the bottom just before it. The bridge cycles automatically, and any animals that try to leave get dropped and automatically butchered.
As animals walk down the path to the left exit, they step on a pressure plate which changes the machine mode. The bridge around the outside of the cells retracts. The hatches between the cells close. The rightmost door opens. The machine now looks like this:
WWWWWWWWWWWWWWW
W W
W W W W W W W WW
W WrhrhrhrhrhrhWW
WWWWWW W W W W W W W W+WW
WWW WWWWWWW W+W+W+W+W+W+WW+WWWWWWWWWWWWWWW
++^hDbb+++rrr+ h++r+r++r++++r++++++++++^D+h^++
WWW WWWWWWW W+W+W+W+W+W>WW+WWWWWWWWWWWWWWW
WWWWWW W W W W W W W W+WW
W WrhrhrhrhrhrhWW
W W W W W W W WW
W W
WWWWWWWWWWWWWWW
The rabbits in the center of the machine can't path to the left exit anymore. They do however see an apparant exit on the right side of the machine, since a door is now open there. And the hatches make paths between the cells and the right side exit, so all the rabbits can leave the machine center and head back for the start of the machine on the right side. When the first one of them reaches the pressure plate just before the non-pet-passable door, it resets the machine state, closing the right-hand door, opening the left passage, and resetting the cells to count a dozen animals again.
Meanwhile the rabbits who have exited to the left are automatically killed and butchered. The fall kills most of them, the weapon traps kill any who survive the fall. The bottom of the pit is surrounded by refuse stockpiles and butcher's shops. You can see two copies of this machine in Pageslipped (
http://mkv25.net/dfma/map-8247-pagedslipped ) near the center of the pyramid on levels 21 through 24. The lower machine used wild rabbits, the upper used wild mountain goats.
This machine is almost certainly more complex than it needs to be. I built it as a challenge to myself to see if it was even possible. It only works with wild animals, since tame animals that die in falls can't be butchered. I haven't bothered rebuilding it in DF2010. Most wild animals don't seem to breed unless the dungeon master shows up, and I haven't managed to get him to show up in DF2010 yet. Butchered animals also seem to generate vastly more items for hauling in DF2010, so I suspect that an operational automated meat engine would need an army of haulers to keep the butcher's shops cleared. Besides which, since milking and cheese-making work now, I've turned to a cheese-based food production process instead.