Modding:WorldGen API/ru: Difference between revisions

From Vintage Story Wiki
Created page with "== Класс VSTreasureChestMod == Основным классом и отправной точкой нашего мода будет VSTreasureChestMod."
(Created page with "Моддинг: API WorldGen")
 
(Created page with "== Класс VSTreasureChestMod == Основным классом и отправной точкой нашего мода будет VSTreasureChestMod.")
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{GameVersion|1.15}}
{{GameVersion|1.15}}
<languages/>== Intro ==
<languages/>== Введение ==


We will be walking through how to plug in and add your own features to the world generation code of Vintage Story by looking at a demo mod called VSTreasureChest. The full source code for this project can be found [https://github.com/anegostudios/VSTreasureChest on Github]. We are going to walk through coding it from scratch.
Мы рассмотрим, как подключить и добавить свои собственные функции в код генерации мира Vintage Story, рассмотрев демо-мод под названием VSTreasureChest. Полный исходный код этого проекта можно найти [https://github.com/anegostudios/VSTreasureChest на Github]. Мы собираемся пройтись по кодированию с нуля.


== VSTreasureChest Mod==
== Мод VSTreasureChest==
This mod places treasure chests around the world for the user to find. Each treasure chest has a random number of ingots in them. The mod only places treasure chests beside trees. It also adds a server command that can be run in the chat window called /treasure that places a treasure chest in front of the player. This can be useful for testing in case you want to change what items are in the chest and you don't want to bother looking for the chest for verification.
Этот мод размещает сундуки с сокровищами по всему миру, чтобы пользователь мог их найти. В каждом сундуке с сокровищами находится случайное количество слитков. Мод размещает сундуки с сокровищами только рядом с деревьями. Он также добавляет команду сервера, которую можно запустить в окне чата под названием /treasure, которая помещает сундук с сокровищами перед игроком. Это может быть полезно для тестирования, если вы хотите изменить, какие предметы находятся в сундуке, и вы не хотите искать сундук для проверки.


[[File:treasure chest.png|thumb]]
[[File:treasure chest.png|thumb]]


== Getting started ==
== Начало работы ==
Please follow the instructions [[Setting up your Development Environment|here]] for setting up your development environment. We named our project VSTreasureChest but you can choose any name you like. We will do one different thing. When you get to the debug command line arguments instead of passing /flatworld we are going to pass /stdworld:test. The reason we are doing this is because we are going to be placing our chest beside a tree. The /flatworld generates a flat world with no trees so that won't help us much in this scenario. However, depending on the specific terrain gen features you are doing you may want to use /flatworld in the future.
Следуйте инструкциям [[Setting up your Development Environment/ru|здесь]] для настройки среды разработки. Мы назвали наш проект VSTreasureChest, но вы можете выбрать любое имя. Мы будем делать одну другую вещь. Когда вы доберетесь до аргументов командной строки отладки, вместо передачи /flatworld мы будем передавать /stdworld:test. Причина, по которой мы это делаем, заключается в том, что мы собираемся разместить наш сундук рядом с деревом. /flatworld создает плоский мир без деревьев, так что в этом сценарии это нам не сильно поможет. Однако, в зависимости от конкретных особенностей генерации ландшафта, которые вы делаете, вы можете использовать /flatworld в будущем.




== The VSTreasureChestMod class ==
== Класс VSTreasureChestMod ==
The main class and the starting point of our mod will be VSTreasureChestMod.
Основным классом и отправной точкой нашего мода будет VSTreasureChestMod.




Confirmedusers
13,514

edits