40d:Cat cancels Store Item in Stockpile: Too injured
|This article is about an older version of DF.|
|This article or section has been rated D for Dwarf. It may include witty humour, not-so-witty humour, bad humour, in-jokes, pop culture references, and references to the Bay12 forums. Don't believe everything you read, and if you miss some of the references, don't worry. It was inevitable.|
- Your cat kills a vermin and drops it at your feet.
- You respond "Thank you, now go get rid of that thing right now".
- Your cat reaches down to pick up the vermin remains, but realizes it has no hands.
- It cries out "My hands! My beautiful hands! Someone has chopped off my beautiful han... wait, I'm a cat, I don't have hands. Right," and then continues on with its business.
This error announcement is actually caused by an old bug in the system which was reintroduced in 40d. When a pet cat kills a vermin, it picks it up with its mouth and carries it to its owner, to bask in the display of gratitude that every cat owner shows upon being gifted small dead animals.
Once it gets to its owner, instead of dropping the vermin remains on the floor (as it should), it attempts to drop off the vermin remains at an appropriate location (much like herbalists do with gathered plants), resulting in it being given a "Store Item in Stockpile" job targeted at one of your refuse stockpiles. However, since cats do not have any body parts capable of grasping, the job cancels with the reason "too injured" and the vermin is dropped on the ground.
This behavior does not occur with stray cats (since they don't have an owner, they leave vermin remains exactly where they were killed), nor will it occur if you have no accessible refuse stockpiles.
Fixing the bug
As your cat and vermin population expands this message becomes more and more common, but it is easy enough to fix by modding (the exact steps are explained below). You don't even have to generate a new world.
Open raw/objects/body_default.txt and add a new entry:
This creates a new body part in your dwarf universe. Specifically, a mouth which can pick things up. Now we need to attach this body part to the cat!
So open raw/objects/creature_domestic.txt and edit the cat to:
[CREATURE:CAT] [NAME:cat:cats:cat] [TILE:'c'][COLOR:0:0:1] [VERMINHUNTER] [PETVALUE:20] [CARNIVORE][NATURAL][PET] [LARGE_ROAMING] [COMMON_DOMESTIC][BENIGN] [PREFSTRING:aloofness] [BODY:QUADRUPED:TAIL:2EYES:2EARS:NOSE:2LUNGS:HEART:GUTS:ORGANS:THROAT:NECK:SPINE:BRAIN:CAT_MOUTH] [BODYGLOSS:PAW] [SIZE:3] [MAXAGE:10:20] [ATTACK:MAIN:BYTYPE:MOUTH:bite:bites:1:6:GORE][ATTACKFLAG_CANLATCH] [CHILD:1][CHILDNAME:kitten:kittens] [FAT:1] [DIURNAL] [STANDARD_FLESH] [HOMEOTHERM:10070] [LAYERING:100] [SWIMS_INNATE][SWIM_SPEED:2500] [MUNDANE]
And you're done.
Note that you don't have to edit the [ATTACK] line, even though it contains a MOUTH too. This is because the "mouth" in this case is referring to the [MOUTH] body part token, not the body part itself (you'll note that our CAT_MOUTH has this mouth tag, too).
It should be noted that this fix does not actually correct the underlying behavior - instead, it allows cats to successfully complete their "store item in stockpile" jobs and haul the vermin remains to your refuse stockpiles.