Modding:Item Json Properties: Difference between revisions

From Vintage Story Wiki
Line 375: Line 375:
     <td>-</td>
     <td>-</td>
     <td>In which creative inventory tabs the item should be visible in.</td>
     <td>In which creative inventory tabs the item should be visible in.</td>
    <td>Any Item</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_creativeinventory_info" data-tt-parent="p_creativeinventory" data-invisible="true"></div></td>
     <td scope="row"><div class="tt" data-tt-id="p_creativeinventory_info" data-tt-parent="p_creativeinventory" data-invisible="true"></div></td>
     <td colspan="3">
     <td colspan="4">
There are several tabs to you can add your stuff. Note that general should always be included, since it should contain everything.
There are several to which you can add content from your mod. Note that general should always be included, since it should contain everything.


*general
*general
Line 388: Line 389:
*items
*items


'''Rock''' adds all of it's variantions to general, terrain and construction:
'''Rock''' adds all of it's variations to general, terrain and construction:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
creativeinventory: { "general": ["*"], "terrain": ["*"], "construction": ["*"] },
creativeinventory: { "general": ["*"], "terrain": ["*"], "construction": ["*"] },
</syntaxhighlight>
</syntaxhighlight>


'''<code>*</code>''' reprents the variants which will be added. You can specify multiple and separate them with a comma. It follows the same way as the '''byType''' property.
'''<code>*</code>''' represents the variants which will be added. You can specify multiple and separate them with a comma. It follows the same way as the '''byType''' property.


However, sometimes you may only want to show a single variant of your block or item (such as one that has multiple directional variants). In this case, you can set a specific variant to show up, once again using similar syntax to the variant code.
However, sometimes you may only want to show a single variant of your block or item (such as one that has multiple directional variants). In this case, you can set a specific variant to show up, once again using similar syntax to the variant code.
219

edits