character.json 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. {
  2. "$schema": "http://json-schema.org/draft-06/schema#",
  3. "properties": {
  4. "name": {"type": "string"},
  5. "player": {"type": "string"},
  6. "classes": {
  7. "items": {"$ref": "#/definitions/classDetail"},
  8. "type": "array"
  9. },
  10. "race": {"type": "string"},
  11. "alignment": {
  12. "type": "string",
  13. "enum": [
  14. "LG", "NG", "CG", "LN", "TN", "CN", "LE", "NE", "CE"
  15. ]
  16. },
  17. "deity": {"type": "string"},
  18. "size": {
  19. "type": "string",
  20. "enum": [
  21. "F", "D", "T", "S", "M", "L", "H", "G", "C"
  22. ]
  23. },
  24. "age": {"type": "integer"},
  25. "gender": {"type": "string", "enum": ["M", "F", "N"]},
  26. "height": {"type": "string"},
  27. "weight": {"type": "number"},
  28. "eyes": {"type": "string"},
  29. "hair": {"type": "string"},
  30. "skin": {"type": "string"},
  31. "experience": {"type": "integer"},
  32. "health": {"$ref": "#/definitions/hitpoints"},
  33. "abilities": {
  34. "propertyNames": {
  35. "type": "string",
  36. "enum": ["str", "dex", "con", "int", "wis", "cha"]
  37. },
  38. "additionalProperties": {
  39. "properties": {
  40. "base": {"$ref": "#/definitions/abilityScore"},
  41. "temp": {"$ref": "#/definitions/abilityScore"}
  42. },
  43. "additionalProperties": false,
  44. "type": "object"
  45. }
  46. },
  47. "skills": {
  48. "items": {"$ref": "#/definitions/skill"},
  49. "type": "array"
  50. },
  51. "inventory": {"$ref": "file:inventory.json#"}
  52. },
  53. "type": "object",
  54. "definitions": {
  55. "abilityScore": {
  56. "type": "integer",
  57. "oneOf": [
  58. {"const": -1},
  59. {"exclusiveMinimum": 0}
  60. ]
  61. },
  62. "classDetail": {
  63. "properties": {
  64. "level": {"type": "integer", "minimum": 1},
  65. "name": {"type": "string"},
  66. "spellBook": {"$ref": "file:spellbook.json#"}
  67. },
  68. "type": "object"
  69. },
  70. "hitpoints": {
  71. "properties": {
  72. "total": {"type": "integer", "minimum": 1},
  73. "rolled": {"type": "integer", "minimum": 1},
  74. "current": {"type": "integer", "minimum": -10},
  75. "temp": {"type": "integer", "minimum": 0},
  76. "nonlethal": {"type": "integer", "minimum": 0}
  77. },
  78. "type":"object"
  79. },
  80. "skill": {
  81. "properties": {
  82. "name": {"type": "string"},
  83. "ranks": {"type": "integer"},
  84. "pointsSpent": {"type": "integer"}
  85. },
  86. "type": "object"
  87. }
  88. }
  89. }