Modding:Basic Block: Difference between revisions

From Vintage Story Wiki
Line 27: Line 27:
<div class="treeview">
<div class="treeview">
* '''Json File'''
* '''Json File'''
** '''code'''
** '''code ''(string)'''''
** '''variantgroups (array)'''
** '''maxstacksize ''(number)''''': ''default'': 64
** '''enabled ''(boolean)''''': ''default'': true; If the block will be added to game or not.
** '''randomdrawoffset ''(boolean)''''': ''default'': false; If the block has a random draw offset.
** '''renderpass'''
*** Opaque ''(default)''
*** OpaqueNoCull
*** Transparent
*** Liquid
*** TopSoil
** '''variantgroups ''(array)'''''
*** '''loadFromProperties'''
*** '''loadFromProperties'''
** '''creativeinventory'''
** '''creativeinventory'''
*** '''default'''
*** '''default'''
** '''shapeinventory'''
** '''shape'''
** '''shape'''
*** '''base'''
*** '''base'''
** '''shapebytype'''
** '''ambientocclusion ''(boolean)''''': ''default'': true; If ambient occlusion will be applied to the block.
** '''blockmaterial'''
** '''blockmaterial'''
** '''drawtype'''
** '''drawtype'''
Line 51: Line 63:
*** CrossAndSnowlayer
*** CrossAndSnowlayer
** '''textures'''
** '''textures'''
** '''texturesinventory'''
** '''texturesbytype'''
** '''texturesinventorybytype'''
** '''resistance'''
** '''resistance'''
** '''sounds'''
** '''sounds'''
*** '''place'''
*** '''place'''
*** '''walk'''
*** '''walk'''
*** '''break'''
*** '''hit'''
*** '''inside'''
</div>
</div>

Revision as of 12:09, 21 December 2016


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

Properties Overview

A complete list of all available properties:

  • Json File
    • code (string)
    • maxstacksize (number): default: 64
    • enabled (boolean): default: true; If the block will be added to game or not.
    • randomdrawoffset (boolean): default: false; If the block has a random draw offset.
    • renderpass
      • Opaque (default)
      • OpaqueNoCull
      • Transparent
      • Liquid
      • TopSoil
    • variantgroups (array)
      • loadFromProperties
    • creativeinventory
      • default
    • shapeinventory
    • shape
      • base
    • shapebytype
    • ambientocclusion (boolean): default: true; If ambient occlusion will be applied to the block.
    • blockmaterial
    • drawtype
      • BlockLayer_1
      • BlockLayer_2
      • BlockLayer_3
      • BlockLayer_4
      • BlockLayer_5
      • BlockLayer_6
      • BlockLayer_7
      • JSON
      • Empty
      • Cube
      • Cross
      • Transparent
      • Liquid
      • CrossAndSnowlayer
    • textures
    • texturesinventory
    • texturesbytype
    • texturesinventorybytype
    • resistance
    • sounds
      • place
      • walk
      • break
      • hit
      • inside