Modding:Basic Block
From Vintage Story Wiki
Revision as of 11:43, 5 January 2017 by CreativeMD (talk | contribs)
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
Overview
A complete list of all available properties:
Property | Type | Default | Usage |
---|---|---|---|
json |
|||
code |
string | empty | |
maxstacksize |
number | 64 | determines the maximum amount you can stack the block in one slot |
enabled |
boolean | true | if the block will be added to game or not |
renderpass |
enum | opaque | |
opaque |
0 | default blocks | |
opaquenocull |
1 | ||
transparent |
2 | ||
liquid |
3 | ||
topsoil |
4 | ||
variantgroups |
arrays | ||
creativeinventory |
arrays | ||
shapeinventory |
object | ||
base |
|||
shape |
object | ||
base |
|||
shapebytype |
object | ||
ambientocclusion |
boolean | true | if ambient occlusion will be applied to the block |
blockmaterial |
string | ||
drawtype |
enum | cube | |
blockLayer_1 |
0 | ||
blockLayer_2 |
1 | ||
blockLayer_3 |
2 | ||
blockLayer_4 |
3 | ||
blockLayer_5 |
4 | ||
blockLayer_6 |
5 | ||
blockLayer_7 |
6 | ||
json |
7 | ||
empty |
8 | ||
cube |
9 | ||
cross |
10 | ||
transparent |
11 | ||
liquid |
12 | ||
crossandsnowlayer |
13 | ||
textures |
arrays | ||
texturesinventory |
arrays | ||
texturesbytype |
arrays | ||
texturesinventorybytype |
arrays | ||
resistance |
|||
sounds |
enum | ||
place |
0 | ||
walk |
1 | ||
break |
2 | ||
hit |
3 | ||
inside |
4 |