Difference between revisions of "Mod file Format"

From VCMI Project Wiki
Jump to: navigation, search
(Fields specific for local file)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This is description of mod.json file, main file for mods.
+
{{Template:MovedToWebpage|https://vcmi.eu/modders/Mod_File_Format/}}
== Fields for local file and repository ==
 
<syntaxhighlight lang="javascript">
 
{
 
    // Name of your mod. While it does not have hard length limit
 
    // it should not be longer than ~30 symbols to fit into allowed space
 
    "name" : "My test mod",
 
 
 
    // More lengthy description of mod. No hard limit. This text will be visible in launcher.
 
    // This field can use small subset of HTML, see link at the bottom of this page.
 
    "description" : "My test mod that add a lot of useless stuff into the game",
 
 
 
    // Author of mod. Can be nickname, real name or name of team
 
    "author" : "Anonymous",
 
 
 
    // Full name of license used by mod. Should be set only if you're author of mod
 
    // or received permission to use such license from original author
 
    "licenseName" : "Creative Commons Attribution-ShareAlike",
 
 
 
    // URL which user can use to see license terms and text
 
    "licenseURL" : "http://creativecommons.org/licenses/by-sa/4.0/deed",
 
 
 
   
 
    // Home page of mod or link to forum thread to contact the author
 
    "contact" : "http://example.com",
 
 
 
    // Type of mod, e.g. "Town", "Artifacts", "Graphical".
 
    "modType" : "Graphical",
 
 
 
    // List of mods that are required to run this one
 
    "depends" :
 
    [
 
        "baseMod"
 
    ],
 
 
    // List of mods that can't be enabled in the same time as this one
 
    "conflicts" :
 
    [
 
        "badMod"
 
    ],
 
 
 
    //List of changes/new features in each version
 
    "changelog" :
 
    {
 
        "1.0"  : [ "initial release" ],
 
        "1.0.1" : [ "change 1", "change 2" ],
 
        "1.1"  : [ "change 3", "change 4" ]
 
    },
 
 
 
    // If set to true, mod will not be enabled automatically on install
 
    "keepDisabled" : false
 
}
 
</syntaxhighlight>
 
==Fields specific for local file==
 
These are fields that are present only in local mod.json file
 
<syntaxhighlight lang="javascript">
 
{
 
    // Following section describes configuration files with content added by mod
 
    // It can be split into several files in any way you want but recommended organization is
 
    // to keep one file per object (creature/hero/etc) and, if applicable, add separate file
 
    // with translatable strings for each type of content
 
    // See "additional links" at the bottom of page for descriptions of each of these formats
 
 
 
    // list of factions/towns configuration files
 
    "factions" :
 
    [
 
        "config/myMod/faction.json"
 
    ]
 
 
 
    // List of hero classes configuration files
 
    "heroClasses" :
 
    [
 
        "config/myMod/heroClasses.json"
 
    ],
 
 
 
    // List of heroes configuration files
 
    "heroes" :
 
    [
 
        "config/myMod/heroes.json"
 
    ],
 
 
 
    // list of creature configuration files
 
    "creatures" :
 
    [
 
        "config/myMod/creatures.json"
 
    ],
 
 
 
    // List of artifacts configuration files
 
    "artifacts" :
 
    [
 
        "config/myMod/artifacts.json"
 
    ],
 
 
 
    // List of objects defined in this mod
 
    "objects" :
 
    [
 
        "config/myMod/objects.json"
 
    ],
 
 
 
    // Optional, description on how files are organized in your mod
 
    // In most cases you do not need to use this field
 
    // Needed mostly to port any existing mods to vcmi (e.g. WoG distributed with Era)
 
    // Example below is default value, which is "Content" directory that acts as H3 root directory
 
    "filesystem":
 
    {
 
        "":
 
            [
 
                {"type" : "dir",  "path" : "/Content"}
 
            ]
 
    }
 
}
 
</syntaxhighlight>
 
 
 
==Fields present only in repository==
 
This is list of fields that must be added to mod record in repository file
 
<syntaxhighlight lang="javascript">
 
{
 
    // URL which launcher will use to download mod
 
    "download" : "http://example.com/mods/helloworld.zip",
 
 
 
    // size of mod archive, in kilobytes
 
    "size" : 12345,
 
 
 
    // list of URL's with screenshots for this mod
 
    "screenshots" : [
 
        "http://example.com/images/helloworld_1.png"
 
    ]
 
}
 
</syntaxhighlight>
 
==Notes==
 
For mod description it is possible to use certain subset of HTML as described here:
 
 
 
http://qt-project.org/doc/qt-5.0/qtgui/richtext-html-subset.html
 
 
 
{{Modding}}
 

Latest revision as of 15:48, 16 July 2024

Logo256.png    Page moved to VCMI-Homepage