|
|
| (26 intermediate revisions by 6 users not shown) |
| Line 1: |
Line 1: |
| − | = Creating mod =
| + | {{Template:MovedToWebpage|https://vcmi.eu/modders/Readme/}} |
| − | To make your own mod you need to create subdirectory in "Mods" with name that will be used as identifier for your mod.
| |
| − | | |
| − | Main mod file called '''mod.json''' and should be placed into main folder of your mod, e.g. '''Mods/myMod/mod.json'''
| |
| − | | |
| − | All content of your mod should go into "Override" directory, e.g. '''Mods/myMod/Override/'''
| |
| − | | |
| − | * '''TODO''': separate '''content''' and '''override''' folders
| |
| − | * '''TODO''': support for .zip archives
| |
| − | | |
| − | Example of how directory structure of your mod may look like:
| |
| − | | |
| − | <pre>
| |
| − | Mods/
| |
| − | myMod/
| |
| − | mod.json
| |
| − | Override/
| |
| − | data/ - unorganized files, mostly bitmap images (.bmp, .png, .pcx)
| |
| − | config/ - json configuration files
| |
| − | maps/ - h3m maps added or modified by mod
| |
| − | music/ - music files. Mp3 is fully supported, ogg may be added if needed
| |
| − | sounds/ - sound files, in wav format.
| |
| − | sprites/ - animation, image sets (H3 .def files or VCMI .json files)
| |
| − | video/ - video files, .bik or .smk
| |
| − | </pre>
| |
| − | | |
| − | = Creating mod file =
| |
| − | All VCMI configuration files use [http://en.wikipedia.org/wiki/Json JSON format] so you may want to familiarize yourself with it first.
| |
| − | | |
| − | Example of how mod.json should look like:
| |
| − | | |
| − | <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",
| |
| − | | |
| − | // 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",
| |
| − | | |
| − | // 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 creature configuration files
| |
| − | "creatures" :
| |
| − | [
| |
| − | "config/myMod/creatures.json"
| |
| − | ],
| |
| − | // list of factions/towns configuration files
| |
| − | "factions" :
| |
| − | [
| |
| − | "config/myMod/creatures.json"
| |
| − | ]
| |
| − | | |
| − | //TODO: following types of content are not yet implemented.
| |
| − | | |
| − | // List of hero classes configuration files
| |
| − | "heroClasses" :
| |
| − | [
| |
| − | "config/myMod/heroClasses.json"
| |
| − | ],
| |
| − | | |
| − | // List of heroes configuration files
| |
| − | "heroes" :
| |
| − | [
| |
| − | "config/myMod/heroes.json"
| |
| − | ],
| |
| − | | |
| − | // List of artifacts configuration files
| |
| − | "artifacts" :
| |
| − | [
| |
| − | "config/myMod/artifacts.json"
| |
| − | ]
| |
| − | } | |
| − | </syntaxhighlight>
| |
| − | = Additional links =
| |
| − | * [[Animation Format|Def file replacement format]]
| |
| − | * [[Creature Format]]
| |
| − | * [[Town Format]]
| |
| − | * [[Hero Classes Format]]
| |
| − | * [[Hero Format]]
| |
| − | * [[Artifact Format]]
| |