Modding:Item Json Properties: Difference between revisions

From Vintage Story Wiki
(13 intermediate revisions by 2 users not shown)
Line 2: Line 2:
== Overview ==
== Overview ==
A complete list of all available properties
A complete list of all available properties
Definitions:
'''Key''' - The name of the property, which should be used as it appears in the column.
'''Value''' - A component of a property.
'''Array''' - A list of objects or values that can be referenced in code.
'''String''' - A sequence of characters that can be used as an identifier in code. Essentially a word that can be referenced and assigned to something. Generally does not use numbers.
'''Boolean''' - A true or false value, essentially "on" or "off".
'''Int''' - An integer, or whole number. Cannot use decimal values.
'''Float''' - A decimal, specifically one that does not exceed more than 1 significant digit
'''Object''' - This is a bit more complex, but essentially objects are the items, blocks and entities that can be interacted with. In most cases, when an "object" type appears it means you must use a specific item variant code, which follows the "itemcode-variant_1-variant_2-variant_n" style of naming.


<table id="treeviewtable" class="table table-bordered tt-table" style='table-layout: fixed'>
<table id="treeviewtable" class="table table-bordered tt-table" style='table-layout: fixed'>
Line 26: Line 46:
     <td>required</td>
     <td>required</td>
     <td>A unique identifier for the item.</td>
     <td>A unique identifier for the item.</td>
     <td>Reference JSONs that use this property.</td>
     <td>All Items</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 48: Line 68:
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_variantgroups" data-tt-parent="root">variantgroups</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_variantgroups" data-tt-parent="root">variantgroups</div></td>
     <td>array of object</td>
     <td>array of objects</td>
     <td>-</td>
     <td>-</td>
     <td>Allows you define multiple variants of the same item.</td>
     <td>Allows you define multiple variants of the same item.</td>
Line 213: Line 233:
   <tr>
   <tr>
   <td scope="row"><div class="tt" data-tt-id="p_enabled" data-tt-parent="root">allowedVariants</div></td>
   <td scope="row"><div class="tt" data-tt-id="p_enabled" data-tt-parent="root">allowedVariants</div></td>
   <td>array</td>
   <td>array of objects</td>
   <td>-</td>
   <td>-</td>
   <td>Used to trim unnecessary items generated by combined variants. </td>
   <td>Used to trim unnecessary items generated by combined variants. </td>
Line 220: Line 240:
<tr>
<tr>
   <td scope="row"><div class="tt" data-tt-id="p_enabled" data-tt-parent="root">skipVariants</div></td>
   <td scope="row"><div class="tt" data-tt-id="p_enabled" data-tt-parent="root">skipVariants</div></td>
   <td>array</td>
   <td>array of object</td>
   <td>-</td>
   <td>-</td>
   <td>Similar to allowedVariants, but instead skips the creation of listed variants rather than assigning which are allowed. </td>
   <td>Similar to allowedVariants, but instead skips the creation of listed variants rather than assigning which are allowed. </td>
Line 372: Line 392:
  <tr>
  <tr>
     <td scope="row"><div class="tt" data-tt-id="p_attributes_list" data-tt-parent="root">attributes</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_attributes_list" data-tt-parent="root">attributes</div></td>
     <td>key: string, value: object</td>
     <td>-</td>
     <td>-</td>
     <td>-</td>
     <td>Custom Attributes associated with this item.</td>
     <td>Custom Attributes associated with this item.</td>
Line 500: Line 520:
<tr>
<tr>
   <td scope="row"><div class="tt" data-tt-id="p_alist_liquidcontain" data-tt-parent="p_alist_waterprops">containable</div></td>
   <td scope="row"><div class="tt" data-tt-id="p_alist_liquidcontain" data-tt-parent="p_alist_waterprops">containable</div></td>
   <td>true</td>
   <td>boolean</td>
   <td>-</td>
   <td>-</td>
   <td>IF true, the liquid can be placed into liquid containers, such as barrels and buckets.</td>
   <td>If true, the liquid can be placed into liquid containers, such as barrels and buckets.</td>
   <td>waterportion, limewaterportion</td>
   <td>waterportion, limewaterportion</td>
