Modinfo.lua: Difference between revisions

From Spring
Jump to navigationJump to search
Flozi (talk | contribs)
→Source: Add link to engine source
Flozi (talk | contribs)
→Example: Add a full example
Line 15: Line 15:


<code><pre>
<code><pre>
ADD ME
local modinfo = {
  name = "My Awesome Spring Game v1.0",
  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
</pre></code>
</pre></code>


[[Category:Game development]]
[[Category:Game development]]
[[Category:gamedata]]
[[Category:gamedata]]

Revision as of 16:16, 16 April 2011

Location

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

Purpose

define a content package as Spring game. Read by lobbies and engine.

Source

The engine source code which parses the data from this file is viewable here: https://github.com/spring/spring/blob/master/rts/System/FileSystem/ArchiveScanner.cpp

Details

Example

local modinfo = {
  name = "My Awesome Spring Game v1.0",
  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