Modinfo: Difference between revisions

From Vintage Story Wiki
m
Updated navbox to new content navbox.
m (Double checked information and updated version)
m (Updated navbox to new content navbox.)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{GameVersion|1.15}}
<languages/><translate>
<!--T:1-->
{{GameVersion|1.19}}


== Overview ==
== Overview == <!--T:2-->
Every mod needs some basic information to be recognized as a mod. This can either happen by putting this info into the assembly (not recommended anymore) or by using the modinfo.json. The modinfo.json sits at the root of your mod directory and looks for example like this:
Every mod needs some basic information to be recognized as a mod. This can either happen by putting this info into the assembly (not recommended anymore) or by using the modinfo.json. The modinfo.json sits at the root of your mod directory and looks for example like this:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
Line 17: Line 19:
</syntaxhighlight>
</syntaxhighlight>


== Reference ==
== Reference == <!--T:3-->
The following properties and values are supported. '''Bold''' values are required. Properties are not case sensitive and may appear in any order.
The following properties and values are supported. '''Bold''' values are required. Properties are not case sensitive and may appear in any order.


<!--T:4-->
{| class="wikitable"
{| class="wikitable"
! Property !! Example !! Description
! Property !! Example !! Description
Line 49: Line 52:
| requiredOnServer|| <code>"requiredOnServer": true</code> ||If set to false and the mod is universal, the mod is not disabled if it's not present on the server. Default value = True
| requiredOnServer|| <code>"requiredOnServer": true</code> ||If set to false and the mod is universal, the mod is not disabled if it's not present on the server. Default value = True
|-
|-
| dependencies || <code>"dependencies": { "game": "1.12.14", "survival": "1.12.14"}</code> ||  List of mods (and versions) this mod depends on.<br>The game uses SemVer to compare using logic described here: [https://semver.org/ https://semver.org/], so for example 1.15.0 > 1.15.0-rc.3 > 1.15.0-rc.2<br>For example, if you set your mod to have a dependency of "game": "1.15.0-rc.2", it will be compatible with that version and all versions released at a later date.<br>You can set the value to an empty string or an asterisk ("game": "*") to allow compatibility with all versions.
| dependencies || <code>"dependencies": { "game": "1.12.14", "survival": "1.12.14"}</code> ||  List of mods (and versions) this mod depends on.<br><br>The game uses [https://semver.org/ SemVer] to compare, so for example "1.15.0" > "1.15.0-rc.3" > "1.15.0-rc.2" > "1.15.0-pre.1". You can set the value to an empty string or an asterisk ("game": "*") to allow compatibility with all versions.<br><br>Although the game follows the general logic of SemVer, it does not fully implement it. So for <prerelease> you can only use rc > pre > dev and <metadata> is not supported.
|}
|}


=== Technical Note ===
=== Technical Note === <!--T:5-->
The <code>modinfo.json</code> properties correspond directly to the fields and properties on the [https://apidocs.vintagestory.at/api/Vintagestory.API.Common.ModInfo.html ModInfo] API class (and are loaded into that class internally using <code>JsonConvert.DeserializeObject</code>). Check the available fields in the api documentation to see a full up to date list of all possible properties.
The <code>modinfo.json</code> properties correspond directly to the fields and properties on the [https://apidocs.vintagestory.at/api/Vintagestory.API.Common.ModInfo.html ModInfo] API class (and are loaded into that class internally using <code>JsonConvert.DeserializeObject</code>). Check the available fields in the api documentation to see a full up to date list of all possible properties.


{{Navbox/modding|Vintage Story}}
<!--T:6-->
{{Navbox/contentmodding}}
</translate>
Confirmedusers
538

edits