</tr>
</tr>
<tr>
<tr>
   <td scope="row"><div class="tt" data-tt-id="p_alist_iperlitre" data-tt-parent="p_alist_waterprops">itemsPerLitre</div></td>
   <td scope="row"><div class="tt" data-tt-id="p_alist_iperlitre" data-tt-parent="p_alist_waterprops">itemsPerLitre</div></td>
   <td>number</td>
   <td>number (int)</td>
   <td>-</td>
   <td>-</td>
   <td>The number of itemstack items required to make a litre of liquid. Generally this value is 1:1, but concentrated items like honey can be 4:1.</td>
   <td>The number of itemstack items required to make a litre of liquid. Generally this value is 1:1, but concentrated items like honey can be 4:1.</td>
Line 528: Line 548:
<tr>
<tr>
   <td scope="row"><div class="tt" data-tt-id="p_alist_tindex" data-tt-parent="p_alist_waterprops">tintIndex</div></td>
   <td scope="row"><div class="tt" data-tt-id="p_alist_tindex" data-tt-parent="p_alist_waterprops">tintIndex</div></td>
  <td>number (0,1 or 2)</td>
    <td>integer</td>
  <td>-</td>
    <td>0</td>
  <td>An optional liquid property that tints the color of a liquid when in a container. Available options are 0(red), 1(green) and 2(blue).</td>
    <td>Tints the color of the item if it's ever drawn as a block: '''''0''''' for no tint, '''''1''''' for plant climate tint, '''''2''''' for water climate tint.</td>
    <td>-</td>
   <td>waterportion, limewater</td>
   <td>waterportion, limewater</td>
</tr>
</tr>
Line 563: Line 584:
<tr>
<tr>
   <td scope="row"><div class="tt" data-tt-id="p_alist_spillstack" data-tt-parent="p_alist_whenspill">stack</div></td>
   <td scope="row"><div class="tt" data-tt-id="p_alist_spillstack" data-tt-parent="p_alist_whenspill">stack</div></td>
   <td>string</td>
   <td>-</td>
   <td>-</td>
   <td>-</td>
   <td>The block or item dropped when spilled. if the "PlaceBlock" action is chosen a block is placed, if "DropContents" is used an item is generated.</td>
   <td>The block or item dropped when spilled. if the "PlaceBlock" action is chosen a block is placed, if "DropContents" is used an item is generated.</td>
Line 576: Line 597:
</tr>
</tr>


<tr>
<td scope="row"><div class="tt" data-tt-id="p_attributes_info" data-tt-parent="p_alist_waterprops" data-invisible="true"></div></td>
<td colspan="4">
We'll look at an example of how this property is utilized by water item:
<syntaxhighlight lang="json">
waterTightContainerProps: {
  containable: true,
  itemsPerLitre: 1,
  texture: { base: "block/liquid/waterportion" },
  tintIndex: 2,
  whenSpilled: {
    action: "PlaceBlock",
    stack: { type: "block", code: "water-still-3" },
    stackByFillLevel: {
      "10": { type: "block", code: "water-still-7" }
    }
  }
}
</syntaxhighlight>
Most is self explanatory, but we can see that it has a some unique features, such as allowing a player to generate a water block when the "fill level" of the container used to spill the fluid. We can also see that the texture for it has a tintIndex of 2, which heightens the blue coloration of the water texture while in a bucket.
</tr>


<tr>
<tr>
Line 616: Line 661:
   <td>Changes the background color of the additional slots provided by the bag. Requires a HEX color code, which you can find with any generic color picker</td>
   <td>Changes the background color of the additional slots provided by the bag. Requires a HEX color code, which you can find with any generic color picker</td>
   <td>miningbag</td>
   <td>miningbag</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_clothesinit" data-tt-parent="p_attributes_equip">clothesallowinitialselect</div></td>
  <td>Boolean</td>
  <td>false</td>
  <td>(Unsure, set to false for all armor types).</td>
  <td>armor</td>
