mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-19 00:17:56 +02:00
It is now possible to give artifacts per-instance bonuses, if needed. Unlike shared bonuses, per-instance bonuses stack if multiple instances of same artifacts are equipped on hero. This to implement resource-producing artifacts in line with H3 - equipping multiple such artifacts on a single hero will give bonus from each instance of such artifact. Also, both existing bonuses and new instanceBonuses fields now use json object instead of json lists. This allows easier modification of individual bonuses of artifacts and potentially - custom icons / descriptions for artifact bonuses.
3.1 KiB
3.1 KiB
Artifact Format
Artifact bonuses use Bonus Format
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 of this artifact - creature, hero or commander
"type": ["HERO", "CREATURE", "COMMANDER"]
// TREASURE, MINOR, MAJOR, RELIC, SPECIAL
"class": "TREASURE",
// Slot(s) to which this artifact can be put, if applicable
// SHOULDERS, NECK, RIGHT_HAND, LEFT_HAND, TORSO, RIGHT_RING, LEFT_RING, FEET, MISC1, MISC2, MISC3, MISC4,
// MACH1, MACH2, MACH3, MACH4, SPELLBOOK, MISC5
// MISC, RING
"slot": "HEAD",
"slot": [ "LEFT_HAND", "RIGHT_HAND ],
// Cost of this artifact, in gold
"value": 12000,
"text":
{
// Name of the artifact
"name": "Big Sword",
// Long description of this artifact
"description": "Big sword gived +10 attack to hero",
// Text that visible on picking this artifact on map
"event": "On your travel, you stumble upon big sword. You dust it off and stick in your backpack"
},
"graphics":
{
// Base image for this artifact, used for example in hero screen
"image": "BigSword.png",
// Large image, used for drag-and-drop and popup messages
"large": "BigSword_large.png",
//def file for adventure map
"map": "BigSword.def"
},
// Bonuses provided by this artifact using bonus system
// If hero equips multiple instances of the same artifact, their effect will not stack
"bonuses":
{
Bonus_1,
Bonus_2
},
// Bonuses provided by every instance of this artifact using bonus system
// These bonuses will stack if hero equips multiple instances of this artifact
"instanceBonuses":
{
Bonus_1,
Bonus_2
},
// Optional, list of components for combinational artifacts
"components":
[
"artifact1",
"artifact2",
"artifact3"
],
// Optional, by default is false. Set to true if components are supposed to be fused.
// When artifact is fused, all its components are removed and hero receives fused artifact in their place.
// As result of this, fused artifact:
// - can not be disassembled
// - unlike combined artifacts, fused artifact does not locks slots of its components
// - does not inherits bonuses from its constituent parts
"fusedComponents" : true,
// Creature id to use on battle field. If set, this artifact is war machine
"warMachine" : "some.creature"
// If set to true, artifact won't spawn on a map without water
"onlyOnWaterMap" : false,
// TODO: document
"growing" : {
"bonusesPerLevel" : {},
"thresholdBonuses" : {},
}
// Optional, used for artifacts with charges.
"charged" : {
// Artifact discharging action
// SPELLCAST - Consumes a charge for each spellcast. Applies to every spell added through the "bonuses" section.
// BATTLE - Consumes one charge per battle.
// BUILDING (not implemented)
"usageType": "BATTLE",
// Optional, by default is false. Remove when fully discharged
"removeOnDepletion" : true,
// Optional, by default is 0. Default starting charge amount.
"startingCharges" : 2,
}
}