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

From Vintage Story Wiki
(Created page with "== Установить FlatPak == Мы будем использовать FlatPak для установки MonoDevelop, поэтому, если у вас уже есть FlatPak, вы можете пропустить этот шаг. У FlatPak есть собственные руководства для многих дистрибутивов [http://flatpak.org/getting.html здесь].")
(Mark for deletion)
Tag: Replaced
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
<languages/>
{{Delete|Outdated duplicate of [[Modding:Setting up your Development Environment/ru]].}}
Этот туториал посвящен продвинутому моддингу. Он должен научить вас, как настроить среду разработки, и познакомить вас с основами Mono Develop, этот учебник был написан для Linux, если вы используете Windows, вы можете использовать [[Advanced_Modding/ru|Visual Studio]].
 
== Установить VintageStory ==
В первую очередь скачайте VintageStory и убедитесь, что у вас установлена самая новая версия игры, иначе могут возникнуть ошибки.
 
== Установить FlatPak ==
Мы будем использовать FlatPak для установки MonoDevelop, поэтому, если у вас уже есть FlatPak, вы можете пропустить этот шаг. У FlatPak есть собственные руководства для многих дистрибутивов [http://flatpak.org/getting.html здесь].
 
== Установить MonoDevelop ==
Теперь пришло время установить MonoDevelop, а с FlatPak это всего одна команда.
Просто откройте терминал и выполните следующую команду.
<br />
<code>flatpak install --user --from https://download.mono-project.com/repo/monodevelop.flatpakref</code>
<br />
Это может занять несколько минут в зависимости от вашего интернет-соединения. (Последняя версия на момент написания статьи весила около 275 МБ.)
 
Чтобы открыть MonoDevelop, запустите в терминале <code>flatpak run com.xamarin.MonoDevelop</code>.
 
<div lang="en" dir="ltr" class="mw-content-ltr">
== API Overview ==
The API interface is mostly documented, but if you feel a need for a reference documentation is is available at [http://apidocs.vintagestory.at]
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
Example mods are available on Github: [https://github.com/tyronx/vsmodexamples]
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
== Creating a solution (project group) ==
* Open up MonoDevelop and and create a new solution with: '''File -> New Solution...''' (in the top left corner).
* Choose '''.NET -> Library''' as a template.
[[File:mono_new_library.png|800px]]
* Click Next.
* Set your '''Project Name''', see example below, do not change the path if you want to follow along, leave it alone.
[[File:mono_new_library_2.png|800px]]
* Click Create. You should now get a screen that looks somewhat like this:
[[File:mono_new_cs_file.png|800px]]
* Right click on the project (the one highlighted below) and click '''Options'''.
[[File:mono_project_menu.png]]
* Click on '''Run -> Configurations -> Default''' (highlighted below).
[[File:mono_run_config_menu.png]]
* Set the values so they look like below but replace 'cynthia' with your username and 'MyCoolMod' with the name of your project, and click on '''OK'''.
[[File:mono_run_config.png]]
* Right click on the project again and click on '''Add -> New File...'''
* Click on '''Misc -> Empty Text File''' and set ''launchmod.sh'' as the name, click on '''New'''.
[[File:mono_new_file.png]]
* Paste the content from the '''launchmod.sh''' section of this page into the new ''launchmod.sh'' file and save it.
* Right click on '''References''' and click on '''Edit References...'''.
* Click on the '''.Net Assembly''' tab and click on '''Browse...'''.
* Navigate to your Vintage Story installation path (<code>/home/yourusernamehere/ApplicationData/vintagestory</code>) and click on the <code>VintagestoryAPI.dll</code> file.
* Click on '''Open'''.
* Click on '''OK'''.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
=== Testing ===
* Click on '''Run -> Start Without Debugging''' or press '''CTRL + F5'''.
* Vintage Story should now start.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
=== launchmod.sh ===
<code>
<nowiki>#!/bin/bash</nowiki><br />
<nowiki>VINTAGE_PATH="${HOME}/ApplicationData/vintagestory/"</nowiki><br />
<nowiki>MOD_PATH="${VINTAGE_PATH}Mods/"</nowiki><br />
<nowiki>cd ${VINTAGE_PATH}</nowiki><br />
<nowiki>mono Vintagestory.exe -oTestworld -pcreativebuilding</nowiki><br />
</code>
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
== Hook up logging ==
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'''.
</div>
 
<div lang="en" dir="ltr" class="mw-content-ltr">
== Additional command line arguments when debugging ==
* -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)
* --rndWorld always creates a new world with an incrementing file name
</div>
 
{{Navbox/modding|Vintage Story}}

Latest revision as of 12:12, 29 January 2024

Delete.png

This Category talk is a candidate for deletion.
Reason: Outdated duplicate of Modding:Setting up your Development Environment/ru.
Before deletion, check what links to this page, the page history, and the page log.