Modding:Mod Packaging/ru: Difference between revisions
Mirotworez (talk | contribs) (Created page with "Чтобы мод было легко установить и использовать, его следует запаковать в [https://en.wikipedia.org/wiki/Zip_(file_...") |
Mirotworez (talk | contribs) (Created page with "Обратите внимание, что если у вас есть мод с кодом, который не имеет ресурсов (т. е. ваш мод предст...") |
||
Line 7: | Line 7: | ||
Чтобы мод было легко установить и использовать, его следует запаковать в [https://en.wikipedia.org/wiki/Zip_(file_format) zip-файл]. Любые активы (изображения, файлы .json и т. д.) помещаются в каталог «assets» в корне zip-файла, любые исходные файлы в папку «src», а любые библиотеки DLL (и, возможно, файлы PDB) помещаются непосредственно в zip-файл. Корневая папка. | Чтобы мод было легко установить и использовать, его следует запаковать в [https://en.wikipedia.org/wiki/Zip_(file_format) zip-файл]. Любые активы (изображения, файлы .json и т. д.) помещаются в каталог «assets» в корне zip-файла, любые исходные файлы в папку «src», а любые библиотеки DLL (и, возможно, файлы PDB) помещаются непосредственно в zip-файл. Корневая папка. | ||
Обратите внимание, что если у вас есть мод с кодом, который не имеет ресурсов (т. е. ваш мод представляет собой единственную DLL C#), можно отправить чистую DLL, не упаковывая ее в zip-архив. Однако это не очень хорошая идея, так как при таком распространении трудно включить файл PDB, а загрузка DLL непосредственно в Windows может привести к проблемам с загрузкой вашего мода из-за политик безопасности, применяемых к файлам, загруженным из Интернета. | |||
<table id="treeviewtable" class="table table-bordered tt-table" style='table-layout: fixed'> | <table id="treeviewtable" class="table table-bordered tt-table" style='table-layout: fixed'> |
Revision as of 11:55, 21 February 2022
Эта страница проверялась в последний раз для версии Vintage Story 1.15.
Если ваш мод изменяет только визуальные эффекты, звуки и другие «тематические» активы, см. также страницу Theme Pack.
Zip-файлы
Чтобы мод было легко установить и использовать, его следует запаковать в zip-файл. Любые активы (изображения, файлы .json и т. д.) помещаются в каталог «assets» в корне zip-файла, любые исходные файлы в папку «src», а любые библиотеки DLL (и, возможно, файлы PDB) помещаются непосредственно в zip-файл. Корневая папка.
Обратите внимание, что если у вас есть мод с кодом, который не имеет ресурсов (т. е. ваш мод представляет собой единственную DLL C#), можно отправить чистую DLL, не упаковывая ее в zip-архив. Однако это не очень хорошая идея, так как при таком распространении трудно включить файл PDB, а загрузка DLL непосредственно в Windows может привести к проблемам с загрузкой вашего мода из-за политик безопасности, применяемых к файлам, загруженным из Интернета.
Zip File Structure |
---|
.zip |
assets |
domain |
asset files (tree overview) |
modinfo.json |
modicon.png |
compiled sources files (*.dll and *.pdb) |
src |
source code files - folders allowed (*.cs) |
Info file
Every zip-file mod requires a modinfo.json
inside the root directory of the archive. Otherwise the entire mod will be ignored. This info file specifies what kind of mod it is, its name, author, etc.
An example of a theme pack info file (modinfo.json
):
{
"type": "content",
"modid": "creativemdexamplemod",
"name": "My Example Content Mod",
"description" : "This is an example mod, which does nothing",
"authors": ["CreativeMD"],
"version": "1.0",
"dependencies": {
"game": "",
"survival": ""
},
"website": "http://example.com"
}
"type": "content",
Besides "type": "content"
, there is also "type": "theme"
and "type": "code"
.
"type": "content"
: Defines this mod as being a Content Mod. Content Mods cannot contain any C# code (if it does they will be ignored)."type": "theme"
: Defines this mod as being a Theme Pack. Theme Packs cannot override gameplay affecting assets categories (such as blocktypes, itemtypes and so on) and no C# code will be loaded."type": "code"
: Defines this mod as being a Code Mod. Code Mods are the same as a Content Mods, except they can also load C# code to do things that are not possible with JSON.
"dependencies": {
"game": "1.5.3"
},
Means it requires at least VintageStory v1.5.3 or a newer version. For more info see Modinfo.
Icon
Note: Mod icons supported starting from 1.16.
The file modicon.png
(if it exists) will be used and shown in the mod manager menu.
Distribution and Installation
To install a mod simply place the zip file in the Mods
directory in your Vintagestory directory.
You can upload your mod to the Vintage Story Mod Database so people can find it.
Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.
Modding | |
---|---|
Modding Introduction | Getting Started • Пакет тем |
Content Modding | Content Mods • Developing a Content Mod • Basic Tutorials • Intermediate Tutorials • Advanced Tutorials • Content Mod Concepts |
Code Modding | Code Mods • Setting up your Development Environment |
Property Overview | Item • Entity • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • World properties |
Workflows & Infrastructure | Modding Efficiency Tips • Mod-engine compatibility • Mod Extensibility • VS Engine |
Additional Resources | Community Resources • Modding API Updates • Programming Languages • List of server commands • List of client commands • Client startup parameters • Server startup parameters Example Mods • API Docs • GitHub Repository |