Changes

m
→‎Overview: fix typo
Line 30: Line 30:  
# Each item type now has an <samp>ItemDataDefinition</samp> class which tells the game how to handle it. SMAPI mods can add custom item type definitions or patch the vanilla logic. Each definition has a unique prefix (like <samp>(O)</samp> for objects) which is used in qualified item IDs. The vanilla types are bigcraftables (<samp>(BC)</samp>), boots (<samp>(B)</samp>), furniture (<samp>(F)</samp>), hats (<samp>(H)</samp>), objects (<samp>(O)</samp>), pants (<samp>(P)</samp>), shirts (<samp>(S)</samp>), and weapons (<samp>(W)</samp>).</li>
 
# Each item type now has an <samp>ItemDataDefinition</samp> class which tells the game how to handle it. SMAPI mods can add custom item type definitions or patch the vanilla logic. Each definition has a unique prefix (like <samp>(O)</samp> for objects) which is used in qualified item IDs. The vanilla types are bigcraftables (<samp>(BC)</samp>), boots (<samp>(B)</samp>), furniture (<samp>(F)</samp>), hats (<samp>(H)</samp>), objects (<samp>(O)</samp>), pants (<samp>(P)</samp>), shirts (<samp>(S)</samp>), and weapons (<samp>(W)</samp>).</li>
 
# Each item now has a locally unique string ID (<samp>ItemID</samp>) and a globally unique string ID (<samp>QualifiedItemID</samp>). The <samp>ItemID</samp> is assumed to only contain alphanumeric/underscore/dot characters so they can be used in fields delimited with spaces/slashes/commas, in filenames, etc. The <samp>QualifiedItemID</samp> is auto-generated by prefixing the <samp>ItemID</samp> with the item type identifier.<p>For legacy reasons, the <samp>ItemID</samp> for vanilla item isn't globally unique. For example, Pufferfish (object 128) and Mushroom Box (bigcraftable 128) both have <samp>ItemID: 128</samp>. They can be distinguished by their <samp>QualifiedItemID</samp>, which is <samp>(O)128</samp> and <samp>(BC)128</samp> respectively.</p><p>For mod items, both IDs should be globally unique. By convention the <samp>ItemID</samp> should include your mod ID or author name, like <samp>Example.ModId_ItemName</samp>.</p>
 
# Each item now has a locally unique string ID (<samp>ItemID</samp>) and a globally unique string ID (<samp>QualifiedItemID</samp>). The <samp>ItemID</samp> is assumed to only contain alphanumeric/underscore/dot characters so they can be used in fields delimited with spaces/slashes/commas, in filenames, etc. The <samp>QualifiedItemID</samp> is auto-generated by prefixing the <samp>ItemID</samp> with the item type identifier.<p>For legacy reasons, the <samp>ItemID</samp> for vanilla item isn't globally unique. For example, Pufferfish (object 128) and Mushroom Box (bigcraftable 128) both have <samp>ItemID: 128</samp>. They can be distinguished by their <samp>QualifiedItemID</samp>, which is <samp>(O)128</samp> and <samp>(BC)128</samp> respectively.</p><p>For mod items, both IDs should be globally unique. By convention the <samp>ItemID</samp> should include your mod ID or author name, like <samp>Example.ModId_ItemName</samp>.</p>
# Custom items can now provide their own item texture, specified in a new field in the item dat assets (see below). The item's <samp>ParentSheetIndex</samp> field is the index within that texture.
+
# Custom items can now provide their own item texture, specified in a new field in the item data assets (see below). The item's <samp>ParentSheetIndex</samp> field is the index within that texture.
    
In other words, the three important fields for items are:
 
In other words, the three important fields for items are:
translators
8,447

edits