Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dwarven science and chained animals  (Read 1027 times)

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Dwarven science and chained animals
« on: March 10, 2011, 10:30:48 am »

Experiment 1:  Testing whether chains restrict movement in the Z axis.

This experiment was to test if a chain would restrict the free movement of a chained creature equally in the X, Y, and Z axis.  This experiment was only to address the movement of a creature walking under its own power, rather than a creature being moved by external forces.

A region of solid rock in the shape of a cube, with dimensions of 9 tiles in each direction, was dug out into up/down staircases, theoretically permitting any creature in the cube free movement in any direction.  The tile in the exact center of the cube had a constructed floor built in it.  A silk rope was then constructed on that center tile.

A stray tame guineahen was then chained to the rope, and its movement observed over a period of several in-game months.  During this time the guineahen was observed to move across multiple Z-levels of the stair-cube and was not restricted to the Z-level that the chain was on, or the Z-levels just above and below it, but was seen as far as the topmost and bottom-most layer of the 9 layer cube.  On each level, the guineahen was not observed to leave the center 3X3 tile region centered on the X and Y position of the chain.  At the end of the observation period, the guineahen was confirmed to still be attached to the chain.

From this experiment it appears that chains do not restrict the voluntary movement of a creature in the Z axis.  Chains do appear to restrict creatures from moving more than 1 tile away in the X axis and more than one tile away in the Y axis, but a chained creature may freely move any Z distance while still being attached to the chain.

Experiment 2:  Testing the effect of chains on falling creatures

This experiment was to test if a chain would restrict or ‘hang’ falling creatures, as well as whether falling would cause a creature to become detached from a chain.

For this experiment a chain was built on a piece of natural floor.  Each of the 8 tiles surrounding that floor was then channeled out, making a 1 Z-layer deep moat, and then covered with a floor hatch.  A nearby lever was connected to all 8 hatches.  A stray guineahen was then attached to the chain.  At this point the guineahen could freely wander across nine tiles - the center tile with the chain attached, and the eight surrounding tiles having 1 Z-level drops covered with floor hatches.

When the guineahen was standing on one of the floor hatches, the lever was pulled.  The guineahen fell one Z-level into the surrounding trench.  It was stunned but otherwise uninjured.  Examination of the chain revealed that the guineahen was still assigned and attached to the chain.  The guineahen was then observed to still be unable to move beyond 1 tile X and Y from the location of the chain.  The floor hatches at this point could then be closed,  even though the chain and the guineahen were on opposite sides of the hatches.

The guineahen was then deliberately removed from the chain, and then reattached to it, in order to move it back atop the hatches.  The 8 tiles under the hatches were then channeled one Z-level further down so that all the hatches would have a 2 Z-level drop under them.  When the chained guineahen again wandered on top of one of the hatches, the lever was pulled again.

After falling the 2 Z-levels, the guineahen was observed to be significantly injured.  Examination of the combat log indicated that the injuries seemed to be due to impact with the ground.  There was no indication in the combat log of strangulation or other possible injuries from the chain.

Examination of the chain revealed that at this point the guineahen was assigned to it, but was not attached.  The guineahen was then observed to wander away from the location of the chain and was not restricted to the tiles adjacent to the point just under where the chain was.  When the lever was pulled again to close the floor hatches, a dwarf promptly retrieved the guineahen and reattached it to the chain.

From this experiment it appears that chains do not restrict falling creatures at all, nor do they cause any injury to them.  However, it appears that falling more than 1 tile will cause a creature to become detached from a chain.  Since the creature is not moving out of the range of tiles the chain would permit it to move into on its own, something other than moving too far from the chain must be responsible for the creature becoming detached.  It may be that when a creature has the ‘flying’ status, it becomes detached from any chains.  This will require further experiments.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Urist McGyver

  • Bay Watcher
  • I love Roc Birds.
    • View Profile
Re: Dwarven science and chained animals
« Reply #1 on: March 10, 2011, 10:41:44 am »

Now channel the spot there the guineahen is while it's still attached and 1-Z below the chain, to see if we can add supports that will be removed so it can stay there, hanging, forever.
Logged
It's treated as completely normal because this is Dwarf Fortress.  There's absolutely nothing wrong with surrounding yourself with a wall of flames, only to later realize that you're surrounded by a wall of flames.
There's nothing that can't be solved by hurling fifteen roc birds at it.

xeivous

  • Bay Watcher
    • View Profile
Re: Dwarven science and chained animals
« Reply #2 on: March 10, 2011, 10:49:54 am »

I recall hearing that strangulation is planned for this sort of situation...
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Dwarven science and chained animals
« Reply #3 on: March 10, 2011, 10:50:41 am »

You recall hearing that we wish strangulation were possible.

Urist McGyver

  • Bay Watcher
  • I love Roc Birds.
    • View Profile
Re: Dwarven science and chained animals
« Reply #4 on: March 10, 2011, 10:55:03 am »

