hero.json 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. {
  2. "type" : "object",
  3. "$schema" : "http://json-schema.org/draft-04/schema",
  4. "title" : "VCMI hero format",
  5. "description" : "Format used to define new heroes in VCMI",
  6. "required" : [ "class", "army", "skills", "texts" ],
  7. "anyOf" : [
  8. {
  9. "required" : [ "images" ]
  10. },
  11. {
  12. "required" : [ "index" ]
  13. }
  14. ],
  15. "additionalProperties" : false,
  16. "properties" : {
  17. "special" : {
  18. "type" : "boolean",
  19. "description" : "If set to true hero will be unavailable on start and won't appear in taverns (campaign heroes)"
  20. },
  21. "class" : {
  22. "type" : "string",
  23. "description" : "Identifier of class this hero belongs to. Such as knight or battleMage"
  24. },
  25. "female" : {
  26. "type" : "boolean",
  27. "description" : "Set to true if the hero is female by default (can be changed in map editor)"
  28. },
  29. "battleImage" : {
  30. "type" : "string",
  31. "description" : "Custom animation to be used on battle, overrides hero class property",
  32. "format" : "animationFile"
  33. },
  34. "compatibilityIdentifiers" : {
  35. "type" : "array",
  36. "items" : {
  37. "type" : "string"
  38. },
  39. "description" : "Additional identifiers that may refer to this object, to provide compatibility after object has been renamed"
  40. },
  41. "images" : {
  42. "type" : "object",
  43. "additionalProperties" : false,
  44. "description" : "images",
  45. "required" : [ "large", "small", "specialtyLarge", "specialtySmall" ],
  46. "properties" : {
  47. "large" : {
  48. "type" : "string",
  49. "description" : "Large version of portrait for use in hero screen",
  50. "format" : "imageFile"
  51. },
  52. "small" : {
  53. "type" : "string",
  54. "description" : "Small version of portrait for use on adventure map",
  55. "format" : "imageFile"
  56. },
  57. "specialtyLarge" : {
  58. "type" : "string",
  59. "description" : "Large image of hero specilty, used in hero screen",
  60. "format" : "imageFile"
  61. },
  62. "specialtySmall" : {
  63. "type" : "string",
  64. "description" : "Small image of hero specialty for use in exchange screen",
  65. "format" : "imageFile"
  66. }
  67. }
  68. },
  69. "army" : {
  70. "type" : "array",
  71. "description" : "Initial hero army when recruited in tavern",
  72. "minItems" : 1,
  73. "maxItems" : 3,
  74. "items" : {
  75. "type" : "object",
  76. "additionalProperties" : false,
  77. "required" : [ "creature", "min", "max" ],
  78. "properties" : {
  79. "creature" : {
  80. "type" : "string",
  81. "description" : "creature"
  82. },
  83. "max" : {
  84. "type" : "number",
  85. "description" : "max",
  86. "minimum" : 1
  87. },
  88. "min" : {
  89. "type" : "number",
  90. "description" : "min",
  91. "minimum" : 1
  92. }
  93. }
  94. }
  95. },
  96. "skills" : {
  97. "type" : "array",
  98. "description" : "List of skills initially known by hero",
  99. "maxItems" : 8,
  100. "items" : {
  101. "type" : "object",
  102. "additionalProperties" : false,
  103. "required" : [ "level", "skill" ],
  104. "properties" : {
  105. "level" : {
  106. "type" : "string",
  107. "description" : "level",
  108. "enum" : [ "basic", "advanced", "expert" ]
  109. },
  110. "skill" : {
  111. "type" : "string",
  112. "description" : "skill"
  113. }
  114. }
  115. }
  116. },
  117. "specialty" : {
  118. "type" : "object",
  119. "description" : "Description of hero specialty using bonus system",
  120. "additionalProperties" : false,
  121. "properties" : {
  122. "bonuses" : {
  123. "type" : "object",
  124. "description" : "List of bonuses added by this specialty. See bonus format for more details",
  125. "additionalProperties" : { "$ref" : "bonusInstance.json" }
  126. },
  127. "creature" : {
  128. "type" : "string",
  129. "description" : "Shortcut for defining creature specialty, using standard H3 rules."
  130. },
  131. "secondary" : {
  132. "type" : "string",
  133. "description" : "Shortcut for defining secondary skill specialty, using standard H3 rules."
  134. },
  135. "creatureLevel" : {
  136. "type" : "integer",
  137. "description" : "Assumed creature level for creature specialty"
  138. },
  139. "stepSize" : {
  140. "type" : "integer",
  141. "description" : "How creature or secondary skill specialty should grow per each step. Default is 5"
  142. }
  143. }
  144. },
  145. "spellbook" : {
  146. "type" : "array",
  147. "description" : "List of starting spells, if available. This entry (even empty) will also grant spellbook",
  148. "items" : { "type" : "string" }
  149. },
  150. "texts" : {
  151. "type" : "object",
  152. "additionalProperties" : false,
  153. "description" : "All translatable texts related to hero",
  154. "required" : [ "name", "biography", "specialty" ],
  155. "properties" : {
  156. "name" : {
  157. "type" : "string",
  158. "description" : "Hero name"
  159. },
  160. "biography" : {
  161. "type" : "string",
  162. "description" : "Hero biography"
  163. },
  164. "specialty" : {
  165. "type" : "object",
  166. "additionalProperties" : false,
  167. "description" : "Hero specialty information",
  168. "required" : [ "name", "description", "tooltip" ],
  169. "properties" : {
  170. "name" : {
  171. "type" : "string",
  172. "description" : "Name of the specialty"
  173. },
  174. "description" : {
  175. "type" : "string",
  176. "description" : "Description visible when hovering over specialty icon"
  177. },
  178. "tooltip" : {
  179. "type" : "string",
  180. "description" : "Tooltip visible on clicking icon."
  181. }
  182. }
  183. }
  184. }
  185. },
  186. "index" : {
  187. "type" : "number",
  188. "description" : "Private field to break things, do not use."
  189. },
  190. "onlyOnWaterMap" : {
  191. "type" : "boolean",
  192. "description" : "If set to true, hero won't show up on a map with water"
  193. },
  194. "onlyOnMapWithoutWater" : {
  195. "type" : "boolean",
  196. "description" : "If set to true, hero will show up only if the map contains no water"
  197. }
  198. }
  199. }