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

From Vintage Story Wiki
Created page with "* Создать новый проект * Добавьте как минимум ссылку на библиотеку <code>VintageStoryApi.dll</code> (в Windows она н..."
(Created page with "== Ручная настройка ==")
(Created page with "* Создать новый проект * Добавьте как минимум ссылку на библиотеку <code>VintageStoryApi.dll</code> (в Windows она н...")
Line 251: Line 251:
== Ручная настройка ==
== Ручная настройка ==


* Create a new project
* Создать новый проект
* Add at least a library reference to the <code>VintageStoryApi.dll</code> (on Windows it's located in the installation directory)
* Добавьте как минимум ссылку на библиотеку <code>VintageStoryApi.dll</code> (в Windows она находится в каталоге установки)
* Open the project properties. Under debug select "Start external program" select the <code>VintageStory.exe</code>. Also adjust the working directory to where the executable is located.
* Откройте свойства проекта. В разделе отладки выберите «Запустить внешнюю программу», выберите <code>VintageStory.exe</code>. Также настройте рабочий каталог, в котором находится исполняемый файл.
* If you compile to a .dll file, set up a ModInfo attribute in your AssemblyInfo.cs ([https://github.com/anegostudios/vsmodtemplate/blob/master/Properties/AssemblyInfo.cs example])
* Если вы компилируете в файл .dll, настройте атрибут ModInfo в файле AssemblyInfo.cs ([пример https://github.com/anegostudios/vsmodtemplate/blob/master/Properties/AssemblyInfo.cs])
** Add the following command line arguments: <code>-openWorld="modsamplestest" -pcreativebuilding --addModPath="C:\path\to\your\bin\folder" --addOrigin="C:\path\to\your\assets\folder\if\you\have\any"</code>
** Добавьте следующие аргументы командной строки: <code>-openWorld="modsamplestest" -pcreativebuilding --addModPath="C:\path\to\your\bin\folder" --addOrigin="C:\path\to\your\assets\folder\if\you\have\any"</code>
* If want to ship a source mod or mod with assets, set up a <code>modinfo.json</code> ([https://github.com/copygirl/CarryCapacity/blob/master/resources/modinfo.json example]). Make sure your folders are set up in a way that the modPath contains the modinfo.json and a folder named "src" containing your source files. Optionally it can also contain an assets folder for your assets.  
* Если вы хотите отправить исходный мод или мод с активами, настройте <code>modinfo.json</code> ([https://github.com/copygirl/CarryCapacity/blob/master/resources/modinfo.json пример ]). Убедитесь, что ваши папки настроены таким образом, что modPath содержит modinfo.json и папку с именем «src», содержащую ваши исходные файлы. При желании он также может содержать папку активов для ваших активов.
** Add the following command line arguments: <code>-openWorld="modsamplestest" -pcreativebuilding --addModPath="C:\path\to\your\modPath"</code>
** Добавьте следующие аргументы командной строки: <code>-openWorld="modsamplestest" -pcreativebuilding --addModPath="C:\path\to\your\modPath"</code>
* I recommend adding the [https://github.com/anegostudios/vsmodexamples/blob/master/Mods/RedirectLogs/src/RedirectLogs.cs RedirectLogs.cs] file to your project, so that you can see the log output in your visual studio output window. Be sure not to ship your mod with it though.
* Я рекомендую добавить в ваш проект файл [https://github.com/anegostudios/vsmodexamples/blob/master/Mods/RedirectLogs/src/RedirectLogs.cs RedirectLogs.cs], чтобы вы могли видеть вывод журнала в своем Окно вывода визуальной студии. Однако не отправляйте свой мод вместе с ним.
* Run the project and hope for the best :D
* Запустите проект и надейтесь на лучшее :D
* To ship a mod have a look at [[Mod Packaging]]
* Чтобы отправить мод, посмотрите [[Mod Packaging/ru|Упаковка мода]]


If you are having troubles, you might be able to learn from the [https://github.com/anegostudios/vsmodexamples vsmodexamples project]
If you are having troubles, you might be able to learn from the [https://github.com/anegostudios/vsmodexamples vsmodexamples project]
Confirmedusers
13,514

edits