Difference between revisions of "Creature Format"

From VCMI Project Wiki
Jump to: navigation, search
m (doubleWide is not needed -- it's determined by an ability)
(long version chosen, removed ext1/2 sounds, changed name syntax)
Line 4: Line 4:
 
* remove deprecated attributes once implemented in town config
 
* remove deprecated attributes once implemented in town config
 
* better name for amm, something more self-documenting
 
* better name for amm, something more self-documenting
* decide on long vs short format
 
 
* exact syntax for abilities (longer term?)
 
* exact syntax for abilities (longer term?)
 
* creature experience
 
* creature experience
Line 14: Line 13:
 
     {
 
     {
 
         // mandatory
 
         // mandatory
         "names" : ["", ""], // interface names: singular, plural
+
         "name" :
 +
        {
 +
            "singular" : "",
 +
            "plural" : ""
 +
        },
 
         "level" : 0,
 
         "level" : 0,
 
         "faction" : "", // config name of faction. Examples: Castle, Rampart
 
         "faction" : "", // config name of faction. Examples: Castle, Rampart
Line 89: Line 92:
 
             "shoot" : "",
 
             "shoot" : "",
 
             "wince": "",
 
             "wince": "",
            "ext1" : "",
 
            "ext2" : "",
 
 
             "moveStart" : "",
 
             "moveStart" : "",
 
             "moveEnd" : ""
 
             "moveEnd" : ""
Line 107: Line 108:
 
     "Pikeman" :
 
     "Pikeman" :
 
     {
 
     {
         "names" : ["Pikeman", "Pikemen"],
+
         "name" :
 +
        {
 +
            "singular" : "Pikeman",
 +
            "plural" : "Pikemen"
 +
        },
 
         "level" : 1,
 
         "level" : 1,
 
         "faction" : "Castle",
 
         "faction" : "Castle",
Line 141: Line 146:
 
             "wince": "PIKEWNCE.wav"
 
             "wince": "PIKEWNCE.wav"
 
         }
 
         }
    }
 
}
 
</pre>
 
 
short version (65 lines):
 
<pre>
 
{
 
    "" :
 
    {
 
        // mandatory
 
        "names" : ["", ""],
 
        "level" : 0,
 
        "faction" : "",
 
        "cost" : 0,
 
        "fightValue" : 0,
 
        "aiValue" : 0,
 
        "growth" : 0,
 
        "hitPoints" : 0,
 
        "speed" : 0,
 
        "attack" : 0,
 
        "defence" : 0,
 
        "damage" : [0, 0],
 
        "amm" : [0, 0],
 
        "animation" : "",
 
 
        // optional
 
        "upgrades" : "",
 
        "cost" :
 
        {
 
            "Wood" : 0,
 
            "Mercury" : 0,
 
            "Ore" : 0,
 
            "Sulfur" : 0,
 
            "Crystal" : 0,
 
            "Gems" : 0,
 
            "Gold" : 0
 
        },
 
        "shots" : 0,
 
        "spellPoints" : 0,
 
        "abilities" :
 
        {
 
        },
 
        "timeBetweenFidgets" : 1.00,
 
        "troopCountLocationOffset" : 0,
 
        "attackClimaxFrame" : 0,
 
        "animationTimeWalk" : 1.00,
 
        "animationTimeAttack" : 1.00,
 
        "animationTimeFlight" : 1.00,
 
        "background120" : "",
 
        "background130" : "",
 
        "missileAnimation" : "",
 
        "missileSpin" : false,
 
        "missileOffsetUpperX" : 0,
 
        "missileOffsetUpperY" : 0,
 
        "missileOffsetMiddleX" : 0,
 
        "missileOffsetMiddleY" : 0,
 
        "missileOffsetLowerX" : 0,
 
        "missileOffsetLowerY" : 0,
 
        "missileFrameAngles" : [],
 
        "soundAttack": "",
 
        "soundDefend": "",
 
        "soundKilled": "",
 
        "soundMove": "",
 
        "soundShoot" : "",
 
        "soundWince": "",
 
        "soundExt1" : "",
 
        "soundExt2" : "",
 
        "soundMoveStart" : "",
 
        "soundMoveEnd" : "",
 
 
        // deprecated
 
        "hordeGrowth" : 0,
 
        "turretShooter" : false
 
    }
 
}
 
</pre>
 
pikeman short (30 lines):
 
<pre>
 
{
 
    "Pikeman" :
 
    {
 
        "names" : ["Pikeman", "Pikemen"],
 
        "level" : 1,
 
        "faction" : "Castle",
 
        "upgrades" : "Halberdier",
 
        "cost" : 60,
 
        "fightValue" : 100,
 
        "aiValue" : 80,
 
        "growth" : 14,
 
        "hitPoints" : 10,
 
        "speed" : 4,
 
        "attack" : 4,
 
        "defence" : 5,
 
        "damage" : [1, 3],
 
        "amm" : [20, 50],
 
        "abilities" :
 
        {
 
            "CHARGE_IMMUNITY" : {}
 
        },
 
        "animation" : "CPKMAN.DEF",
 
        "animationTimeWalk" : 1.15,
 
        "soundAttack": "PIKEATTK.wav",
 
        "soundDefend": "PIKEDFND.wav",
 
        "soundKilled": "PIKEKILL.wav",
 
        "soundMove": "PIKEMOVE.wav",
 
        "soundWince": "PIKEWNCE.wav"
 
 
     }
 
     }
 
}
 
}
 
