Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [39e] Strange Animal Behavior  (Read 4646 times)

Relee

  • Bay Watcher
    • View Profile
[39e] Strange Animal Behavior
« on: August 09, 2008, 03:03:43 am »

I've been noticing some strange behavior in the animals in my fort lately. I'm not terribly experienced in handling animals in Dwarf Fortress so I'm not entirely sure which, if any, of these issues are actually bugs. The two things I want to focus on are ways animals are misbehaving due to doors.

The first strange behavior was encountered when I noticed a lot of animals were running through my woodshop. The way I had built my workshops, I made large rooms dedicated to different types of building. Each of these workshops has several double-doors on its sides, leading to a five-square wide 'main road'. The main road is set to high traffic, so the dwarves all use it for getting around, but the animals don't pay any heed to traffic labels and were walking through the workshop with gleeful abandon, in order to catch up to their various owners. I didn't like this, so I decided to set the doors to the woodshop to 'shut tightly', and not let animals through. There were still some animals in the room, so I left one pair of double-doors pet passable.

To my surprise, the animals did not leave the room. They became confused and started flashing question marks, the way they would if I put them in a room with only blocked exits. Worse yet, as I left it for a while, more and more animals were piling up against the shut door. After a bit, I realized what was going on. The animals were pathfinding through the doors, even though they couldn't pass them, and were unable to take the longer path out of the room, even though it was the only path available. I set all the doors as pet-passable and let them get back to their lives.

I had ignored it at the time, but something else is happening that made me remember this problem. The second strange behavior. I just cleared out the monsters in a cave pool and mined out the area around it to make an indoor park for my dwarves. I walled off a small area in a corner and put a single door sealed tightly against pets. I also set it to restricted traffic, to keep nosy dwarves out. It's a web farm; the idea is to give the cave spiders someplace to do their thing without dwarves crushing the webs, or cats killing them.
While passing by the web farm I noticed something... there was a kitten standing at the door, trying to get at the spiders inside. He could pathfind in to where there were spiders, but couldn't pass the door. This is a really annoying problem, since it means my cats will constantly be standing at the door trying to get in. I figure it's a pathfinding bug in animals... And decided to report it.
Logged
- Relee the Squirrel --

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: [39e] Strange Animal Behavior
« Reply #1 on: August 09, 2008, 03:20:15 am »

animals will pathfind through doors and will actually take into affect traffic designations. The only thing is that they take traffic designations backward, with them trying to use the restricted ones more and avoid the high traffic areas. While this can be annoying, such as in your case, it does allow you to create animal pens that function through pathing much easier.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

Draco18s

  • Bay Watcher
    • View Profile
Re: [39e] Strange Animal Behavior
« Reply #2 on: August 09, 2008, 08:10:24 am »

animals will pathfind through doors and will actually take into affect traffic designations. The only thing is that they take traffic designations backward, with them trying to use the restricted ones more and avoid the high traffic areas. While this can be annoying, such as in your case, it does allow you to create animal pens that function through pathing much easier.

That is HILARIOUS.  I can kinda see why Toady did it, but still, I can just see a cat pushing its face against an "Employees Only" door and going "Merroooowwww!" in complaint.
Logged

WCG

  • Bay Watcher
    • View Profile
    • That's interesting...
Re: [39e] Strange Animal Behavior
« Reply #3 on: August 09, 2008, 10:03:18 am »

animals will pathfind through doors and will actually take into affect traffic designations. The only thing is that they take traffic designations backward, with them trying to use the restricted ones more and avoid the high traffic areas. While this can be annoying, such as in your case, it does allow you to create animal pens that function through pathing much easier.

Wow, I need to think about this a bit! I've been trying to 'ranch' cattle and horses, but it's been difficult. The animals all bunch at the doors and slip through when any dwarf enters (the butcher, normally). Even multiple animal-proof doors in a row don't work for long.

Eventually, I round them all up and 'pit' them back, but from the pit screen, I can't see which animals are where. So I have to collect them all, which means that my dwarves let more animals through the doors in the process of collecting those which were already in their proper place.

