File: heroClass.json

package info (click to toggle)
vcmi 1.6.5%2Bdfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid, trixie
  • size: 32,060 kB
  • sloc: cpp: 238,971; python: 265; sh: 224; xml: 157; ansic: 78; objc: 61; makefile: 49
file content (113 lines) | stat: -rw-r--r-- 3,210 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
	"type" : "object",
	"$schema" : "http://json-schema.org/draft-04/schema",
	"title" : "VCMI hero class format",
	"description" : "Format used to define classes of heroes in VCMI",
	"required" : [
		"name", "faction", "affinity", "commander", "animation", "mapObject",
		"primarySkills", "secondarySkills", "lowLevelChance", "highLevelChance", 
		"defaultTavern", "tavern"
	],
	"additionalProperties" : false,
	"properties" : {
		"name" : {
			"type" : "string",
			"description" : "Translatable name of hero class"
		},
		"faction" : {
			"type" : "string",
			"description" : "Identifier of faction this class belongs to"
		},
		"affinity" : {
			"type" : "string",
			"description" : "Affinity of hero class, might or magic",
			"enum" : [ "might", "magic"]
		},
		"commander" : {
			"type" : "string",
			"description" : "Identifier of creature that is used as commander by heroes"
		},
		"animation" : {
			"type" : "object",
			"additionalProperties" : false,
			"description" : "Files related to hero animation",
			"required" : [ "battle" ],
			"properties" : {
				"battle" : {
					"type" : "object",
					"additionalProperties" : false,
					"description" : "Hero animations for battle",
					"required" : [ "female", "male" ],
					"properties" : {
						"female" : {
							"type" : "string",
							"description" : "Female version",
							"format" : "animationFile"
						},
						"male" : {
							"type" : "string",
							"description" : "Male version",
							"format" : "animationFile"
						}
					}
				}
			}
		},
		"mapObject" : {
			// TODO: this entry should be merged with corresponding base entry in hero object type and validated as objectType
			// "$ref" : "objectType.json",
			"type" : "object",
			"properties" : {
				"filters" : {
					"type" : "object",
					"additionalProperties" : true
				}
			}
		},
		"primarySkills" : {
			"type" : "object",
			"description" : "Initial primary skills of heroes",
			"additionalProperties" : {
				"type" : "number"
			}
		},
		"secondarySkills" : {
			"type" : "object",
			"description" : "Chance to get specific secondary skill on level-up. All missing skills are considered to be banned",
			"additionalProperties" : {
				"type" : "number"
			}
		},
		"lowLevelChance" : {
			"type" : "object",
			"description" : "Chance to get specific primary skill on level-up, applicable for levels less than 10",
			"additionalProperties" : {
				"type" : "number"
			}
		},
		"highLevelChance" : {
			"type" : "object",
			"description" : "Chance to get specific primary skill on level-up, applicable for levels starting from 10",
			"additionalProperties" : {
				"type" : "number"
			}
		},
		"defaultTavern" : {
			"type" : "number",
			"description" : "Default chance for hero to appear in tavern, used only when value vas not set in tavern field",
			"minimum" : 0
		},
		"tavern" : {
			"type" : "object",
			"description" : "Chance for this hero to appear in tavern of this factions. Reversed version of field \"tavern\" from town format",
			"additionalProperties" : {
				"type" : "number",
				"minimum" : 0
			}
		},
		"index" : {
			"type" : "number",
			"description" : "Private field to break things, do not use."
		}
	}
}