Modding:Commands/ru: Difference between revisions

From Vintage Story Wiki
no edit summary
(Created page with "Эту команду может использовать любой игрок, которому разрешено отправлять сообщения (по умолча...")
No edit summary
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{GameVersion|1.15}}
{{GameVersion|1.15}}
Ever wanted to know how to add a command to the game? If yes, this is the right place to get an answer.
Вы когда-нибудь хотели узнать, как добавить команду в игру? Если да, то это правильное место, чтобы получить ответ.


== Preparations ==
== Подготовка ==


The idea is to add a command which makes it easier for your mates to locate you. Therefore we will spawn some particles alongside a playing sound, so others can see and hear where you are at the moment.
Идея состоит в том, чтобы добавить команду, которая облегчит вашим товарищам поиск вас. Поэтому мы будем создавать некоторые частицы вместе с игровым звуком, чтобы другие могли видеть и слышать, где вы находитесь в данный момент.


You can download the required assets [https://wiki.vintagestory.at/images/1/16/Here_Assets.zip here]. Just extract them in your mods directory and you are good to go.
Вы можете скачать необходимые ресурсы [https://wiki.vintagestory.at/images/1/16/Here_Assets.zip здесь]. Просто извлеките их в каталог модов, и все готово.


== Implementation ==
== Реализация ==


First of all you need to add another mod to your workspace. I will use the modid <code>here</code>, so I will type in <code>add here</code> in modtools to create a new mod. Additionally I will create <code>Command.cs</code> in the <code>src</code> directory.
Прежде всего, вам нужно добавить еще один мод в свое рабочее пространство. Я буду использовать modid <code>here</code>, поэтому я наберу <code>add here</code> в modtools, чтобы создать новый мод. Кроме того, я создам <code>Command.cs</code> в каталоге <code>src</code>.


Как всегда нам нужно создать класс, расширяющий <code>ModSystem</code>:
Как всегда нам нужно создать класс, расширяющий <code>ModSystem</code>:
Line 70: Line 70:
</syntaxhighlight>
</syntaxhighlight>


If you want to learn more about how to use particles you can check out this [[Simple Particles|tutorial]].
Если вы хотите узнать больше о том, как использовать частицы, вы можете ознакомиться с этим [[Simple Particles/ru|учебником]].


== Testing ==
== Тестирование ==


Finally, we are ready to run our first test:
Наконец, мы готовы запустить наш первый тест:


<youtube>XjHMtl6rSF4</youtube>
<youtube>XjHMtl6rSF4</youtube>


== Download ==
== Скачать ==


Feel free to try it out yourself:
Не стесняйтесь попробовать это самостоятельно:


[https://wiki.vintagestory.at/images/5/5f/Here_v1.1.zip Here_v1.1.zip]
[https://wiki.vintagestory.at/images/5/5f/Here_v1.1.zip Here_v1.1.zip]
{{Navbox/modding|Vintage Story}}
{{Navbox/modding|Vintage Story}}
Confirmedusers
13,514

edits