</tr>
</tr>
<tr>
<tr>
Line 641: Line 679:
<tr>
<tr>
   <td scope="row"><div class="tt" data-tt-id="p_alist_defprotloss" data-tt-parent="p_attributes_equip">defaultProtLoss</div></td>
   <td scope="row"><div class="tt" data-tt-id="p_alist_defprotloss" data-tt-parent="p_attributes_equip">defaultProtLoss</div></td>
  <td>number</td>
   <td>-</td>
   <td>-</td>
   <td>Defines the default protection loss for incoming damage that is of a higher tier than the armor. Requires the usage of perTierRelativeProtectionLoss and perTIerFlatDamageReductionLoss properties.</td>
  <td>-</td>
   <td>Defines the default protection loss for incoming damage that is of a higher tier than the armor. Requires the usage of perTierRelativeProtectionLoss and perTierFlatDamageReductionLoss properties.</td>
   <td>armor</td>
   <td>armor</td>
</tr>
</tr>
Line 724: Line 762:
The tier of incoming damage is not just a contest of values, but is actually looped through multiple times depending on the tier value to reduce the effectiveness of an armor. For example, tier 4 damage will loop four times and reduces the armor effectiveness each loop, while tier 1 damage will loop only once.  
The tier of incoming damage is not just a contest of values, but is actually looped through multiple times depending on the tier value to reduce the effectiveness of an armor. For example, tier 4 damage will loop four times and reduces the armor effectiveness each loop, while tier 1 damage will loop only once.  


The looped value starts as 1 and As the value increases up to the damage tier it is compared to the tier of the armor. If this increasing value is greater than the armor tier the second second value is used in the perTier function, otherwise the first value is used. Additionally, if the armor has the highDamageTierResistant property set to true then every loop which is higher than the armor will have it's armor reduction halved.  
The looped value starts as 1 and as the value increases up to the damage tier it is compared to the tier of the armor. If this increasing value is greater than the armor tier the second second value is used in the perTier function, otherwise the first value is used. Additionally, if the armor has the highDamageTierResistant property set to true then every loop which is higher than the armor will have it's armor reduction halved.  


Lets look at an example of this using an armor with the following stats:
Lets look at an example of this using an armor with the following stats:
Line 804: Line 842:
<tr>
<tr>
   <td scope="row"><div class="tt" data-tt-id="p_alist_wearattach" data-tt-parent="p_attributes_equip">wearableAttachment</div></td>
   <td scope="row"><div class="tt" data-tt-id="p_alist_wearattach" data-tt-parent="p_attributes_equip">wearableAttachment</div></td>
   <td>-</td>
   <td>boolean</td>
   <td>-</td>
   <td>-</td>
   <td>Designates the item as a wearable object.</td>
   <td>Designates the item as a wearable object.</td>
Line 817: Line 855:
<tr>
<tr>
   <td scope="row"><div class="tt" data-tt-id="p_hlist_exclude" data-tt-parent="p_attributes_handbook">exclude</div></td>
   <td scope="row"><div class="tt" data-tt-id="p_hlist_exclude" data-tt-parent="p_attributes_handbook">exclude</div></td>
   <td>-</td>
   <td>boolean</td>
   <td>-</td>
   <td>-</td>
   <td>If true, removes the item from the handbook. Can be used with the "ByType" functionality to remove large amounts of variants.</td>
   <td>If true, removes the item from the handbook. Can be used with the "ByType" functionality to remove large amounts of variants.</td>
Line 828: Line 866:
   <td>(Needs more info).</td>
   <td>(Needs more info).</td>
   <td>-</td>
   <td>-</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_hlist_include" data-tt-parent="p_attributes_handbook">include</div></td>
  <td>boolean</td>
  <td>-</td>
  <td>Allows the toggling of the handbook entry.</td>
  <td>burnedbrick</td>
</tr>
</tr>
<tr>
<tr>
Line 833: Line 878:
   <td>-</td>
   <td>-</td>
   <td>-</td>
   <td>-</td>
   <td>Adds a section to the handbook for this item (requires a lang file input).</td>
   <td>Adds a section to the handbook for this item. The title and text properties are actually code identifiers that must be filled out in the lang file of a mod, just as one would for an item or block name.</td>
  <td></td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_hlist_text" data-tt-parent="p_hlist_sections">text</div></td>
  <td>string (text id)</td>
  <td>-</td>
  <td>The textbox name that will show up in the lang file.</td>
  <td></td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_hlist_title" data-tt-parent="p_hlist_sections">title</div></td>
  <td>string (title id)</td>
  <td>-</td>
  <td>The title name that will show up in the lang file.</td>
   <td></td>
   <td></td>
