Modding:Block and Item Interactions: 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__
{{GameVersion|1.9}}
This tutorial should introduce you into the basics of custom interactions. We will create a magic wand which should spawn particles when holding right click.
This tutorial should introduce you into the basics of custom interactions. We will create a magic wand which should spawn particles when holding right click.


== Preparations ==
= Preparations =


I highly recommend to read about [[Advanced Items|The Item Class]] first. Additionally you can download the assets [https://wiki.vintagestory.at/images/4/4d/MagicWand_-_No_CS_File.zip here].
I highly recommend to read about [[Advanced Items|The Item Class]] first. Additionally you can download the assets [https://wiki.vintagestory.at/images/4/4d/MagicWand_-_No_CS_File.zip here].
Line 8: Line 11:


<syntaxhighlight lang="c#">
<syntaxhighlight lang="c#">
     public class Magic : ModBase
     public class Magic : ModSystem
     {
     {


Line 146: Line 149:
<youtube>bTPXL97Gfns</youtube>
<youtube>bTPXL97Gfns</youtube>


== Download ==
= Mod Download =


Feel free to try it out yourself:
Feel free to try it out yourself:


[https://wiki.vintagestory.at/images/3/38/MagicWand.zip MagicWand.zip]
Here is my version:
* for VS v1.9: [https://wiki.vintagestory.at/images/7/72/Magicwand_vs1.9_v1.0.0.zip Magicwand_vs1.9_v1.0.0.zip]
* for VS v1.8: [https://wiki.vintagestory.at/images/3/38/MagicWand.zip MagicWand.zip]
 




{{Navbox/modding|Vintage Story}}
{{Navbox/modding|Vintage Story}}
219

edits