Modding:Block Json Properties: Difference between revisions

From Vintage Story Wiki
No edit summary
(21 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
== Overview ==
== Overview ==
An incomplete list of all available properties
A complete list of all available properties


<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: gray;'>
   <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" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><b>Core (no byType available)</b></td>
     <td colspan="4" class="propHeader"><b>Core (no byType available)</b></td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 28: Line 28:
     <td scope="row"><div class="tt" data-tt-id="p_code_info" data-tt-parent="p_code" data-invisible="true"></div></td>
     <td scope="row"><div class="tt" data-tt-id="p_code_info" data-tt-parent="p_code" data-invisible="true"></div></td>
     <td colspan="3">
     <td colspan="3">
A '''domain prefix''' will be added dynamically depending on the location of the file. Every mod and the VintageStory itself have a unique prefix.
A '''domain prefix''' will be added dynamically depending on the location of the file. Every mod and VintageStory itself have a unique prefix.


For example the code '''<code>stone</code>''' would turn into '''<code>game:stone</code>'''.  
For example the code '''<code>stone</code>''' turns into '''<code>game:stone</code>'''.  


The code identifier has to be unique, at least inside his domain, so in theory there can be equal identifiers with different domain prefixes.
The code identifier has to be unique inside its domain. In theory there could be equal identifiers with different domain prefixes.
Find out more about [[Basic Modding#Domains|Domains]].
Find out more about [[Basic Modding#Domains|Domains]].
     </td>
     </td>
Line 51: Line 51:
     <td scope="row"><div class="tt" data-tt-id="p_variantgroups_info" data-tt-parent="p_variantgroups" data-invisible="true"></div></td>
     <td scope="row"><div class="tt" data-tt-id="p_variantgroups_info" data-tt-parent="p_variantgroups" data-invisible="true"></div></td>
     <td colspan="3">
     <td colspan="3">
The variantgroups property allows you to define multiple variants of this block. All of them will have their unique code, which will added to the code.
The variantgroups property allows you to define multiple variants of this block. All of them will have their unique pattern, which will be added to the block code.


An easy example would be a bowl, which can either be raw or burned:
An easy example would be a bowl, which can either be raw or burned:
Line 77: Line 77:
----
----


Additionally it is possible to refer to external lists that are found in the worldproperties folder, such as <code>block/rock</code>, which contains all states of all rock types. This used for <code>gravel</code>, <code>sand</code> and <code>rock</code>:
Additionally it is possible to refer to external lists that are found in the worldproperties folder, such as <code>block/rock</code>, which contains all states of all rock types. This used for <code>gravel</code>, <code>sand</code> and <code>rock</code>. It's a good way to keep everything organized:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
variantgroups: [
variantgroups: [
Line 89: Line 89:
----
----


Futhermore there are two ways of combining together groups. So far we covered the default combination mode, which is <code>multiplicative</code> (the total count of variants is the product of all states).
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 104: Line 104:
The variants are <code>flowerpot-raw</code>, <code>flowerpot-empty</code>, <code>flowerpot-{all flowers}</code>, <code>flowerpot-{all mushrooms}</code> and <code>flowerpot-{all saplings}</code>.
The variants are <code>flowerpot-raw</code>, <code>flowerpot-empty</code>, <code>flowerpot-{all flowers}</code>, <code>flowerpot-{all mushrooms}</code> and <code>flowerpot-{all saplings}</code>.


Things might get clearer if we look at another example:
<code>Additive</code> mode could also be called separate, since it defines a variant separate from all the other groups:
 
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
variantgroups: [
variantgroups: [
Line 114: Line 115:


In this case, the result would be <code>same-raw</code>, <code>same-baked</code>, <code>different-raw</code>, <code>different-baked</code>, <code>red</code> and <code>green</code>
In this case, the result would be <code>same-raw</code>, <code>same-baked</code>, <code>different-raw</code>, <code>different-baked</code>, <code>red</code> and <code>green</code>
    </td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_byType" data-tt-parent="root">(any) byType</div></td>
    <td>key: string; value: object</td>
    <td>-</td>
    <td>You can create properties for certain variants of the block.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_byType_info" data-tt-parent="p_byType" data-invisible="true"></div></td>
    <td colspan="3">
In order to define properties for specific variants you can add '''byType''' to the property name. This allows you to define it depending on the type and always follows the same syntax:
<syntaxhighlight lang="json">
(property)ByType: {
"selector": property,
"selector2": property2,
...
}
</syntaxhighlight>


The <code>additive</code> combination means all states will be added as a separate variant.
If the selector matches the name of the variant the given property will be used. Keep in mind that only the first matching one will be used (everything below will be ignored).
    </td>
 
A slab for example has two variants ('''up''', '''down'''), which have different collision boxes:
<syntaxhighlight lang="json">
collisionboxByType: {
"*-down": { x1: 0, y1: 0, z1: 0,  x2: 1, y2: 0.5, z2: 1 },
"*-up": { x1: 0, y1: 0.5, z1: 0,  x2: 1, y2: 1, z2: 1 }
},
</syntaxhighlight>
 
The char '''<code>*</code>''' stands for anything. In this case it ignores the code of the block.
 
Furthermore this opens up even more possbilities for more advanced selectors like this one for doors:
<code>*-north-*-opened-left</code>. This will ignore the second variantgroup. Additionally ByType can also be used for child properties:
<syntaxhighlight lang="json">
collisionboxnbox: {
x1: 0, y1: 0, z1: 0.875, x2: 1, y2: 1, z2: 1,
rotateYByType: {
"*-north-*-opened-left": 90,
"*-north-*-closed-left": 0,
"*-west-*-opened-left": 180,
"*-west-*-closed-left": 90,
 
"*-east-*-opened-left": 0,
"*-east-*-closed-left": 270,
"*-south-*-opened-left": 270,
"*-south-*-closed-left": 180,
 
"*-north-*-opened-right": 270,
"*-north-*-closed-right": 0,
"*-west-*-opened-right": 0,
"*-west-*-closed-right": 90,
 
"*-east-*-opened-right": 180,
"*-east-*-closed-right": 270,
"*-south-*-opened-right": 90,
"*-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>
</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td colspan="4" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><b>Specific</b></td>
     <td colspan="4" class="propHeader"><b>Specific</b></td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 130: Line 200:
     <td scope="row"><div class="tt" data-tt-id="p_class_info" data-tt-parent="p_class" data-invisible="true"></div></td>
     <td scope="row"><div class="tt" data-tt-id="p_class_info" data-tt-parent="p_class" data-invisible="true"></div></td>
     <td colspan="3">
     <td colspan="3">
A complete tutorial of how to create your own class can be found [[Advanced Blocks|here]].
It can be used to open guis or adding other extra functionality to the block. A complete tutorial of how to add your own class to the game can be found [[Advanced Blocks|here]].
</td>
</td>
   </tr>
   </tr>
Line 142: Line 212:
     <td scope="row"><div class="tt" data-tt-id="p_entityclass_info" data-tt-parent="p_entityclass" data-invisible="true"></div></td>
     <td scope="row"><div class="tt" data-tt-id="p_entityclass_info" data-tt-parent="p_entityclass" data-invisible="true"></div></td>
     <td colspan="3">
     <td colspan="3">
A complete tutorial of creating your own entityclass can be found [[Block Entity|here]].
A chest for example uses the BlockEntity to store the inventory. A tutorial of creating your own entityclass can be found [[Block Entity|here]].
</td>
</td>
   </tr>
   </tr>
Line 149: 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>
     <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 all exisiting behaviors, if you want to create your own custom behavior you can read [[Adding Block Behavior]].
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 484: Line 555:
     <td>0 ... 255</td>
     <td>0 ... 255</td>
     <td>0</td>
     <td>0</td>
     <td>Basic glow level for all the blocks model elements.</td>
     <td>Causes the block to visually glow if Bloom is enabled. Basic glow level for all the blocks model elements.</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 617: Line 688:
     <td>'''lastdrop'''</td>
     <td>'''lastdrop'''</td>
<td>false</td>
<td>false</td>
<td>If true and the quantity dropped is >=1 any subsequent drop will be ignored.</td>
<td>If true and the quantity dropped is >=1 any subsequent drop in the list will be ignored.</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 674: 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.


Futhermore you can also switch between different distribution modes using the '''''dist''''' property.
Furthermore you can also switch between different distribution modes using the '''''dist''''' property.


<table class="wikitable mw-collapsible mw-collapsed">
<table class="wikitable mw-collapsible mw-collapsed">
Line 773: Line 844:
     <td>-</td>
     <td>-</td>
     <td>Particles that should spawn in regular intervals from this block.</td>
     <td>Particles that should spawn in regular intervals from this block.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_particleproperties_info" data-tt-parent="p_particleproperties" data-invisible="true"></div></td>
    <td colspan="3">
{{:json:block:particle}}
</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 846: Line 923:
   </tr>
   </tr>
   <tr>
   <tr>
     <td colspan="4" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><b>Common</b></td>
     <td colspan="4" class="propHeader"><b>Common</b></td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 937: Line 1,014:
     <td>key: string, value: object</td>
     <td>key: string, value: object</td>
     <td>-</td>
     <td>-</td>
     <td>Custom Attributes that's always assiociated with this item.</td>
     <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 oragnized and and modifiable. The '''oreblastingbomb''' for example has attributes, which define its radius and type. These can be used by behaviors and blockentities:
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: {
        "blastRadius": { type: "Int", value: 4 },
"blastRadius": 4,
        "blastType": { type: "Int", value: 0 },
"blastType": 0,
    },
},
</syntaxhighlight>
</syntaxhighlight>
</td>
</td>
Line 961: Line 1,038:
     <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 967: Line 1,044:
     <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 973: Line 1,050:
     <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 979: Line 1,056:
     <td>integer</td>
     <td>integer</td>
     <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 SmeltedStack is set.</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,009: Line 1,086:
     <td>boolean</td>
     <td>boolean</td>
     <td>true</td>
     <td>true</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 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 1,022: Line 1,099:
</syntaxhighlight>
</syntaxhighlight>


Futhermore it can be used to define smelting processes. An example would be an '''ingotmold''' which turns into an ingotmold-burned:
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,060: Line 1,137:
     <td>How much health it can restore.</td>
     <td>How much health it can restore.</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 colspan="4" class="propHeader"><b>Rendering</b></td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_renderpass" data-tt-parent="root">renderpass</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_textures" data-tt-parent="root">Textures</div></td>
     <td>string (of enum)</td>
     <td>key: string, value: object</td>
    <td>opaque</td>
    <td>Determines how the block will be drawn.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_opaque" data-tt-parent="p_renderpass">opaque</div></td>
     <td></td>
     <td></td>
     <td>0</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>
    <td>Used for solid blocks with no half transparency.</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_opaquenocull" data-tt-parent="p_renderpass">opaquenocull</div></td>
     <td scope="row" valign="top"><div class="tt" data-tt-id="p_textures_base" data-tt-parent="p_textures">base</div><br><br><div class="tt" data-tt-id="p_textures_overlays" data-tt-parent="p_textures">overlays</div><br><br><div class="tt" data-tt-id="p_textures_base" data-tt-parent="p_textures">alternates</div></td>
    <td></td>
     <td colspan="3">{{:json:block:texture}}</td>
    <td>1</td>
     <td>Used for non-solid single faced blocks, such as tall grass.</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_transparent" data-tt-parent="p_renderpass">transparent</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_texturesinventory" data-tt-parent="root">TexturesInventory</div></td>
    <td>key: string, value: object</td>
     <td></td>
     <td></td>
     <td>2</td>
     <td>The texture definitions for the block as seen in the player inventory. Overrides the textures.</td>
    <td>Use for solid halftransparent blocks, such as glass</td>
   </tr>
   </tr>
   <tr>
   <tr>
    <td scope="row"><div class="tt" data-tt-id="p_liquid" data-tt-parent="p_renderpass">liquid</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_shape" data-tt-parent="root">Shape</div></td>
    <td></td>
     <td>object</td>
    <td>3</td>
     <td>-</td>
    <td>Used for liquids, produces waves.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_topsoil" data-tt-parent="p_renderpass">topsoil</div></td>
    <td></td>
    <td>4</td>
    <td>Used for grass covered blocks. Allows for a smooth transition from grass to soil, while still allowing climate tinting of grass.</td>
  </tr>
  <tr>
     <td scope="row"><div class="tt" data-tt-id="p_shape" data-tt-parent="root">shape</div></td>
     <td>shape</td>
     <td></td>
     <td>For the json drawtype, the shape definition of the block as shown in the world, dropped on the ground or held in hand.</td>
     <td>For the json drawtype, the shape definition of the block as shown in the world, dropped on the ground or held in hand.</td>
   </tr>
   </tr>
Line 1,118: Line 1,172:
     <td>float</td>
     <td>float</td>
     <td>0</td>
     <td>0</td>
     <td></td>
     <td>Only 90 degree rotations are possible.</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,124: Line 1,178:
     <td>float</td>
     <td>float</td>
     <td>0</td>
     <td>0</td>
     <td></td>
     <td>Only 90 degree rotations are possible.</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,130: Line 1,184:
     <td>float</td>
     <td>float</td>
     <td>0</td>
     <td>0</td>
     <td></td>
     <td>Only 90 degree rotations are possible.</td>
   </tr>
   </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>shape</td>
     <td>object</td>
     <td></td>
     <td>-</td>
     <td>For the json drawtype, the shape definition of the block as shown in the players inventory.</td>
     <td>For the json drawtype, the shape definition of the block as shown in the players inventory.</td>
   </tr>
   </tr>
  <tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_invbase" data-tt-parent="p_shapeinventory">base</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_drawtype" data-tt-parent="root">DrawType</div></td>
    <td></td>
     <td>string</td>
    <td></td>
     <td>&quot;cube&quot;</td>
    <td>The path to the shape json file, the base dir is ''assets/shapes/''.</td>
     <td>Determines how the block is tesselated, select JSON for being able to use custom JSON Models. The other values are hardcoded methods of tesselating the block.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_invrotateX" data-tt-parent="p_shapeinventory">rotateX</div></td>
    <td>float</td>
    <td>0</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_invrotateY" data-tt-parent="p_shapeinventory">rotateY</div></td>
    <td>float</td>
    <td>0</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_invrotateZ" data-tt-parent="p_shapeinventory">rotateZ</div></td>
    <td>float</td>
    <td>0</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_ambientocclusion" data-tt-parent="root">ambientocclusion</div></td>
    <td>boolean</td>
    <td>true</td>
    <td>If ambient occlusion will be applied to the block.</td>
  </tr>
  <tr>
     <td scope="row"><div class="tt" data-tt-id="p_drawtype" data-tt-parent="root" hide="children">drawtype</div></td>
     <td>string (of enum)</td>
     <td>cube</td>
     <td>Determines how the block is tesselated, select JSON for being able to use custom JSON Models. The other values are hardcoded methods of tesselating the block. Check [[Drawtypes]] for a full list.</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 1,259: Line 1,283:
   </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_renderpass" data-tt-parent="root">RenderPass</div></td>
     <td>key: direction, value: texture</td>
     <td>string</td>
    <td>&quot;opaque&quot;</td>
    <td>Determines how the block will be drawn.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_opaque" data-tt-parent="p_renderpass">opaque</div></td>
    <td></td>
    <td>0</td>
    <td>Used for solid blocks with no half transparency.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_opaquenocull" data-tt-parent="p_renderpass">opaquenocull</div></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>1</td>
    <td>Used for non-solid single faced blocks, such as tall grass.</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row" valign="top"><div class="tt" data-tt-id="p_textures_base" data-tt-parent="p_textures">base</div><br><br><div class="tt" data-tt-id="p_textures_overlays" data-tt-parent="p_textures">overlays</div><br><br><div class="tt" data-tt-id="p_textures_base" data-tt-parent="p_textures">alternates</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_transparent" data-tt-parent="p_renderpass">transparent</div></td>
     <td colspan="3">{{:json:block:texture}}</td>
    <td></td>
    <td>2</td>
    <td>Use for solid halftransparent blocks, such as glass</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_liquid" data-tt-parent="p_renderpass">liquid</div></td>
     <td></td>
    <td>3</td>
    <td>Used for liquids, produces waves.</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_texturesinventory" data-tt-parent="root">texturesinventory</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_topsoil" data-tt-parent="p_renderpass">topsoil</div></td>
    <td>key: direction, value: texture</td>
     <td></td>
     <td></td>
     <td>The texture definitions for the block as seen in the player inventory. Overrides the textures definition if set.</td>
     <td>4</td>
    <td>Used for grass covered blocks. Allows for a smooth transition from grass to soil, while still allowing climate tinting of grass.</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_sideopaque" data-tt-parent="root">sideopaque</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_ambientocclusion" data-tt-parent="root">AmbientOcclusion</div></td>
     <td>key: direction, value: boolean</td>
     <td>boolean</td>
     <td>true</td>
     <td>true</td>
    <td>If ambient occlusion will be applied to the block.</td>
  </tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_tintindex" data-tt-parent="root">TintIndex</div></td>
    <td>integer</td>
    <td>0</td>
    <td>'''''0''''' for no tint, '''''1''''' for plant climate tint, '''''2''''' for water climate tint.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_renderflags" data-tt-parent="root">RenderFlags</div></td>
    <td>0 ... 255</td>
    <td>0</td>
    <td>8 bits that are sent to the graphics card for each vertex of the blocks shape. The lower 3 bits are currently used for altering the vertexes z-depth to fix a bunch of z-fighting issues.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_facecullmode" data-tt-parent="root">FaceCullMode</div></td>
    <td>string</td>
    <td>&quot;default&quot;</td>
    <td>Determines which sides of the blocks should be rendered.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_facecullmode_default" data-tt-parent="p_facecullmode">Default</div></td>
    <td></td>
    <td>0</td>
    <td>Culls faces if they are opaque faces adjacent to opaque faces.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_facecullmode_default" data-tt-parent="p_facecullmode">NeverCull</div></td>
    <td></td>
    <td>1</td>
    <td>Never culls any faces.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_facecullmode_default" data-tt-parent="p_facecullmode">Merge</div></td>
    <td></td>
    <td>2</td>
    <td>Culls all faces that are adjacent to opaque faces and faces adjacent to blocks of the same id (Example usage: Ice blocks).</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_facecullmode_default" data-tt-parent="p_facecullmode">Collapse</div></td>
    <td></td>
    <td>3</td>
    <td>Culls all faces that are adjacent to opaque faces and the bottom, east or south faces adjacent to blocks of the same id. This causes to still leave one single face in between instead of 2, eliminating any z-fighting.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_facecullmode_default" data-tt-parent="p_facecullmode">MergeMaterial</div></td>
    <td></td>
    <td>4</td>
    <td>Same as Merge but checks for equal material (Example usage: Plain glass and all colored glass blocks).</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_facecullmode_default" data-tt-parent="p_facecullmode">CollapseMaterial</div></td>
    <td></td>
    <td>5</td>
    <td>Same as Collapse but checks for equal material (Example usage: All leaves blocks).</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_facecullmode_default" data-tt-parent="p_facecullmode">Liquid</div></td>
    <td></td>
    <td>6</td>
    <td>Same as CollapseMaterial but also culls faces towards opaque blocks.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_sideopaque" data-tt-parent="root">SideOpaque</div></td>
    <td>key: string, value: boolean</td>
    <td>-</td>
     <td>Determines if given block face is fully opaque. If yes, the opposite face of the adjacent block will not be drawn for efficiency reasons.</td>
     <td>Determines if given block face is fully opaque. If yes, the opposite face of the adjacent block will not be drawn for efficiency reasons.</td>
   </tr>
   </tr>
Line 1,283: Line 1,393:
     <td scope="row">
     <td scope="row">
         <div class="tt" data-tt-id="p_sideopaque_all" data-tt-parent="p_sideopaque">all</div><br>
         <div class="tt" data-tt-id="p_sideopaque_all" data-tt-parent="p_sideopaque">all</div><br>
<div class="tt" data-tt-id="p_sideopaque_horizontals" data-tt-parent="p_sideopaque">horizontals</div><br>
<div class="tt" data-tt-id="p_sideopaque_verticals" data-tt-parent="p_sideopaque">verticals</div><br>
         <div class="tt" data-tt-id="p_sideopaque_east" data-tt-parent="p_sideopaque">east</div><br>
         <div class="tt" data-tt-id="p_sideopaque_east" data-tt-parent="p_sideopaque">east</div><br>
         <div class="tt" data-tt-id="p_sideopaque_west" data-tt-parent="p_sideopaque">west</div><br>
         <div class="tt" data-tt-id="p_sideopaque_west" data-tt-parent="p_sideopaque">west</div><br>
Line 1,295: Line 1,407:
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_sidesolid" data-tt-parent="root">sidesolid</div></td>
    <td scope="row"><div class="tt" data-tt-id="p_sideao" data-tt-parent="root">SideAo</div></td>
     <td>key: direction, value: boolean</td>
    <td>key: string, value: boolean</td>
     <td>true</td>
    <td>-</td>
     <td>Determins if given block side is solid. If true, other blocks like torches can be attached to it</td>
    <td>If AmbientOcclusion will be applied for each side.</td>
  </tr>
  <tr>
    <td scope="row">
        <div class="tt" data-tt-id="p_sideao_all" data-tt-parent="p_sideao">all</div><br>
<div class="tt" data-tt-id="p_sideao_horizontals" data-tt-parent="p_sideao">horizontals</div><br>
<div class="tt" data-tt-id="p_sideao_verticals" data-tt-parent="p_sideao">verticals</div><br>
        <div class="tt" data-tt-id="p_sideao_east" data-tt-parent="p_sideao">east</div><br>
        <div class="tt" data-tt-id="p_sideao_west" data-tt-parent="p_sideao">west</div><br>
        <div class="tt" data-tt-id="p_sideao_up" data-tt-parent="p_sideao">up</div><br>
        <div class="tt" data-tt-id="p_sideao_down" data-tt-parent="p_sideao">down</div><br>
        <div class="tt" data-tt-id="p_sideao_north" data-tt-parent="p_sideao">north</div><br>
        <div class="tt" data-tt-id="p_sideao_south" data-tt-parent="p_sideao">south</div>
    </td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
     <td scope="row"><div class="tt" data-tt-id="p_sidesolid" data-tt-parent="root">SideSolid</div></td>
     <td>key: string, value: boolean</td>
     <td>-</td>
     <td>Determins if given block side is solid. If true, other blocks like torches can be attached to it.</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row">
     <td scope="row">
         <div class="tt" data-tt-id="p_sidesolid_all" data-tt-parent="p_sidesolid">all</div><br>
         <div class="tt" data-tt-id="p_sidesolid_all" data-tt-parent="p_sidesolid">all</div><br>
<div class="tt" data-tt-id="p_sidesolid_horizontals" data-tt-parent="p_sidesolid">horizontals</div><br>
<div class="tt" data-tt-id="p_sidesolid_verticals" data-tt-parent="p_sidesolid">verticals</div><br>
         <div class="tt" data-tt-id="p_sidesolid_east" data-tt-parent="p_sidesolid">east</div><br>
         <div class="tt" data-tt-id="p_sidesolid_east" data-tt-parent="p_sidesolid">east</div><br>
         <div class="tt" data-tt-id="p_sidesolid_west" data-tt-parent="p_sidesolid">west</div><br>
         <div class="tt" data-tt-id="p_sidesolid_west" data-tt-parent="p_sidesolid">west</div><br>
Line 1,312: Line 1,448:
     <td></td>
     <td></td>
     <td></td>
     <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_randomdrawoffset" data-tt-parent="root">RandomDrawOffset</div></td>
    <td>boolean</td>
    <td>false</td>
    <td>If true then the block will be randomly offseted by 1/3 of a block when placed.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_lighthsv" data-tt-parent="root">LightHsv</div></td>
    <td>byte array with 3 elements. See http://tyron.at/vs/vslightwheel.html for valid values</td>
    <td>-</td>
    <td>For light emitting blocks: hue, saturation and brightness value.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_lightabsorption" data-tt-parent="root">LightAbsorption</div></td>
    <td>0 ... 255</td>
    <td>99</td>
    <td>For light blocking blocks. Any value above 32 will completely block all light.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_guitransform" data-tt-parent="root">GuiTransform</div></td>
    <td>object</td>
    <td>block default</td>
    <td>Used for scaling, rotation or offseting the block when rendered in guis.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_fphandtransform" data-tt-parent="root">FpHandTransform</div></td>
    <td>object</td>
    <td>block default</td>
    <td>Used for scaling, rotation or offseting the block when rendered in the first person mode hand.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_tphandtransform" data-tt-parent="root">TpHandTransform</div></td>
    <td>object</td>
    <td>block default</td>
    <td>Used for scaling, rotation or offseting the block when rendered in the third person mode hand.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_groundtransform" data-tt-parent="root">GroundTransform</div></td>
    <td>object</td>
    <td>block default</td>
    <td>Used for scaling, rotation or offseting the rendered as a dropped item on the ground.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_randomizeaxes" data-tt-parent="root">RandomizeAxes</div></td>
    <td>string</td>
    <td>&quot;xyz&quot;</td>
    <td>Random texture selection - whether or not to use the Y axis during randomization (for multiblock plants).</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_randomizeaxes_xyz" data-tt-parent="p_randomizeaxes">XYZ</div></td>
    <td></td>
    <td>0</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_randomizeaxes_xz" data-tt-parent="p_randomizeaxes">XZ</div></td>
    <td></td>
    <td>1</td>
     <td></td>
     <td></td>
   </tr>
   </tr>
</table>
</table>
{{Navbox/modding|Vintage Story}}
42

edits