modinfo.lua - beyond-all-reason/springrts_engine_wiki_mirror GitHub Wiki

Location

is a file in the root directory of a Spring Game.

Purpose

The purpose of this file is to define a Spring content package as a game or game content archive. It is read both by the multiplayer lobbies and the engine itself.

Source

The engine source code which parses the data from this file is viewable here:

Details

The following tags are read, all are strings unless otherwise specified:

Examples

Main Game file

local modinfo = {
  name = "My Awesome Spring Game",
  shortName = "MASG",
  game = "My Awesome Spring Game",
  shortGame = "MASG",
  mutator = "Official",
  version = "v1.0",
  description = "An awesome game I made with units",
  url = "http://www.linktomyawesomegame.com/",
  modtype = 1,
}

return modinfo

Mutator

A mutator depends on the main game file, but does not replace it, it will usually have a different and but the same and values as the main game file. It should still have a of .

local modinfo = {
  name = "My Awesome Spring Game Mutator",
  shortName = "MASGM",
  game = "My Awesome Spring Game",
  shortGame = "MASG",
  mutator = "Double Speed Mutator",
  version = "v1.0",
  description = "An awesome mutator I made for MASG",
  url = "http://www.linktomyawesomegame.com/",
  modtype = 1,
  depend = {
    "My Awesome Spring Game v1.0",
  }
}

return modinfo

Base Content

Base content is a hidden, unplayable content package which is depended on by your game. For example you might include music in a hidden content package so that it was not updated with the main game files. It must have a of ( prior to 104.0). The following example is from , which is automatically loaded by Spring for all games.

local modinfo = {
  name = "Spring content",
  version = "v1",
  description = "Mods can depend on this archive to get all the spring content",
  modtype = 4,
  depend = {
    "Spring Bitmaps v1"
  },
}

return modinfo

Further Reading

Forum thread:

Category:gamedata

⚠️ **GitHub.com Fallback** ⚠️