pub struct ModInfo {
pub name: String,
pub version: Version,
pub title: String,
pub author: String,
pub contact: Option<String>,
pub homepage: Option<Url>,
pub description: Option<String>,
pub factorio_version: FactorioVersion,
pub dependencies: Vec<Dependency>,
pub package: Option<ModPackageInfo>,
}Expand description
The info.json file identifies the mod and defines its version.
Fields§
§name: StringThe internal name of mod.
The game accepts anything as a mod name, however the mod portal restricts mod names to only consist of alphanumeric characters, dashes and underscores. Note that the mod folder or mod zip file name has to contain the mod name, where the restrictions of the file system apply.
The game accepts mod names with a maximum length of 100 characters. The mod portal only accepts mods with names that are longer than 3 characters and shorter than 50 characters.
version: VersionDefines the version of the mod.
title: StringThe display name of the mod, so it is not recommended to use someUgly_pRoGrAmMeR-name here.
Can be overwritten with a locale entry in the mod-name category,
using the internal mod name as the key.
The game will reject a title field that is longer than 100 characters. However, this can be worked around by using the locale entry. The mod portal does not restrict mod title length.
The author of the mod.
This field does not have restrictions, it can also be a list of authors etc. The mod portal ignores this field, it will simply display the uploader’s name as the author.
contact: Option<String>How the mod author can be contacted, for example an email address.
homepage: Option<Url>Where the mod can be found on the internet.
Note that the in-game mod browser shows the mod portal link additionally
to this field. Please don’t put the string "None" here,
it makes the field on the mod portal website look ugly.
Just leave the field empty if the mod doesn’t have
a website/forum thread/discord.
Note: The None variant is perfectly valid to use.
description: Option<String>A short description of what your mod does.
This is all that people get to see in-game.
Can be overwritten with a locale entry in the mod-description category,
using the internal mod name as the key.
factorio_version: FactorioVersionThe Factorio version that this mod supports.
This can only be one Factorio version, not multiple.
However, it includes all .sub (.patch) versions.
While the field is optional, usually mods are developed for versions
higher than the default 0.12, so the field has to be added anyway.
Adding a sub (patch) part, e.g. “0.18.27” will make the mod portal reject the mod and the game act weirdly. That means this shouldn’t be done; use only the major and minor components “major.minor”, for example “1.0”.
Mods with the factorio_version “0.18” can also be loaded in 1.0 and the mod portal will return them when queried for factorio_version 1.0 mods.
dependencies: Vec<Dependency>Mods that this mod depends on or is incompatible with.
If this mod depends on another, the other mod will load first,
see Data-Lifecycle.
An empty Vec allows to work around the default
and have no dependencies at all.
package: Option<ModPackageInfo>Unofficial extensions to the info.json format.
Used by third party packaging tools (such as Facti).