Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0004366Dwarf FortressDwarf Mode -- Petspublic2011-03-27 20:232014-11-25 16:18
DoktorV 
Toady One 
normalminorhave not tried
resolvedfixed 
Windows XPSP3
0.31.23 
0.40.19 
0004366: Animals in large pastures fight despite abundance of space
I have 33 mixed animals on a 9x18 pasture (approximately 5 tiles per animal) and several have accumulated injuries from fighting with other tame animals on the pasture. Additionally, the six dogs I embarked with have also been attacking dwarves in the 9x5 meeting hall.
Embark with numerous beasties, pasture, and wait for combat reports. Faster-breeding beasties are more likely to create the problem sooner.
31.23 with pre-installed Phoebus graphics pack. Manually installed Dwarven Higher Learning mod, which shouldn't affect anything regarding livestock.
pasture
related to 0004367resolved Toady One Animals all try to graze from pasture's top left corner, starvation ensues 
related to 0007554resolved Toady One Crowded animals are too docile 
parent of 0009246acknowledged Dwarfu Animals only move very rarely when brought to a pasture 
related to 0004402resolved Dwarfu Tame animals in pastures attack each other 
Not all the children of this issue are yet resolved or closed.
Issue History
2011-03-27 20:23DoktorVNew Issue
2011-03-27 22:42DoktorVTag Attached: pasture
2011-03-27 23:43KogutNote Added: 0016703
2011-03-27 23:44KogutNote Edited: 0016703bug_revision_view_page.php?bugnote_id=0016703#r6219
2011-03-28 01:03KumquatNote Added: 0016705
2011-03-28 04:42danarisNote Added: 0016713
2011-03-28 08:44Granite26Note Added: 0016718
2011-03-31 03:16DwarfuRelationship addedrelated to 0004402
2011-03-31 04:37DoktorVNote Added: 0016845
2011-03-31 04:57DoktorVNote Edited: 0016845bug_revision_view_page.php?bugnote_id=0016845#r6277
2011-03-31 05:17DoktorVNote Edited: 0016845bug_revision_view_page.php?bugnote_id=0016845#r6278
2011-03-31 05:23dieffenbachjNote Added: 0016846
2011-03-31 10:17danarisNote Added: 0016862
2011-03-31 10:25KumquatNote Added: 0016863
2011-03-31 14:04DawideIssue Monitored: Dawide
2011-04-02 13:50FootkerchiefRelationship addedrelated to 0004367
2012-04-01 07:38KogutNote Added: 0021983
2014-07-21 23:33King MirNote Added: 0027184
2014-07-21 23:34King MirNote Edited: 0027184bug_revision_view_page.php?bugnote_id=0027184#r10167
2014-07-21 23:35King MirNote Edited: 0027184bug_revision_view_page.php?bugnote_id=0027184#r10168
2014-07-21 23:35King MirNote Edited: 0027184bug_revision_view_page.php?bugnote_id=0027184#r10169
2014-10-19 06:29clanlNote Added: 0030671
2014-11-22 14:30Tristan AlkaiNote Added: 0031128
2014-11-24 06:58FootkerchiefRelationship addedrelated to 0007554
2014-11-24 06:58FootkerchiefAssigned To => Footkerchief
2014-11-24 06:58FootkerchiefStatusnew => needs feedback
2014-11-25 13:25Toady OneNote Added: 0031183
2014-11-25 13:25Toady OneStatusneeds feedback => resolved
2014-11-25 13:25Toady OneResolutionopen => fixed
2014-11-25 13:25Toady OneAssigned ToFootkerchief => Toady One
2014-11-25 16:18lethosorFixed in Version => Next Version
2015-12-11 18:41DwarfuRelationship addedparent of 0009246

Notes
(0016703)
Kogut   
2011-03-27 23:43   
(edited on: 2011-03-27 23:44)
I suggest to upload save

(0016705)
Kumquat   
2011-03-28 01:03   
I was about to report this same bug in .22, and this seems to be happening in .24 too.

All I had was 5 yaks in a 20x20 pasture.