It isn't just about strangulation. Its more of leaving someone hanging, alone and inspiring fear on all weaker sentient creatures that happen to come close to it starving.
Logged
It's treated as completely normal because this is Dwarf Fortress.  There's absolutely nothing wrong with surrounding yourself with a wall of flames, only to later realize that you're surrounded by a wall of flames.
There's nothing that can't be solved by hurling fifteen roc birds at it.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Dwarven science and chained animals
« Reply #5 on: March 10, 2011, 11:31:43 am »

At the moment, the only way I know of to have a creature hanging in midair is with the stuck projectile status bug.  If you save the game when a creature is airborne, that creature will sometimes be left floating in midair permanently when you restore.  Creatures which are like this are basically in suspended animation and don't interact with the rest of the world at all - you can build walls through them, flood their tile with magma, even collapse roofs on them and they're not affected.  The only way to unstick a creature in this status is to use a memory hacking tool to turn off the 'projectile' flag.  I don't know if this bug is still around, it's possible it's been fixed in some update.  I haven't tried to reproduce it recently.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Granite26

  • Bay Watcher
    • View Profile
Re: Dwarven science and chained animals
« Reply #6 on: March 10, 2011, 04:17:30 pm »

Which version was this?

I wonder if the Z level combat fix will affect this?

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Dwarven science and chained animals
« Reply #7 on: March 10, 2011, 04:23:27 pm »

The testing I did in the original post was in the current version - v0.31.21.

The creature stuck in midair bug was around in v0.28.181.40d.  It might still be around, I haven't tried to reproduce it in the current version.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

PartyBear

  • Bay Watcher
    • View Profile
Re: Dwarven science and chained animals
« Reply #8 on: March 10, 2011, 06:26:43 pm »

It may be that when a creature has the ‘flying’ status, it becomes detached from any chains.  This will require further experiments.

What about using retractable bridges on each Z level to keep dropping the guineahen one Z level at a time?

Also, a retractable bridge on solid ground could fling the guineahen on the same Z level.  That causes "flying" status, doesn't it?
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Dwarven science and chained animals
« Reply #9 on: March 10, 2011, 07:32:46 pm »

Experiment #3:

Using the same test setup as in experiment #2, but adding floor hatches on every square of the trench one Z-level below the level with the chain.  Each of the eight floor hatches one Z-level down was linked to a second lever.

The stray tame guineahen was reattached to the chain on the main level.  When the guineahen moved onto one of the floor hatches on the level with the chain, the first lever was pulled.  This caused those first eight hatches to open, dumping the guineahen one Z-level down.  The guineahen was stunned by this, but not injured further.  Examination of the chain revealed that the guineahen was still assigned to and attached to the chain.  The guineahen was unable to move more than one square away from the location of the chain in X and Y at this point.

At this point the second lever was pulled.  This opened all the floor hatches on the lower level.  The guineahen was dropped one more Z-level.  Again, it was stunned, but not further injured.  Examination of the chain revealed that the guineahen was assigned to the chain, but was no longer attached to it.  The guineahen was able to wander away from the location of the chain at this point.  When the first lever was pulled, the floor hatches on the upper level closed, and a dwarf promptly grabbed the guineahen and returned it to the chain.

It appears that dropping a chained creature from the level of the chain to one Z-level below the chain does not release the creature from the chain, but dropping the chained creature from one Z-level below the chain to two Z-levels below the chain does.  This is puzzling in light of the earlier results which indicated that chains did restrict a creature's Z-level movement.

Experiment #4:

Starting with the previous experiment, the floor hatches were removed and replaced with solid floors.  On each floor tile around the chain a retracting bridge was built.  All these bridges were then linked to a nearby lever.  The stray tame guineahen was returned to the chain in the center of the bridges.  A ring of walls was then built around the 3X3 experimental area.

Once the experimental setup was completed and the area sealed, the lever was pulled repeatedly.  Each time the bridges extended or retracted, the guineahen was flung around the enclosure.  It became airborne repeatedly in the process, but was not injured.  It was not flung outside the 3X3 square area centered on the chain because of the surrounding walls.

After the guineahen had been flung repeatedly, the chain was inspected.  The chain showed that the guineahen was still assigned to and attached to the chain, despite being made airborne repeatedly.

At this point, the walls surrounding the experimental cell were removed.  The lever was then assigned to be pulled repeatedly.  The first two flings tossed the guineahen, but did not throw it outside the 3X3 area centered on the chain.  At this time the guineahen was observed to still be assigned to and attached to the chain.  The third cycle of the bridges threw the guineahen outside the 3X3 area.  At this time it was observed to no longer be attached to the chain, and a dwarf attempted to return it to the chain.

Conclusion:  Becoming airborne does not detach a creature from a chain.  A creature will become detached from a chain when it is forced to move away from a 3X3X3 cube centered on the chain, even though it is normally able to move freely on any Z-level and only retrained by the chain in X and Y movement.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.