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:Item token"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Fixing links within namespace (464/997))
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{Quality|Superior|01:25, 8 July 2013 (UTC)}}
 
{{av}}
 
{{av}}
:''You may be looking for {{L|Item definition tokens}}.''
+
:''You may be looking for [[Item definition token]].''
These are to be used with certain {{L|Creature Tokens}} (such as ITEMCORPSE) as well as in {{L|Reactions}}.
+
These are to be used with certain [[Creature token]] (such as ITEMCORPSE) as well as in [[Reactions]].
  
 +
An item is described by four tokens, as such:
  
An item is described by four [[tokens]], as such:
+
[<whatever is asking for the token>:TYPE:SUBTYPE:MATERIAL:MATGLOSS]
  
[<whatever is asking for the token>:TYPE:SUBTYPE:MATERIAL:MATGLOSS]
+
Nearly all items are made of a [[Material token|material]], though several types expect either a creature ID or a plant ID instead.
  
 
==Item type tokens==
 
==Item type tokens==
  
{| {{prettytable}}
+
{| {{prettytable}} class="sortable"
 
|- bgcolor="#ddd"
 
|- bgcolor="#ddd"
! Token !! Description
+
! # !! Token !! Description
 +
|-
 +
| 0 || {{text anchor|BAR}} || [[Bar]]s, such as [[metal]], [[fuel]], or [[soap]].
 +
|-
 +
| 1 || {{text anchor|SMALLGEM}} || Cut [[gem]]stones usable in [[jeweler's workshop]]
 
|-
 
|-
| AMMO || Ammunition for hand-held weapons.  Subtypes come from item_ammo.
+
| 2 || {{text anchor|BLOCKS}} || [[Block]]s of any kind.
 
|-
 
|-
| AMULET || Amulets.
+
| 3 || {{text anchor|ROUGH}} || Rough [[gem]]stones or raw [[glass]].
 
|-
 
|-
| ANIMALTRAP || Traps for animals.
+
| 4 || {{text anchor|STONE}} || Raw mined [[stone]].
 
|-
 
|-
| ANVIL || Anvils.
+
| 5 || {{text anchor|WOOD}} || Wooden [[log]]s. Material must be WOOD.
 
|-
 
|-
| ARMOR || Armor and clothing worn on the upper body.  Subtypes come from item_armor.
+
| 6 || {{text anchor|DOOR}} || [[Door]]s.
 
|-
 
|-
| ARMORSTAND || Armor stands.
+
| 7 || {{text anchor|FLOODGATE}} || [[Floodgate]]s.
 
|-
 
|-
| BACKPACK || Backpacks.
+
| 8 || {{text anchor|BED}} || [[Bed]]s.
 
|-
 
|-
| BALLISTAPARTS || Ballista parts.
+
| 9 || {{text anchor|CHAIR}} || [[Chair]]s and thrones.
 
|-
 
|-
| BALLISTARROWHEAD || Arrow heads for ballista bolts.
+
| 10 || {{text anchor|CHAIN}} || [[Chain]]s and [[rope]]s.
 
|-
 
|-
| BAR || Both metal and non-metal bars.
+
| 11 || {{text anchor|FLASK}} || [[Flask]]s.
 
|-
 
|-
| BARREL || Barrels.
+
| 12 || {{text anchor|GOBLET}} || [[Goblet]]s.
 
|-
 
|-
| BED || Beds.
+
| 13 || {{text anchor|INSTRUMENT}} || Musical [[instrument]]s.  Subtypes come from item_instrument.txt
 
|-
 
|-
| BIN || Bins.
+
| 14 || {{text anchor|TOY}} || [[Toy]]s.  Subtypes come from item_toy.txt
 
|-
 
|-
| BLOCKS || Blocks of any kind.
+
| 15 || {{text anchor|WINDOW}} || Glass [[window]]s.
 
|-
 
|-
| BONES || Bones from creatures. Material is a creature ID.
+
| 16 || {{text anchor|CAGE}} || [[Cage]]s.
 
|-
 
|-
| BOX || Chests (wood), coffers (stone), boxes (glass), and bags (cloth or leather).
+
| 17 || {{text anchor|BARREL}} || [[Barrel]]s.
 
|-
 
|-
| BRACELET || Bracelets.
+
| 18 || {{text anchor|BUCKET}} || [[Bucket]]s.
 
|-
 
|-
| BUCKET || Buckets.
+
| 19 || {{text anchor|ANIMALTRAP}} || [[Animal trap]]s.
 
|-
 
|-
| CABINET || Cabinets.
+
| 20 || {{text anchor|TABLE}} || [[Table]]s.
 
|-
 
|-
| CAGE || Cages.
+
| 21 || {{text anchor|COFFIN}} || [[Coffin]]s.
 
|-
 
|-
| CATAPULTPARTS || Catapult parts.
+
| 22 || {{text anchor|STATUE}} || [[Statue]]s.
 
|-
 
|-
| CHAIN || Chains and ropes.
+
| 23 || {{text anchor|CORPSE}} || [[Corpse]]s. Has no material.
 
|-
 
|-
| CHAIR || Chairs and thrones.
+
| 24 || {{text anchor|WEAPON}} || [[Weapon]]s.  Subtypes come from item_weapon.txt
 
|-
 
|-
| CHEESE || Cheeses.
+
| 25 || {{text anchor|ARMOR}} || [[Armor]] and clothing worn on the upper body.  Subtypes come from item_armor.txt
 
|-
 
|-
| CLOTH || Cloth made at the loom.
+
| 26 || {{text anchor|SHOES}} || Armor and clothing worn on the feet.  Subtypes come from item_shoes.txt
 
|-
 
|-
| COIN || Coins.
+
| 27 || {{text anchor|SHIELD}} || [[Shield]]s and bucklers.  Subtypes come from item_shield.txt
 
|-
 
|-
| COFFIN || Coffins and caskets.
+
| 28 || {{text anchor|HELM}} || Armor and clothing worn on the head.  Subtypes come from item_helm.txt
 
|-
 
|-
| CORPSE || Dead things.
+
| 29 || {{text anchor|GLOVES}} || Armor and clothing worn on the hands.  Subtypes come from item_gloves.txt. Note that created gloves will not be flagged as "left" or "right" and thus cannot be equipped by anyone.
 
|-
 
|-
| CORPSEPIECE || Body parts.
+
| 30 || {{text anchor|BOX}} || [[Container|Chest]]s (wood), coffers (stone), boxes (glass), and bags (cloth or leather).
 
|-
 
|-
| CROWN || Crowns.
+
| 31 || {{text anchor|BIN}} || [[Bin]]s.
 
|-
 
|-
| DOOR || Doors.
+
| 32 || {{text anchor|ARMORSTAND}} || [[Armor stand]]s.
 
|-
 
|-
| DRINK || Liquids from brewed plants.
+
| 33 || {{text anchor|WEAPONRACK}} || [[Weapon rack]]s.
 
|-
 
|-
| EARRING || Earrings.
+
| 34 || {{text anchor|CABINET}} || [[Cabinet]]s.
 
|-
 
|-
| EXTRACT || Extracts from certain plants and creatures.
+
| 35 || {{text anchor|FIGURINE}} || [[Idol]]s.
 
|-
 
|-
| FIGURINE || Idols.
+
| 36 || {{text anchor|AMULET}} || [[Amulet]]s.
 
|-
 
|-
| FISH || Prepared fish. Material is a creature ID.
+
| 37 || {{text anchor|SCEPTER}} || [[Scepter]]s.
 
|-
 
|-
| FISH_RAW || Unprepared fish. Material is a creature ID.
+
| 38 || {{text anchor|AMMO}} || [[Ammunition]] for hand-held weapons. Subtypes come from item_ammo.txt
 
|-
 
|-
| FLASK || Flasks.
+
| 39 || {{text anchor|CROWN}} || [[Crown]]s.
 
|-
 
|-
| FLOODGATE || Floodgates.
+
| 40 || {{text anchor|RING}} || [[Ring]]s.
 
|-
 
|-
| FOOD || Prepared food.
+
| 41 || {{text anchor|EARRING}} || [[Earring]]s.
 
|-
 
|-
| GEM || Large gems.
+
| 42 || {{text anchor|BRACELET}} || [[Bracelet]]s.
 
|-
 
|-
| GLOB || Fats, tallows and small bits of molten rock/metal. Also works with blood, vomit, mud, filth, salt, grime and unknown substance.
+
| 43 || {{text anchor|GEM}} || Large [[gem]]s.
 
|-
 
|-
| GLOVES || Clothing worn on the hands.  Subtypes come from item_gloves.
+
| 44 || {{text anchor|ANVIL}} || [[Anvil]]s.
 
|-
 
|-
| GOBLET || Goblets, cups (wooden), and mugs (rock).
+
| 45 || {{text anchor|CORPSEPIECE}} || [[Body part]]s. Has no material.
 
|-
 
|-
| HELM || Armor and clothing worn on the head. Subtypes come from item_helm.
+
| 46 || {{text anchor|REMAINS}} || Dead [[vermin]] bodies and large creature [[chunk]]s. Material is a creature ID.
 
|-
 
|-
| INSTRUMENT || Musical instruments. Subtypes come from item_instrument.
+
| 47 || {{text anchor|MEAT}} || Butchered [[meat]]. Material is a creature ID.
 
|-
 
|-
| LEAVES || Leaves from certain plants after processing.
+
| 48 || {{text anchor|FISH}} || Prepared [[fish]]. Material is a creature ID.
 
|-
 
|-
| LIQUID_MISC || Miscellaneous liquids such as lye.
+
| 49 || {{text anchor|FISH_RAW}} || Unprepared [[fish]]. Material is a creature ID.
 
|-
 
|-
| MEAT || Butchered meat. Material is a creature ID.
+
| 50 || {{text anchor|VERMIN}} || Live [[vermin]]. Material is a creature ID.
 
|-
 
|-
| MILLSTONE || Millstones.
+
| 51 || {{text anchor|PET}} || Tame [[vermin]]. Material is a creature ID.
 
|-
 
|-
| PANTS || Armor and clothing worn on the legs. Subtypes come from item_pants.
+
| 52 || {{text anchor|SEEDS}} || [[Seed]]s from plants. Material is a plant ID.
 
|-
 
|-
| PET || Tame vermin. Material is a creature ID.
+
| 53 || {{text anchor|PLANT}} || [[Plant]]s. Material is a plant ID.
 
|-
 
|-
| PIPE_SECTION || Lengths of pipe.
+
| 54 || {{text anchor|SKIN_RAW}} || Untanned [[skin]]s. Material is a creature ID.
 
|-
 
|-
| PLANT || Plants. Material is a plant ID.
+
| 55 || {{text anchor|SKIN_TANNED}} || [[Leather]]. Material must be LEATHER.
 
|-
 
|-
| POTION || ???
+
| 56 || {{text anchor|BONES}} || [[Bone]]s from creatures. Material is a creature ID.
 
|-
 
|-
| POWDER_MISC || Powders (such as flour or dye) from milled plants; bone meal.
+
| 57 || {{text anchor|SHELL}} || [[Shell]]s from creatures that have them. Material is a creature ID.
 
|-
 
|-
| QUIVER || Quivers.
+
| 58 || {{text anchor|LEAVES}} || Leaves, usually from [[quarry bush]]es. Material is a plant ID.
 
|-
 
|-
| REMAINS || Dead vermin bodies. Material is a creature ID.
+
| 59 || {{text anchor|THREAD}} || [[Thread]] gathered from webs or made at the [[farmer's workshop]].
 
|-
 
|-
| RING || Rings.
+
| 60 || {{text anchor|CLOTH}} || [[Cloth]] made at the [[loom]].
 
|-
 
|-
| ROCK || Pebbles (more useful in {{L|Thrower|adventure mode}}.)
+
| 61 || {{text anchor|TOTEM}} || Skull [[totem]]s.
 
|-
 
|-
| ROUGH || Raw gemstones.
+
| 62 || {{text anchor|SKULL}} || [[Skull]]s of dead creatures. Does not work correctly - raws are parsed as a standard material+matgloss, but the item interprets the material as a creature ID. See [[40d Talk:Item token#Skulls|talk]] for more information.
 
|-
 
|-
| SAND || Sand.
+
| 63 || {{text anchor|PANTS}} || Armor and clothing worn on the legs.  Subtypes come from item_pants.txt
 
|-
 
|-
| SCEPTER || Scepters.
+
| 64 || {{text anchor|BACKPACK}} || [[Backpack]]s.
 
|-
 
|-
| SEEDS || Seeds from plants.
+
| 65 || {{text anchor|QUIVER}} || [[Quiver]]s.
 
|-
 
|-
| SHELL || Shells from creatures that have them. Material is a creature ID.
+
| 66 || {{text anchor|CATAPULTPARTS}} || [[Catapult]] parts.
 
|-
 
|-
| SHIELD || Shields and bucklers.  Subtypes come from item_shield.
+
| 67 || {{text anchor|BALLISTAPARTS}} || [[Ballista]] parts.
 
|-
 
|-
| SHOES || Armor and clothing worn on the feet.  Subtypes come from item_shoes.
+
| 68 || {{text anchor|SIEGEAMMO}} || Siege engine ammunition.  Subtypes come from item_siegeammo.txt
 
|-
 
|-
| SIEGEAMMO || Siege ammo.  Subtypes come from item_siegeammo.
+
| 69 || {{text anchor|BALLISTAARROWHEAD}} || Ballista arrow heads.
 
|-
 
|-
| SKIN_RAW || Untanned skins.
+
| 70 || {{text anchor|TRAPPARTS}} || [[Mechanism]]s.
 
|-
 
|-
| SKIN_TANNED || Tanned skins.
+
| 71 || {{text anchor|TRAPCOMP}} || [[Trap component]]s.  Subtypes come from item_trapcomp.txt
 
|-
 
|-
| SKULL || Skulls of dead critters. Possibly broken, neither BONE material or creature IDs seem to work.
+
| 72 || {{text anchor|EXTRACT}} || [[Extract]]s from certain plants and creatures. Material is either CREATURE or PLANT, and matgloss is a creature ID or plant ID.
 
|-
 
|-
| SMALLGEM || Cut gemstones usable in jeweler's workshop
+
| 73 || {{text anchor|POTION}} || Potions. Not implemented.
 
|-
 
|-
| STATUE || Statues.
+
| 74 || {{text anchor|DRINK}} || [[Alcohol]]ic drinks.
 
|-
 
|-
| STONE || Raw mined stone.
+
| 75 || {{text anchor|POWDER_MISC}} || Powders such as [[flour]], [[dye]], [[sand]], or [[bone meal]].
 
|-
 
|-
| TABLE || Tables.
+
| 76 || {{text anchor|CHEESE}} || Pieces of [[cheese]]. Material is either CREATURE or PLANT, and matgloss is a creature ID or plant ID.
 
|-
 
|-
| THREAD || Thread gathered from webs or made at the farmer's workshop.
+
| 77 || {{text anchor|FOOD}} || [[Prepared meal]]s. Subtypes come from item_food.txt
 
|-
 
|-
| TOTEM || Totems.
+
| 78 || {{text anchor|LIQUID_MISC}} || Liquids such as [[water]] and [[lye]].
 
|-
 
|-
| TOY || Toys.  Subtypes come from item_toy.
+
| 79 || {{text anchor|COIN}} || [[Coin]]s.
 
|-
 
|-
| TRAPCOMP || Weapons for traps only. Subtypes come from item_trapcomp.
+
| 80 || {{text anchor|GLOB}} || [[Fat]], [[tallow]], and small bits of molten rock/metal. Also works with blood, vomit, mud, filth, salt, grime and unknown substance.
 
|-
 
|-
| TRAPPARTS || Mechanisms.
+
| 81 || {{text anchor|ROCK}} || Small rocks (usually [[Thrower|thrown]] in [[adventurer mode]]).
 
|-
 
|-
| VERMIN || Small pseudo-creatures. Material is a creature ID.
+
| 82 || {{text anchor|PIPE_SECTION}} || [[Pipe section]]s.
 
|-
 
|-
| WEAPON || Weapons.  Subtypes come from item_weapon.
+
| 83 || {{text anchor|HATCH_COVER}} || [[Hatch cover]]s.
 
|-
 
|-
| WEAPONRACK || Weapon racks.
+
| 84 || {{text anchor|GRATE}} || [[Grate]]s.
 
|-
 
|-
| WINDOW || Windows.
+
| 85 || {{text anchor|QUERN}} || [[Quern]]s.
 
|-
 
|-
| WOOD || Wooden logs.
+
| 86 || {{text anchor|MILLSTONE}} || [[Millstone]]s.
 
|}
 
|}
  
Line 189: Line 195:
 
Most item types have no subtypes. "NONE" or "NO_SUBTYPE" (the raws use NO_SUBTYPE, saving an embark profile uses NONE) is used for the subtype position for these. For items that do have subtypes, the subtypes are defined from the raws for that item type as noted above.
 
Most item types have no subtypes. "NONE" or "NO_SUBTYPE" (the raws use NO_SUBTYPE, saving an embark profile uses NONE) is used for the subtype position for these. For items that do have subtypes, the subtypes are defined from the raws for that item type as noted above.
  
==Material tokens==
+
{{Category|Modding}}
 
+
{{Category|Tokens}}
The material tokens have been moved to the new {{L|Material tokens}} page.
 
 
 
[[Category:Modding]]
 
[[Category:Tokens]]
 

Latest revision as of 16:49, 22 December 2025

This article is about an older version of DF.
You may be looking for Item definition token.

These are to be used with certain Creature token (such as ITEMCORPSE) as well as in Reactions.

An item is described by four tokens, as such:

[<whatever is asking for the token>:TYPE:SUBTYPE:MATERIAL:MATGLOSS]

Nearly all items are made of a material, though several types expect either a creature ID or a plant ID instead.

Item type tokens[edit]

# Token Description
0  BAR Bars, such as metal, fuel, or soap.
1  SMALLGEM Cut gemstones usable in jeweler's workshop
2  BLOCKS Blocks of any kind.
3  ROUGH Rough gemstones or raw glass.
4  STONE Raw mined stone.
5  WOOD Wooden logs. Material must be WOOD.
6  DOOR Doors.
7  FLOODGATE Floodgates.
8  BED Beds.
9  CHAIR Chairs and thrones.
10  CHAIN Chains and ropes.
11  FLASK Flasks.
12  GOBLET Goblets.
13  INSTRUMENT Musical instruments. Subtypes come from item_instrument.txt
14  TOY Toys. Subtypes come from item_toy.txt
15  WINDOW Glass windows.
16  CAGE Cages.
17  BARREL Barrels.
18  BUCKET Buckets.
19  ANIMALTRAP Animal traps.
20  TABLE Tables.
21  COFFIN Coffins.
22  STATUE Statues.
23  CORPSE Corpses. Has no material.
24  WEAPON Weapons. Subtypes come from item_weapon.txt
25  ARMOR Armor and clothing worn on the upper body. Subtypes come from item_armor.txt
26  SHOES Armor and clothing worn on the feet. Subtypes come from item_shoes.txt
27  SHIELD Shields and bucklers. Subtypes come from item_shield.txt
28  HELM Armor and clothing worn on the head. Subtypes come from item_helm.txt
29  GLOVES Armor and clothing worn on the hands. Subtypes come from item_gloves.txt. Note that created gloves will not be flagged as "left" or "right" and thus cannot be equipped by anyone.
30  BOX Chests (wood), coffers (stone), boxes (glass), and bags (cloth or leather).
31  BIN Bins.
32  ARMORSTAND Armor stands.
33  WEAPONRACK Weapon racks.
34  CABINET Cabinets.
35  FIGURINE Idols.
36  AMULET Amulets.
37  SCEPTER Scepters.
38  AMMO Ammunition for hand-held weapons. Subtypes come from item_ammo.txt
39  CROWN Crowns.
40  RING Rings.
41  EARRING Earrings.
42  BRACELET Bracelets.
43  GEM Large gems.
44  ANVIL Anvils.
45  CORPSEPIECE Body parts. Has no material.
46  REMAINS Dead vermin bodies and large creature chunks. Material is a creature ID.
47  MEAT Butchered meat. Material is a creature ID.
48  FISH Prepared fish. Material is a creature ID.
49  FISH_RAW Unprepared fish. Material is a creature ID.
50  VERMIN Live vermin. Material is a creature ID.
51  PET Tame vermin. Material is a creature ID.
52  SEEDS Seeds from plants. Material is a plant ID.
53  PLANT Plants. Material is a plant ID.
54  SKIN_RAW Untanned skins. Material is a creature ID.
55  SKIN_TANNED Leather. Material must be LEATHER.
56  BONES Bones from creatures. Material is a creature ID.
57  SHELL Shells from creatures that have them. Material is a creature ID.
58  LEAVES Leaves, usually from quarry bushes. Material is a plant ID.
59  THREAD Thread gathered from webs or made at the farmer's workshop.
60  CLOTH Cloth made at the loom.
61  TOTEM Skull totems.
62  SKULL Skulls of dead creatures. Does not work correctly - raws are parsed as a standard material+matgloss, but the item interprets the material as a creature ID. See talk for more information.
63  PANTS Armor and clothing worn on the legs. Subtypes come from item_pants.txt
64  BACKPACK Backpacks.
65  QUIVER Quivers.
66  CATAPULTPARTS Catapult parts.
67  BALLISTAPARTS Ballista parts.
68  SIEGEAMMO Siege engine ammunition. Subtypes come from item_siegeammo.txt
69  BALLISTAARROWHEAD Ballista arrow heads.
70  TRAPPARTS Mechanisms.
71  TRAPCOMP Trap components. Subtypes come from item_trapcomp.txt
72  EXTRACT Extracts from certain plants and creatures. Material is either CREATURE or PLANT, and matgloss is a creature ID or plant ID.
73  POTION Potions. Not implemented.
74  DRINK Alcoholic drinks.
75  POWDER_MISC Powders such as flour, dye, sand, or bone meal.
76  CHEESE Pieces of cheese. Material is either CREATURE or PLANT, and matgloss is a creature ID or plant ID.
77  FOOD Prepared meals. Subtypes come from item_food.txt
78  LIQUID_MISC Liquids such as water and lye.
79  COIN Coins.
80  GLOB Fat, tallow, and small bits of molten rock/metal. Also works with blood, vomit, mud, filth, salt, grime and unknown substance.
81  ROCK Small rocks (usually thrown in adventurer mode).
82  PIPE_SECTION Pipe sections.
83  HATCH_COVER Hatch covers.
84  GRATE Grates.
85  QUERN Querns.
86  MILLSTONE Millstones.

Item subtype tokens[edit]

Most item types have no subtypes. "NONE" or "NO_SUBTYPE" (the raws use NO_SUBTYPE, saving an embark profile uses NONE) is used for the subtype position for these. For items that do have subtypes, the subtypes are defined from the raws for that item type as noted above.