</tr>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_hlist_groupby" data-tt-parent="p_attributes_handbook">groupBy</div></td>
  <td>-</td>
  <td>-</td>
  <td>Groups variants into a single handbook page, rather than making multiples.</td>
  <td>-</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_hlist_groupname" data-tt-parent="p_attributes_handbook">groupedName</div></td>
  <td>-</td>
  <td>-</td>
  <td>Gives a name to the group of variants within the handbook (must be filled out in the lang file).</td>
  <td>-</td>
</tr>
<tr>
<td scope="row"><div class="tt" data-tt-id="p_attributes_info" data-tt-parent="p_attributes_handbook" data-invisible="true"></div></td>
<td colspan="4">


The plumb and square is a good example of how a handbook section is added to the game:


<syntaxhighlight lang="json">
handbook: {
  include: true,
  extraSections: [
    { title: "plumbandsquare-handbook-help-title", text: "plumbandsquare-handbook-help-text" }
  ]
}
</syntaxhighlight>
</tr>




Line 1,077: Line 1,163:
     <td colspan="5" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><b>Common</b></td>
     <td colspan="5" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><b>Common</b></td>
   </tr>
   </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_storageflags" data-tt-parent="root">storageFlags</div></td>
    <td>number (storage flag ID)</td>
    <td>-</td>
    <td>Determines the kinds of storage types the item can be put into. These values also determine what type of items can fit into specialized inventory bags.</td>
    <td>arrow, armor, upperbody, ore-graded</td>
  </tr>
<tr>
<td scope="row"><div class="tt" data-tt-id="p_storageflag_info" data-tt-parent="p_storageflags" data-invisible="true"></div></td>
<td colspan="4">
The following are the current existing storage flags (some are unused or reserved)
1 - general
2 - backpack
4 - mining
8 - jewelcrafting
16 - alchemy
32 - agriculture
64 - currency
128 - clothes
256 - offhand
512 - arrows/ammo
1024, 2048, ... (doubling) - Reserved for mods
</tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_creativeinventory" data-tt-parent="root">creativeinventory</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_creativeinventory" data-tt-parent="root">creativeinventory</div></td>
Line 1,152: Line 1,261:
     <td>false</td>
     <td>false</td>
     <td>If the item can select a liquid while holding it in hand.</td>
     <td>If the item can select a liquid while holding it in hand.</td>
    <td>-</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,199: Line 1,309:
     <td>-</td>
     <td>-</td>
     <td>Information about the items burnable states.</td>
     <td>Information about the items burnable states.</td>
  </tr>
    <td>redmeat, plank, ore-ungraded</td> 
</tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_burntemperature" data-tt-parent="p_combustibleprops">burntemperature</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_burntemperature" data-tt-parent="p_combustibleprops">burntemperature</div></td>
Line 1,205: Line 1,316:
     <td>-</td>
     <td>-</td>
     <td>The temperature at which it burns in degrees celsius.</td>
     <td>The temperature at which it burns in degrees celsius.</td>
   </tr>
    <td>redmeat, plank, ore-ungraded</td>    
</tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_burnduration" data-tt-parent="p_combustibleprops">burnduration</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_burnduration" data-tt-parent="p_combustibleprops">burnduration</div></td>
Line 1,211: Line 1,323:
     <td>-</td>
     <td>-</td>
     <td>For how long it burns in seconds.</td>
     <td>For how long it burns in seconds.</td>
  </tr>
    <td>plank, ore-ungraded</td> 
</tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_heatresistance" data-tt-parent="p_combustibleprops">heatresistance</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_heatresistance" data-tt-parent="p_combustibleprops">heatresistance</div></td>
Line 1,217: Line 1,330:
     <td>500</td>
     <td>500</td>
     <td>How many degrees celsius it can resists before it ignites (not implemented yet).</td>
     <td>How many degrees celsius it can resists before it ignites (not implemented yet).</td>
   </tr>
    <td>redmeat, plank, ore-ungraded</td>    
</tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_meltingpoint" data-tt-parent="p_combustibleprops">meltingpoint</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_meltingpoint" data-tt-parent="p_combustibleprops">meltingpoint</div></td>
Line 1,223: Line 1,337:
     <td>-</td>
     <td>-</td>
     <td>How many degrees celsius it takes to smelt/transform this into another. Only used when put in a stove and Melted is set.</td>
     <td>How many degrees celsius it takes to smelt/transform this into another. Only used when put in a stove and Melted is set.</td>
   </tr>
    <td>redmeat, plank, ore-ungraded</td>    
</tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_meltingduration" data-tt-parent="p_combustibleprops">meltingduration</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_meltingduration" data-tt-parent="p_combustibleprops">meltingduration</div></td>
Line 1,229: Line 1,344:
     <td>-</td>
     <td>-</td>
     <td>For how many seconds the temperature has to be above the melting point until the item is smelted.</td>
     <td>For how many seconds the temperature has to be above the melting point until the item is smelted.</td>
    <td>redmeat, plank, ore-ungraded</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,235: Line 1,351:
     <td>1</td>
     <td>1</td>
     <td>How much smoke this item produces when being used as fuel.</td>
     <td>How much smoke this item produces when being used as fuel.</td>
    <td>plank, ore-ungraded</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,240: Line 1,357:
     <td>integer</td>
     <td>integer</td>
     <td>1</td>
     <td>1</td>
     <td>How many ores are required to produce one output stack.</td>
     <td>How many items are required to produce one output stack.</td>
    <td>nugget, ore-graded</td>  
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,246: Line 1,364:
     <td>object</td>
     <td>object</td>
     <td>-</td>
     <td>-</td>
     <td>If set, the block/item is smeltable in a furnace and this is the resulting itemstack once the MeltingPoint has been reached for the supplied duration.</td>
     <td>If set, the block/item is smeltable and this is the resulting itemstack once the MeltingPoint has been reached for the supplied duration.</td>
    <td>nugget, ore-graded</td>  
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,253: Line 1,372:
     <td>true</td>
     <td>true</td>
     <td>If set to true, the block/item requires a smelting/cooking/baking container such as the Crucible. If false, it can be directly baked/melted without smelting/cooking/baking container.</td>
     <td>If set to true, the block/item requires a smelting/cooking/baking container such as the Crucible. If false, it can be directly baked/melted without smelting/cooking/baking container.</td>
    <td>nugget, ore-graded, lime</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_combustibleprops_info" data-tt-parent="p_combustibleprops" data-invisible="true"></div></td>
     <td scope="row"><div class="tt" data-tt-id="p_combustibleprops_info" data-tt-parent="p_combustibleprops" data-invisible="true"></div></td>
     <td colspan="3">
     <td colspan="4">
This property can be used to define a burning material. '''Plank''' for example can get on fire:
This property can be used to define a burning material. '''Plank''' for example can get on fire:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
Line 1,283: Line 1,403:
     <td>object</td>
     <td>object</td>
     <td>-</td>
     <td>-</td>
     <td>Information about the items nutrients.</td>
     <td>Defines the nutritional qualities of an item.</td>
    <td>fruit, grain, vegetable, redmeat</td>  
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,290: Line 1,411:
     <td>-</td>
     <td>-</td>
     <td>Defines the type of food. It can be '''''fruit''''', '''''vegetable''''', '''''protein''''', '''''grain''''' and '''''dairy'''''.</td>
     <td>Defines the type of food. It can be '''''fruit''''', '''''vegetable''''', '''''protein''''', '''''grain''''' and '''''dairy'''''.</td>
    <td>fruit, grain, vegetable, redmeat</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,296: Line 1,418:
     <td>0</td>
     <td>0</td>
     <td>How much saturation it can restore.</td>
     <td>How much saturation it can restore.</td>
    <td>fruit, grain, vegetable, redmeat</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,302: Line 1,425:
     <td>0</td>
     <td>0</td>
     <td>How much health it can restore.</td>
     <td>How much health it can restore.</td>
    <td>-</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td colspan="4" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><b>Rendering</b></td>
     <td scope="row"><div class="tt" data-tt-id="p_transprops" data-tt-parent="root">transitionableProps</div></td>
    <td>-</td>
    <td>-</td>
    <td>Can be used to transition an item to another item or block.</td>
    <td>redmeat, hide</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_textures" data-tt-parent="root">textures</div></td>
    <td scope="row"><div class="tt" data-tt-id="p_tprops_type" data-tt-parent="p_transprops">type</div></td>
    <td>-</td>
    <td>-</td>
    <td>The type of transition method to utilize.</td>
    <td>redmeat, hide</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_tprops_type_cure" data-tt-parent="p_tprops_type">Cure</div></td>
    <td>string</td>
    <td>-</td>
    <td>Will "cure" an item by showing percent progress until cured.</td>
    <td>hide</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_tprops_type_perish" data-tt-parent="p_tprops_type">Perish</div></td>
    <td>string</td>
    <td>-</td>
    <td>Will gradually reduce the saturation of a food item once it's fresh period has passed, eventually converting into the product item (usually rot).</td>
    <td>hide</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_tprops_fresh" data-tt-parent="p_transprops">freshHours</div></td>
    <td>number (hours)</td>
    <td>-</td>
    <td>An optional "fresh" period that must pass before the transition time starts. With food, this is the period of time that saturation is not affected.</td>
    <td>bread, vegetable, redmeat</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_tprops_ttime" data-tt-parent="p_transprops">transitionHours</div></td>
    <td>number (hours)</td>
    <td>-</td>
    <td>Number of hours before the item transitions into a different item.</td>
    <td>redmeat, hide</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_tprops_stack" data-tt-parent="p_transprops">transitionedStack</div></td>
    <td>object (item or block)</td>
    <td>-</td>
    <td>The item or block that the item will transition into.</td>
    <td>redmeat, hide</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_tprops_ratio" data-tt-parent="p_transprops">transitionRatio</div></td>
    <td>number</td>
    <td>-</td>
    <td>The quantity of the item that will be consumed after the transition period.</td>
    <td>redmeat, hide</td>
  </tr>
