Difference between revisions of "Artifact Format"

From VCMI Project Wiki
Jump to: navigation, search
m
(Format)
 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
See thread http://forum.vcmi.eu/viewtopic.php?t=558for discussion
+
See thread http://forum.vcmi.eu/viewtopic.php?t=558 for discussion
  
Artifact abilities use [[Bonus Format]].
+
Artifact bonuses use [[Bonus Format]].
  
 
TODO:
 
TODO:
* Combined artifacts identified by string
 
 
* Artifacts growing with Commander level
 
* Artifacts growing with Commander level
 
+
==Required data==
<pre>
+
In order to make functional artifact you also need:
 +
* Icon for hero inventory (1 image)
 +
* Icon for popup windows (1 image, optional)
 +
* Animation for adventure map (1 animation)
 +
==Format==
 +
<syntaxhighlight lang="javascript">
 
{
 
{
type: "HERO", \\CREATURE, COMMANDER
+
"type": ["HERO", "CREATURE", "COMMANDER"] //what kind of bearer can use this artifact
class: "TREASURE", \\MINOR, MAJOR, RELIC, SPECIAL
+
"class": "TREASURE", //TREASURE, MINOR, MAJOR, RELIC, SPECIAL
slot: "HEAD", \\SHOULDERS, NECK, RIGHT_HAND, LEFT_HAND, TORSO, RIGHT_RING, LEFT_RING, FEET, MISC1, MISC2, MISC3, MISC4,
+
"slot": "HEAD", //SHOULDERS, NECK, RIGHT_HAND, LEFT_HAND, TORSO, RIGHT_RING, LEFT_RING, FEET, MISC1, MISC2, MISC3, MISC4,
MACH1, MACH2, MACH3, MACH4, SPELLBOOK, MISC5
+
//MACH1, MACH2, MACH3, MACH4, SPELLBOOK, MISC5
value: 12000, //based on ARTRAITS.txt
+
                //also possible MISC, RING
name:
+
"value": 12000, //based on ARTRAITS.txt
 +
"text":
 +
{
 +
"name": "Big Sword",
 +
"description": "Big sword gived +10 attack to hero",
 +
"event": "On your travel, you stumble upon big sword. You dust it off and stick in your backpack"
 +
},
 +
"graphics":
 
{
 
{
name: "Big Sword",
+
"image": "BigSword.png",
description: "Big sword gived +10 attack to hero",
+
"large": "BigSword_large.png",
event: "On your travel, you stumble upon big sword. You dust it off and stick in your backpack"
+
"map": "BigSword.def"//def file for adventure map
}
+
},
graphics: "BigSword.png",
+
"bonuses":
bonuses:
 
 
{
 
{
 
Bonus_1,
 
Bonus_1,
 
Bonus_2
 
Bonus_2
}
+
},
 +
"components": //optional, for combined artifacts only
 +
[
 +
"artifact1",
 +
"artifact2",
 +
"artifact3"
 +
],
 +
"warMachine" : "some.creature" //if set with artifact works like war machine
 
}
 
}
</pre>
+
</syntaxhighlight>
 +
 
 +
 
 +
{{Modding}}

Latest revision as of 17:24, 6 June 2017

See thread http://forum.vcmi.eu/viewtopic.php?t=558 for discussion

Artifact bonuses use Bonus Format.

TODO:

  • Artifacts growing with Commander level

Required data

In order to make functional artifact you also need:

  • Icon for hero inventory (1 image)
  • Icon for popup windows (1 image, optional)
  • Animation for adventure map (1 animation)

Format

{
	"type": ["HERO", "CREATURE", "COMMANDER"] //what kind of bearer can use this artifact
	"class": "TREASURE", //TREASURE, MINOR, MAJOR, RELIC, SPECIAL
	"slot":	"HEAD", //SHOULDERS, NECK, RIGHT_HAND, LEFT_HAND, TORSO, RIGHT_RING, LEFT_RING, FEET, MISC1, MISC2, MISC3, MISC4,
		//MACH1, MACH2, MACH3, MACH4, SPELLBOOK, MISC5
                //also possible MISC, RING 
	"value": 12000, //based on ARTRAITS.txt		
	"text":
	{
		"name": "Big Sword",
		"description": "Big sword gived +10 attack to hero",
		"event": "On your travel, you stumble upon big sword. You dust it off and stick in your backpack"
	},
	"graphics":
	{
		"image": "BigSword.png",
		"large": "BigSword_large.png",
		"map": "BigSword.def"//def file for adventure map
	},
	"bonuses":
	{
		Bonus_1,
		Bonus_2
	},
	"components": //optional, for combined artifacts only
	[
		"artifact1",
		"artifact2",
		"artifact3"
	],
	"warMachine" : "some.creature" //if set with artifact works like war machine
}


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