Modding:Basic Block: Difference between revisions

From Vintage Story Wiki
No edit summary
No edit summary
Line 22: Line 22:


[[Block Json Properties]]
[[Block Json Properties]]
== Overview ==
A complete list of all available properties:
<table id="treeviewtable" class="table table-bordered tt-table">
  <tr style='background-color: gray;'>
    <th width='300' align='left'>Property</th>
    <th width='80' align='left'>Type</th>
    <th width='80' align='left'>Default</th>
    <th align='left'>Usage</th>
  </tr>
  <tr>
    <td><div class="tt" data-tt-id="root">json</div></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_code" data-tt-parent="root">code</div></td>
    <td>string</td>
    <td>empty</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_maxstacksize" data-tt-parent="root">maxstacksize</div></td>
    <td>number</td>
    <td>64</td>
    <td>determines the maximum amount you can stack the block in one slot</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_enabled " data-tt-parent="root">enabled</div></td>
    <td>boolean</td>
    <td>true</td>
    <td>if the block will be added to game or not</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_renderpass" data-tt-parent="root">renderpass</div></td>
    <td>enum</td>
    <td>opaque</td>
    <td></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>default blocks</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></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>2</td>
    <td></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></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></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_variantgroups" data-tt-parent="root">variantgroups</div></td>
    <td>arrays</td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_creativeinventory" data-tt-parent="root">creativeinventory</div></td>
    <td>arrays</td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_shapeinventory" data-tt-parent="root">shapeinventory</div></td>
    <td>object</td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_invbase" data-tt-parent="p_shapeinventory">base</div></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_shape" data-tt-parent="root">shape</div></td>
    <td>object</td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_base" data-tt-parent="p_shape">base</div></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_shapebytype" data-tt-parent="root">shapebytype</div></td>
    <td>object</td>
    <td></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_blockmaterial" data-tt-parent="root">blockmaterial</div></td>
    <td>string</td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_drawtype" data-tt-parent="root">drawtype</div></td>
    <td>enum</td>
    <td>cube</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_blockLayer_1" data-tt-parent="p_drawtype">blockLayer_1</div></td>
    <td></td>
    <td>0</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_blockLayer_2" data-tt-parent="p_drawtype">blockLayer_2</div></td>
    <td></td>
    <td>1</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_blockLayer_3" data-tt-parent="p_drawtype">blockLayer_3</div></td>
    <td></td>
    <td>2</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_blockLayer_4" data-tt-parent="p_drawtype">blockLayer_4</div></td>
    <td></td>
    <td>3</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_blockLayer_5" data-tt-parent="p_drawtype">blockLayer_5</div></td>
    <td></td>
    <td>4</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_blockLayer_6" data-tt-parent="p_drawtype">blockLayer_6</div></td>
    <td></td>
    <td>5</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_blockLayer_7" data-tt-parent="p_drawtype">blockLayer_7</div></td>
    <td></td>
    <td>6</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_json" data-tt-parent="p_drawtype">json</div></td>
    <td></td>
    <td>7</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_empty" data-tt-parent="p_drawtype">empty</div></td>
    <td></td>
    <td>8</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_cube" data-tt-parent="p_drawtype">cube</div></td>
    <td></td>
    <td>9</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_cross" data-tt-parent="p_drawtype">cross</div></td>
    <td></td>
    <td>10</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_transparent" data-tt-parent="p_drawtype">transparent</div></td>
    <td></td>
    <td>11</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_liquid" data-tt-parent="p_drawtype">liquid</div></td>
    <td></td>
    <td>12</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_crossandsnowlayer" data-tt-parent="p_drawtype">crossandsnowlayer</div></td>
    <td></td>
    <td>13</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_textures" data-tt-parent="root">textures</div></td>
    <td>arrays</td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_texturesinventory" data-tt-parent="root">texturesinventory</div></td>
    <td>arrays</td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_texturesbytype" data-tt-parent="root">texturesbytype</div></td>
    <td>arrays</td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_texturesinventorybytype" data-tt-parent="root">texturesinventorybytype</div></td>
    <td>arrays</td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_resistance" data-tt-parent="root">resistance</div></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_sounds" data-tt-parent="root">sounds</div></td>
    <td>enum</td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_place" data-tt-parent="p_sounds">place</div></td>
    <td></td>
    <td>0</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_walk" data-tt-parent="p_sounds">walk</div></td>
    <td></td>
    <td>1</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_break" data-tt-parent="p_sounds">break</div></td>
    <td></td>
    <td>2</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_hit" data-tt-parent="p_sounds">hit</div></td>
    <td></td>
    <td>3</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_inside" data-tt-parent="p_sounds">inside</div></td>
    <td></td>
    <td>4</td>
    <td></td>
  </tr>
</table>

Revision as of 11:44, 5 January 2017


This tutorial should introduce you into the basic of adding a block to the game using JSON files. Down below you can find a complete list of all existing properties. If your block requires more than just a JSON file there is a tutorial for Advanced Blocks.

A Simple Block

Let's add a simple block to the game. In our example we will add a new wooden planks type.

The Texture

First of all we need a texture. We will add a spruce wood plank to the game using this texture: File:Spruce1.png.

Now we need to copy the texture to the game assets. Therefore navigate to the Vintagestory folder and place it in assets\textures\blocks\wood\planks\

The JSON file

Testing

Export a mod

Advanced Properties

Block Json Properties