<tr>
<td scope="row"><div class="tt" data-tt-id="p_transition_info" data-tt-parent="p_transprops" data-invisible="true"></div></td>
<td colspan="4">
 
Here we'll show an example of a custom food item that transitions into rot:
 
<syntaxhighlight lang="json">
transitionableProps [{
  type: "Perish",
  freshHours: { avg: 240 },
  transitionHours: { avg: 48 },
  transitionedStack { type: "item", code: "game:rot", quantity: 2 },
  transitionRatio: 1
}]
</syntaxhighlight>
 
We can see that it will take on average 10 days before the food begins to spoil, after which it will degrade over 2 days before turning into 2 rot.
</tr>
  <tr>
    <td colspan="5" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><b>Rendering</b></td>
  </tr>
  <tr>
     <td scope="row"><div class="tt" data-tt-id="p_textures" data-tt-parent="root">texture</div></td>
     <td>string</td>
     <td>string</td>
     <td>required</td>
     <td>required</td>
     <td>The texture definitions for the item held in hand or dropped on the ground.</td>
     <td>The texture definition for the item held in hand or dropped on the ground.</td>
    <td>Any Item</td> 
</tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_textures_shape" data-tt-parent="root">textures</div></td>
    <td>string</td>
    <td>-</td>
    <td>Used to define the textures of a shape the item uses, rather than the singular item texture it pulls from. This is useful for items that use a shape and have visually distinct variants that you want to control in the item JSON.</td>
    <td>ingot, redmeat</td> 
   </tr>
   </tr>
<tr>
<td scope="row"><div class="tt" data-tt-id="p_textures_info" data-tt-parent="p_textures_shape" data-invisible="true"></div></td>
<td colspan="4">
A very simple example is how the ingot item uses the metal variants to change the texture of the shape it uses. Where "metal" is the texture defined in the ingot shape JSON, and is overrode here in the item JSON:
  <syntaxhighlight lang="json">
    textures: {
      "metal": { base: "block/metal/ingot/{metal}" },
    },
  </syntaxhighlight>
</tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_shape" data-tt-parent="root">shape</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_shape" data-tt-parent="root">shape</div></td>
     <td>object</td>
     <td>object</td>
     <td>-</td>
     <td>-</td>
     <td>The items shape. Empty for automatic shape based on the texture.</td>
     <td>The items shape. If left empty the item will instead use the texture assigned to it and turn it into a shape by default.</td>
    <td>flint, stone</td>
</tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_shape_vox" data-tt-parent="p_shape">voxelizeTexture</div></td>
    <td>boolean</td>
    <td>-</td>
    <td>Tells an item to render it's texture as a shape rather than utilizing the assigned shape</td>
    <td>redmeat (vintage)</td>
   </tr>
   </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_shape_alt" data-tt-parent="p_shape">alternatives</div></td>
    <td>array of shapes</td>
    <td>-</td>
    <td>Can be used to give an item alternative shapes based off of different states.</td>
    <td>bow</td>
</tr>
<tr>
<td scope="row"><div class="tt" data-tt-id="p_shapealt_info" data-tt-parent="p_shape" data-invisible="true"></div></td>
<td colspan="4">
<syntaxhighlight lang="json">
shape: {
  base: "item/tool/bow/{type}",
  alternates: [
    { base: "item/tool/bow/{type}-charge1" },
    { base: "item/tool/bow/{type}-charge2" },
    { base: "item/tool/bow/{type}-charge3" } 
  ]
},
</syntaxhighlight>
In this example taken from the bow we can see that it will use alternative shapes when the bow is in different "charged" states.
</tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_shapeinventory" data-tt-parent="root">shapeinventory</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_shapeinventory" data-tt-parent="root">shapeinventory</div></td>
     <td>object</td>
     <td>object</td>
     <td>-</td>
     <td>-</td>
     <td>The items shape in inventory.</td>
     <td>If used, gives the item a different shape while it's in the player's inventory.</td>
    <td>lantern</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,328: Line 1,579:
     <td>object</td>
     <td>object</td>
     <td>item default</td>
     <td>item default</td>
     <td>Used for scaling, rotation or offseting the item when rendered in guis.</td>
     <td>Used for scaling, rotation or offsetting the item when rendered in guis.</td>
    <td>Any Item</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,334: Line 1,586:
     <td>object</td>
     <td>object</td>
     <td>item default</td>
     <td>item default</td>
     <td>Used for scaling, rotation or offseting the item when rendered in the first person mode hand.</td>
     <td>Used for scaling, rotation or offsetting the item when rendered in the first person mode hand.</td>
    <td>Any Item</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,340: Line 1,593:
     <td>object</td>
     <td>object</td>
     <td>item default</td>
     <td>item default</td>
     <td>Used for scaling, rotation or offseting the item when rendered in the third person mode hand.</td>
     <td>Used for scaling, rotation or offsetting the item when rendered in the third person mode hand.</td>
    <td>Any Item</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,346: Line 1,600:
     <td>object</td>
     <td>object</td>
     <td>item default</td>
     <td>item default</td>
     <td>Used for scaling, rotation or offseting the rendered as a dropped item on the ground.</td>
     <td>Used for scaling, rotation or offsetting the rendered as a dropped item on the ground.</td>
    <td>Any Item</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_toolracktransform" data-tt-parent="root">toolrackTransform</div></td>
    <td>string</td>
    <td>-</td>
    <td>If the item can be placed on a toolrack (using the rackable property) this will transform its position while on the toolrack.</td>
    <td>Axe, Hoe, Scythe, Sword</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_glowlevel" data-tt-parent="root">glowLevel</div></td>
    <td>number</td>
    <td>0</td>
    <td>Gives the item a light value that it produces when held and dropped on the ground.</td>
    <td>gear (temporal)</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_animation_use" data-tt-parent="root">heldTpUseAnimation</div></td>
    <td>string</td>
    <td>-</td>
    <td>The animation played when an item is used with a right-click function.</td>
    <td>hoe</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_animation_hit" data-tt-parent="root">heldTpHitAnimation</div></td>
    <td>string</td>
    <td>-</td>
    <td>The animation played when swinging the item with the left-click mouse button.</td>
    <td>axe, hoe, sword</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_animation_idle" data-tt-parent="root">heldTpIdleAnimation</div></td>
    <td>string</td>
    <td>-</td>
    <td>Gives the item a unique animation when being idly held by the player.</td>
    <td>strawdummy</td>
   </tr>
   </tr>
<tr>
<td scope="row"><div class="tt" data-tt-id="p_attributes_info" data-tt-parent="root" data-invisible="true"></div></td>
<td colspan="4">
The following are available animations used by items in the game:
''axe, breaktool, hoe, holdbothhandslarge, holdunderarm, knap, scythe, shears, shoveldig, smithing, spearhit, swordhit, twohandplaceblock, water.
</tr>
  </table>
  </table>


219

edits