Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

Mod Data Format

Andrew Miner edited this page Aug 28, 2015 · 8 revisions

The Mod file format is a very simple command-based language which is very similar to YAML. There are commands for entering all various kinds of data needed to describe a mod and what versions are supported. Most commands are optional, and can be entered in any order. Anywhere this isn't true will be called out below.

Each mod data file is stored in its own directory under /data. The directory should be named using the Mod's slug name (see: About Slugs). This directory should contain:

  • a file named mod.cg using the format described on this page
  • a 160x160 icon.png file used to represent the mod in various places on the site
  • (optional) a tutorials directory. See Tutorial Data Format for details.
  • an items directory containing a directory for each item (named using the item's slug). Each directory should have a 48x48 icon.png file for that item. See Mod Version Data Format for details.

Example

schema: 1

name:             Buildcraft
author:           SpaceToad
description:      A technical mod which adds power generation, mining, and building systems
homePageUrl:      http://www.mod-buildcraft.com
documentationUrl: http://www.mod-buildcraft.com/wiki/doku.php
downloadUrl:      http://www.mod-buildcraft.com/download/

version: 6.2.6

Basics

Each line of the file should usually contain a single command. Each command has the format: <command>: <arg>, <arg>, .... All of the available commands are described below. Multiple commands may be listed on the same line by separating them with ; characters. Comments are entered using the # character, which can itself be escaped if you need to use it in an item name. Blank lines are ignored. Whitespace is generally irrelevant outside item names, but following the conventions described above makes things easier.

Command Reference

  • schema: <version> (required)

    The data schema used by the file. The current version is: 1.

  • name: <mod name> (required)

    The name of the mod described in the file. This should be the full name of the mod as referred to in its own documentation; only use abbreviations if they are as commonly used as the full name itself (e.g., "IC2").

  • author: <author(s)>

    The person or persons who created the mod or are now responsible for maintaining it (i.e., to whom you would send a question or bug report). If the author chooses to use an alias, respect their chosen name by spelling it as they spell it in their own documentation.

  • description: <description>

    A short description of the mod. Focus on briefly calling out the essence of the mod, and differentiating it from the other mods supported by Crafting Guide. Keep it under about 150 characters in length.

  • homePageUrl: <url> (required)

    The URL which is the main landing page for the mod. If a mod has a dedicated website, this should be the main page of that website. If not, it should be the announcement page in the official Minecraft forum (if one is available), or otherwise the top search result on Google for the mod.

  • documentationUrl: <url>

    The URL which most directly points to the entryway to the mods documentation. This may or may not be the same page as the official website (and usually isn't).

  • downloadUrl: <url>

    The URL which most directly leads to the downloads page for mod. This should never be used to circumvent a paywall (e.g., AdFly links), and should never link to one specific version of the mod.
    Instead, find the page which lists the available downloads for all versions of the mod (if possible).

  • version: <version> (required)

    Adds a version to the list of supported versions of this mod. The version should be specified exactly as the mod owner describes it (e.g., "6.2.6" for a recent Buildcraft version, and "rv1-stable-1" for a recent Applied Energistics 2 version).

    Multiple versions may be specified, and if so, they should be listed with the most recent first.

    For each version listed, a subdirectory should exist under /data/<mod_slug>/versions/<version> containing a mod-version.cg file. See Mod Version Data Format for details on this file's format.

Clone this wiki locally