Difference between revisions of "User:Ivan/Mod format WIP"
From VCMI Project Wiki
Line 1: | Line 1: | ||
− | + | Future mod format, WIP | |
− | |||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{ | { | ||
− | + | // This is description on how files are organized in your mod | |
− | + | // Make sure to replace "myMod" with name of your mod | |
− | + | // In most cases you do not need to modify anything else in this field | |
− | + | // TODO: make this entry optional | |
− | + | "filesystem": | |
− | + | { | |
− | + | "": | |
− | + | [ | |
− | + | {"type" : "dir", "path" : "ALL/MODS/myMod/Override"} | |
− | + | ] | |
− | + | }, | |
− | + | ||
− | + | // 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", | |
− | + | ||
− | + | // Version of the mod. Consists from up to 3 numbers: | |
− | + | // 1) Major - changed when there is large change in functionality | |
− | + | // 2) Minor - some minor changes notable by players | |
− | + | // 3) Patch - small bugfix releases | |
− | + | "version" : "1.0.2" | |
− | + | ||
− | + | // autor of mod. Can be nickname, real name or name of team | |
− | + | "author" : "Anonymous" | |
− | + | ||
− | + | // Home page of mod or link to forum thread | |
− | + | "weblink" : "http://example.com" | |
− | + | ||
− | + | // More lengthy description of mod. No hard limit | |
− | + | // TODO: show it in some kind of mod manager | |
− | + | "description" : "My test mods that add a lot of useless stuff into the game", | |
− | + | ||
− | + | // 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" | ||
+ | ], | ||
+ | |||
+ | // Priority in which your mod will be loaded. Bigger priority will make mod load later | ||
+ | // and override whatever changes were made by previous mod | ||
+ | // Can be modified by user as well as by game so this field is more like a hint | ||
+ | "priority" : 20, | ||
+ | |||
+ | // 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" | |
− | + | ], | |
− | + | ||
+ | // Overriding of configuration of another mod | ||
+ | // Uses same set of fields as mod configuration | ||
+ | // TODO: allow filesystem overriding as well? | ||
+ | "override" : | ||
+ | { | ||
+ | // Override of creature of base mod on which current one depends | ||
+ | // This method may be used to replace any fields in config | ||
+ | "baseMod" : | ||
+ | { | ||
+ | "creatures" : | ||
+ | [ | ||
+ | "config/myMod/creaturesBaseMod.json" | ||
+ | ] | ||
+ | }, | ||
+ | |||
+ | // Override of artifact in another unrelated mod | ||
+ | // In this case override will be used only if mod is present | ||
+ | "anotherMod" : | ||
+ | { | ||
+ | "artifacts" : | ||
+ | [ | ||
+ | "config/myMod/artifactsAnotherMod.json" | ||
+ | ] | ||
+ | }, | ||
+ | } | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 23:05, 27 December 2012
Future mod format, WIP
{
// This is description on how files are organized in your mod
// Make sure to replace "myMod" with name of your mod
// In most cases you do not need to modify anything else in this field
// TODO: make this entry optional
"filesystem":
{
"":
[
{"type" : "dir", "path" : "ALL/MODS/myMod/Override"}
]
},
// 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",
// Version of the mod. Consists from up to 3 numbers:
// 1) Major - changed when there is large change in functionality
// 2) Minor - some minor changes notable by players
// 3) Patch - small bugfix releases
"version" : "1.0.2"
// autor of mod. Can be nickname, real name or name of team
"author" : "Anonymous"
// Home page of mod or link to forum thread
"weblink" : "http://example.com"
// More lengthy description of mod. No hard limit
// TODO: show it in some kind of mod manager
"description" : "My test mods that add a lot of useless stuff into the game",
// 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"
],
// Priority in which your mod will be loaded. Bigger priority will make mod load later
// and override whatever changes were made by previous mod
// Can be modified by user as well as by game so this field is more like a hint
"priority" : 20,
// 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"
],
// Overriding of configuration of another mod
// Uses same set of fields as mod configuration
// TODO: allow filesystem overriding as well?
"override" :
{
// Override of creature of base mod on which current one depends
// This method may be used to replace any fields in config
"baseMod" :
{
"creatures" :
[
"config/myMod/creaturesBaseMod.json"
]
},
// Override of artifact in another unrelated mod
// In this case override will be used only if mod is present
"anotherMod" :
{
"artifacts" :
[
"config/myMod/artifactsAnotherMod.json"
]
},
}
}