Modding:Setting up your Development Environment: Difference between revisions

From Vintage Story Wiki
(8 intermediate revisions by one other user not shown)
Line 9: Line 9:
== Install Development Tool ==
== Install Development Tool ==


VintageStory is developed in C#. Now it's about to install a development program, which allows you to write and compile mods. There is a tutorial for each platform.
VintageStory is developed in C#. Programming is most efficiently done in an IDE (integrated development environment). Let's install one!


=== Windows ===
=== Windows ===


VintageStory is developed using VisualStudio. Luckily you can get VisualStudio Community for free [https://www.visualstudio.com/de/vs/community/ here]. Installation should be simple and straight forward to do, but depending on your internet connection it may take a while.
VintageStory is developed using VisualStudio. You can get VisualStudio Community for free [https://www.visualstudio.com/de/vs/community/ here]. Installation should be simple and straight forward to do, but depending on your internet connection it may take a while.
 
----


=== Linux ===
=== Linux ===
Line 32: Line 30:
This might take a few minutes depending on your internet connection. (The latest version at the time of writing was around 275MB.)
This might take a few minutes depending on your internet connection. (The latest version at the time of writing was around 275MB.)
To open up MonoDevelop enter <code>flatpak run com.xamarin.MonoDevelop</code> in the terminal.
To open up MonoDevelop enter <code>flatpak run com.xamarin.MonoDevelop</code> in the terminal.
----


=== Mac OS ===
=== Mac OS ===
Line 39: Line 35:
Download and install '''VisualStudio for Mac''' [https://www.visualstudio.com/vs/mac/ here]. Unfortunately nobody in our team has a mac, so we don't know for sure if the following tutorials work on mac without any problems.
Download and install '''VisualStudio for Mac''' [https://www.visualstudio.com/vs/mac/ here]. Unfortunately nobody in our team has a mac, so we don't know for sure if the following tutorials work on mac without any problems.


= Project Setup (ZIP) =
= Project Setup (SRC) =


The source mod system lets you build mods that ship with source code that is compiled during run-time by the modloader engine. This has the great advantage of being open and easy to modify on the run but also comes with 2 major disadvantages. Up until game version 1.6.x you only have a hardcoded list of library references available to you (System.dll, System.Core.dll, System.Drawing.dll, System.Xml.dll, System.Net.Http.dll, VintagestoryAPI.dll, Newtonsoft.Json.dll, protobuf-net.dll, Tavis.JsonPatch.dll, cairo-sharp.dll), any other reference will not get loaded and thus your mod would fail to compile. The second major disadvantage, affecting all game versions, is that the inbuilt source code compiler can only compile code only up until C# 6.0, so newer language feature are not supported. If either of these disadvantages are a showstopper to you, we advice you to build a compiled mod.
== Get the Modtemplate ==
== Get the Modtemplate ==


To get started download the VSModTemplate solution ([https://github.com/anegostudios/vsmodtemplate/releases/download/1.3/VSModTemplate-v1.3.zip here]). Now you simply need to extract the zip archive to your desired place:
To get started download the VSModTemplate solution ([https://github.com/anegostudios/vsmodtemplate/releases/download/1.3.3/VSModTemplate-v1.3.3.zip here]). Now you simply need to extract the zip archive to your desired place:


[[File:VSMods9.png]]
[[File:VSMods9.png]]
Line 98: Line 95:


= Project Setup (DLL) =
= Project Setup (DLL) =
A convenient setup system for dll mods is not finished yet, please refer to the samples mod repository until then: https://github.com/anegostudios/vsmodexamples
Confirmedusers, editor, Administrators
886

edits