Skip to content
Khanx edited this page Jan 7, 2021 · 3 revisions

The modInfo.json file is the cornerstone of your mod. It is the JSON file that provides basic information about your mod such as name and description, but also about the location of the files used by your mod.

Let's see an example of modInfo.json file from the Compass mod:

[
	{
		"name" : "Compass",
		"description" : "The compass is a easy way to know the cardinal direction and to find your colonies.",
		"version" : "0.1.1.1",
		"dllpath": "Compass.dll",
		"compatibleversions":
			[
				"0.8.0"
			],
		"jsonFiles" : [
			{
				"relativePath" : "./gamedata/types.json",
				"fileType" : "addNewTypes",
				"index" : -1000000
			},
			{
				"relativePath" : "./gamedata/recipes.json",
				"fileType" : "addOrReplacePlayerRecipes",
				"index" : -1000000,
			},
			{
				"fileType": "addOrOverrideLocalization",
				"relativePath": "gamedata/localization/en-US/en-US.json"
			},
			{
				"fileType": "addOrOverrideLocalization",
				"relativePath": "gamedata/localization/es-ES/es-ES.json"
			}
		]
	}
]

Simply by seeing the keys used in the JSON file it is possible to understand it. It is important to mention that there are some keys that are not mandatory.

It is important to highlight the keys of "dllpath" (provides information about the location of the .dll file used ) and "jsonFiles" (Provides information about the type and location of the json files used by the mod). The types of jsonfiles that can be used are listed here.

You can find more info about the keys of the modInfo.json file here.

More examples of modInfo.json files:

PS: The file location path is case sensitive, which means that it is not the same to say that the file is called "Compass.dll" than "compass.dll". Therefore, be careful with capital letters when indicating the location of the files. Always use the correct name taking into account the capital letters otherwise the mod may not work in certain operating systems (Linux).