Modding:Basic Item: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__FORCETOC__
__FORCETOC__
Please read the tutorial [[Getting Started]] first, if you haven't done it already. This tutorial should introduce you into the basic of adding an item to the game using JSON files. If you want to add a item with functionality you should check out the tutorial for [[Advanced Items]]. There is a full list of all properties which can be defined inside the json file [[Item Json Properties]]. Adding a block to the game is rather similar, so if you have done that already most of the following steps should be familiar to you.
Please read the tutorial [[Getting Started with Advanced Modding#Domains|Getting Started]] first, if you haven't done it already. This tutorial should introduce you into the basic of adding an item to the game using JSON files. If you want to add a item with functionality you should check out the tutorial for [[Advanced Items]]. There is a full list of all properties which can be defined inside the json file [[Item Json Properties]]. Adding a block to the game is rather similar, so if you have done that already most of the following steps should be familiar to you.


= A Simple Item =
= A Simple Item =
Line 14: Line 14:
This is the texture we gonna use [[File:Wand.png]].
This is the texture we gonna use [[File:Wand.png]].


In order to use the texture we need to put it at the right place. Therefore create the following folders in your workspace <code>assets/mywandmod/textures/item/<code>. Now rename the texture to <code>wand.png</code> and place it in there.
In order to use the texture we need to put it at the right place. Therefore create the following folders in your workspace <code>assets/mywandmod/textures/item/</code>. Now rename the texture to <code>wand.png</code> and place it in there.


== The Item File ==
== The Item File ==
Line 47: Line 47:
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.
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]
Furthermore you need to add a <code>modinfo.json</code> file, check out [[Game_Content_Mod|this tutorial]].
 
[https://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.
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.
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]]
[[File:2017-01-30 13-59-27.png|700px]]
'''Hint''': Use the client command <code>.tfedit</code> if you want to adjust the item position, rotation and scale in Hands, in GUI, when dropped on the ground or in third person mode.


= Advanced Properties =
= Advanced Properties =
Line 142: Line 147:
texturebytype: {
texturebytype: {
"*-shovel": {
"*-shovel": {
base: "wand-shovel",
base: "item/wand-shovel",
},
},
"*-pickaxe": {
"*-pickaxe": {
base: "wand-pickaxe",
base: "item/wand-pickaxe",
},
},
"*-axe": {
"*-axe": {
base: "wand-axe",
base: "item/wand-axe",
},
},
}
}
Line 156: Line 161:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
texture: {
texture: {
base: "wand-{tooltype}",
base: "item/wand-{tooltype}",
}
}
</syntaxhighlight>
</syntaxhighlight>
Line 171: Line 176:
texture: {
texture: {
base: "wand",
base: "wand",
overlays: [ "wand-overlay-{tooltype}" ],
overlays: [ "item/wand-overlay-{tooltype}" ],
},
},
</syntaxhighlight>
</syntaxhighlight>
Line 181: Line 186:
== Download ==
== Download ==


You can download the mod to test it out yourself: [http://wiki.vintagestory.at/images/e/ec/MyAdvancedWandMod.zip MyAdvancedWandMod.zip]
You can download the mod to test it out yourself: [https://wiki.vintagestory.at/images/e/ec/MyAdvancedWandMod.zip MyAdvancedWandMod.zip]
 
 
 
{{Navbox/modding|Vintage Story}}
Confirmedusers, editor, Administrators
886

edits