Modding:Setting up your Linux Development Environment: Difference between revisions

From Vintage Story Wiki
Marked this version for translation
mNo edit summary
(Marked this version for translation)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>
<!--T:1-->
This tutorial is about advanced modding. It should teach you how to setup your development environment and should introduce you into the basics of Mono Develop, this tutorial was written for Linux, if you use Windows you may want to use [[Advanced_Modding|Visual Studio]].
This tutorial is about advanced modding. It should teach you how to setup your development environment and should introduce you into the basics of Mono Develop, this tutorial was written for Linux, if you use Windows you may want to use [[Advanced_Modding|Visual Studio]].


== Install VintageStory ==
== Install VintageStory == <!--T:2-->
First of all download VintageStory and make sure you have installed the newest version of the game, otherwise errors may occur.
First of all download VintageStory and make sure you have installed the newest version of the game, otherwise errors may occur.


== Install FlatPak ==
== Install FlatPak == <!--T:3-->
We will use FlatPak to install MonoDevelop so if you already have FlatPak then you can skip this step. FlatPak have their own guides for many distrobutions [http://flatpak.org/getting.html here].
We will use FlatPak to install MonoDevelop so if you already have FlatPak then you can skip this step. FlatPak have their own guides for many distrobutions [http://flatpak.org/getting.html here].


== Install MonoDevelop ==
== Install MonoDevelop == <!--T:4-->
Now it is time to install MonoDevelop and with FlatPak it is only one command.
Now it is time to install MonoDevelop and with FlatPak it is only one command.
Simply open up a terminal and run the following command.
Simply open up a terminal and run the following command.
Line 17: Line 18:
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.)


<!--T:5-->
To open up MonoDevelop run <code>flatpak run com.xamarin.MonoDevelop</code> in the terminal.
To open up MonoDevelop run <code>flatpak run com.xamarin.MonoDevelop</code> in the terminal.


== API Overview ==
== API Overview == <!--T:6-->
The API interface is mostly documented, but if you feel a need for a reference documentation is is available at [http://apidocs.vintagestory.at]
The API interface is mostly documented, but if you feel a need for a reference documentation is is available at [http://apidocs.vintagestory.at]


<!--T:7-->
Example mods are available on Github: [https://github.com/tyronx/vsmodexamples]
Example mods are available on Github: [https://github.com/tyronx/vsmodexamples]


== Creating a solution (project group) ==
== Creating a solution (project group) == <!--T:8-->
* Open up MonoDevelop and and create a new solution with: '''File -> New Solution...''' (in the top left corner).
* Open up MonoDevelop and and create a new solution with: '''File -> New Solution...''' (in the top left corner).
* Choose '''.NET -> Library''' as a template.
* Choose '''.NET -> Library''' as a template.
Line 49: Line 52:
* Click on '''OK'''.
* Click on '''OK'''.


=== Testing ===
=== Testing === <!--T:9-->
* Click on '''Run -> Start Without Debugging''' or press '''CTRL + F5'''.
* Click on '''Run -> Start Without Debugging''' or press '''CTRL + F5'''.
* Vintage Story should now start.
* Vintage Story should now start.


=== launchmod.sh ===
=== launchmod.sh === <!--T:10-->
<code>
<code>
<nowiki>#!/bin/bash</nowiki><br />
<nowiki>#!/bin/bash</nowiki><br />
Line 62: Line 65:
</code>
</code>


== Hook up logging ==
== Hook up logging == <!--T:11-->
If you want to you can download [[File:RedirectLogs.cs]] and add it to your project, which will allow to see the log of Vintagestory in MonoDevelop. Once you have downloaded the file you can just add it to the project by right clicking on the project and clicking on '''Add -> Add Files...''' then navigating to the file and click '''Open''' then '''Copy the file to the directory.''' and '''OK'''.
If you want to you can download [[File:RedirectLogs.cs]] and add it to your project, which will allow to see the log of Vintagestory in MonoDevelop. Once you have downloaded the file you can just add it to the project by right clicking on the project and clicking on '''Add -> Add Files...''' then navigating to the file and click '''Open''' then '''Copy the file to the directory.''' and '''OK'''.


== Additional command line arguments when debugging ==
== Additional command line arguments when debugging == <!--T:12-->
* -oFoobar open a world named "foobar", if it doesn't exists it will create a new one
* -oFoobar open a world named "foobar", if it doesn't exists it will create a new one
* -pcreativebuilding new worlds are created with given playstyle ("surviveandbuild" or "creativebuilding" by default)
* -pcreativebuilding new worlds are created with given playstyle ("surviveandbuild" or "creativebuilding" by default)
Confirmedusers
13,514

edits