settings.json 14 KB

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