Difference between revisions of "Spell Format"

From VCMI Project Wiki
Jump to: navigation, search
Line 3: Line 3:
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
 
{
 
{
"spells":
+
"spellName":
{
+
{ //numeric id of spell required only for original spells, prohibited for new spells
"spellName":
+
"index": 0,
 +
//Original Heroes 3 info
 +
//Mandatory, spell type
 +
"type": "adventure",//"adventure", "combat", "ability"
 +
//Mandatory
 +
"name": "Localizable name",
 +
//Mandatory, Spell schools this spell belongs to
 +
"school": ["air", "earth", "fire", "water"],
 +
//number, mandatory, Spell level, value in range 1-5
 +
"level": 1,
 +
//Mandatory, base power
 +
"power": 10,
 +
//Mandatory, default chance for this spell to appear in Mage Guilds
 +
//Used only if chance for a faction is not set in gainChance field
 +
"defaultGainChance": 0,
 +
//Optional, chance for it to appear in Mage Guild of a specific faction
 +
//NOTE: this field is linker with faction configuration
 +
"gainChance":
 
{
 
{
//numeric id of spell required only for original spells, prohibited for new spells
+
"factionName": 3
"index": 0,
+
},
 
+
//VCMI info
//Original Heroes 3 info
 
 
 
//Mandatory, spell type
+
//   anim: main effect animation (AC format), -1 - none
"type": "adventure",//"adventure", "combat", "ability"
+
//TODO: more flexible system to allow defining custom spell effects
 
+
"anim": -1,
//Mandatory
 
"name": "Localizable name",
 
 
 
//Mandatory, Spell schools this spell belongs to
 
"school": ["air", "earth", "fire", "water"],
 
 
 
//number, mandatory, Spell level, value in range 1-5
 
"level": 1,
 
 
 
//Mandatory, base power
 
"power": 10,
 
 
 
//Mandatory, default chance for this spell to appear in Mage Guilds
 
//Used only if chance for a faction is not set in gainChance field
 
"defaultGainChance": 0,
 
 
 
//Optional, chance for it to appear in Mage Guild of a specific faction
 
//NOTE: this field is linker with faction configuration
 
"gainChance":
 
{
 
"factionName": 3
 
},
 
 
 
 
 
//VCMI info
 
 
 
 
 
//  anim: main effect animation (AC format), -1 - none
+
// counters: array of ids of countering spells
//TODO: more flexible system to allow defining custom spell effects
+
"counters": ["spellID", ...]
"anim": -1,
 
 
// counters: array of ids of countering spells
 
"counters": ["spellID", ...]
 
  
//Mandatory, string array of:
+
//Mandatory, string array of:
//              indifferent, negative, positive - Positiveness of spell for target (required)
+
//              indifferent, negative, positive - Positiveness of spell for target (required)
// damage - spell does damage (direct or indirect)
+
// damage - spell does damage (direct or indirect)
// offensive - direct damage (implicitly sets damage and negative)
+
// offensive - direct damage (implicitly sets damage and negative)
// rising - rising spell (implicitly sets positive)
+
// rising - rising spell (implicitly sets positive)
// summoning //todo:
+
// summoning //todo:
"flags" : ["flag1", "flag2"],
+
"flags" : ["flag1", "flag2"],
  
//string array of bonus names, any one of these bonus grants immunity
+
//string array of bonus names, any one of these bonus grants immunity
"immunity": ["BONUS_NAME", ...],
+
"immunity": ["BONUS_NAME", ...],
 
 
//optional| no default | string array of bonus names
+
//optional| no default | string array of bonus names
//any one of these bonus grants immunity, cant be negated
+
//any one of these bonus grants immunity, cant be negated
"absoluteImmunity": ["BONUS_NAME", ...],
+
"absoluteImmunity": ["BONUS_NAME", ...],
  
//string array of bonus names, presence of all bonuses required to be affected by
+
//string array of bonus names, presence of all bonuses required to be affected by
"limit": ["BONUS_NAME", ...],
+
"limit": ["BONUS_NAME", ...],
  
//graphics - OPTIONAL; object;
+
//graphics - OPTIONAL; object;
"graphics":
+
"graphics":
{
+
{
//  iconImmune - OPTIONAL; string;  
+
//  iconImmune - OPTIONAL; string;  
//resourse path of icon for SPELL_IMMUNITY bonus (relative to DATA or SPRITES)
+
//resourse path of icon for SPELL_IMMUNITY bonus (relative to DATA or SPRITES)
"iconImmune":"ZVS/LIB1.RES/E_SPMET"
+
"iconImmune":"ZVS/LIB1.RES/E_SPMET"
},
+
},
 +
//Mandatory 4 element array of objects
 +
//configuration for no skill, basic, adv, expert
 +
"levels":[
 +
{
 +
//Mandatory, localizable description
 +
//Use {xxx} for formatting
 +
"description": "",
  
//Mandatory 4 element array of objects
 
//configuration for no skill, basic, adv, expert
 
"levels":[
 
{
 
//Mandatory, localizable description
 
//Use {xxx} for formatting
 
"description": "",
 
  
 +
//Mandatory, number,
 +
//cost in mana points
 +
"cost": 1,
  
//Mandatory, number,
+
//Mandatory, number
//cost in mana points
+
"power": 10,
"cost": 1,
 
 
 
//Mandatory, number
 
"power": 10,
 
  
//Mandatory, number
+
//Mandatory, number
"aiValue": 20,
+
"aiValue": 20,
  
//Mandatory, spell target type
+
//Mandatory, spell target type
"targetType":"NO_TARGET",//"CREATURE","OBSTACLE"
+
"targetType":"NO_TARGET",//"CREATURE","OBSTACLE"
 
 
//Mandatory
+
//Mandatory
//spell range description in SRSL
+
//spell range description in SRSL
"range": "X",
+
"range": "X",
  
//Optional, bonus format array
+
//Optional, bonus format array
//timed effects  
+
//timed effects  
"effects":
+
"effects":
[
+
[
{bonus format}, ...
+
{bonus format}, ...
]
 
},
 
{...},{...},{...}
 
 
]
 
]
}
+
},
 +
{...},{...},{...}
 +
]
 
}
 
}
 +
 
}
 
}
  

