Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: 40D11 Chained animals igore chain and cause pathing lag (vid proof included)  (Read 1254 times)

smjjames

  • Bay Watcher
    • View Profile

This is actually a crosspost since the thread discussing it is here: http://www.bay12games.com/forum/index.php?topic=44207.0

I have checked the bug list and it appears to be related to a bug that was fixed ages ago: # 000470 ▪ (0.27.169.33e) [dwarf mode][creatures]   animals seeking their masters (and others) ignore that they are chained

However, the dogs don't have any 'master' (although I guess they'd consider all dwarves their master when stray) assigned and since this was during the first year when any lag wierdness is most likely to be noticed. I did change to the horse and donkey that came with me and it was fine.

It's entirely possible that this bug is not a very noticeable one, but some close observation should make this noticeable.

My version is 40D11 with Maydays graphics pack, but someone else said they seem to be having the same thing, so I suspect that this crosses all versions
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions

I've just narrowed this down a bit in my own fortress - if a chained animal is within a certain proximity to a meeting area (though presumably not one defined from an activity zone), it will repeatedly attempt (and fail) to path to the building from which the meeting area is defined. If it's far enough away, they don't seem to notice.

In my case, I had 7 chained animals which were sitting peacefully in their stalls, but once I built a well 3 Z-levels above them and defined it as a meeting area, they all started pulling on their chains and causing tons of lag; once I (f)reed the room defined from the well, they calmed down.
« Last Edit: November 21, 2009, 01:28:19 am by Quietust »
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.

smjjames

  • Bay Watcher
    • View Profile

hmm, I did have a meeting zone(defined from an activity zone) one level above and was almost directly above the animals in that particular game (there was a large flat plateu above), maybe shifted to the side a bit.

Although the former location of the wagon was very close by as well, so that could have had an effect.

Its looking like this is in fact a separate, although closely related bug.
Logged

KenboCalrissian

  • Bay Watcher
    • View Profile

Fortunately, this doesn't cause problems when you have animals chained inside the meeting area, as I have several animals chained up in my statue garden and I'm not noticing this lag.

For that matter, I'm trying to reproduce this bug and can't.  In my current fort, I have a couple of dogs chained up in front of the main entrance, and I can get the edge of a Dining-Room-as-Meeting-Area within 11 squares of the restraint (the actual pathing distance is 25 squares).

Then, I designated a Zone-as-Meeting-Area with its edge 4 squares away from their restraint.  Still, the dogs seemed not to notice, and actually one coincidentally moved away from the zone, making it clear they weren't interested.  This gives support to Quietust's claim that it doesn't happen with activity zones.

I'm using 40d.
« Last Edit: November 22, 2009, 10:57:28 pm by KenboCalrissian »
Logged
I've never tried it and there's a good chance it could make them freak out.
Do it.
Severedcoils - the Baron Consort accumulation challenge
Severedcoils II: The Reckoning - a DnD 5e Adventure set in the world of Severedcoils

Derakon

  • Bay Watcher
    • View Profile

I'm pretty certain that once the wagon is removed and you have defined a new meeting area, the wagon isn't used any more as a meeting area.

Also, I doubt that 40d and 40d11 differ in this respect, since as I understand it the only differences in the d# versions is to the rendering code.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

KenboCalrissian

  • Bay Watcher
    • View Profile

In that case, I'm going to post the rest of my findings about this.

As a final test, I constructed a table near the dogs to be used as a new dining room.



Notice the table is at the bottom left, and the restrained dogs are to the center right.

I tested it with several different room sizes, with the border stopping within 3, 4, 5, and 8 tiles away from the restraint.  Again, this did not cause a drop in FPS for me, and the dogs did not act interested in the meeting area.
Logged
I've never tried it and there's a good chance it could make them freak out.
Do it.
Severedcoils - the Baron Consort accumulation challenge
Severedcoils II: The Reckoning - a DnD 5e Adventure set in the world of Severedcoils

Cavalcadeofcats

  • Bay Watcher
    • View Profile

Both of the people reporting the bug describe their meeting areas as 1) overlapping on the xy, and 2) on a different z-level. The people trying, and failing, to replicate the bug describe the meeting areas as 1) either overlapping or nearby on the xy, but 2) on the same z-level.

This suggests a possibility.
Logged

G-Flex

  • Bay Watcher
    • View Profile

Here's a possibility:

A chained animal still checks for all tiles in the 3x3x3 area in which they're centered, because that's how far chains reach.

A chained animal might still try pathing to any of these tiles that would NORMALLY be accessible (if the creature weren't chained), but then fails because of the chain.


In other words, maybe the game just tells chained animals "only treat areas a single tile away in any direction as accessible", yet the game's connectivity map (or whatever it uses to determine whether you can get to tile A to tile B) isn't meant to handle treating a creature as so restricted. So if the game decides a creature at tile A can get to tile B, it won't consider the fact that the creature in question is physically restrained from doing so, so the pathing algorithm runs and fails, runs and fails, etc.



Makes sense to me, anyway. The only situation that COULD cause this is over multiple z-levels, since floors exist (i.e. barriers between open tiles vertically, as opposed to walls, which separate tiles horizontally but take an ENTIRE tile to do so), so a tile can be adjacent to another across z-levels but it can still be impossible to get from one to the other in a single step, unlike when they're on the same z-level.

They're probably pathing to meeting zones specifically because that's one of the few places animals tend to path to, at least so regularly.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

smjjames

  • Bay Watcher
    • View Profile

Well, in that game it was still early in the first year (first summer I think), so I didn't have any other meeting zone set up, plus they were clearly trying to path outside rather than inside.

Strangely the pack animals in that game didn't do it as much.

Normally I don't have this problem, usually because there is either a meeting zone on the same level or there isn't one overlapping them. I don't remember if the meeting zone overlapped the location, but it was at least a few tiles away and they would get dragged through the shadow of the meeting zone anyway.

@G-Flex, you know, that sounds alot like the pathing issue with pet impassible doors.
Logged