artifact.json 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. {
  2. "type" : "object",
  3. "$schema" : "http://json-schema.org/draft-04/schema",
  4. "title" : "VCMI artifact format",
  5. "description" : "Format used to define new artifacts in VCMI",
  6. "required" : [ "type", "class", "value", "text" ],
  7. "definitions" : {
  8. "growingBonusList" : {
  9. "type" : "array",
  10. "items" : {
  11. "type" : "object",
  12. "additionalProperties" : false,
  13. "properties" : {
  14. "level" : {
  15. "type" : "number"
  16. },
  17. "bonus" : { "$ref" : "bonusInstance.json" }
  18. }
  19. }
  20. }
  21. },
  22. "additionalProperties" : false,
  23. "properties" : {
  24. "warMachine" :
  25. {
  26. "type" : "string",
  27. "description" : "Creature id to use on battle field. If set, this artifact is war machine"
  28. },
  29. "type" : {
  30. "type" : "array",
  31. "description" : "Type of this artifact - creature, hero or commander",
  32. "items" : {
  33. "type" : "string",
  34. "enum" : [ "HERO", "CREATURE", "COMMANDER" ]
  35. }
  36. },
  37. "slot" : {
  38. "description" : "Slot to which this artifact can be put, if applicable",
  39. "oneOf" : [
  40. {
  41. "type" : "string"
  42. },
  43. {
  44. "type" : "array",
  45. "minItems" : 1,
  46. "items" : { "type" : "string" }
  47. }
  48. ]
  49. },
  50. "class" : {
  51. "type" : "string",
  52. "enum" : [ "SPECIAL", "TREASURE", "MINOR", "MAJOR", "RELIC" ],
  53. "description" : "Artifact class, treasure, minor, major or relic"
  54. },
  55. "value" : {
  56. "type" : "number",
  57. "description" : "Cost of this artifact, in gold"
  58. },
  59. "components" : {
  60. "type" : "array",
  61. "description" : "Optional, list of components for combinational artifacts",
  62. "items" : { "type" : "string" }
  63. },
  64. "fusedComponents" : {
  65. "type" : "boolean",
  66. "description" : "Used together with components fild. Marks the artifact as fused. Cannot be disassembled."
  67. },
  68. "bonuses" : {
  69. "description" : "Bonuses provided by this artifact using bonus system",
  70. "type" : "object",
  71. "additionalProperties" : {
  72. "$ref" : "bonusInstance.json"
  73. }
  74. },
  75. "instanceBonuses" : {
  76. "description" : "Bonuses provided by every instance of this artifact using bonus system",
  77. "type" : "object",
  78. "additionalProperties" : {
  79. "$ref" : "bonusInstance.json"
  80. }
  81. },
  82. "growing" : {
  83. "type" : "object",
  84. "additionalProperties" : false,
  85. "properties" : {
  86. "bonusesPerLevel" : { "$ref" : "#/definitions/growingBonusList"},
  87. "thresholdBonuses" : { "$ref" : "#/definitions/growingBonusList"}
  88. }
  89. },
  90. "graphics" : {
  91. "type" : "object",
  92. "additionalProperties" : false,
  93. "description" : "Graphical files associated with the artifact",
  94. "required" : [ "image", "map", "scenarioBonus" ],
  95. "properties" : {
  96. "image" : {
  97. "type" : "string",
  98. "description" : "Base image for this artifact, used for example in hero screen",
  99. "format" : "imageFile"
  100. },
  101. "scenarioBonus" : {
  102. "type" : "string",
  103. "description" : "Image 58x64 in size, for use as campaign scenario starting bonus selection",
  104. "format" : "imageFile"
  105. },
  106. "map" : {
  107. "type" : "string",
  108. "description" : ".def file for adventure map",
  109. "format" : "animationFile"
  110. }
  111. }
  112. },
  113. "text" : {
  114. "type" : "object",
  115. "additionalProperties" : false,
  116. "description" : "Texts associated with artifact",
  117. "required" : [ "description", "event", "name" ],
  118. "properties" : {
  119. "name" : {
  120. "type" : "string",
  121. "description" : "Name of the artifact"
  122. },
  123. "description" : {
  124. "type" : "string",
  125. "description" : "Long description of this artifact"
  126. },
  127. "event" : {
  128. "type" : "string",
  129. "description" : "Text that visible on picking this artifact on map"
  130. }
  131. }
  132. },
  133. "index" : {
  134. "type" : "number",
  135. "description" : "Private field to break things, do not use."
  136. },
  137. "onlyOnWaterMap" : {
  138. "type" : "boolean",
  139. "description" : "If set to true, artifact won't spawn on a map without water"
  140. },
  141. "charged": {
  142. "type" : "object",
  143. "additionalProperties" : false,
  144. "description" : "Determines charged artifact behavior",
  145. "required" : ["usageType"],
  146. "properties" : {
  147. "usageType": {
  148. "type" : "string",
  149. "enum" : ["SPELLCAST", "BATTLE", "BUILDING"]
  150. },
  151. "removeOnDepletion" : {
  152. "type" : "boolean"
  153. },
  154. "startingCharges" : {
  155. "type" : "number",
  156. "description" : "Default starting charge amount"
  157. }
  158. }
  159. }
  160. }
  161. }