Confirmedusers, Bureaucrats, editor, Administrators
1,778
edits
No edit summary |
No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
<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'> | ||
<tr style='background-color: | <tr style='background-color: rgba(0,0,0,0.2);'> | ||
<th width='300' align='left'>Property</th> | <th width='300' align='left'>Property</th> | ||
<th width='200' align='left'>Type</th> | <th width='200' align='left'>Type</th> | ||
Line 89: | Line 89: | ||
---- | ---- | ||
Furthermore there are two ways of combining groups together. So far we covered the default combination mode, which is <code>multiplicative</code> (the total count of variants is the product of all states). | |||
Let's take a look at a different example (flowerpot), which uses the <code>additive</code> combination mode: | Let's take a look at a different example (flowerpot), which uses the <code>additive</code> combination mode: | ||
Line 173: | Line 173: | ||
"*-south-*-closed-right": 180 | "*-south-*-closed-right": 180 | ||
} | } | ||
}, | |||
</syntaxhighlight> | |||
Since Vintagestory v1.8 it is also possible to use the variantgroup as a placeholder: | |||
<syntaxhighlight lang="json"> | |||
variantgroups: [ | |||
{ code: "metal", states: ["copper", "tinbronze", "bismuthbronze", "blackbronze", "gold", "silver", "iron" ] }, | |||
], | |||
textures: { | |||
"metal": { base: "block/metal/ingot/{metal}" }, | |||
"wood": { base: "item/tool/material/wood" } | |||
}, | }, | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 392: | Line 403: | ||
<td>key: string, value: object</td> | <td>key: string, value: object</td> | ||
<td>-</td> | <td>-</td> | ||
<td>Custom Attributes | <td>Custom Attributes associated with this item.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td scope="row"><div class="tt" data-tt-id="p_attributes_info" data-tt-parent="p_attributes" data-invisible="true"></div></td> | <td scope="row"><div class="tt" data-tt-id="p_attributes_info" data-tt-parent="p_attributes" data-invisible="true"></div></td> | ||
<td colspan="3"> | <td colspan="3"> | ||
Extra attributes added to a item or block. Those are final and cannot be modified. It's a good way to keep things | Extra attributes added to a item or block. Those are final and cannot be modified. It's a good way to keep things organized and and modifiable. The '''oreblastingbomb''' for example has attributes, which define its radius and type. These can be used by behaviors and blockentities: | ||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
attributes: { | attributes: { | ||
Line 416: | Line 427: | ||
<td>integer</td> | <td>integer</td> | ||
<td>-</td> | <td>-</td> | ||
<td>The temperature at which it burns.</td> | <td>The temperature at which it burns in degrees celsius.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 422: | Line 433: | ||
<td>decimal number</td> | <td>decimal number</td> | ||
<td>-</td> | <td>-</td> | ||
<td>For how long it burns.</td> | <td>For how long it burns in seconds.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 428: | Line 439: | ||
<td>integer</td> | <td>integer</td> | ||
<td>500</td> | <td>500</td> | ||
<td>How many degrees celsius it can resists before it ignites.</td> | <td>How many degrees celsius it can resists before it ignites (not implemented yet).</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 464: | Line 475: | ||
<td>boolean</td> | <td>boolean</td> | ||
<td>true</td> | <td>true</td> | ||
<td>If set, the block/item | <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> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 477: | Line 488: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Furthermore it can be used to define smelting processes. An example would be an '''ingotmold''' which turns into an ingotmold-burned: | |||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
combustiblePropsByType: { | combustiblePropsByType: { |