Confirmedusers, Bureaucrats, editor, Administrators
1,778
edits
CreativeMD (talk | contribs) (Undo revision 3841 by CreativeMD (talk)) |
No edit summary |
||
(9 intermediate revisions by 4 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 | <tr> | ||
<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 17: | Line 17: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="4" | <td colspan="4" class="propHeader"><b>Core (no byType available)</b></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
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: "type", states: ["normal", "bamboo"] }, | |||
], | |||
textures: { | |||
horizontals: { base: "block/hay/{type}-side" }, | |||
verticals: { base: "block/hay/{type}-top" }, | |||
}, | }, | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 178: | Line 189: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="4" | <td colspan="4" class="propHeader"><b>Specific</b></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 208: | Line 219: | ||
<td>array of object</td> | <td>array of object</td> | ||
<td>-</td> | <td>-</td> | ||
<td>A behavior adds custom abilities such as falling block | <td>A behavior adds custom abilities such as falling block.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td scope="row"><div class="tt" data-tt-id="p_behaviors_info" data-tt-parent="p_behaviors" data-invisible="true"></div></td> | <td scope="row"><div class="tt" data-tt-id="p_behaviors_info" data-tt-parent="p_behaviors" data-invisible="true"></div></td> | ||
<td colspan="3"> | <td colspan="3"> | ||
Here is an overview of | Here is an overview of most exisiting behaviors, if you want to create your own custom behavior you can read [[Adding Block Behavior]]. | ||
To see all of the current behaviors in the game see [[Json:block:behaviors|All Block Behaviors]] | |||
{{:json:block:behavior}} | {{:json:block:behavior}} | ||
</td> | </td> | ||
Line 285: | Line 297: | ||
Same examples of resistance's values used in VintageStory: | Same examples of resistance's values used in VintageStory: | ||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr style="background-color: | <tr style="background-color: rgba(0,0,0,0.2);"> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Block</th> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Value</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 330: | Line 342: | ||
<td colspan="3"> | <td colspan="3"> | ||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr style="background-color: | <tr style="background-color: rgba(0,0,0,0.2);"> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Tier</th> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Ores</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 479: | Line 491: | ||
<td colspan="3"> | <td colspan="3"> | ||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr style="background-color: | <tr style="background-color: rgba(0,0,0,0.2);"> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Value</th> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Effect (Blocks)</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 520: | Line 532: | ||
<td colspan="3"> | <td colspan="3"> | ||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr style="background-color: | <tr style="background-color: rgba(0,0,0,0.2);"> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Value</th> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Effect</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 549: | Line 561: | ||
<td colspan="3"> | <td colspan="3"> | ||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr style="background-color: | <tr style="background-color: rgba(0,0,0,0.2);"> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Blocks</th> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Value</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 592: | Line 604: | ||
<td colspan="3"> | <td colspan="3"> | ||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr style="background-color: | <tr style="background-color: rgba(0,0,0,0.2);"> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Blocks</th> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Value</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 617: | Line 629: | ||
<td colspan="3"> | <td colspan="3"> | ||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr style="background-color: | <tr style="background-color: rgba(0,0,0,0.2);"> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Blocks</th> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Value</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 658: | Line 670: | ||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr style="background-color: | <tr style="background-color: rgba(0,0,0,0.2);"> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Property</th> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Default</th> | ||
<th style="background-color: | <th style="background-color: rgba(0,0,0,0.2);">Explanation</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 733: | Line 745: | ||
'''''var''''': How much the drop rate can vary. Meaning the drop rate can be <code>avg - var</code> at minimum and <code>age + var</code> at maximum. | '''''var''''': How much the drop rate can vary. Meaning the drop rate can be <code>avg - var</code> at minimum and <code>age + var</code> at maximum. | ||
For more information see [[NatFloat]] page. | |||
---- | ---- | ||
Line 911: | Line 873: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="4" | <td colspan="4" class="propHeader"><b>Common</b></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,002: | Line 964: | ||
<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 block.</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 block. Those are final and cannot be modified. It's a good way to keep things | Extra attributes added to a 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 1,087: | Line 1,049: | ||
</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: { | ||
Line 1,126: | Line 1,088: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="4" | <td colspan="4" class="propHeader"><b>Rendering</b></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,132: | Line 1,094: | ||
<td>key: string, value: object</td> | <td>key: string, value: object</td> | ||
<td></td> | <td></td> | ||
<td>The texture definitions for the block as seen in the world, when dropped on the ground or held in the hand.</td> | <td>The texture definitions for the block as seen in the world, when dropped on the ground or held in the hand. Within a mod, to refer to a texture from the base game, prefix the path with "game:" (i.e. base: "game:path/to/texture") </td> | ||
</tr> | </tr> | ||
<tr> | <tr> |