Right now, I've got only one long path to the pasture. But you're saying that I could make a short, restricted path which the animals would try to exit, but a longer, high-traffic path which the dwarves would actually use? Or vice versa, I guess. I'm still trying to figure this out.

Thanks! I'll definitely give this a try.

Bill
Logged

Relee

  • Bay Watcher
    • View Profile
Re: [39e] Strange Animal Behavior
« Reply #4 on: August 09, 2008, 02:21:35 pm »

animals will pathfind through doors and will actually take into affect traffic designations. The only thing is that they take traffic designations backward, with them trying to use the restricted ones more and avoid the high traffic areas. While this can be annoying, such as in your case, it does allow you to create animal pens that function through pathing much easier.

o.O;;  That can't be INTENTIONAL can it?
Logged
- Relee the Squirrel --

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: [39e] Strange Animal Behavior
« Reply #5 on: August 09, 2008, 02:55:50 pm »

animals will pathfind through doors and will actually take into affect traffic designations. The only thing is that they take traffic designations backward, with them trying to use the restricted ones more and avoid the high traffic areas. While this can be annoying, such as in your case, it does allow you to create animal pens that function through pathing much easier.

o.O;;  That can't be INTENTIONAL can it?

Yeah, it is intentional

That is HILARIOUS.  I can kinda see why Toady did it, but still, I can just see a cat pushing its face against an "Employees Only" door and going "Merroooowwww!" in complaint.

That would be just the kind of thing a cat would do, real-world cats seem to take personal offense at any door being closed so that they can't get through it. ;D
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

WCG

  • Bay Watcher
    • View Profile
    • That's interesting...
Re: [39e] Strange Animal Behavior
« Reply #6 on: August 09, 2008, 09:44:57 pm »

That seems to work great on an animal pen, though I haven't had much time with it yet. I set a high traffic zone to one side of the pen, and a low traffic zone to the other. All of the doors are set, of course, to prohibit animal passage. So far, the animals all bunch up at the door to the low traffic zone, so they shouldn't slip out when a dwarf enters from the other side.

Note that you can't use a restricted traffic zone there. And the door must allow dwarves to enter (though I don't want them to enter that way, of course). Hmm,... come to think of it, I'm not sure how fully I tested this. But it did NOT work when the door was completely prohibited and it was identified as a restricted traffic zone.

This will be very useful. Thanks for the info!

Bill
Logged

MMad

  • Bay Watcher
    • View Profile
Re: [39e] Strange Animal Behavior
« Reply #7 on: August 10, 2008, 01:13:10 pm »

Yeah, it is intentional

If so, it's strange and unintuitive.
Logged
"Ask not what your fortress can do for you - ask what you can do for your fortress."
Unapologetic ASCII abolitionist.

valcon

  • Bay Watcher
  • Experience rivers.
    • View Profile
    • My YouTube Channel
Re: [39e] Strange Animal Behavior
« Reply #8 on: August 10, 2008, 04:38:29 pm »

Yeah, it is intentional

If so, it's strange and unintuitive.

Strange and unintuitive is the dwarven way!  If it isn't dangerous, illogical and likely to fail, the dwarves are more likely than not to boycott it. 
Logged
Still doing Let's Plays, still got a gold toof. 

Adventure Mode:  The Movie!

MMad

  • Bay Watcher
    • View Profile
Re: [39e] Strange Animal Behavior
« Reply #9 on: August 10, 2008, 04:54:34 pm »

Strange and unintuitive is the dwarven way!  If it isn't dangerous, illogical and likely to fail, the dwarves are more likely than not to boycott it. 

Heh. Life certainly would be easier for game developers if players typically felt the same way. :p
Logged
"Ask not what your fortress can do for you - ask what you can do for your fortress."
Unapologetic ASCII abolitionist.

MercDraco

  • Bay Watcher
  • Royal Hammerer, Smasher of Stupid Nobles,
    • View Profile
