Confirmedusers, editor, Administrators
886
edits
CreativeMD (talk | contribs) No edit summary |
CreativeMD (talk | contribs) No edit summary |
||
Line 12: | Line 12: | ||
== The Texture == | == The Texture == | ||
This is the texture we gonna use [[File:Wand.png]]. | This is the texture we gonna use [[File:Wand.png]]. Now we need to create the following folders inside our workspace <code>assets/mywandmod/textures/items/<code>, copy the texture in there and rename it to <code>wand.png</code>. | ||
== The | == The Item File == | ||
To create the actual wand need to create a json file inside <code>assets/mywandmod/itemtypes/</code> in your workspace. In this example we name it <code>wand.json</code>. This file contains the basic properties of your item. | |||
The content of this json file should look as it follows: | The content of this json file should look as it follows: | ||
Line 23: | Line 23: | ||
code: "wand", | code: "wand", | ||
creativeinventory: { "general": ["*"] }, | creativeinventory: { "general": ["*"] }, | ||
texture: { base: " | texture: { base: "wand" } | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* '''code''': A unique identifier for your item | * '''code''': A unique identifier for your item. | ||
* '''creativeinventory''': The creative inventory tabs the itemshould be shown in (currently only 1 tab available) | * '''creativeinventory''': The creative inventory tabs the itemshould be shown in (currently only 1 tab available) | ||
* '''textures''': What textures to apply. | * '''textures''': What textures to apply. | ||
== | == Naming the Block == | ||
To give the block a proper name, we need to create another json file and save it inside a new created folder <code>assets/mywandmod/lang/en.json</code> | |||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
" | { | ||
"block-wand": "Wand" | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== Testing/ Distribution == | |||
There is only one thing left. We need to create a zip file of the assets folder inside your workspace. Either you use an external program (such as WinRAR or 7Zip) or you right-click the <code>assets</code> folder and hit '''Send To''' -> '''Compressed (zipped) folder'''. Eventually you can rename the zip file to <code>MyWandMod.zip</code>. The zip file can be either used for testing purposes or you can send it to other people so they can use it as well. | |||
[http://wiki.vintagestory.at/images/e/ec/MyWandMod.zip MyWandMod.zip] | |||
[ | To install the mod, navigate to the [[VintageStory Folder]] and place it inside the mods folder. | ||
Now we got everything ready to run our first test. You should be able to find the added item in the creative inventory. | |||
[[File:2017-01-30 13-59-27.png|700px]] | |||
= Advanced Properties = | = Advanced Properties = |