settings.json 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. // This is schema for checking game settings from settings.json
  2. // Any new settings should be added in this file for correct serialization and initialization
  3. {
  4. "type" : "object",
  5. "$schema": "http://json-schema.org/draft-04/schema",
  6. "required" : [ "general", "video", "adventure", "pathfinder", "battle", "server", "logging", "launcher", "gameTweaks" ],
  7. "definitions" : {
  8. "logLevelEnum" : {
  9. "type" : "string",
  10. "enum" : [ "trace", "debug", "info", "warn", "error" ]
  11. }
  12. },
  13. "additionalProperties" : false,
  14. "properties":
  15. {
  16. "general" : {
  17. "type" : "object",
  18. "default": {},
  19. "additionalProperties" : false,
  20. "required" : [
  21. "playerName",
  22. "music",
  23. "sound",
  24. "language",
  25. "gameDataLanguage",
  26. "swipe",
  27. "swipeDesktop",
  28. "saveRandomMaps",
  29. "saveFrequency",
  30. "notifications",
  31. "extraDump",
  32. "userRelativePointer",
  33. "relativePointerSpeedMultiplier",
  34. "lastSettingsTab"
  35. ],
  36. "properties" : {
  37. "playerName" : {
  38. "type":"string",
  39. "default" : "Player"
  40. },
  41. "music" : {
  42. "type" : "number",
  43. "default" : 88
  44. },
  45. "sound" : {
  46. "type" : "number",
  47. "default" : 88
  48. },
  49. "swipe" : {
  50. "type" : "boolean",
  51. "default" : true
  52. },
  53. "swipeDesktop" : {
  54. "type" : "boolean",
  55. "default" : false
  56. },
  57. "saveRandomMaps" : {
  58. "type" : "boolean",
  59. "default" : false
  60. },
  61. "lastMap" : {
  62. "type":"string",
  63. "default" : "Maps/Arrogance"
  64. },
  65. "language" : {
  66. "type":"string",
  67. "enum" : [ "english", "chinese", "german", "polish", "russian", "spanish", "ukrainian" ],
  68. "default" : "english"
  69. },
  70. "gameDataLanguage" : {
  71. "type":"string",
  72. "enum" : [ "auto", "english", "chinese", "german", "korean", "polish", "russian", "spanish", "ukrainian", "other_cp1250", "other_cp1251", "other_cp1252" ],
  73. "default" : "auto"
  74. },
  75. "lastSave" : {
  76. "type":"string",
  77. "default" : "NEWGAME"
  78. },
  79. "lastSettingsTab" : {
  80. "type" : "number",
  81. "default" : 0
  82. },
  83. "lastCampaign" : {
  84. "type":"string",
  85. "default" : ""
  86. },
  87. "saveFrequency" : {
  88. "type" : "number",
  89. "default" : 1
  90. },
  91. "notifications" : {
  92. "type" : "boolean",
  93. "default" : false
  94. },
  95. "extraDump" : {
  96. "type" : "boolean",
  97. "default" : false
  98. },
  99. "userRelativePointer" : {
  100. "type" : "boolean",
  101. "default" : false
  102. },
  103. "relativePointerSpeedMultiplier" : {
  104. "type" : "number",
  105. "default" : 1
  106. }
  107. }
  108. },
  109. "video" : {
  110. "type" : "object",
  111. "additionalProperties" : false,
  112. "default": {},
  113. "required" : [
  114. "screenRes",
  115. "bitsPerPixel",
  116. "fullscreen",
  117. "realFullscreen",
  118. "cursor",
  119. "spellbookAnimation",
  120. "driver",
  121. "showIntro",
  122. "displayIndex",
  123. "showfps",
  124. "targetfps"
  125. ],
  126. "properties" : {
  127. "screenRes" : {
  128. "type" : "object",
  129. "additionalProperties" : false,
  130. "required" : [ "width", "height" ],
  131. "properties" : {
  132. "width" : { "type" : "number" },
  133. "height" : { "type" : "number" }
  134. },
  135. "default": {"width" : 800, "height": 600 }
  136. },
  137. "bitsPerPixel" : {
  138. "type" : "number",
  139. "default" : 32
  140. },
  141. "fullscreen": {
  142. "type": "boolean",
  143. "default": false
  144. },
  145. "realFullscreen" : {
  146. "type" : "boolean",
  147. "default" : false
  148. },
  149. "cursor" : {
  150. "type" : "string",
  151. "enum" : [ "auto", "hardware", "software" ],
  152. "default" : "auto"
  153. },
  154. "showIntro" : {
  155. "type" : "boolean",
  156. "default" : true
  157. },
  158. "spellbookAnimation" : {
  159. "type" : "boolean",
  160. "default" : true
  161. },
  162. "driver":{
  163. "type" : "string",
  164. "default" : "opengl",
  165. "description" : "preferred graphics backend driver name for SDL2"
  166. },
  167. "displayIndex" : {
  168. "type" : "number",
  169. "default" : 0
  170. },
  171. "showfps" : {
  172. "type" : "boolean",
  173. "default" : false
  174. },
  175. "targetfps" : {
  176. "type" : "number",
  177. "default" : 60
  178. }
  179. }
  180. },
  181. "adventure" : {
  182. "type" : "object",
  183. "additionalProperties" : false,
  184. "default": {},
  185. "required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "alwaysSkipCombat" ],
  186. "properties" : {
  187. "heroMoveTime" : {
  188. "type" : "number",
  189. "default" : 150
  190. },
  191. "enemyMoveTime" : {
  192. "type" : "number",
  193. "default" : 150
  194. },
  195. "scrollSpeedPixels" : {
  196. "type" : "number",
  197. "default" : 800
  198. },
  199. "heroReminder" : {
  200. "type" : "boolean",
  201. "default" : true
  202. },
  203. "quickCombat" : {
  204. "type" : "boolean",
  205. "default" : false
  206. },
  207. "objectAnimation" : {
  208. "type" : "boolean",
  209. "default" : true
  210. },
  211. "terrainAnimation" : {
  212. "type" : "boolean",
  213. "default" : true
  214. },
  215. "alwaysSkipCombat" : {
  216. "type" : "boolean",
  217. "default" : false
  218. }
  219. }
  220. },
  221. "pathfinder" : {
  222. "type" : "object",
  223. "additionalProperties" : false,
  224. "default": {},
  225. "required" : [ "teleports", "layers", "oneTurnSpecialLayersLimit", "originalMovementRules", "lightweightFlyingMode" ],
  226. "properties" : {
  227. "layers" : {
  228. "type" : "object",
  229. "additionalProperties" : false,
  230. "default": {},
  231. "required" : [ "sailing", "waterWalking", "flying" ],
  232. "properties" : {
  233. "sailing" : {
  234. "type" : "boolean",
  235. "default" : true
  236. },
  237. "waterWalking" : {
  238. "type" : "boolean",
  239. "default" : true
  240. },
  241. "flying" : {
  242. "type" : "boolean",
  243. "default" : true
  244. }
  245. }
  246. },
  247. "teleports" : {
  248. "type" : "object",
  249. "additionalProperties" : false,
  250. "default": {},
  251. "required" : [ "twoWay", "oneWay", "oneWayRandom", "whirlpool", "castleGate" ],
  252. "properties" : {
  253. "twoWay" : {
  254. "type" : "boolean",
  255. "default" : true
  256. },
  257. "oneWay" : {
  258. "type" : "boolean",
  259. "default" : true
  260. },
  261. "oneWayRandom" : {
  262. "type" : "boolean",
  263. "default" : false
  264. },
  265. "whirlpool" : {
  266. "type" : "boolean",
  267. "default" : true
  268. },
  269. "castleGate" : {
  270. "type" : "boolean",
  271. "default" : false
  272. }
  273. }
  274. },
  275. "oneTurnSpecialLayersLimit" : {
  276. "type" : "boolean",
  277. "default" : true
  278. },
  279. "originalMovementRules" : {
  280. "type" : "boolean",
  281. "default" : false
  282. },
  283. "lightweightFlyingMode" : {
  284. "type" : "boolean",
  285. "default" : false
  286. }
  287. }
  288. },
  289. "battle" : {
  290. "type" : "object",
  291. "additionalProperties" : false,
  292. "default": {},
  293. "required" : [ "speedFactor", "mouseShadow", "cellBorders", "stackRange", "showQueue", "queueSize" ],
  294. "properties" : {
  295. "speedFactor" : {
  296. "type" : "number",
  297. "default" : 2
  298. },
  299. "mouseShadow" : {
  300. "type":"boolean",
  301. "default" : true
  302. },
  303. "cellBorders" : {
  304. "type" : "boolean",
  305. "default" : false
  306. },
  307. "stackRange" : {
  308. "type" : "boolean",
  309. "default" : true
  310. },
  311. "showQueue" : {
  312. "type" : "boolean",
  313. "default" : true
  314. },
  315. "queueSize" : {
  316. "type" : "string",
  317. "default" : "auto",
  318. "enum" : [ "auto", "small", "big" ]
  319. }
  320. }
  321. },
  322. "server" : {
  323. "type" : "object",
  324. "additionalProperties" : false,
  325. "default": {},
  326. "required" : [ "server", "port", "localInformation", "playerAI", "friendlyAI","neutralAI", "enemyAI", "reconnect", "uuid", "names" ],
  327. "properties" : {
  328. "server" : {
  329. "type":"string",
  330. "default" : "127.0.0.1"
  331. },
  332. "port" : {
  333. "type" : "number",
  334. "default" : 3030
  335. },
  336. "localInformation" : {
  337. "type" : "number",
  338. "default" : 2
  339. },
  340. "playerAI" : {
  341. "type" : "string",
  342. "default" : "Nullkiller"
  343. },
  344. "friendlyAI" : {
  345. "type" : "string",
  346. "default" : "BattleAI"
  347. },
  348. "neutralAI" : {
  349. "type" : "string",
  350. "default" : "StupidAI"
  351. },
  352. "enemyAI" : {
  353. "type" : "string",
  354. "default" : "BattleAI"
  355. },
  356. "reconnect" : {
  357. "type" : "boolean",
  358. "default" : false
  359. },
  360. "uuid" : {
  361. "type" : "string",
  362. "default" : ""
  363. },
  364. "names" : {
  365. "type" : "array",
  366. "default" : [],
  367. "items":
  368. {
  369. "type" : "string",
  370. "default" : ""
  371. }
  372. }
  373. }
  374. },
  375. "logging" : {
  376. "type" : "object",
  377. "additionalProperties" : false,
  378. "default" : {},
  379. "required" : [ "console", "file", "loggers" ],
  380. "properties" : {
  381. "console" : {
  382. "type" : "object",
  383. "default" : {},
  384. "required" : [ "format", "threshold", "coloredOutputEnabled", "colorMapping" ],
  385. "properties" : {
  386. "format" : {
  387. "type" : "string",
  388. "default" : "%m"
  389. },
  390. "threshold" : {
  391. "$ref" : "#/definitions/logLevelEnum",
  392. "default" : "info"
  393. },
  394. "coloredOutputEnabled" : {
  395. "type" : "boolean",
  396. "default" : true
  397. },
  398. "colorMapping" : {
  399. "type" : "array",
  400. "default" : [
  401. { "domain" : "global", "level" : "trace", "color" : "gray"},
  402. { "domain" : "global", "level" : "debug", "color" : "white"},
  403. { "domain" : "global", "level" : "info", "color" : "green"},
  404. { "domain" : "global", "level" : "warn", "color" : "yellow"},
  405. { "domain" : "global", "level" : "error", "color" : "red"}
  406. ],
  407. "items" : {
  408. "type" : "object",
  409. "additionalProperties" : false,
  410. "default" : {},
  411. "required" : [ "domain", "level", "color" ],
  412. "properties" : {
  413. "domain" : { "type" : "string" },
  414. "level" : { "$ref" : "#/definitions/logLevelEnum" },
  415. "color" : { "type" : "string", "enum" : [ "default", "green", "red", "magenta", "yellow", "white", "gray", "teal" ] }
  416. }
  417. }
  418. }
  419. }
  420. },
  421. "file" : {
  422. "type" : "object",
  423. "additionalProperties" : false,
  424. "default" : {},
  425. "required" : [ "format" ],
  426. "properties" : {
  427. "format" : {
  428. "type" : "string",
  429. "default" : "[%c] %l %n - %m"
  430. }
  431. }
  432. },
  433. "loggers" : {
  434. "type" : "array",
  435. "default" : [ { "domain" : "global", "level" : "trace" } ],
  436. "items" : {
  437. "type" : "object",
  438. "additionalProperties" : false,
  439. "required" : [ "level", "domain" ],
  440. "properties" : {
  441. "domain" : { "type" : "string" },
  442. "level" : { "$ref" : "#/definitions/logLevelEnum" }
  443. }
  444. }
  445. }
  446. }
  447. },
  448. "launcher" : {
  449. "type" : "object",
  450. "default": {},
  451. "additionalProperties" : false,
  452. "required" : [ "setupCompleted", "repositoryURL", "enableInstalledMods", "extraResolutionsModPath", "autoCheckRepositories", "updateOnStartup", "updateConfigUrl", "lobbyUrl", "lobbyPort", "lobbyUsername", "connectionTimeout" ],
  453. "properties" : {
  454. "repositoryURL" : {
  455. "type" : "array",
  456. "default" : [
  457. "https://raw.githubusercontent.com/vcmi/vcmi-mods-repository/develop/vcmi-1.2.json"
  458. ],
  459. "items" : {
  460. "type" : "string"
  461. }
  462. },
  463. "setupCompleted" : {
  464. "type" : "boolean",
  465. "default" : false
  466. },
  467. "enableInstalledMods" : {
  468. "type" : "boolean",
  469. "default" : true
  470. },
  471. "extraResolutionsModPath" : {
  472. "type" : "string",
  473. "default" : "/vcmi-extras/Mods/extraResolutions/Content/config/resolutions.json"
  474. },
  475. "autoCheckRepositories" : {
  476. "type" : "boolean",
  477. "default" : true
  478. },
  479. "updateOnStartup" : {
  480. "type" : "boolean",
  481. "default" : true
  482. },
  483. "updateConfigUrl" : {
  484. "type" : "string",
  485. "default" : "https://raw.githubusercontent.com/vcmi/vcmi-updates/master/vcmi-updates.json"
  486. },
  487. "lobbyUrl" : {
  488. "type" : "string",
  489. "description" : "ip address or web link to remote proxy server",
  490. "default" : "beholder.vcmi.eu"
  491. },
  492. "lobbyPort" : {
  493. "type" : "number",
  494. "description" : "connection port for remote proxy server",
  495. "default" : 5002
  496. },
  497. "lobbyUsername" : {
  498. "type" : "string",
  499. "description" : "username for the client on the remote proxy server",
  500. "default" : ""
  501. },
  502. "connectionTimeout" : {
  503. "type" : "number",
  504. "description" : "maximum time in ms, should be enough to establish socket connection to remote proxy server.",
  505. "default" : 2000
  506. }
  507. }
  508. },
  509. "gameTweaks" : {
  510. "type": "object",
  511. "default": {},
  512. "additionalProperties": false,
  513. "required": [
  514. "showGrid",
  515. "forceMovementInfo",
  516. "numericCreaturesQuantities",
  517. "availableCreaturesAsDwellingLabel",
  518. "compactTownCreatureInfo",
  519. "infoBarPick",
  520. "skipBattleIntroMusic"
  521. ],
  522. "properties": {
  523. "showGrid": {
  524. "type": "boolean",
  525. "default": false
  526. },
  527. "forceMovementInfo": {
  528. "type": "boolean",
  529. "default": false
  530. },
  531. "numericCreaturesQuantities": {
  532. "type": "boolean",
  533. "default": false
  534. },
  535. "availableCreaturesAsDwellingLabel" : {
  536. "type" : "boolean",
  537. "default" : false
  538. },
  539. "compactTownCreatureInfo" : {
  540. "type" : "boolean",
  541. "default" : false
  542. },
  543. "infoBarPick" : {
  544. "type" : "boolean",
  545. "default" : false
  546. },
  547. "skipBattleIntroMusic" : {
  548. "type" : "boolean",
  549. "default" : false
  550. }
  551. }
  552. }
  553. }
  554. }