Re: [39e] Strange Animal Behavior
« Reply #10 on: August 11, 2008, 12:46:02 am »

Yea but then again some games just aren't as fun without those noticble fun F---ups (!!!Dire  Zombie CARP!!!)  Also Anyone notice the instant you set a door to not allow pets they try and pass through even if it leads to the River???

~~~~~~
XXXDXXX
X   C    X

~ Da River
X Wall
D Da Door
C Furball McDURRR

Do my kitties just want baths? or is it trying to flood the Fortress???  :-\

Eh well he can mew all he wants Da Door remains shut...until the nobles arrive...
Logged
The Cake...is...a...LIE!!!
The Worlds Best Trap includes a single left footed -Pig Tail- sock.
Madness? This isn't Madness...This is DWARF FORTRESS.

WCG

  • Bay Watcher
    • View Profile
    • That's interesting...
Re: [39e] Strange Animal Behavior
« Reply #11 on: August 11, 2008, 09:37:26 am »

If so, it's strange and unintuitive.

But VERY useful. Frankly, I'd say this is a clever way to make pastures workable. Yeah, it could certainly be improved (I'd especially like to be able to see WHICH specific animal I'm caging/pitting), but as a temporary work-around, this works great!

Bill
Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: [39e] Strange Animal Behavior
« Reply #12 on: August 13, 2008, 06:59:57 pm »

animals will pathfind through doors and will actually take into affect traffic designations. The only thing is that they take traffic designations backward, with them trying to use the restricted ones more and avoid the high traffic areas. While this can be annoying, such as in your case, it does allow you to create animal pens that function through pathing much easier.

o.O;;  That can't be INTENTIONAL can it?

Yeah, it is intentional

Where'd you get that?  There's no code for reversing traffic designations.  Animals just don't get the flag to care about them.

The issue with pet passable doors is Bug 631, and it's a difficult problem since some animals have jobs that require use of the path components, but the path components don't respect pet passable doors, yet it's not possible speed-wise to just have another set of path components just for this purpose.  In essence, all of the things that involving an animal solving a complicated path need to be scrapped, or a lot of memory capital needs to be spent, as far as I can see it, unless pet-forbidden doors themselves are removed.
Logged
The Toad, a Natural Resource:  Preserve yours today!

WCG

  • Bay Watcher
    • View Profile
    • That's interesting...
Re: [39e] Strange Animal Behavior
« Reply #13 on: August 13, 2008, 10:18:50 pm »


Where'd you get that?  There's no code for reversing traffic designations.  Animals just don't get the flag to care about them.


This is my first fortress, so I'm never entirely sure about anything. :) But when I heard this about the backwards traffic designations for animals, I tried it in my 'pasture,' and it seemed to work.

Now that I think of it, though, the change might be due to something else. I had the south door to the pasture set to 'forbidden,' and the animals all clustered at the north door, which was impassable to animals but still permitted dwarven use. When I changed the traffic designations, I also changed the south door to allow dwarven (but not animal) use. I guess when the animals all immediately moved to the south door, I thought it was due to the traffic change. (After all, I figured I hadn't changed anything to do with animal permissions.)

Not so, huh? Too bad. Still, if the animals just ignore the traffic designations, that can accomplish the same thing. The dwarf butcher enters from the north door, while the animals stay clustered around the south door (apparently just because it's a shorter path to wherever they want to go). It doesn't work perfectly, but it does seem to work.

Bill
Logged

MMad

  • Bay Watcher
    • View Profile
Re: [39e] Strange Animal Behavior
« Reply #14 on: August 14, 2008, 02:29:53 am »

Still, if the animals just ignore the traffic designations, that can accomplish the same thing. The dwarf butcher enters from the north door, while the animals stay clustered around the south door (apparently just because it's a shorter path to wherever they want to go). It doesn't work perfectly, but it does seem to work.

Sounds great. I'll have to try this. :)
Logged
"Ask not what your fortress can do for you - ask what you can do for your fortress."
Unapologetic ASCII abolitionist.