Modding:Basic Block: Difference between revisions
From Vintage Story Wiki
CreativeMD (talk | contribs) No edit summary |
CreativeMD (talk | contribs) No edit summary |
||
Line 11: | Line 11: | ||
First of all we need a texture. We will add a spruce wood plank to the game using this texture: [[File:Spruce1.png]]. | 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 <code>assets\textures\blocks\wood\planks\</code> | Now we need to copy the texture to the game assets. Therefore navigate to the [[Vintagestory folder]] and place it in <code>assets\textures\blocks\wood\planks\</code>. Eventually rename it to <code>ourtexture.png</code> | ||
== The JSON file == | == The JSON file == | ||
Now we need a json file which will determine the properties this block has. For now we keep it simple and only cover simple properties, but there are a lot of other things you can do with. Here is a full list of all [[Block Json Properties]]. | |||
<poem> | |||
<code> | |||
{ | |||
code: "myspecialplanks", | |||
creativeinventory: { "default": ["*"] }, | |||
shape: { base: "basic/cube" }, | |||
blockmaterial: "Wood", | |||
drawtype: "cube", | |||
textures: { | |||
all: { base: "wood/planks/ourtexture.png" } | |||
}, | |||
resistance: 3.5, | |||
sounds: { | |||
"place": "block/planks", | |||
"walk": "walk/wood" | |||
} | |||
} | |||
</code> | |||
</poem> | |||
== Testing == | == Testing == |