All translations

From Vintage Story Wiki

Enter a message name below to show all available translations.

Message

Found 2 translations.

NameCurrent message text
 h English (en)We can now compile our mod, add it to our VintageStory mod folder and test it ingame. If the there are occasional chat messages saying "There aren't any listed tips", our mod is working. We are ready to move on to the next step - setting up "SpawnMod" and then having it interact with "TipMod".
== Setting up SpawnMod ==
Let's first setup our mods functionality. We register a command which teleports the player to spawn. Conveniently, the [http://apidocs.vintagestory.at/api/Vintagestory.API.Server.IServerPlayer.html <code>IServerPlayer</code>] object stores it's spawn position, as well as the [http://apidocs.vintagestory.at/api/Vintagestory.API.Common.IPlayer.html#Vintagestory_API_Common_IPlayer_Entity <code>IPlayerEntity</code>], which defines a method for teleporting itself to a location. 
<syntaxhighlight lang="c#">
   // In SpawnMod.cs
   class SpawnMod : ModSystem
   {
       public override void StartServerSide(ICoreServerAPI api)
       {
           base.StartServerSide(api);
 h Russian (ru)Теперь мы можем скомпилировать наш мод, добавить его в папку с модами VintageStory и протестировать его в игре. Если в чате время от времени появляются сообщения «Нет советов в списке», наш мод работает. Мы готовы перейти к следующему шагу — настроить «SpawnMod», а затем заставить его взаимодействовать с «TipMod».
== Настройка SpawnMod ==
Давайте сначала настроим функциональность наших модов. Мы регистрируем команду, которая телепортирует игрока на спавн. Для удобства объект [http://apidocs.vintagestory.at/api/Vintagestory.API.Server.IServerPlayer.html <code>IServerPlayer</code>] хранит свою позицию появления, а также [http://apidocs .vintagestory.at/api/Vintagestory.API.Common.IPlayer.html#Vintagestory_API_Common_IPlayer_Entity <code>IPlayerEntity</code>], который определяет метод телепортации в определенное место.
<syntaxhighlight lang="c#">
   // In SpawnMod.cs
   class SpawnMod : ModSystem
   {
       public override void StartServerSide(ICoreServerAPI api)
       {
           base.StartServerSide(api);