Confirmedusers, Bureaucrats, editor, Administrators
1,795
edits
CreativeMD (talk | contribs) |
No edit summary |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
= Software | == Software == | ||
When you are ready to begin coding mods for Vintage Story, you probably would want to set up a development environment that simplifies the process of coding and testing your creations. There are several applications that aid you in the development of mods. Here are some suggestions: | |||
* [https://www.visualstudio.com/de/vs/community/ Visual Studio Community] is a free and very powerful development environment and covered in below guide. This is also the tool the Vintage Story Team uses to build the game. It also has a [https://www.visualstudio.com/vs/mac/ MacOS Version]. | |||
= | * [https://code.visualstudio.com/ Visual Studio Code] is very a lightweight version of Visual Studio. Our precious community member [https://twitter.com/koppeh?lang=en copygirl] is using this tool and also [https://github.com/copygirl/howto-example-mod wrote a set up guide on github] | ||
* [https://www.monodevelop.com/ MonoDevelop] is another IDE that is more lightweight than Visual Studio Community. | |||
* [https://notepad-plus-plus.org/ Notepad++] your very basic text editing tool with some extra features. You can code mods in any text editor, really. It does however lack instant context sensitive feedback while programming, which is very helpful. If you choose this way, you can use the game itself to trial and error mods by reloading them while the game is running. | |||
== Install Development Tool == | |||
VintageStory is developed in C#. Choose one of the above IDEs or other alternatives. We suggest '''Visual Studio Community''' on Windows and on Linux you may want to use '''MonoDevelop''' or '''Visual Studio Code'''. | |||
=== Installation Guide on Linux (MonoDevelop) === | |||
'''1. Install FlatPak''' | '''1. Install FlatPak''' | ||
Line 30: | Line 29: | ||
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. | ||
== Get the Modtemplate == | == Get the Modtemplate == | ||
To get started download the VSModTemplate solution ([https://github.com/anegostudios/vsmodtemplate/releases/download/1.4. | To get started download the VSModTemplate solution ([https://github.com/anegostudios/vsmodtemplate/releases/download/1.4.1/VSModTemplate-v1.4.1.zip here]). Now you simply need to extract the zip archive to your desired place: | ||
[[File:VSMods9.png]] | [[File:VSMods9.png]] | ||
Line 97: | Line 92: | ||
= Project Setup (DLL) = | = Project Setup (DLL) = | ||
Dll mods are way more powerful than source mods, but they have two major downsides. Firstly, they are not able to carry assets which will be loaded by the game, secondly because they are so powerful they can be dangerous. Besides that dll mods can (unlike the others) have cross mod references, provide APIs and use C# 7. We recommend this type of mod for more experienced mod developers. | |||
== Add Mod == | |||
''Syntax: <code>add-dll <modid></code>'' | |||
Adds a new mod project to your workspace. A generated <code>AssemblyInfo.cs</code> file will be in your properties folder, it contains the mod information (name, author, version, description etc.) so make sure to change them before you spread the mod to other people. The mod will be added to your visual studio solution and will be loaded by VintageStory. | |||
== Delete Mod == | |||
''Syntax: <code>delete <modid></code>'' | |||
Before executing, make sure your project is closed, otherwise you might run into some difficulties. Running this command will delete the given mod completely (irreversible). | |||
== Release Mod == | |||
Once you launch VintageStory in your workspace, the dll mod will be compiled. You can find it in your <code>mods</code> folder, with the give name: <code><modid>.dll</code>. If you want to upload this mod or share it with your friends this is the file you need to use. |