Modding:Block Json Properties: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
Line 1,060: Line 1,060:
     <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" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><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.</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,095:
     <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,101:
     <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,107:
     <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,206:
   </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>1</td>
    <td>Used for non-solid single faced blocks, such as tall grass.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_transparent" data-tt-parent="p_renderpass">transparent</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>2</td>
    <td>Use for solid halftransparent blocks, such as glass</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_liquid" data-tt-parent="p_renderpass">liquid</div></td>
     <td colspan="3">{{:json:block:texture}}</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.</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 inbetween 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.</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.</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,316:
     <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,330:
   </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,371:
     <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>array of 0 ... 255</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>
Confirmedusers, editor, Administrators
886

edits