Modding:Setting up your Development Environment: Difference between revisions

From Vintage Story Wiki
Line 53: Line 53:
[[File:VSMods9.png]]
[[File:VSMods9.png]]


Navigate to <code>VSMods</code> and double click <code>VSMods.sln</code> (only works if VisualStudio is installed). Alternatively you can also start VisualStudio hit <code>Open Project/ Solution</code>, navigate to the extracted folder and select <code>VSMods.sln</code>. Once it has loaded you can run your first test by hitting <code>start</code> [[File:VSMods10.png]]. If everything has been done correctly VintageStory should start.
Navigate to <code>VSMods</code> and double click <code>VSMods.sln</code> (only works if VisualStudio is installed). Alternatively you can also start VisualStudio hit <code>Open Project/ Solution</code>, navigate to the extracted folder and select <code>VSMods.sln</code>.
 
But before you can start to work, you have to setup the ModTools first.


== Run ModTools ==
== Run ModTools ==


The ModTools allow you to do various tasks rather easily by typing in a command. There is no difference for each platform except of the way how to start it ...
The ModTools allow you to do various tasks rather easily by typing in a command. Each platform requires a different way to start it.
 
[[File:ModTools.png]]


=== Windows ===
=== Windows ===
Line 72: Line 72:


Double-click <code>modtools.command</code>.
Double-click <code>modtools.command</code>.
[[File:ModTools.png]]
== Setup ==
''Syntax: <code>setup [optional path]</code>''
Before doing anything else you have to setup your workspace. Just type in <code>setup</code> and it will automatically try to locate your VintageStory installation directory. If it cannot find it, you will be asked to type in the full path. Once you have entered your path, it will update your project files so you can start to work with it. Now open the project again and run your first test by hitting <code>start</code> [[File:VSMods10.png]]. If everything has been done correctly VintageStory should start.


== Add Mod ==
== Add Mod ==
''Syntax: <code>add <modid></code>''
Allows you to add a mod to your workspace. It's fully automated and will generate an <code>assets</code> and a <code>src</code> folder, including a <code>modinfo.json</code> file. The mod will be added to your project and will be loaded by VintageStory. Also make sure to fill in all additional information in <code>modinfo.json</code>.


== Delete Mod ==
== Delete Mod ==
''Syntax: <code>delete <modid></code>''
Make sure your project is closed, otherwise you might run into some difficulties. It will delete the given mod completely (irreversible).


== Pack Mod ==
== Pack Mod ==
''Syntax: <code>pack <modid></code>''
Creates a mod zip file and places it in <code>/releases/<modid>/<modid>_v<modversion>.zip</code>. This file is ready for use and can be shared with other people.
''Syntax: <code>pack-all</code>''


== Update ==
Packs all mods in your workspace at once.


= Project Setup (DLL) =
= Project Setup (DLL) =