Difference between revisions of "Animation Format"

From VCMI Project Wiki
Jump to: navigation, search
m (template insertion)
(Format description)
Line 52: Line 52:
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
=Proposed format extentions=
  
 
{{Modding}}
 
{{Modding}}

Revision as of 16:34, 7 January 2017

VCMI allows overriding HoMM3 .def files with .json replacement. Compared to .def this format allows:

  • Overriding individual frames from json file (e.g. icons)
  • Modern graphics formats (targa, png - all formats supported by VCMI image loader)
  • Does not requires any special tools - all you need is text editor and images.

Note that right now this replacement is not supported fully: there are still some areas that can't use it. Most notable areas are:

  • Adventure map
  • Battles

Format description

{
    // Base path of all images in animation. Optional.
    // Can be used to avoid using long path to images 
    "basepath" : "path/to/images/directory/",

    // List of sequiences / groups in animation
    // This will replace original group with specified list of files
    // even if original animation is longer
    "sequences" :
    [
        {
            // Index of group, zero-based
            "group" : 1,

            // List of files in this group
            "frames" :
            [
                "frame1.png",
                "frame2.png"
                    ...
            ]
        },
        ...
    ],

    // Allow overriding individual frames in file
    "images" :
    [
        {
            // Group of this image. Optional, default = 0
            "group" : 0,

            // Imdex of the image in group
            "frame" : 0,

            // Filename for this frame
            "file" : "filename.png"
        }.
        ...
    ]

}

Proposed format extentions

Modding related articles

Main articles
Modding changelog Modding guidelines Mod Handler


Formats
Mod file Format
Town Format Creature Format Hero Classes Format
Artifact Format Animation Format Hero Format
Bonus Format Object Format Spell Format


Work-in-progress formats
Building bonuses Map format
Bonus Type Format Random map template


Outdated pages
Mod system proposal