</pre>
 
</pre>

Revision as of 17:53, 22 August 2012

This is only a proposal and not official information by the VCMI team. See thread http://forum.vcmi.eu/viewtopic.php?t=533.

todo:

  • remove deprecated attributes once implemented in town config
  • better name for amm, something more self-documenting
  • exact syntax for abilities (longer term?)
  • creature experience

long version (83 lines):

{
    "" : // name (for configs), should be camel case version of interface name. Examples: Pikeman, RoyalGriffin
    {
        // mandatory
        "name" :
        {
            "singular" : "",
            "plural" : ""
        },
        "level" : 0,
        "faction" : "", // config name of faction. Examples: Castle, Rampart
        "cost" : 0, // gold. If other, use optional longer syntax
        "fightValue" : 0,
        "aiValue" : 0,
        "growth" : 0,
        "hitPoints" : 0,
        "speed" : 0,
        "attack" : 0,
        "defence" : 0,
        "damage" : [0, 0], // damage min, max. If same use single integer
        "amm" : [0, 0], // adventure map amount. If same use single integer
        "graphics" :
        {
            "animation" : "" // name of def file
        },

        // optional
        "upgrades" : "", // config name of creature that this creature can be upgraded to
        "cost" :
        {
            "Wood" : 0,
            "Mercury" : 0,
            "Ore" : 0,
            "Sulfur" : 0,
            "Crystal" : 0,
            "Gems" : 0,
            "Gold" : 0
        },
        "shots" : 0,
        "spellPoints" : 0,
        "abilities" :
        {
        },
        "graphics" :
        {
            "timeBetweenFidgets" : 1.00,
            "troopCountLocationOffset" : 0,
            "attackClimaxFrame" : 0,
            "animationTime" :
            {
                "walk" : 1.00,
                "attack" : 1.00,
                "flight" : 1.00
            },
            "backgrounds" :
            {
                "120" : "", // if empty, uses faction background
                "130" : ""  // if empty, uses faction background
            },
            "missile" :
            {
                "animation" : "", // name of def file for missile
                "spin" : false,
                "offset" :
                {
                    "upperX" : 0,
                    "upperY" : 0,
                    "middleX" : 0,
                    "middleY" : 0,
                    "lowerX" : 0,
                    "lowerY" : 0
                },
                "missileFrameAngles" : []
            }
        },
        "sounds" : // names of sound files
        {
            "attack": "",
            "defend": "",
            "killed": "",
            "move": "",
            "shoot" : "",
            "wince": "",
            "moveStart" : "",
            "moveEnd" : ""
        },

        // deprecated, move to town config
        "hordeGrowth" : 0, // growth bonus from horde building
        "turretShooter" : false // if used in turret
    },
    // more creatures
}

pikeman long (39 lines):

{
    "Pikeman" :
    {
        "name" :
        {
            "singular" : "Pikeman",
            "plural" : "Pikemen"
        },
        "level" : 1,
        "faction" : "Castle",
        "upgrades" : "Halberdier",
        "cost" : 60,
        "fightValue" : 100,
        "aiValue" : 80,
        "growth" : 14,
        "hitPoints" : 10,
        "speed" : 4,
        "attack" : 4,
        "defence" : 5,
        "damage" : [1, 3],
        "amm" : [20, 50],
        "abilities" :
        {
            "CHARGE_IMMUNITY" : {}
        },
        "graphics" :
        {
            "animation" : "CPKMAN.DEF",
            "animationTime" :
            {
                "walk" : 1.15
            }
        },
        "sound" :
        {
            "attack": "PIKEATTK.wav",
            "defend": "PIKEDFND.wav",
            "killed": "PIKEKILL.wav",
            "move": "PIKEMOVE.wav",
            "wince": "PIKEWNCE.wav"
        }
    }
}