artifact.json 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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" : [ "class", "text", "type", "value" ],
  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" : "vcmi:bonus" }
  18. }
  19. }
  20. }
  21. },
  22. "additionalProperties" : false,
  23. "properties":{
  24. "bonuses": {
  25. "type":"array",
  26. "description": "Bonuses provided by this artifact using bonus system",
  27. "items": { "$ref" : "vcmi:bonus" }
  28. },
  29. "class": {
  30. "type":"string",
  31. "enum" : [ "SPECIAL", "TREASURE", "MINOR", "MAJOR", "RELIC" ],
  32. "description": "Artifact class, treasure, minor, major or relic"
  33. },
  34. "index" : {
  35. "type" : "number",
  36. "description" : "Private field to break things, do not use."
  37. },
  38. "components": {
  39. "type":"array",
  40. "description": "Optional, list of components for combinational artifacts",
  41. "items": { "type":"string" }
  42. },
  43. "graphics": {
  44. "type":"object",
  45. "additionalProperties" : false,
  46. "description": "Graphical files associated with the artifact",
  47. "required" : [ "image", "map" ],
  48. "properties":{
  49. "image": {
  50. "type":"string",
  51. "description": "Base image for this artifact, used for example in hero screen",
  52. "format" : "imageFile"
  53. },
  54. "large": {
  55. "type":"string",
  56. "description": "Large image, used for drag-and-drop and popup messages",
  57. "format" : "imageFile"
  58. },
  59. "map": {
  60. "type":"string",
  61. "description": ".def file for adventure map",
  62. "format" : "defFile"
  63. }
  64. }
  65. },
  66. "growing" : {
  67. "type" : "object",
  68. "additionalProperties" : false,
  69. "properties" : {
  70. "bonusesPerLevel" : { "$ref" : "#/definitions/growingBonusList"},
  71. "thresholdBonuses" : { "$ref" : "#/definitions/growingBonusList"}
  72. }
  73. },
  74. "slot": {
  75. "description": "Slot to which this artifact can be put, if applicable",
  76. "oneOf" : [
  77. {
  78. "type":"string"
  79. },
  80. {
  81. "type" : "array",
  82. "minItems" : 1,
  83. "additionalItems" : { "type" : "string" }
  84. }
  85. ]
  86. },
  87. "text": {
  88. "type":"object",
  89. "additionalProperties" : false,
  90. "description": "Texts associated with artifact",
  91. "required" : [ "description", "event", "name" ],
  92. "properties":{
  93. "description": {
  94. "type":"string",
  95. "description": "Long description of this artifact"
  96. },
  97. "event": {
  98. "type":"string",
  99. "description": "Text that visible on picking this artifact on map"
  100. },
  101. "name": {
  102. "type":"string",
  103. "description": "Name of the artifact"
  104. }
  105. }
  106. },
  107. "type": {
  108. "type":"array",
  109. "description": "Type of this artifact - creature, hero or commander",
  110. "items": {
  111. "type":"string",
  112. "enum" : [ "HERO", "CREATURE", "COMMANDER" ]
  113. }
  114. },
  115. "value": {
  116. "type":"number",
  117. "description": "Cost of this artifact, in gold"
  118. }
  119. }
  120. }