Description
Mod_info.json is a required file that informs the game engine how to set up and use it. Every mod must have a mod_info.json file. It is formatted in Starsector's somewhat loose JSON schema
Example
{
"id":"examplea", # required code id
"name":"Example Mod A", # required friendly name
"version":"Beta 1", # required mod version
"description":"Example mod_info.json file", # required friendly mod description
"gameVersion":"0.8.1", # required starsector version this was designed for
"author":"example mod author name", # author's name
"utility":"false", # utility toggle
"jars":["jars/example.jar"], # mod jars
"modplugin":"data.scripts.ModPlugin", # mod java classes
"totalConversion":"false", # total conversion toggle
"replace":[""] # files to not load (for total conversions)
}
Required elements
id
- Unique ID of your mod. Ensure it is unique from other mods. By convention it is the same or similar to the mod folder. Text field
name
- This is the user facing friendly name of your mod, as it will appear in the mod loader. Text field
version
- The version of your mod (not the intended version of Starfarer). Displayed in the mod loader next to the friendly mod name. Text Field
description
- The description of your mod as it appears in the mod loader. Text field
gameVersion
- The base version of Starfarer that the mod is intended for. While required this currently (0.8) isn't used to perform any checks or other actions. Text field
Optional elements
author
- The name of the author. Displayed in the mod loader following the description. Text field
utility
- Denotes if the mod is a utility mod. Utility mods can be loaded alongside total conversions. Defaults to "false", from "true" or "false"
jars
- The specified jar files will be loaded by the game on startup and will be accessible from scripts or anywhere where a class is referred to by name. If a class is found both in a jar file and as a .java file in the same package then the one from the jar will be used. JSON array
modplugin
- The specified class must implement the com.fs.starfarer.api.ModPlugin interface. A new instance of it will be created and appropriate methods will be called when various lifecycle events occur, such as when the game application has finished loading. See com/fs/starfarer/api/ModPlugin.java in starfarer.api.zip for details. JSON array
Total Conversion
These are optional elements that should only normally be used in a total conversion mod
totalConversion
- If set to "true" then no other mods will be loaded alongside it, excepting utility mods. The game will also skip loading ship variants that refer to hull ids that no longer exist (i.e. if the total conversion replaces ship_data.csv with a new ship set). Defaults to "false", from "true" or "false"
replace
- Core files that should not be merged & loaded, in a relative path from the starsector-core base folder. Graphics, sound and .java files are automatically replaced and don't need to be specified here. Mods that aren't total conversions probably shouldn't use this parameter, as they're unlikely to be compatible with other mods as a result. JSON array
Reference
Mod descriptor (mod_info.json) post from Alex Nov 2012 [1]
At least two versions out of date. Last verified for version 0.8.1a-RC8. Please refer to Version History and update this page
Return to: Modding