v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "40d:Cat cancels Store Item in Stockpile: Too injured"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m (clean up)
Line 1: Line 1:
 +
Your cat kills a [[vermin]].
 +
 +
It reaches down to pick it up.
 +
 +
It realizes it has no hands, 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.
 +
 
{{D for Dwarf}}
 
{{D for Dwarf}}
  
This error message is actually often caused by a bug in the system, existing in prior versions, and which was reintroduced in 40d. When a [[pet]] [[cat]] kills a [[vermin]], it will attempt to pick up the vermin in its mouth and carry it to their owner. However, the cat's mouth does not possess the [GRASP] tag, so it registers as unable to pick up the item and generates the message. Secondary programming picks up the task and lets the cat carry the vermin afterwards. This bug can be fixed by [[modding]] the cat entity token by adding [GRASP] to the mouth part of the cat.[http://www.bay12games.com/forum/index.php?topic=25198.0]
+
This error message is actually caused by an old bug in the system which was reintroduced in 40d. When a [[pet]] [[cat]] kills a [[vermin]] it will attempt to pick it up and carry it to their owner, to bask in the display of gratitude that every cat owner shows upon being gifted small dead animals.  
  
==Alternate explanation==
+
However the cat's mouth does not possess the <tt>[GRASP]</tt> tag, so it registers as unable to pick up the item and so generates this error message. Frustratingly, secondary programming picks up the task and lets the cat carry the vermin anyway.
Your cat kills a vermin. It reaches down to pick it up with its hands, realizes it has no hands, 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.
 
  
== Resolution ==
+
== 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]].
 +
 
 +
'''Step One'''
  
 
Open <tt>raw/objects/body_default.txt</tt> and add a new entry:
 
Open <tt>raw/objects/body_default.txt</tt> and add a new entry:
Line 13: Line 21:
 
  [BP:CAT_MOUTH:mouth][CONTYPE:HEAD][MOUTH][SMALL][EMBEDDED][APERTURE][GRASP]
 
  [BP:CAT_MOUTH:mouth][CONTYPE:HEAD][MOUTH][SMALL][EMBEDDED][APERTURE][GRASP]
  
This creates a new body part in your dwarf universe. Now we need to attach this body part to the cat! So open <tt>raw/objects/creature_domestic.txt</tt> and edit the cat to:
+
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!
 +
 
 +
'''Step Two'''
 +
 
 +
So open <tt>raw/objects/creature_domestic.txt</tt> and edit the cat to:
  
 
  [CREATURE:CAT]
 
  [CREATURE:CAT]
Line 38: Line 50:
 
         [MUNDANE]
 
         [MUNDANE]
  
Note that it can still attack with a normal mouth (you don't need to edit the ATTACK line) - in this case "Mouth" is referring to a Tag, not a Body-part (you'll note that our <tt>CAT_MOUTH</tt> has a mouth tag, too).
+
And you're done.
 +
 
  
You do not have to generate a new world for this to apply.
+
Note that you don't have to edit the <tt>[ATTACK]</tt> line, even though it contains a <tt>MOUTH</tt> too. This is because the "mouth" in this case is referring to a Tag, not a Body-part (you'll note that our <tt>CAT_MOUTH</tt> has a mouth tag, too).
  
  
 
{{Errors FAQ}}
 
{{Errors FAQ}}

Revision as of 07:41, 7 November 2008

Your cat kills a vermin.

It reaches down to pick it up.

It realizes it has no hands, 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.

D4Dwarf.png 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.


This error message is actually caused by an old bug in the system which was reintroduced in 40d. When a pet cat kills a vermin it will attempt to pick it up and carry it to their owner, to bask in the display of gratitude that every cat owner shows upon being gifted small dead animals.

However the cat's mouth does not possess the [GRASP] tag, so it registers as unable to pick up the item and so generates this error message. Frustratingly, secondary programming picks up the task and lets the cat carry the vermin anyway.

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.

Step One

Open raw/objects/body_default.txt and add a new entry:

[BODY:CAT_MOUTH]
[BP:CAT_MOUTH:mouth][CONTYPE:HEAD][MOUTH][SMALL][EMBEDDED][APERTURE][GRASP]

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!

Step Two

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 a Tag, not a Body-part (you'll note that our CAT_MOUTH has a mouth tag, too).