Modinfo

From Vintage Story Wiki
This page contains changes which are not marked for translation.
Other languages:

This page was last verified for Vintage Story version 1.19.


Overview

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:

{
  "type": "code",
  "modid": "mycoolmod",
  "name": "My Cool Mod (very cool)",
  "authors": ["SakuraSpiritKid69"],
  "description": "Mod that is so cool it freezes you.",
  "version": "1.2.3",
  "dependencies": {
    "game": "1.14.10",
  }
}

Reference

The following properties and values are supported. Bold values are required. Properties are not case sensitive and may appear in any order.

Property Example Description
type "type": "code" The type of this mod. Can be "Theme", "Content" or "Code"
name "name": "My cool Mod" The name of this mod.
modid "modid": "mycoolmod" The mod id (domain) of this mod.
Must only contain lowercase letters and numbers. No special chars, whitespaces, uppercase letters, etc. allowed.
If it is not supplied it will be generated from the name, but it is recommended that you choose the id yourself because it will be used as a domain for your mod.
version "version": "1.2.3" Version of this mod (used for dependency resolution)
networkVersion "networkVersion" : "1.2.3" The network version of this mod.
Change this number when a user that has an older version of your mod should not be allowed to connected to server with a newer version.
Default value is the version.
textureSize "textureSize" : 32 If the mod is a texture pack that changes topsoil grass textures, define the texture size here. Default value = 32
description "description": "Mod that is so cool it freezes you." A short description of what this mod does.
website "website": "https://wiki.vintagestory.at" Location of the website or project site of this mod.
authors "authors": ["SakuraSpiritKid69"] Names of people working on this mod. Must be formatted as an array, even if there is only one author.
contributors "contributors": ["noone"] Names of people contributing to this mod.
side "side" : "Universal" Which side(s) this mod runs on. Can be "Server", "Client" or "Universal". Default value = "Universal"
requiredOnClient "requiredOnClient": true If set to false and the mod is universal, clients don't need the mod to join. Default value = True
requiredOnServer "requiredOnServer": true 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 "dependencies": { "game": "1.12.14", "survival": "1.12.14"} List of mods (and versions) this mod depends on.

The game uses 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.

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

The modinfo.json properties correspond directly to the fields and properties on the ModInfo API class (and are loaded into that class internally using JsonConvert.DeserializeObject). Check the available fields in the api documentation to see a full up to date list of all possible properties.


Content Modding
Basics Content Mods Developing a Content Mod Packaging & Release
Tutorials
Concepts Modding Concepts Modinfo Variants Domains Patching Remapping World Properties
Moddable Assets
Uncategorized
Icon Sign.png

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 Theme Pack
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 ItemEntityEntity BehaviorsBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity BehaviorsCollectible BehaviorsWorld properties
Workflows & Infrastructure Modding Efficiency TipsMod-engine compatibilityMod ExtensibilityVS Engine
Additional Resources Community Resources Modding API Updates Programming Languages List of server commandsList of client commandsClient startup parametersServer startup parameters
Example ModsAPI DocsGitHub Repository