Modding:Basic Item: Difference between revisions

From Vintage Story Wiki
(Big update and split to Modding:Advanced Item)
m (rename some sections and call it a "cool" wand (screenshots needed))
Line 1: Line 1:
__FORCETOC__
__FORCETOC__
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 an 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 an 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 ==
 
So, the first thing we going to need is an idea. What does this game need? Wait! I got it ... the game needs a cool wand. Let's call this mod '''BasicWand''', because this is the Basic Item tutorial, and we're making a wand.
So, the first thing we going to need is an idea. What does this game need? Wait! I got it ... the game needs an overpowered wand. Let's call this mod '''BasicWand''', because this is the Basic Item tutorial, and we're making a wand.


== Workspace ==
== Workspace ==
Line 14: Line 12:
After making sure our workspace is ready we can move on to actually making the wand.
After making sure our workspace is ready we can move on to actually making the wand.


== The Texture ==
== Adding a Texture ==
Let's start with the texture we will use: [[File:Wand.png]]
Let's start with the texture we will use: [[File:Wand.png]]


In order to use the texture we need to put it at the right place. To do this we will create the folder <code>textures/item/</code>. Remember, this is in our namespaced folder so the full path is <code>assets/basicwand/textures/item/</code>.
In order to use the texture we need to put it at the right place. To do this we will create the folder <code>textures/item/</code>. Remember, this is in our namespaced folder so the full path is <code>assets/basicwand/textures/item/</code>.


== The Item File ==
== Creating the Item File ==
To create the actual wand item we need to create a JSON file inside the <code>itemtypes/</code> folder. In this example we name it <code>wand.json</code>. This file contains the basic properties of our item.
To create the actual wand item we need to create a JSON file inside the <code>itemtypes/</code> folder. In this example we name it <code>wand.json</code>. This file contains the basic properties of our item.


Line 60: Line 58:


== Conclusion ==
== Conclusion ==
Together, the item and language files are technically enough to be a complete mod. But they don't add the overpowered wand I said we would make at the beginning of this tutorial. In order to get to that we have to head over to the [[Modding:Advanced Item]] tutorial where I explain how we can do way cooler things with items than just a measly stick.
Together, the item and language files are technically enough to be a complete mod. But they don't add the cool wand I said we would make at the beginning of this tutorial. In order to get to that we have to head over to the [[Modding:Advanced Item]] tutorial where I explain how we can do way cooler things with items than just a measly stick.