I haven't noticed pigs or sheep fighting yet.
(0016713)
danaris   
2011-03-28 04:42   
I had a similar problem with a water buffalo bull, a reindeer calf, and a horse in a 10x10 pasture in .22 (I think, might have been .21). I had to move the water buffalo bull to its own pasture separated from the others.
(0016718)
Granite26   
2011-03-28 08:44   
Is the problem that they are all being dropped off at the same point and not spreading out?
(0016845)
DoktorV   
2011-03-31 04:37   
(edited on: 2011-03-31 05:17)
Livestock fighting if kept in excessively close confinement is intended behavior, but I have observed that they start fighting immediately if several animals are herded to the same pasture at the same time. Even though the pasture may be quite large, they start fighting within seconds.

I now have a save where I designated pasturing immediately upon arrival. The combat reports show animals fighting the same in-game day.
http://dffd.wimbli.com/file.php?id=4090 [^]

I suspect that something like this is occurring: If several animals are herded to the same pasture at about the same time, they are all dropped off on the same tile, and the animal aggression code is triggering too fast. Additionally, I think that grazing animals probably don't move until they have eaten all the grass on the tile they're standing on, which aggravates the problem. I don't know what sort of movement routine is operating on the poultry.

(0016846)
dieffenbachj   
2011-03-31 05:23   
I've had severe problems where I have a massive pasture, only 3 or 4 animals in it... but since they INSIST on grazing in the same area, I'll glance over and I'll always see two of them either adjacent to each other, or in the same tile.

And inevitably, even with only a couple animals on a huge pasture, there will be deaths and missing limbs and broken spines and all manner of nasty business.

I think animals in a pen need to have code for spreading out. It's not just enough to have them drift apart on their own--I think they need to actively try to keep space between them (and then, if too many animals are put into one pen / the grass is only edible on one side, THEN they'll get closer and start dying...)

It's not even a problem with being dropped off and not spreading out, since this behavior will be maintained for years. There's no point in keeping animals for milk or cloth, just slaughter them as soon as possible lest they cripple or kill each other because you put two in the same huge pen and they decided to sit on each other's faces...
(0016862)
danaris   
2011-03-31 10:17   
Oh, I think I should also note:

I have noticed some of my animals seeming to "follow" each other, with a horse and a mule in a single square, then when one moves, the other moves immediately after to the same square.

I have not observed these "stacked" animals fighting; however, I can't be sure that they don't eventually.

~ TGC
(0016863)
Kumquat   
2011-03-31 10:25   
The problem is that animals browse on pastures in "typewriter order".

Every hungry animal ends up packed onto the same tile and start fighting.

Larger animals are worse with this, since they eat more. Sheep manage fairly well, yaks and water buffaloes are nearly impossible, can't have more than one or two on a pasture of any size. They are pretty much always hungry.
(0021983)
Kogut   
2012-04-01 07:38   
34.07 save: http://dffd.wimbli.com/submit.php?action=message&fid=6058 [^]
(0027184)
King Mir   
2014-07-21 23:33   
(edited on: 2014-07-21 23:35)
According to bug 7554(http://www.bay12games.com/dwarves/mantisbt/view.php?id=7554 [^]), in 0.40 the pendulum swung the other way, and animals don't fight much at all. So this should probably be closed. The typewriter problem still exists however.

(0030671)
clanl   
2014-10-19 06:29   
Can this be marked as resolved?
It seems this should be fixed with 0004367
(0031128)
Tristan Alkai   
2014-11-22 14:30   
@clanl: Not so fast.

This bug and 0004367 refer to different things: respectively, an effect and a cause of overcrowding. With 0004367 fixed, this one will manifest less frequently, but animals grazing in typewriter order is not the only thing that can lead to crowding despite a suitably large pasture (the easiest example is breeding poultry and packing their next boxes too close together). That fix is neither necessary nor sufficient to call this bug resolved.

That said, I agree with King Mir that 0007554 may be an undocumented fix of this one. Apologies if this makes the previous comments come across as overly pedantic.

On the other hand, the code (requested by DoktorV) for an animal to perceive itself as crowded and attempt to spread out would have other benefits.
1. Multiple animals on the same tile are more difficult for the player to count.
2. Attempting to avoid crowds could help keep multiple grazers from targeting the same patch of grass.
3. Attempting to maintain space between animals could help pastured livestock avoid presenting a roadblock to pathing dwarves (assuming, of course, that the pasture itself is big enough).
(0031183)
Toady One   
2014-11-25 13:25   
I haven't worked on any spreading-out code, but with the typewriter fix from before and timer balance (for 0.40.19) this'll be closed enough. We can revisit further behavior off the tracker (unless something goes wrong).