Modinfo

From Vintage Story Wiki
Jump to navigation Jump to search
This page was last verified for Vintage Story version 1.15

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 using logic described here: https://semver.org/, so for example 1.15.0 > 1.15.0-rc.3 > 1.15.0-rc.2
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.
You can set the value to an empty string or an asterisk ("game": "*") to allow compatibility with all versions.

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.


Main Page: Modding
Green Items require C# coding
Basics

Getting Started | Mod Types | Simple Examples

Asset System | Textures | Items | Recipes | Blocks | Model Creator | Animation Basics | VTML & Icons | Mod Packaging & Release | Modinfo | Debugging

Advanced

JSON Patching | Advanced JSON Items | The Remapper | Server-Client Considerations

Setting Up Your Development Environment (General - Windows - Linux)

Advanced Blocks | Advanced Items | Item-Block Interactions | Block Behavior | Block Entities | Particle Effects | World Access | Inventory Handling | Chat Commands | GUIs | Server-Client Networking | Monkey patching (Harmony)

Data Management

Savegame Data Storage | ModConfig File | Chunk Data Storage | Tree Attribute

Worldgen

WorldGen Concepts | Terrain | Ores | Trees | WorldGen API

Rendering

Shaders and Renderers

Property Overview

Item | Entity | Block | Block Behaviors | Block Classes | Block Entities | Block Entity Behaviors

Workflows & Infrastructure

Modding Efficiency Tips | Mod Extensibility | Load Order

Additional Resources

List of server commands | List of client commands | Client startup parameters | Creative Starter Guide | ServerBlockTicking | Bot System | WorldEdit | Cinematic Camera

Example Mods | API Docs | GitHub Repository