Modding:Advanced Items: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__FORCETOC__
__FORCETOC__
{{GameVersion|1.9}}


It's highly recommended to read [[Basic Item]] first. Additionally this tutorial requires a development environment. If you don't have one already you should read the tutorial [[Setting up your Development Environment]].
It's highly recommended to read [[Basic Item]] first. Additionally this tutorial requires a development environment. If you don't have one already you should read the tutorial [[Setting up your Development Environment]].
Line 22: Line 23:
If you have read the [[Advanced Blocks]] Tutorial already, this should be fimilar to you.
If you have read the [[Advanced Blocks]] Tutorial already, this should be fimilar to you.


In order to register your item class, we need to create a mod, which is basically a class exendting ModBase:
In order to register your item class, we need to create a mod, which is basically a class exendting ModSystem:


<syntaxhighlight lang="c#">
<syntaxhighlight lang="c#">
public class TunnlerMod : ModBase
public class TunnlerMod : ModSystem
{
{
      
      
Line 34: Line 35:


<syntaxhighlight lang="c#">
<syntaxhighlight lang="c#">
public class TunnlerMod : ModBase
public class TunnlerMod : ModSystem
{
{
     public override void Start(ICoreAPI api)
     public override void Start(ICoreAPI api)
Line 123: Line 124:
namespace ExampleMods
namespace ExampleMods
{
{
     public class TunnlerMod : ModBase
     public class TunnlerMod : ModSystem
     {
     {


Line 197: Line 198:


In order to finish everything, open the modtools and type in <code>pack <your mod id></code>. Now you can take the zip file and share it with other people. It will work in the same way as ordinary mods, you can install it by copying it into the <code>mods</code> folder.
In order to finish everything, open the modtools and type in <code>pack <your mod id></code>. Now you can take the zip file and share it with other people. It will work in the same way as ordinary mods, you can install it by copying it into the <code>mods</code> folder.
= Mod Download =


Here is my version:  
Here is my version:  
219

edits