Confirmedusers
13,514
edits
Mirotworez (talk | contribs) (add translate tag) |
Mirotworez (talk | contribs) (Marked this version for translation) |
||
Line 1: | Line 1: | ||
<languages/><translate> | <languages/><translate> | ||
<!--T:1--> | |||
{{GameVersion|1.15}} | {{GameVersion|1.15}} | ||
<!--T:2--> | |||
If your mod changes only visuals, sounds, and other "theming" assets, refer also to the [[Modding:Theme_Pack|Theme Pack]] page. | If your mod changes only visuals, sounds, and other "theming" assets, refer also to the [[Modding:Theme_Pack|Theme Pack]] page. | ||
== Zip Files == | == Zip Files == <!--T:3--> | ||
<!--T:4--> | |||
To make your mod easy to install and use, it should be packed into a [https://en.wikipedia.org/wiki/Zip_(file_format) zip file]. Any assets (images, .json files, etc) go in a "assets" directory in the root of the zip, any source files into the "src" folder and any DLLs (and optionally, PDB files) go directly into the zip file root folder. | To make your mod easy to install and use, it should be packed into a [https://en.wikipedia.org/wiki/Zip_(file_format) zip file]. Any assets (images, .json files, etc) go in a "assets" directory in the root of the zip, any source files into the "src" folder and any DLLs (and optionally, PDB files) go directly into the zip file root folder. | ||
<!--T:5--> | |||
Please note that if you have a code mod that has no assets (AKA, your mod is a single C# DLL), it is possible to ship the bare DLL without packing it into a zip. This is not really a good idea though, as when distributed this way it is hard to include a PDB file and downloading DLLs directly in Windows can lead to issues with your mod failing to load due to security policies applied to files downloaded from the internet. | Please note that if you have a code mod that has no assets (AKA, your mod is a single C# DLL), it is possible to ship the bare DLL without packing it into a zip. This is not really a good idea though, as when distributed this way it is hard to include a PDB file and downloading DLLs directly in Windows can lead to issues with your mod failing to load due to security policies applied to files downloaded from the internet. | ||
<!--T:6--> | |||
<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'> | ||
<tr style='background-color: rgba(180, 160, 128, 0.15);'> | <tr style='background-color: rgba(180, 160, 128, 0.15);'> | ||
Line 43: | Line 48: | ||
</table> | </table> | ||
== Info file == | == Info file == <!--T:7--> | ||
<!--T:8--> | |||
Every zip-file mod requires a <code>modinfo.json</code> 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. | Every zip-file mod requires a <code>modinfo.json</code> 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. | ||
<!--T:9--> | |||
An example of a theme pack info file (<code>modinfo.json</code>): | An example of a theme pack info file (<code>modinfo.json</code>): | ||
<syntaxhighlight lang=json> | <syntaxhighlight lang=json> | ||
Line 64: | Line 71: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<!--T:10--> | |||
---- | ---- | ||
<!--T:11--> | |||
<syntaxhighlight lang=json> | <syntaxhighlight lang=json> | ||
"type": "content", | "type": "content", | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<!--T:12--> | |||
Besides <code>"type": "content"</code>, there is also <code>"type": "theme"</code> and <code>"type": "code"</code>. | Besides <code>"type": "content"</code>, there is also <code>"type": "theme"</code> and <code>"type": "code"</code>. | ||
<!--T:13--> | |||
* <code>"type": "content"</code>: Defines this mod as being a '''Content Mod'''. Content Mods cannot contain any C# code (if it does they will be ignored). | * <code>"type": "content"</code>: Defines this mod as being a '''Content Mod'''. Content Mods cannot contain any C# code (if it does they will be ignored). | ||
* <code>"type": "theme"</code>: 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. | * <code>"type": "theme"</code>: 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. | ||
* <code>"type": "code"</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. | * <code>"type": "code"</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. | ||
<!--T:14--> | |||
<syntaxhighlight lang=json> | <syntaxhighlight lang=json> | ||
"dependencies": { | "dependencies": { | ||
Line 82: | Line 94: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<!--T:15--> | |||
Means it requires at least VintageStory v1.5.3 or a newer version. For more info see [[Modinfo]]. | Means it requires at least VintageStory v1.5.3 or a newer version. For more info see [[Modinfo]]. | ||
== Icon == | == Icon == <!--T:16--> | ||
'''Note:''' Mod icons supported starting from 1.16. | <!--T:17--> | ||
'''Note:''' Mod icons supported starting from 1.16. | |||
The file <code>modicon.png</code> (if it exists) will be used and shown in the mod manager menu. | The file <code>modicon.png</code> (if it exists) will be used and shown in the mod manager menu. | ||
<!--T:18--> | |||
[[File:Example Mod.png]] | [[File:Example Mod.png]] | ||
== Distribution and Installation == | == Distribution and Installation == <!--T:19--> | ||
<!--T:20--> | |||
To install a mod simply place the zip file in the <code>Mods</code> directory in your [[Vintagestory folder|Vintagestory directory]]. | To install a mod simply place the zip file in the <code>Mods</code> directory in your [[Vintagestory folder|Vintagestory directory]]. | ||
<!--T:21--> | |||
You can upload your mod to the [https://mods.vintagestory.at/ Vintage Story Mod Database] so people can find it. | You can upload your mod to the [https://mods.vintagestory.at/ Vintage Story Mod Database] so people can find it. | ||
<!--T:22--> | |||
{{Navbox/modding|Vintage Story}} | {{Navbox/modding|Vintage Story}} | ||
</translate> | </translate> |