settings.json 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759
  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", "lobby", "gameTweaks", "mods" ],
  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. "multiPlayerNames",
  23. "music",
  24. "sound",
  25. "saveRandomMaps",
  26. "lastMap",
  27. "language",
  28. "gameDataLanguage",
  29. "lastSave",
  30. "lastSettingsTab",
  31. "lastCampaign",
  32. "lastDifficulty",
  33. "saveFrequency",
  34. "notifications",
  35. "extraDump",
  36. "userRelativePointer",
  37. "relativePointerSpeedMultiplier",
  38. "hapticFeedback",
  39. "longTouchTimeMilliseconds",
  40. "autosaveCountLimit",
  41. "useSavePrefix",
  42. "savePrefix",
  43. "startTurnAutosave",
  44. "enableUiEnhancements",
  45. "audioMuteFocus"
  46. ],
  47. "properties" : {
  48. "playerName" : {
  49. "type" : "string",
  50. "default" : "Player"
  51. },
  52. "multiPlayerNames" : {
  53. "type" : "array",
  54. "default" : []
  55. },
  56. "music" : {
  57. "type" : "number",
  58. "default" : 88
  59. },
  60. "sound" : {
  61. "type" : "number",
  62. "default" : 88
  63. },
  64. "saveRandomMaps" : {
  65. "type" : "boolean",
  66. "default" : false
  67. },
  68. "lastMap" : {
  69. "type" : "string",
  70. "default" : "Maps/Arrogance"
  71. },
  72. "language" : {
  73. "type" : "string",
  74. "enum" : [ "english", "czech", "chinese", "finnish", "french", "german", "hungarian", "italian", "korean", "polish", "portuguese", "russian", "spanish", "swedish", "turkish", "ukrainian", "vietnamese" ],
  75. "default" : "english"
  76. },
  77. "gameDataLanguage" : {
  78. "type" : "string",
  79. "enum" : [ "auto", "english", "czech", "chinese", "finnish", "french", "german", "hungarian", "italian", "korean", "polish", "portuguese", "russian", "spanish", "swedish", "turkish", "ukrainian", "vietnamese" ],
  80. "default" : "auto"
  81. },
  82. "lastSave" : {
  83. "type" : "string",
  84. "default" : "NEWGAME"
  85. },
  86. "lastSettingsTab" : {
  87. "type" : "number",
  88. "default" : 0
  89. },
  90. "lastCampaign" : {
  91. "type" : "string",
  92. "default" : ""
  93. },
  94. "lastDifficulty" : {
  95. "type" : "number",
  96. "default" : 1
  97. },
  98. "saveFrequency" : {
  99. "type" : "number",
  100. "default" : 1
  101. },
  102. "notifications" : {
  103. "type" : "boolean",
  104. "default" : false
  105. },
  106. "extraDump" : {
  107. "type" : "boolean",
  108. "default" : false
  109. },
  110. "userRelativePointer" : {
  111. "type" : "boolean",
  112. "default" : false
  113. },
  114. "relativePointerSpeedMultiplier" : {
  115. "type" : "number",
  116. "default" : 1
  117. },
  118. "longTouchTimeMilliseconds" : {
  119. "type" : "number",
  120. "default" : 1000
  121. },
  122. "hapticFeedback" : {
  123. "type" : "boolean",
  124. "default" : true
  125. },
  126. "autosaveCountLimit" : {
  127. "type" : "number",
  128. "default": 5
  129. },
  130. "useSavePrefix" : {
  131. "type": "boolean",
  132. "default": true
  133. },
  134. "savePrefix" : {
  135. "type": "string",
  136. "default": ""
  137. },
  138. "startTurnAutosave" : {
  139. "type": "boolean",
  140. "default": false
  141. },
  142. "enableUiEnhancements" : {
  143. "type": "boolean",
  144. "default": true
  145. },
  146. "audioMuteFocus" : {
  147. "type": "boolean",
  148. "default": false
  149. }
  150. }
  151. },
  152. "mods" : {
  153. "type" : "object",
  154. "additionalProperties" : false,
  155. "default" : {},
  156. "required" : [
  157. "validation"
  158. ],
  159. "properties" : {
  160. "validation" : {
  161. "type" : "string",
  162. "enum" : [ "off", "basic", "full" ],
  163. "default" : "basic"
  164. }
  165. }
  166. },
  167. "video" : {
  168. "type" : "object",
  169. "additionalProperties" : false,
  170. "default" : {},
  171. "required" : [
  172. "resolution",
  173. "reservedWidth",
  174. "fullscreen",
  175. "realFullscreen",
  176. "cursor",
  177. "showIntro",
  178. "spellbookAnimation",
  179. "driver",
  180. "displayIndex",
  181. "showfps",
  182. "targetfps",
  183. "vsync",
  184. "fontsType",
  185. "fontScalingFactor",
  186. "upscalingFilter",
  187. "fontUpscalingFilter",
  188. "downscalingFilter"
  189. ],
  190. "properties" : {
  191. "resolution" : {
  192. "type" : "object",
  193. "additionalProperties" : false,
  194. "required" : [ "width", "height", "scaling" ],
  195. "properties" : {
  196. "width" : { "type" : "number", "default" : 800 },
  197. "height" : { "type" : "number", "default" : 600 },
  198. "scaling" : { "type" : "number", "default" : 0 }
  199. }
  200. },
  201. "reservedWidth" : {
  202. "type" : "number",
  203. "defaultIOS" : 0.1, // iOS camera cutout / notch is not excluded from available area by SDL, handle it this way
  204. "default" : 0
  205. },
  206. "fullscreen" : {
  207. "type" : "boolean",
  208. "default" : true
  209. },
  210. "realFullscreen" : {
  211. "type" : "boolean",
  212. "default" : false
  213. },
  214. "cursor" : {
  215. "type" : "string",
  216. "enum" : [ "hardware", "software" ],
  217. "default" : "hardware"
  218. },
  219. "showIntro" : {
  220. "type" : "boolean",
  221. "default" : true
  222. },
  223. "spellbookAnimation" : {
  224. "type" : "boolean",
  225. "default" : true
  226. },
  227. "driver" : {
  228. "type" : "string",
  229. "defaultWindows" : "",
  230. "default" : "opengl",
  231. "description" : "preferred graphics backend driver name for SDL2"
  232. },
  233. "displayIndex" : {
  234. "type" : "number",
  235. "default" : 0
  236. },
  237. "showfps" : {
  238. "type" : "boolean",
  239. "default" : false
  240. },
  241. "targetfps" : {
  242. "type" : "number",
  243. "default" : 60
  244. },
  245. "vsync" : {
  246. "type" : "boolean",
  247. "default" : true
  248. },
  249. "fontsType" : {
  250. "type" : "string",
  251. "enum" : [ "auto", "original", "scalable" ],
  252. "default" : "auto"
  253. },
  254. "fontScalingFactor" : {
  255. "type" : "number",
  256. "default" : 1
  257. },
  258. "fontUpscalingFilter" : {
  259. "type" : "string",
  260. "enum" : [ "nearest", "bilinear", "xbrz" ],
  261. "default" : "nearest"
  262. },
  263. "upscalingFilter" : {
  264. "type" : "string",
  265. "enum" : [ "auto", "none", "xbrz2", "xbrz3", "xbrz4" ],
  266. "default" : "auto"
  267. },
  268. "downscalingFilter" : {
  269. "type" : "string",
  270. "enum" : [ "nearest", "linear", "best" ],
  271. "default" : "best"
  272. }
  273. }
  274. },
  275. "input" : {
  276. "type" : "object",
  277. "additionalProperties" : false,
  278. "default" : {},
  279. "required" : [
  280. "radialWheelGarrisonSwipe",
  281. "touchToleranceDistance",
  282. "mouseToleranceDistance",
  283. "shortcutToleranceDistance",
  284. "enableMouse",
  285. "enableTouch",
  286. "enableController",
  287. "controllerTriggerTreshold",
  288. "controllerAxisDeadZone",
  289. "controllerAxisFullZone",
  290. "controllerAxisSpeed",
  291. "controllerAxisScale"
  292. ],
  293. "properties" : {
  294. "radialWheelGarrisonSwipe" : {
  295. "type" : "boolean",
  296. "default" : true
  297. },
  298. "touchToleranceDistance" : {
  299. "type" : "number",
  300. "default" : 20
  301. },
  302. "mouseToleranceDistance" : {
  303. "type" : "number",
  304. "default" : 0
  305. },
  306. "shortcutToleranceDistance" : {
  307. "type" : "number",
  308. "default" : 0
  309. },
  310. "enableMouse" : {
  311. "type" : "boolean",
  312. "default" : true
  313. },
  314. "enableTouch" : {
  315. "type" : "boolean",
  316. "default" : true
  317. },
  318. "enableController" : {
  319. "type" : "boolean",
  320. "default" : true
  321. },
  322. "controllerTriggerTreshold" : {
  323. "type" : "number",
  324. "default" : 0.3
  325. },
  326. "controllerAxisDeadZone" : {
  327. "type" : "number",
  328. "default" : 0.2
  329. },
  330. "controllerAxisFullZone" : {
  331. "type" : "number",
  332. "default" : 1.0
  333. },
  334. "controllerAxisSpeed" : {
  335. "type" : "number",
  336. "default" : 1000
  337. },
  338. "controllerAxisScale" : {
  339. "type" : "number",
  340. "default" : 2
  341. }
  342. }
  343. },
  344. "adventure" : {
  345. "type" : "object",
  346. "additionalProperties" : false,
  347. "default" : {},
  348. "required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "forceQuickCombat", "borderScroll", "leftButtonDrag", "rightButtonDrag", "smoothDragging", "backgroundDimLevel", "hideBackground", "backgroundDimSmallWindows" ],
  349. "properties" : {
  350. "heroMoveTime" : {
  351. "type" : "number",
  352. "default" : 150
  353. },
  354. "enemyMoveTime" : {
  355. "type" : "number",
  356. "default" : 150
  357. },
  358. "scrollSpeedPixels" : {
  359. "type" : "number",
  360. "default" : 800
  361. },
  362. "heroReminder" : {
  363. "type" : "boolean",
  364. "default" : true
  365. },
  366. "quickCombat" : {
  367. "type" : "boolean",
  368. "default" : false
  369. },
  370. "objectAnimation" : {
  371. "type" : "boolean",
  372. "default" : true
  373. },
  374. "terrainAnimation" : {
  375. "type" : "boolean",
  376. "default" : true
  377. },
  378. "forceQuickCombat" : {
  379. "type" : "boolean",
  380. "default" : false
  381. },
  382. "borderScroll" :
  383. {
  384. "type" : "boolean",
  385. "defaultIOS" : false,
  386. "defaultAndroid" : false,
  387. "default" : true
  388. },
  389. "leftButtonDrag" : {
  390. "type" : "boolean",
  391. "default" : false
  392. },
  393. "rightButtonDrag" : {
  394. "type" : "boolean",
  395. "default" : false
  396. },
  397. "smoothDragging" : {
  398. "type" : "boolean",
  399. "default" : true
  400. },
  401. "backgroundDimLevel" : {
  402. "type" : "number",
  403. "default" : 128
  404. },
  405. "hideBackground" : {
  406. "type" : "boolean",
  407. "default" : false
  408. },
  409. "backgroundDimSmallWindows" : {
  410. "type" : "boolean",
  411. "default" : false
  412. }
  413. }
  414. },
  415. "battle" : {
  416. "type" : "object",
  417. "additionalProperties" : false,
  418. "default" : {},
  419. "required" : [ "speedFactor", "mouseShadow", "cellBorders", "stackRange", "movementHighlightOnHover", "rangeLimitHighlightOnHover", "showQueue", "swipeAttackDistance", "queueSize", "stickyHeroInfoWindows", "enableAutocombatSpells", "endWithAutocombat", "queueSmallSlots", "queueSmallOutside", "enableQuickSpellPanel" ],
  420. "properties" : {
  421. "speedFactor" : {
  422. "type" : "number",
  423. "default" : 2
  424. },
  425. "mouseShadow" : {
  426. "type" : "boolean",
  427. "default" : true
  428. },
  429. "cellBorders" : {
  430. "type" : "boolean",
  431. "default" : false
  432. },
  433. "stackRange" : {
  434. "type" : "boolean",
  435. "default" : true
  436. },
  437. "movementHighlightOnHover" : {
  438. "type" : "boolean",
  439. "default" : true
  440. },
  441. "rangeLimitHighlightOnHover" : {
  442. "type" : "boolean",
  443. "default" : false
  444. },
  445. "showQueue" : {
  446. "type" : "boolean",
  447. "default" : true
  448. },
  449. "swipeAttackDistance" : {
  450. "type" : "number",
  451. "default" : 250
  452. },
  453. "queueSize" : {
  454. "type" : "string",
  455. "default" : "auto",
  456. "enum" : [ "auto", "small", "big" ]
  457. },
  458. "stickyHeroInfoWindows" : {
  459. "type" : "boolean",
  460. "default" : true
  461. },
  462. "enableAutocombatSpells" : {
  463. "type": "boolean",
  464. "default": true
  465. },
  466. "endWithAutocombat" : {
  467. "type": "boolean",
  468. "default": false
  469. },
  470. "queueSmallSlots" : {
  471. "type": "number",
  472. "default": 10
  473. },
  474. "queueSmallOutside" : {
  475. "type": "boolean",
  476. "default": false
  477. },
  478. "enableQuickSpellPanel" : {
  479. "type": "boolean",
  480. "default": true
  481. }
  482. }
  483. },
  484. "server" : {
  485. "type" : "object",
  486. "additionalProperties" : false,
  487. "default" : {},
  488. "required" : [ "localHostname", "localPort", "remoteHostname", "remotePort", "seed", "playerAI", "alliedAI", "friendlyAI", "neutralAI", "enemyAI" ],
  489. "properties" : {
  490. "localHostname" : {
  491. "type" : "string",
  492. "default" : "127.0.0.1"
  493. },
  494. "localPort" : {
  495. "type" : "number",
  496. "default" : 3030
  497. },
  498. "remoteHostname" : {
  499. "type" : "string",
  500. "default" : ""
  501. },
  502. "remotePort" : {
  503. "type" : "number",
  504. "default" : 3030
  505. },
  506. "seed" : {
  507. "type" : "number",
  508. "default" : 0
  509. },
  510. "playerAI" : {
  511. "type" : "string",
  512. "default" : "Nullkiller"
  513. },
  514. "alliedAI" : {
  515. "type" : "string",
  516. "default" : "Nullkiller"
  517. },
  518. "friendlyAI" : {
  519. "type" : "string",
  520. "default" : "BattleAI"
  521. },
  522. "neutralAI" : {
  523. "type" : "string",
  524. "default" : "BattleAI"
  525. },
  526. "enemyAI" : {
  527. "type" : "string",
  528. "default" : "BattleAI"
  529. }
  530. }
  531. },
  532. "logging" : {
  533. "type" : "object",
  534. "additionalProperties" : false,
  535. "default" : {},
  536. "required" : [ "console", "file", "loggers" ],
  537. "properties" : {
  538. "console" : {
  539. "type" : "object",
  540. "default" : {},
  541. "required" : [ "format", "threshold", "coloredOutputEnabled", "colorMapping" ],
  542. "properties" : {
  543. "format" : {
  544. "type" : "string",
  545. "default" : "%m"
  546. },
  547. "threshold" : {
  548. "$ref" : "#/definitions/logLevelEnum",
  549. "default" : "info"
  550. },
  551. "coloredOutputEnabled" : {
  552. "type" : "boolean",
  553. "default" : true
  554. },
  555. "colorMapping" : {
  556. "type" : "array",
  557. "default" : [
  558. { "domain" : "global", "level" : "trace", "color" : "gray"},
  559. { "domain" : "global", "level" : "debug", "color" : "white"},
  560. { "domain" : "global", "level" : "info", "color" : "green"},
  561. { "domain" : "global", "level" : "warn", "color" : "yellow"},
  562. { "domain" : "global", "level" : "error", "color" : "red"}
  563. ],
  564. "items" : {
  565. "type" : "object",
  566. "additionalProperties" : false,
  567. "default" : {},
  568. "required" : [ "domain", "level", "color" ],
  569. "properties" : {
  570. "domain" : { "type" : "string" },
  571. "level" : { "$ref" : "#/definitions/logLevelEnum" },
  572. "color" : { "type" : "string", "enum" : [ "default", "green", "red", "magenta", "yellow", "white", "gray", "teal" ] }
  573. }
  574. }
  575. }
  576. }
  577. },
  578. "file" : {
  579. "type" : "object",
  580. "additionalProperties" : false,
  581. "default" : {},
  582. "required" : [ "format" ],
  583. "properties" : {
  584. "format" : {
  585. "type" : "string",
  586. "default" : "[%c] %l [%t] %n - %m"
  587. }
  588. }
  589. },
  590. "loggers" : {
  591. "type" : "array",
  592. "default" : [ { "domain" : "global", "level" : "trace" }, { "domain" : "rng", "level" : "info" } ],
  593. "items" : {
  594. "type" : "object",
  595. "additionalProperties" : false,
  596. "required" : [ "level", "domain" ],
  597. "properties" : {
  598. "domain" : { "type" : "string" },
  599. "level" : { "$ref" : "#/definitions/logLevelEnum" }
  600. }
  601. }
  602. }
  603. }
  604. },
  605. "launcher" : {
  606. "type" : "object",
  607. "default" : {},
  608. "additionalProperties" : false,
  609. "required" : [
  610. "setupCompleted",
  611. "defaultRepositoryEnabled",
  612. "defaultRepositoryURL",
  613. "extraRepositoryURL",
  614. "extraRepositoryEnabled",
  615. "enableInstalledMods",
  616. "autoCheckRepositories",
  617. "ignoreSslErrors",
  618. "updateOnStartup",
  619. "updateConfigUrl"
  620. ],
  621. "properties" : {
  622. "defaultRepositoryEnabled" : {
  623. "type" : "boolean",
  624. "default" : true,
  625. },
  626. "defaultRepositoryURL" : {
  627. "type" : "string",
  628. "default" : "https://raw.githubusercontent.com/vcmi/vcmi-mods-repository/develop/vcmi-1.6.json",
  629. },
  630. "extraRepositoryEnabled" : {
  631. "type" : "boolean",
  632. "default" : false,
  633. },
  634. "extraRepositoryURL" : {
  635. "type" : "string",
  636. "default" : "",
  637. },
  638. "setupCompleted" : {
  639. "type" : "boolean",
  640. "default" : false
  641. },
  642. "enableInstalledMods" : {
  643. "type" : "boolean",
  644. "default" : true
  645. },
  646. "ignoreSslErrors" : {
  647. "type" : "boolean",
  648. "default" : false
  649. },
  650. "autoCheckRepositories" : {
  651. "type" : "boolean",
  652. "default" : true
  653. },
  654. "updateOnStartup" : {
  655. "type" : "boolean",
  656. "default" : true
  657. },
  658. "updateConfigUrl" : {
  659. "type" : "string",
  660. "default" : "https://raw.githubusercontent.com/vcmi/vcmi-updates/master/vcmi-updates.json"
  661. }
  662. }
  663. },
  664. "lobby" : {
  665. "type" : "object",
  666. "additionalProperties" : false,
  667. "default" : {},
  668. "required" : [ "mapPreview", "hostname", "port", "roomPlayerLimit", "roomType", "roomMode" ],
  669. "properties" : {
  670. "mapPreview" : {
  671. "type" : "boolean",
  672. "default" : true
  673. },
  674. "hostname" : {
  675. "type" : "string",
  676. "default" : "beholder.vcmi.eu"
  677. },
  678. "port" : {
  679. "type" : "number",
  680. "default" : 3031
  681. },
  682. "roomPlayerLimit" : {
  683. "type" : "number",
  684. "default" : 2
  685. },
  686. "roomType" : {
  687. "type" : "number",
  688. "default" : 0
  689. },
  690. "roomMode" : {
  691. "type" : "number",
  692. "default" : 0
  693. }
  694. }
  695. },
  696. "gameTweaks" : {
  697. "type" : "object",
  698. "default" : {},
  699. "additionalProperties" : false,
  700. "required" : [
  701. "showGrid",
  702. "forceMovementInfo",
  703. "numericCreaturesQuantities",
  704. "availableCreaturesAsDwellingLabel",
  705. "compactTownCreatureInfo",
  706. "infoBarPick",
  707. "skipBattleIntroMusic",
  708. "infoBarCreatureManagement",
  709. "enableLargeSpellbook",
  710. "skipAdventureMapAnimations"
  711. ],
  712. "properties" : {
  713. "showGrid" : {
  714. "type" : "boolean",
  715. "default" : false
  716. },
  717. "forceMovementInfo" : {
  718. "type" : "boolean",
  719. "default" : false
  720. },
  721. "numericCreaturesQuantities" : {
  722. "type" : "boolean",
  723. "default" : false
  724. },
  725. "availableCreaturesAsDwellingLabel" : {
  726. "type" : "boolean",
  727. "default" : false
  728. },
  729. "compactTownCreatureInfo" : {
  730. "type" : "boolean",
  731. "default" : false
  732. },
  733. "infoBarPick" : {
  734. "type" : "boolean",
  735. "default" : false
  736. },
  737. "skipBattleIntroMusic" : {
  738. "type" : "boolean",
  739. "default" : false
  740. },
  741. "infoBarCreatureManagement": {
  742. "type" : "boolean",
  743. "default" : true
  744. },
  745. "enableLargeSpellbook" : {
  746. "type": "boolean",
  747. "default": true
  748. },
  749. "skipAdventureMapAnimations": {
  750. "type": "boolean",
  751. "default": false
  752. }
  753. }
  754. }
  755. }
  756. }