Modding:Item Json Properties: Difference between revisions

From Vintage Story Wiki
(17 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 462: Line 482:


<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
inFirePitProps: {
inFirePitProps: {
  transform: {
  transform: {
    scale: 0.85,
    scale: 0.85,
    origin: { x: 0.5, y: 0.0625, z: 0.5 },
    origin: { x: 0.5, y: 0.0625, z: 0.5 },
    translation: { x: -0.03125, y: 0.0625, z: 0.046875 },
    translation: { x: -0.03125, y: 0.0625, z: 0.046875 },
    rotation: { x: 0, y: 0, z: 90 }
    rotation: { x: 0, y: 0, z: 90 }
  },
  },
  useFirepitModel: "Spit"
  useFirepitModel: "Spit"
        },
},
</syntaxhighlight>
</syntaxhighlight>


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>0</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>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_whenspill" data-tt-parent="p_alist_waterprops">whenSpilled</div></td>
  <td>-</td>
  <td>-</td>
  <td>Determines what happens when the "spill" interaction is used. Only works if the allowSpill property is set to true.</td>
  <td>waterportion, limewater</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_spillact" data-tt-parent="p_alist_whenspill">action</div></td>
  <td>string</td>
  <td>-</td>
  <td>Code identifier that determines what happens when the liquid is spilled from a container.</td>
  <td>waterportion, limewater</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_spillblock" data-tt-parent="p_alist_spillact">PlaceBlock</div></td>
  <td>-</td>
  <td>-</td>
  <td>Places a block at the spilled location.</td>
  <td>waterportion</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_spillitem" data-tt-parent="p_alist_spillact">DropContents</div></td>
  <td>-</td>
  <td>-</td>
  <td>Drops an item at the location. If the item is a liquid it will disappear immediately with a "splash" particle effect.</td>
  <td>limeportion</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_spillstack" data-tt-parent="p_alist_whenspill">stack</div></td>
  <td>-</td>
   <td>-</td>
   <td>-</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>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>waterportion, limewater</td>
   <td>waterportion, limewater</td>
</tr>
</tr>
<tr>
<tr>
   <td scope="row"><div class="tt" data-tt-id="p_alist_tindex" data-tt-parent="p_alist_waterprops">whenSpilled</div></td>
   <td scope="row"><div class="tt" data-tt-id="p_alist_sfilllevel" data-tt-parent="p_alist_whenspill">stackByFillLevel</div></td>
   <td>-</td>
   <td>-</td>
   <td>-</td>
   <td>-</td>
   <td>Determines what happens when the "spill" interaction is used. Only works if the allowSpill property is set to true.</td>
   <td>Allows for different blocks or items to be placed based on the level of the liquid in the container.</td>
   <td>waterportion, limewater</td>
   <td>waterportion, limewater</td>
</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 546: Line 626:
<td colspan="4">
<td colspan="4">
Attributes primarily used with equipment and armor.
Attributes primarily used with equipment and armor.
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_atshape" data-tt-parent="p_attributes_equip">attachShape</div></td>
  <td>Path to Shape</td>
  <td>-</td>
  <td>Assigns a shape to a bag to be shown on the player when worn in a bag slot.</td>
  <td>backpack</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_backpack" data-tt-parent="p_attributes_equip">backpack</div></td>
  <td>-</td>
  <td>-</td>
  <td>Gives an item bag properties, allowing it to be placed in the bag slot to increase inventory space.</td>
  <td>backpack</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_bpquantity" data-tt-parent="p_alist_backpack">quantitySlots</div></td>
  <td>number</td>
  <td>-</td>
  <td>How many additional slots the bag provides.</td>
  <td>backpack</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_bpsflags" data-tt-parent="p_alist_backpack">storageFlags</div></td>
  <td>number (storage flag ID)</td>
  <td>-</td>
  <td>Limits what type of item can be placed into the bag by assigning it a storage flag. (Need a list of storage flags)</td>
  <td>miningbag</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_slotcolor" data-tt-parent="p_alist_backpack">slotBgColor</div></td>
  <td>Color value (HEX)</td>
  <td>-</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>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_clothescategory" data-tt-parent="p_attributes_equip">clothescategory</div></td>
  <td>string</td>
  <td>-</td>
  <td>Assigns a wearable item to a specific inventory slot. There are 15 slots in total, including 3 armor slots and 12 decorative clothing slots.</td>
  <td>armor, upperbody, lowerbody</td>
</tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_ccategorylist" data-tt-parent="p_alist_clothescategory" data-invisible="true"></div></td>
    <td colspan="4">
Armor slots: ''armorhead, armorbody, armorlegs''.
Clothing slots: ''head, face, neck emblem, upperbodyover, upperbody, shoulder, arm, hand, lowerbody, waist, foot''.
</td>
  </tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_defprotloss" data-tt-parent="p_attributes_equip">defaultProtLoss</div></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>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_diselement" data-tt-parent="p_attributes_equip">disableElements</div></td>
  <td>Shape Element</td>
  <td>-</td>
  <td>Allows shape elements to be disabled to make better looking armor, for example removing the Seraph's ponytail with helmets.</td>
  <td>armor (plate helmet)</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_footstep" data-tt-parent="p_attributes_equip">footStepSound</div></td>
  <td>path to ogg file</td>
  <td>-</td>
  <td>What sound to play while the player is wearing this item.</td>
  <td>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_charcreate" data-tt-parent="p_attributes_equip">inCharactercreationDialog</div></td>
  <td>boolean</td>
  <td>-</td>
  <td>If set to true, will allow the player to select the wearable item during the character creation sequence.</td>
  <td>Lowerbody, Upperbody</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_protmodlist" data-tt-parent="p_attributes_equip">protectionModifiers</div></td>
  <td>-</td>
  <td>-</td>
  <td>Assigns protection values to an armor piece.</td>
  <td>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_plist_tier" data-tt-parent="p_alist_protmodlist">protectionTier</div></td>
  <td>number</td>
  <td>-</td>
  <td>The value contested against the tier of incoming damage. If the damage tier is higher the effectiveness of the armor is reduced, potentially to zero if the difference is high enough.</td>
  <td>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_plist_high" data-tt-parent="p_alist_protmodlist">highDamageTierResistant</div></td>
  <td>boolean</td>
  <td>false</td>
  <td>If set to true this armor will reduce the protection loss of higher damage tiers by half when looping through the protection loss sequence of the damage calculation.</td>
  <td>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_plist_flat" data-tt-parent="p_alist_protmodlist">flatDamageReduction</div></td>
  <td>number, decimal</td>
  <td>-</td>
  <td>This is the amount of damage that is initially subtracted before relative protection is applied.</td>
  <td>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_plist_relative" data-tt-parent="p_alist_protmodlist">relativeProtection</div></td>
  <td>number, decimal</td>
  <td>-</td>
  <td>After the damage is subtracted by the flat reduction the remaining damage is reduced by a percent amount equal to this value.</td>
  <td>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_damredtiered" data-tt-parent="p_alist_protmodlist">perTierFlatDamageReductionLoss</div></td>
  <td>array of numbers</td>
  <td>-</td>
  <td>Determines how much flat damage reduction is lost by a damage tier higher than the armor tier. Each relative difference can be customized individually.</td>
  <td>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_drelativetiered" data-tt-parent="p_alist_protmodlist">perTierRelativeProtectionLoss</div></td>
  <td>array of numbers</td>
  <td>-</td>
  <td>Determines how much relative protection is lost by a damage tier higher than the armor tier. The first value is used for high damage resistant armor, the second is for all other armors.</td>
  <td>armor</td>
</tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_pertier_info" data-tt-parent="p_alist_protmodlist" data-invisible="true"></div></td>
    <td colspan="4">
The system for how these values are used is a bit complex, but here's essentially how it works:
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.
Lets look at an example of this using an armor with the following stats:
<syntaxhighlight lang="json">
protectionModifiers {
  protectionTier: 2,
  flatDamageReduction: 1.0,
  relativeProtection: 0.80,
  perTierFlatDamageReductionLoss: [0.03, 0.15],
  perTierRelativeProtectionLoss: [0.1, 0.2],
  highDamageTierResistant = true
},
</syntaxhighlight>
Now lets loop through the protection values and see what the overall loss is. The damage tier is 4, so we start with 1 and end with 4:
'''Round 1''': Damage tier = 1, armor tier = 2
- Damage tier is below the armor tier in the loop, so we use the first values (0.03 and 0.1)
'''Round 2''': Damage Tier = 2, armor tier = 2
- Damage tier is still not higher in the loop, so once again we use the first values (0.03 and 0.1)
'''Round 3''': Damage Tier = 3, armor tier = 2
- At last the damage tier is higher than the armor tier in the loop so we use the second values (0.15 and 0.2), but we also have the <code>highDamageTierResistant</code> property, so both these values are halved, resulting in (0.075 and 0.1)
'''Round 4''': Damage tier = 4, armor tier = 2
- Same as before, resulting in (0.075 and 0.1).
Finally, we add up the results of each to determine the total loss of protection: (0.21 and 0.4), which causes a 21% loss to our damage reduction and 0.4 loss to our flat damage reduction. This leaves our original protection values at 59% and 0.6, a significant loss in armor performance!
If the damage was of a lower tier, such as 1, only the first round would be used, which would result in a much lower protection loss of 3% and 0.1 damage in total.
  </td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_astats" data-tt-parent="p_attributes_equip">statModifiers</div></td>
  <td>-</td>
  <td>-</td>
  <td>Gives an armor piece a modifier to certain stats. Generally these values are debuffs, but if the values were reversed they could be used as buffs for magical armor.</td>
  <td>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_stat_heal" data-tt-parent="p_alist_astats">healingeffectiveness</div></td>
  <td>number, decimal</td>
  <td>-</td>
  <td>Player healing rate (percent) modification.</td>
  <td>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_stat_hunger" data-tt-parent="p_alist_astats">healingeffectiveness</div></td>
  <td>number, decimal</td>
  <td>-</td>
  <td>Player hunger rate (percent) modification.</td>
  <td>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_stat_racc" data-tt-parent="p_alist_astats">rangedWeaponsAcc</div></td>
  <td>number, decimal</td>
  <td>-</td>
  <td>Player ranged weapon accuracy (percent) modification.</td>
  <td>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_stat_rspd" data-tt-parent="p_alist_astats">rangedWeaponsSpeed</div></td>
  <td>number, decimal</td>
  <td>-</td>
  <td>Player ranged weapon draw speed (percent) modification.</td>
  <td>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_stat_wspd" data-tt-parent="p_alist_astats">walkSpeed</div></td>
  <td>number, decimal</td>
  <td>-</td>
  <td>Player movement speed (percent) modification.</td>
  <td>armor</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_wearattach" data-tt-parent="p_attributes_equip">wearableAttachment</div></td>
  <td>boolean</td>
  <td>-</td>
  <td>Designates the item as a wearable object.</td>
  <td>armor</td>
</tr>
<tr>
<td scope="row"><div class="tt" data-tt-id="p_attributes_handbook" data-tt-parent="root">(Handbook Attributes)</div></td>
<td colspan="4">
Attributes that give an item additional handbook details.
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_hlist_exclude" data-tt-parent="p_attributes_handbook">exclude</div></td>
  <td>boolean</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>burnedbrick</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_hlist_excludelist" data-tt-parent="p_attributes_handbook">excludeFromList</div></td>
  <td>-</td>
  <td>-</td>
  <td>(Needs more info).</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>
  <td scope="row"><div class="tt" data-tt-id="p_hlist_sections" data-tt-parent="p_attributes_handbook">extraSections</div></td>
  <td>-</td>
  <td>-</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>
</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>
</tr>


Line 786: 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 861: 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 908: 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 914: 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 920: 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 926: 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 932: 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 938: 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 944: 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 949: 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 955: 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 962: 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 992: 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 999: 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,005: 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,011: 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>
    <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>
    <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>
   <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_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>
   <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_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,037: 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,043: 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,049: 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,055: 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>
  <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>
<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