Modding:Item Json Properties: Difference between revisions

From Vintage Story Wiki
Line 617: Line 617:
   <td>miningbag</td>
   <td>miningbag</td>
</tr>
</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>
  <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>number</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_damredtiered" data-tt-parent="p_attributes_equip">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_attributes_equip">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_drelativetiered" data-invisible="true"></div></td>
    <td colspan="4">
As an example, we'll look at how the default values are assigned in Vintage Story:
<syntaxhighlight lang="json">
defaultProtLoss: {
  perTierRelativeProtectionLoss: [0.03, 0.15],
  perTierFlatDamageReductionLoss: [0.1, 0.2],
},
</syntaxhighlight>
Here we see that both relative protection and flat damage reduction will be lost by two different amounts. If the armor has the highDamageTierResistant property set to true it will use the first value, otherwise it will use the second value. 
NOTE: If necessary, these values can also be defined per item as a protectionModifiers property.
  </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, uses the "damage resistant" category for protection losses per tier.</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_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>-</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 primarily that give an item additional handbook details.
</tr>
<tr>
<tr>
<td scope="row"><div class="tt" data-tt-id="p_attributes_misc" data-tt-parent="root">(Misc Attributes)</div></td>
<td scope="row"><div class="tt" data-tt-id="p_attributes_misc" data-tt-parent="root">(Misc Attributes)</div></td>
219

edits