Modding:Basic Item: Difference between revisions

From Vintage Story Wiki
m
no edit summary
(Marked this version for translation)
mNo edit summary
 
(16 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{GameVersion|1.19}}
__FORCETOC__
__FORCETOC__
First, if you haven't done it already, please read the tutorial [[Getting Started with Advanced Modding#Domains|Getting Started]]. This tutorial should introduce you to the basics of using JSON files to add an item to the game. If you want to add an item with functionality, you should check out the tutorial for [[Advanced Items]]. That page contains a full list of all properties that can be defined inside the json file [[Item Json Properties]]. Adding a block to the game is similar to adding an item, so if you have already learned how to do that, most of the following steps should be familiar.
{{PageOutdated|lookat={{ll|Modding:Content_Tutorial_Simple_Item|the simple item tutorial|nsp=0}}}}
 
First, if you haven't done it already, please read about {{ll|Modding:Asset System|nsp=1}}. This tutorial should introduce you to the basics of using JSON files to add an item to the game. If you want to add an item with functionality, you should check out the tutorial for [[Advanced Items]]. That page contains a full list of all properties that can be defined inside the json file [[Item Json Properties]]. Adding a block to the game is similar to adding an item, so if you have already learned how to do that, most of the following steps should be familiar.


== A Simple Item == <!--T:2-->
== A Simple Item == <!--T:2-->
Line 17: Line 21:


== Adding a Texture == <!--T:6-->
== Adding a Texture == <!--T:6-->
Let's start with the texture we will use: [[File:Wand.png]]
Let's start with the texture we will use: [[File:Wand.png]] <br>
(To create your own textures, you can use programs like [https://www.dotpdn.com/downloads/pdn.html/ PaintDotNet(free)], [https://www.piskelapp.com/ Piskel(free)], [https://www.gimp.org/ GIMP(free)], or [https://github.com/aseprite/aseprite/ Aseprite(free open source, or pay for precompiled)])


<!--T:7-->
<!--T:7-->
Line 23: Line 28:


== Creating the Item File == <!--T:8-->
== Creating the Item File == <!--T:8-->
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. (we recommend to use an editor with syntax highlighting, such as [https://notepad-plus-plus.org/ Notepad++] or [https://www.sublimetext.com/ Sublime Text]. If you are going to have many json files or some C#, then [https://code.visualstudio.com/ Visual Studio Code] is also a good pick).


<!--T:9-->
<!--T:9-->
Line 55: Line 60:


<!--T:13-->
<!--T:13-->
You might have noticed that the <code>creativeinventory</code> and <code>texture</code> properties aren't as simple as the <code>code</code> values. The reason for the differences in <code>texture</code> and <code>creativeinventory</code> isn't something we'll cover in this tutorial, but is discussed in advanced tutorials.
You might have noticed that the <code>creativeinventory</code> and <code>textures</code> properties aren't as simple as the <code>code</code> values. The reason for the differences in <code>textures</code> and <code>creativeinventory</code> isn't something we'll cover in this tutorial, but is discussed in advanced tutorials.


== Naming the Item == <!--T:14-->
== Naming the Item == <!--T:14-->
Line 72: Line 77:


<!--T:17-->
<!--T:17-->
{{Navbox/modding|Vintage Story}}
{{Navbox/contentmodding}}
</translate>
</translate>
Confirmedusers
536

edits