Modding:Mod Packaging: Difference between revisions

From Vintage Story Wiki
m
VeryGoodDog moved page Mod Packaging to Modding:Mod Packaging
m (VeryGoodDog moved page Mod Packaging to Modding:Mod Packaging)
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Zip Files ==
== Zip Files ==


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 C# DLLs (and optionally, PDB files) go directly into the zip file root as well.
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.


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.


<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: gray;'>
   <tr style='background-color: rgba(180, 160, 128, 0.15);'>
     <th width='500px' align='left'>Zip File Structure</th>
     <th width='500px' align='left'>Zip File Structure</th>
   </tr>
   </tr>
Line 28: Line 28:
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="dll" data-tt-parent="root">code files (*.dll, *.pdb and *.cs)</div></td>
     <td scope="row"><div class="tt" data-tt-id="dll" data-tt-parent="root">compiled sources files (*.dll and *.pdb)</div></td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 34: Line 34:
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="src-dll" data-tt-parent="src">code files - folders allowed (*.dll, *.pdb and *.css)</div></td>
     <td scope="row"><div class="tt" data-tt-id="src-dll" data-tt-parent="src">source code files - folders allowed (*.cs)</div></td>
   </tr>
   </tr>
</table>
</table>
Line 46: Line 46:
{
{
   "type": "content",
   "type": "content",
  "modid": "creativemdexamplemod",
   "name": "My Example Content Mod",
   "name": "My Example Content Mod",
   "description" : "This is an example mod, which does nothing",
   "description" : "This is an example mod, which does nothing",
Line 71: Line 72:


<syntaxhighlight lang=json>
<syntaxhighlight lang=json>
   "dependency": {
   "dependencies": {
     "game": "1.5.3"
     "game": "1.5.3"
   },
   },
</syntaxhighlight>
</syntaxhighlight>


Means it requires at least VintageStory v1.5.3 or a newer version.
Means it requires at least VintageStory v1.5.3 or a newer version. For more info see [[Modinfo]].


== Icon ==
== Icon ==
Confirmedusers, Bureaucrats, editor, Administrators
1,522

edits