Difference between revisions of "Hero Format"

From VCMI Project Wiki
Jump to: navigation, search
(Created page with "==Format description== <syntaxhighlight lang="javascript"> "myHeroName" : { // Identifier of class. Usually camelCase version of human-readable name "class" : "wizard", //...")
 
(Format description)
Line 9: Line 9:
 
// TODO: string identifier and/or multiple spells
 
// TODO: string identifier and/or multiple spells
 
"spell" : 15,
 
"spell" : 15,
+
 
 +
// Set to true if the hero is female by default (can be changed in map editor)
 +
"female" : true,
 +
 
 
// All translatable texts related to hero
 
// All translatable texts related to hero
 
"texts" :
 
"texts" :
Line 102: Line 105:
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 
==Additional links==
 
==Additional links==
 
[[Bonus Format]]
 
[[Bonus Format]]

Revision as of 11:05, 16 December 2012

Format description

"myHeroName" :
{
	// Identifier of class. Usually camelCase version of human-readable name
	"class" : "wizard",

	// Starting spell, if available. Will also grant spellbook
	// TODO: string identifier and/or multiple spells
	"spell" : 15,

	// Set to true if the hero is female by default (can be changed in map editor)
	"female" : true,

	// All translatable texts related to hero
	"texts" :
	{
		"name" : "My Hero",
		"biography" : "This is a long story...",

		"specialty" :
		{
			// Description visible when hovering over specialty icon
			"description" : "Spell mastery: Magic Arrow",

			// Tooltip visible on clicking icon. Can use {} symbols to change title to yellow
			// as well as escape sequences "\n" to add line breaks
			"tooltip" : "{Magic Arrow}\n\nCasts powerfull magic arrows",

			// Name of your specialty
			"name" : "Magic Arrow"
		}
	},

	// Graphics used by hero
	"images" :
	{
		// Index of icons in UN44, UN32, PortraitsLarge and PortraitsSmall files
		// Temporary field, will be replaced with 4 fields below
		"index" : 500,

		// Small 32px speciality icon
		"specialtySmall" : "myMod/myHero/specSmall.png",

		// Large 44px speciality icon
		"specialtyLarge" : "myMod/myHero/specLarge.png",

		// Large 58x64px portrait
		"large" : "myMod/myHero/large.png",

		// Small 48x32px portrait
		"small" : "myMod/myHero/small.png"
	},

	// Initial hero army when recruited in tavern
	// Must have 1-3 elements
	"army" :
	[
		// First always available stack
		{
			// Identifier of creature in this stack
			"creature" : "mage",

			// Minimal and maximum size of stack. Size will be
			// determined randomly at the start of the game
			"max" : 2,
			"min" : 1
		},
		// Second stack has 90 % chance to appear
		{
			"creature" : "archmage",
			"max" : 1,
			"min" : 1
		},
		// Third stack with just 20 % chance to appear
		{
			"creature" : "mage",
			"max" : 2,
			"min" : 1
		}
	],

	// List of skills received by hero
	// Not limited by size - you can add as many skills as you wish
	"skills" :
	[
		{
			// Skill level, basic, advanced or expert
			"level" : "basic",

			// Skill identifier, camelCase version of name
			"skill" : "wisdom"
		},
		{
			"level" : "basic",
			"skill" : "waterMagic"
		}
	],

	// Description of specialty mechanics using bonus format
	"speciality" :
	[
		Bonus Format
	]
}

Additional links

Bonus Format