Revision as of 09:16, 16 February 2014

Current draft. WiP.

{
	"spellName":
	{	//numeric id of spell required only for original spells, prohibited for new spells
		"index": 0,
		//Original Heroes 3 info
		//Mandatory, spell type 
		"type": "adventure",//"adventure", "combat", "ability"
		//Mandatory
		"name": "Localizable name",
		//Mandatory, Spell schools this spell belongs to
		"school": ["air", "earth", "fire", "water"],
		//number, mandatory, Spell level, value in range 1-5
		"level": 1,
		//Mandatory, base power
		"power": 10,
		//Mandatory, default chance for this spell to appear in Mage Guilds
		//Used only if chance for a faction is not set in gainChance field
		"defaultGainChance": 0, 
		//Optional, chance for it to appear in Mage Guild of a specific faction
		//NOTE: this field is linker with faction configuration
		"gainChance":
		{
			"factionName": 3
		},
		//VCMI info
			
		//   anim: main effect animation (AC format), -1 - none
		//TODO: more flexible system to allow defining custom spell effects
		"anim": -1,
			
		//	 counters: array of ids of countering spells
		"counters": ["spellID", ...]

		//Mandatory, string array of:
		//              indifferent, negative, positive - Positiveness of spell for target (required)
		//		damage - spell does damage (direct or indirect)
		//		offensive - direct damage (implicitly sets damage and negative)
		//		rising - rising spell (implicitly sets positive)
		//		summoning //todo:
		"flags" : ["flag1", "flag2"],

		//string array of bonus names, any one of these bonus grants immunity
		"immunity": ["BONUS_NAME", ...],
			
		//optional| no default | string array of bonus names
		//any one of these bonus grants immunity, cant be negated
		"absoluteImmunity": ["BONUS_NAME", ...],

		//string array of bonus names, presence of all bonuses required to be affected by
		"limit": ["BONUS_NAME", ...],

		//graphics - OPTIONAL; object;
		"graphics":
		{
			//  iconImmune - OPTIONAL; string; 
			//resourse path of icon for SPELL_IMMUNITY bonus (relative to DATA or SPRITES)
			"iconImmune":"ZVS/LIB1.RES/E_SPMET"
		},
		//Mandatory 4 element array of objects
		//configuration for no skill, basic, adv, expert
		"levels":[
		{
			//Mandatory, localizable description
			//Use {xxx} for formatting
			"description": "",


			//Mandatory, number, 
			//cost in mana points
			"cost": 1,

			//Mandatory, number
			"power": 10,

			//Mandatory, number
			"aiValue": 20,

			//Mandatory, spell target type
			"targetType":"NO_TARGET",//"CREATURE","OBSTACLE"
				
			//Mandatory
			//spell range description in SRSL
			"range": "X",

			//Optional, bonus format array
			//timed effects 
			"effects":
			[
			{bonus format}, ...
			]
		},
		{...},{...},{...}
		]
	}

}


Modding related articles

Main articles
Modding changelog Modding guidelines How to create a town mod 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