character.json 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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": "string"},
  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. },
  35. "skills": {
  36. "items": {"$ref": "#/definitions/skill"},
  37. "type": "array"
  38. },
  39. "inventory": {"$ref": "file:inventory.json#"}
  40. },
  41. "type": "object",
  42. "definitions": {
  43. "classDetail": {
  44. "properties": {
  45. "level": {"type": "integer", "minimum": 1},
  46. "name": {"type": "string"},
  47. "spellBook": {"$ref": "file:spellbook.json#"}
  48. },
  49. "type": "object"
  50. },
  51. "hitpoints": {
  52. "properties": {
  53. "total": {"type": "integer", "minimum": 1},
  54. "rolled": {"type": "integer", "minimum": 1},
  55. "current": {"type": "integer", "minimum": -10},
  56. "temp": {"type": "integer", "minimum": 0},
  57. "nonlethal": {"type": "integer", "minimum": 0}
  58. },
  59. "type":"object"
  60. },
  61. "skill": {
  62. "properties": {
  63. "name": {"type": "string"},
  64. "ranks": {"type": "integer"},
  65. "pointsSpent": {"type": "integer"}
  66. },
  67. "type": "object"
  68. }
  69. }
  70. }