Difference between revisions of "Modding guidelines"
(Split page into players/modders sections. TODO: better style for tables.) |
(→Additional links) |
||
Line 139: | Line 139: | ||
* [[Hero Format]] | * [[Hero Format]] | ||
* [[Artifact Format]] | * [[Artifact Format]] | ||
− | * [[Object Format]] | + | * [[Object Format]] (Todo) |
* [[Spell Format]] (WiP) | * [[Spell Format]] (WiP) |
Revision as of 08:18, 23 January 2013
Contents
For players
Installing mod
To install mod unpack archive in /Mods. This should result in such directory structure:
<data directory>/Mods/<name of mod>/mod.json
There is no need to activate newly installed mods.
List of currently available mods
Name | Download URL | Author |
---|---|---|
Cove town | URL | HotA Crew |
New artifacts pack | URL | Witchking |
High resolution main menu | URL | Dru |
Managing mods
To activate or deactivate mod open file <data dir>/config/modSettings.json. Set mod state to "false" for disabling it or to "true" for enabling.
Note that removing mod from this list will not deactivate or remove mod from the game - any mods not present in this file will be considered by game as newly installed and will be (re-)inserted in this file on startup.
To remove mod delete its folder (<data dir>/Mods/modname).
Notes
- Data directory location is system-specific:
- Windows : Same as your Heroes III directory
- Unix-like : Inside home directory: ~/.vcmi
For modders
Creating mod
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:
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
Creating mod file
All VCMI configuration files use JSON format so you may want to familiarize yourself with it first.
Example of how mod.json should look like:
{
// 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 mod 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"
],
// 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"
],
// Optional, description on how files are organized in your mod
// In most cases you do not need to used 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"}
]
}
}