v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Info.txt file

From Dwarf Fortress Wiki
Jump to navigation Jump to search

This page is specifically about the info.txt file. A lot of what is here is redundant; it can also be found at the comprehensive Mod page.

Directory Structure[edit]

Mods contain an info.txt file and either an "objects" folder or a "graphics" folder (or both.) All of the vanilla objects in the game too use this format. Your mod folder should look something like this:

Folder-orange.svg Mod Name
 ├ Text-x-generic.svg info.txt
 ├ Text-x-generic.svg preview.png
 ├ Folder.svg objects
 └ Folder.svg graphics


Mod Info[edit]

Main article: Mod info token

Each mod must have a info.txt at the root of your mod folder. It has a few fields defining basic metadata information about the mod and can be edited using any text editor (like notepad++ or Subline Text).

Examples[edit]

The info.txt is formatted like so:

[ID:my_first_mod]
[NUMERIC_VERSION:1]
[DISPLAYED_VERSION:1.0.0]
[EARLIEST_COMPATIBLE_NUMERIC_VERSION:1]
[EARLIEST_COMPATIBLE_DISPLAYED_VERSION:1.0.0]
[AUTHOR:Your Name Here]
[NAME:My First Mod]
[DESCRIPTION:A cool mod I made!]

The examples below are largely identical.

Example Bay 12[edit]

This is the example found at Bay 12 Games. Comment notation used after tokens <--

[ID:vanilla_items]
[NUMERIC_VERSION:5001]
[DISPLAYED_VERSION:50.01]
[EARLIEST_COMPATIBLE_NUMERIC_VERSION:5001]
[EARLIEST_COMPATIBLE_DISPLAYED_VERSION:50.01]
[AUTHOR:Mary Lee]
[NAME:Vanilla Items]
[DESCRIPTION:These are the default Dwarf Fortress items.]
[STEAM_TITLE:Test Descriptors]
[STEAM_DESCRIPTION:Some test object definitions for shapes and colors.]
[STEAM_TAG:mod] <-- as many as you want, use a separate STEAM_TAG for each one
[STEAM_KEY_VALUE_TAG:test:stuff] <-- as many as you want, similarly
[STEAM_METADATA:metadata test]
[STEAM_CHANGELOG:made some changes]

Example DF Wiki[edit]

With entries (tokens) for the steam platform...

[ID:wiki_example]
[NAME:Wiki Example Mod]
[NUMERIC_VERSION:5001]
[DISPLAYED_VERSION:50.01]
[EARLIEST_COMPATIBLE_NUMERIC_VERSION:5001]
[EARLIEST_COMPATIBLE_DISPLAYED_VERSION:50.01]
[AUTHOR:Dwarf Fortress Wiki]
[DESCRIPTION:This is an example mod. This text shows up in-game.]

[STEAM_TITLE:Wiki Example Mod]
[STEAM_DESCRIPTION:This text shows up on Steam Workshop.]
[STEAM_TAG:mod] 
[STEAM_KEY_VALUE_TAG:test:stuff]
[STEAM_METADATA:metadata test]
[STEAM_CHANGELOG:Made some changes. Shown in 'Change Notes' tab.]

[STEAM_FILE_ID:#########]

Example Zeeb[edit]

An example found on steam in the "Example Mod." Contains entries for the steam platform.

[ID:example_mod]
[NUMERIC_VERSION:1]
[DISPLAYED_VERSION:1.0.0]
[EARLIEST_COMPATIBLE_NUMERIC_VERSION:1]
[EARLIEST_COMPATIBLE_DISPLAYED_VERSION:1.0.0]
[AUTHOR:Author]
[NAME:Example Mod]
[DESCRIPTION:This is just an empty example mod.]

[STEAM_TITLE:Example Mod]
[STEAM_DESCRIPTION:This is just an empty example mod.]
[STEAM_TAG:example]
[STEAM_FILE_ID:2905754195]

Note that you should remove the last token "STEAM_FILE_ID" as it will be autogenerated. Remove the [STEAM_FILE_ID:###] tag since that is unique for every mod and generates automatically whenever you upload your mod to the workshop

Info.txt Tokens[edit]

Token Arguments Usage Description
ID id Required The ID of the mod. This should be unique, with no two mods sharing the same ID. IDs starting with "vanilla_" are reserved for vanilla raws.
NUMERIC_VERSION integer Required An integer version number for the mod. Must be greater than or equal to EARLIEST_COMPATIBLE_NUMERIC_VERSION. Must be integer.
DISPLAYED_VERSION string Required The version of the mod, as displayed in-game.
EARLIEST_COMPATIBLE_NUMERIC_VERSION integer Required The earliest compatible numeric version of the mod. Installed mods are automatically updated, if a later compatible version is available.
EARLIEST_COMPATIBLE_DISPLAYED_VERSION string Required The earliest compatible numeric version, as displayed in-game.
AUTHOR string Required[Verify] The name of the author (usually you).
NAME string Required[Verify] The name of the mod.
DESCRIPTION string A description of the mod, shown in the mod loading screen.
REQUIRES_ID string Mod cannot be used unless mod with given ID is also loaded.
REQUIRES_ID_BEFORE_ME string Mod cannot be used unless mod with given ID is earlier in the mod load list.
REQUIRES_ID_AFTER_ME string Mod cannot be used unless mod with given ID is later in the mod load list.
CONFLICTS_WITH_ID string Mod cannot be used if mod with given ID is also loaded.


Steam Workshop tokens[edit]

These tokens are required for the mod to function properly on Steam Workshop.

Token Type Req? Description Example External Doc
STEAM_TITLE single string Req The title of the mod on Steam Workshop. [STEAM_TITLE:Imani's Tweaks] SetItemTitle
STEAM_DESCRIPTION single string The description of the mod on Steam Workshop. Maximum size is 8000 bytes (about 400 words).

Will overwrite the existing description of the mod on the workshop, can be omitted to avoid this behavior.

[STEAM_DESCRIPTION:This is my collection of small changes and additional content.] SetItemDescription
STEAM_TAG multi string Any number can be used. Use a separate STEAM_TAG for each one. Each string must be under 255 chars. [STEAM_TAG:ui][STEAM_TAG:tweak] SetItemTags
STEAM_KEY_VALUE_TAG multi string1, string2 Any number can be used. SetReturnKeyValueTags
STEAM_METADATA multi string Sets arbitrary metadata for an item. This metadata can be returned from queries without having to download and install the actual content. Toady doesn't know what it does [1]. SetItemMetadata
STEAM_CHANGELOG single string A brief description of the changes made. (Optional, set to NULL for no change note). The log message is only for the version you're uploading. This should be different each time you update a mod, and only include the changes in the new version. Steam Workshop congregates all version changelogs, so a full changelog can be seen there. Initial example: [STEAM_CHANGELOG:Initial release]

Update example: [STEAM_CHANGELOG:Update the mod compatible with...]

STEAM_FILE_ID uint64 Req, autogen Connects the mod to an entry on the Steam Workshop.

Generated automatically the first time you upload a mod to Workshop, do not include it manually. If you upload a mod with an existing STEAM_FILE_ID token, it will update the Workshop entry connected to the ID. (Presumably only if you're the original uploader of said mod.)


See Also[edit]