Modding:Metadata file

From Starbounder - Starbound Wiki
Jump to: navigation, search

The metadata file replaces the [MODNAME].modinfo file as of version 1.0 (Cheerful Giraffe, released July 22nd, 2016)[1]. It's an entirely optional JSON file that contains a set of entirely optional parameters. [2].

The metadata file can be named either _metadata or .metadata[3] and is placed at the root of a mod's folder.

(Note: Windows generally takes issue with any file that starts with a period. It's been suggested to either use _metadata for the filename, or name it .metadata. [4] Windows will strip the trailing period.

If you are using Steam for windows, you can upload a mod using the Mod Uploader Tool. This will automatically generate a metadata file for you. Simply click the normal play from Steam, and select the "Launch Mod Uploader Tool" and follow along with the instructions. It should be noted, however, that the uploader does not have fields for "requires", "includes", "priority" or "link", but will not harm any already contained in the file. Should these parameters be needed in a Steam upload, they will need to be manually added prior to uploading.

The metadata file contains general information about the mod, much of which will be displayed in mod's information section via the mod list on the Starbound title screen. (Note: parameter order doesn't matter, and that each parameter is optional; Starbound will load just fine without it. You could for example create a metadata file that only contained an author parameter, or a metadata file that included every parameter except a version number. If you don't need a parameter, don't include it. However, for the sake of releasing mods on Steam, it's strongly suggested you set the name, friendlyname, description and version parameters.

Here's an example of a metadata file that includes every parameter:
{
  "name" : "coolmod",
  "friendlyName" : "Cool mod",
  "description" : "This a cool mod!",
  "author" : "XxX-Cool mod Creator-XxX",
  "version" : "2.00 Alpha Gold",
  "link" : "http://example.com/coolmod",
  "steamContentId" : "000000001",
  "tags" : "Crafting and Building|Weapons|Armor and Clothes",
  "includes" : ["coolmodv1"],
  "requires" : ["anothermod", "coolmod2"],
  "priority" : 0
}
Entry Description
name The "behind the scenes" name that may be referenced by other mods. The requires and includes fields use this parameter.
friendlyName The name that'll show up mostly everywhere else.
description The description of the mod.
Type '\n' for a new line, and escape quotations with a \, such as
"description" : "This mod is \"cool\", if you know what I mean.\n:)"
author The author of the mod.
version The version of the mod.
link An URL that links to the mod. (Steam Workshop URL, Chucklefish Forum, Github, yourwebsite.net, etc)
steamContentId Each Steam workshop item has a unique ID. The Mod Uploader Tool available with Starbound's Steam version will fill this in automatically. Can be quoted (string) or not (number). If the original metadata file is lost, future uploads of a previously uploaded mod will fail unless metadata with a valid ID is provided or the name of the mod is changed; the ID for any workshop item can be found in that item's workshop page URL.
tags The workshop's tags this mod is classified as that steam uses. The Mod Uploader Tool offers a list of tags to select from.
includes A JSON list of mod names that will be loaded immediately before this mod, regardless of their priority value. If a listed mod does not exist, it is ignored.
(Note, this parameter name was poorly chosen and is confusing. It does not indicate that the mod contains or replaces the listed mods.)
(Remember that any parameter is optional! Don't add this if you don't need it!)
requires A JSON list of mod names that will be loaded immediately before this mod, regardless of their priority value. If a listed mod does not exist, the game will silently halt at startup, and an error message will be left in the game's log file.
(Remember that any parameter is optional! Don't add this if you don't need it!)
priority An integer value. If not present, the default is 0. In general, the lower the number, the sooner the mod will be loaded [5]. The base assets.pak has a priority of -9999.
Assume mod A has priority -10, mod B has declared no priority and therefore has a default priority of 0, and mod C has priority 15. Normally, the mod load order would be A, B, C. However, assume mod A includes or requires mod C. In that case, the load order becomes C, A, B.
(Note that Steam further alters the mod load order by scanning and loading workshop mods after all mods in the /mods folder have loaded).
(Remember that any parameter is optional! Don't add this if you don't need it!)


Quick Navigation

Category:Modding:Documentation
  1. https://www.reddit.com/r/starbound/comments/4smkzj/2_quick_tips_about_mod_formats_for_unstable/
  2. http://community.playstarbound.com/threads/modding-for-1-0.117818/#post-2956738 The | Suit, Jul 22, 2016
  3. http://community.playstarbound.com/threads/how-do-we-format-metadata-files.118150/#post-2957094 The | Suit, Jul 22, 2016
  4. http://i.imgur.com/PyNZqbg.gif
  5. https://community.playstarbound.com/threads/includes-priority-and-mod-load-order.161097/ Mod Load Order, 07 Aug 2020