| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555 |
- // This is schema for checking game settings from settings.json
- // Any new settings should be added in this file for correct serialization and initialization
- {
- "type" : "object",
- "$schema": "http://json-schema.org/draft-04/schema",
- "required" : [ "general", "video", "adventure", "pathfinder", "battle", "server", "logging", "launcher", "gameTweaks" ],
- "definitions" : {
- "logLevelEnum" : {
- "type" : "string",
- "enum" : [ "trace", "debug", "info", "warn", "error" ]
- }
- },
- "additionalProperties" : false,
- "properties":
- {
- "general" : {
- "type" : "object",
- "default": {},
- "additionalProperties" : false,
- "required" : [
- "playerName",
- "music",
- "sound",
- "language",
- "gameDataLanguage",
- "swipe",
- "swipeDesktop",
- "saveRandomMaps",
- "saveFrequency",
- "notifications",
- "extraDump",
- "userRelativePointer",
- "relativePointerSpeedMultiplier",
- "lastSettingsTab"
- ],
- "properties" : {
- "playerName" : {
- "type":"string",
- "default" : "Player"
- },
- "music" : {
- "type" : "number",
- "default" : 88
- },
- "sound" : {
- "type" : "number",
- "default" : 88
- },
- "swipe" : {
- "type" : "boolean",
- "default" : true
- },
- "swipeDesktop" : {
- "type" : "boolean",
- "default" : false
- },
- "saveRandomMaps" : {
- "type" : "boolean",
- "default" : false
- },
- "lastMap" : {
- "type":"string",
- "default" : "Maps/Arrogance"
- },
- "language" : {
- "type":"string",
- "enum" : [ "english", "chinese", "german", "polish", "russian", "spanish", "ukrainian" ],
- "default" : "english"
- },
- "gameDataLanguage" : {
- "type":"string",
- "enum" : [ "auto", "english", "chinese", "german", "korean", "polish", "russian", "spanish", "ukrainian", "other_cp1250", "other_cp1251", "other_cp1252" ],
- "default" : "auto"
- },
- "lastSave" : {
- "type":"string",
- "default" : "NEWGAME"
- },
- "lastSettingsTab" : {
- "type" : "number",
- "default" : 0
- },
- "lastCampaign" : {
- "type":"string",
- "default" : ""
- },
- "saveFrequency" : {
- "type" : "number",
- "default" : 1
- },
- "notifications" : {
- "type" : "boolean",
- "default" : false
- },
- "extraDump" : {
- "type" : "boolean",
- "default" : false
- },
- "userRelativePointer" : {
- "type" : "boolean",
- "default" : false
- },
- "relativePointerSpeedMultiplier" : {
- "type" : "number",
- "default" : 1
- }
- }
- },
- "video" : {
- "type" : "object",
- "additionalProperties" : false,
- "default": {},
- "required" : [
- "screenRes",
- "bitsPerPixel",
- "fullscreen",
- "realFullscreen",
- "cursor",
- "spellbookAnimation",
- "driver",
- "showIntro",
- "displayIndex",
- "showfps",
- "targetfps"
- ],
- "properties" : {
- "screenRes" : {
- "type" : "object",
- "additionalProperties" : false,
- "required" : [ "width", "height" ],
- "properties" : {
- "width" : { "type" : "number" },
- "height" : { "type" : "number" }
- },
- "default": {"width" : 800, "height": 600 }
- },
- "bitsPerPixel" : {
- "type" : "number",
- "default" : 32
- },
- "fullscreen": {
- "type": "boolean",
- "default": false
- },
- "realFullscreen" : {
- "type" : "boolean",
- "default" : false
- },
- "cursor" : {
- "type" : "string",
- "enum" : [ "auto", "hardware", "software" ],
- "default" : "auto"
- },
- "showIntro" : {
- "type" : "boolean",
- "default" : true
- },
- "spellbookAnimation" : {
- "type" : "boolean",
- "default" : true
- },
- "driver":{
- "type" : "string",
- "default" : "opengl",
- "description" : "preferred graphics backend driver name for SDL2"
- },
- "displayIndex" : {
- "type" : "number",
- "default" : 0
- },
- "showfps" : {
- "type" : "boolean",
- "default" : false
- },
- "targetfps" : {
- "type" : "number",
- "default" : 60
- }
- }
- },
- "adventure" : {
- "type" : "object",
- "additionalProperties" : false,
- "default": {},
- "required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "alwaysSkipCombat" ],
- "properties" : {
- "heroMoveTime" : {
- "type" : "number",
- "default" : 150
- },
- "enemyMoveTime" : {
- "type" : "number",
- "default" : 150
- },
- "scrollSpeedPixels" : {
- "type" : "number",
- "default" : 800
- },
- "heroReminder" : {
- "type" : "boolean",
- "default" : true
- },
- "quickCombat" : {
- "type" : "boolean",
- "default" : false
- },
- "objectAnimation" : {
- "type" : "boolean",
- "default" : true
- },
- "terrainAnimation" : {
- "type" : "boolean",
- "default" : true
- },
- "alwaysSkipCombat" : {
- "type" : "boolean",
- "default" : false
- }
- }
- },
- "pathfinder" : {
- "type" : "object",
- "additionalProperties" : false,
- "default": {},
- "required" : [ "teleports", "layers", "oneTurnSpecialLayersLimit", "originalMovementRules", "lightweightFlyingMode" ],
- "properties" : {
- "layers" : {
- "type" : "object",
- "additionalProperties" : false,
- "default": {},
- "required" : [ "sailing", "waterWalking", "flying" ],
- "properties" : {
- "sailing" : {
- "type" : "boolean",
- "default" : true
- },
- "waterWalking" : {
- "type" : "boolean",
- "default" : true
- },
- "flying" : {
- "type" : "boolean",
- "default" : true
- }
- }
- },
- "teleports" : {
- "type" : "object",
- "additionalProperties" : false,
- "default": {},
- "required" : [ "twoWay", "oneWay", "oneWayRandom", "whirlpool", "castleGate" ],
- "properties" : {
- "twoWay" : {
- "type" : "boolean",
- "default" : true
- },
- "oneWay" : {
- "type" : "boolean",
- "default" : true
- },
- "oneWayRandom" : {
- "type" : "boolean",
- "default" : false
- },
- "whirlpool" : {
- "type" : "boolean",
- "default" : true
- },
- "castleGate" : {
- "type" : "boolean",
- "default" : false
- }
- }
- },
- "oneTurnSpecialLayersLimit" : {
- "type" : "boolean",
- "default" : true
- },
- "originalMovementRules" : {
- "type" : "boolean",
- "default" : false
- },
- "lightweightFlyingMode" : {
- "type" : "boolean",
- "default" : false
- }
- }
- },
- "battle" : {
- "type" : "object",
- "additionalProperties" : false,
- "default": {},
- "required" : [ "speedFactor", "mouseShadow", "cellBorders", "stackRange", "showQueue", "queueSize" ],
- "properties" : {
- "speedFactor" : {
- "type" : "number",
- "default" : 2
- },
- "mouseShadow" : {
- "type":"boolean",
- "default" : true
- },
- "cellBorders" : {
- "type" : "boolean",
- "default" : false
- },
- "stackRange" : {
- "type" : "boolean",
- "default" : true
- },
- "showQueue" : {
- "type" : "boolean",
- "default" : true
- },
- "queueSize" : {
- "type" : "string",
- "default" : "auto",
- "enum" : [ "auto", "small", "big" ]
- }
- }
- },
- "server" : {
- "type" : "object",
- "additionalProperties" : false,
- "default": {},
- "required" : [ "server", "port", "localInformation", "playerAI", "friendlyAI","neutralAI", "enemyAI", "reconnect", "uuid", "names" ],
- "properties" : {
- "server" : {
- "type":"string",
- "default" : "127.0.0.1"
- },
- "port" : {
- "type" : "number",
- "default" : 3030
- },
- "localInformation" : {
- "type" : "number",
- "default" : 2
- },
- "playerAI" : {
- "type" : "string",
- "default" : "Nullkiller"
- },
- "friendlyAI" : {
- "type" : "string",
- "default" : "BattleAI"
- },
- "neutralAI" : {
- "type" : "string",
- "default" : "StupidAI"
- },
- "enemyAI" : {
- "type" : "string",
- "default" : "BattleAI"
- },
- "reconnect" : {
- "type" : "boolean",
- "default" : false
- },
- "uuid" : {
- "type" : "string",
- "default" : ""
- },
- "names" : {
- "type" : "array",
- "default" : [],
- "items":
- {
- "type" : "string",
- "default" : ""
- }
- }
- }
- },
- "logging" : {
- "type" : "object",
- "additionalProperties" : false,
- "default" : {},
- "required" : [ "console", "file", "loggers" ],
- "properties" : {
- "console" : {
- "type" : "object",
- "default" : {},
- "required" : [ "format", "threshold", "coloredOutputEnabled", "colorMapping" ],
- "properties" : {
- "format" : {
- "type" : "string",
- "default" : "%m"
- },
- "threshold" : {
- "$ref" : "#/definitions/logLevelEnum",
- "default" : "info"
- },
- "coloredOutputEnabled" : {
- "type" : "boolean",
- "default" : true
- },
- "colorMapping" : {
- "type" : "array",
- "default" : [
- { "domain" : "global", "level" : "trace", "color" : "gray"},
- { "domain" : "global", "level" : "debug", "color" : "white"},
- { "domain" : "global", "level" : "info", "color" : "green"},
- { "domain" : "global", "level" : "warn", "color" : "yellow"},
- { "domain" : "global", "level" : "error", "color" : "red"}
- ],
- "items" : {
- "type" : "object",
- "additionalProperties" : false,
- "default" : {},
- "required" : [ "domain", "level", "color" ],
- "properties" : {
- "domain" : { "type" : "string" },
- "level" : { "$ref" : "#/definitions/logLevelEnum" },
- "color" : { "type" : "string", "enum" : [ "default", "green", "red", "magenta", "yellow", "white", "gray", "teal" ] }
- }
- }
- }
- }
- },
- "file" : {
- "type" : "object",
- "additionalProperties" : false,
- "default" : {},
- "required" : [ "format" ],
- "properties" : {
- "format" : {
- "type" : "string",
- "default" : "[%c] %l %n - %m"
- }
- }
- },
- "loggers" : {
- "type" : "array",
- "default" : [ { "domain" : "global", "level" : "trace" } ],
- "items" : {
- "type" : "object",
- "additionalProperties" : false,
- "required" : [ "level", "domain" ],
- "properties" : {
- "domain" : { "type" : "string" },
- "level" : { "$ref" : "#/definitions/logLevelEnum" }
- }
- }
- }
- }
- },
- "launcher" : {
- "type" : "object",
- "default": {},
- "additionalProperties" : false,
- "required" : [ "setupCompleted", "repositoryURL", "enableInstalledMods", "extraResolutionsModPath", "autoCheckRepositories", "updateOnStartup", "updateConfigUrl", "lobbyUrl", "lobbyPort", "lobbyUsername", "connectionTimeout" ],
- "properties" : {
- "repositoryURL" : {
- "type" : "array",
- "default" : [
- "https://raw.githubusercontent.com/vcmi/vcmi-mods-repository/develop/vcmi-1.2.json"
- ],
- "items" : {
- "type" : "string"
- }
- },
- "setupCompleted" : {
- "type" : "boolean",
- "default" : false
- },
- "enableInstalledMods" : {
- "type" : "boolean",
- "default" : true
- },
- "extraResolutionsModPath" : {
- "type" : "string",
- "default" : "/vcmi-extras/Mods/extraResolutions/Content/config/resolutions.json"
- },
- "autoCheckRepositories" : {
- "type" : "boolean",
- "default" : true
- },
- "updateOnStartup" : {
- "type" : "boolean",
- "default" : true
- },
- "updateConfigUrl" : {
- "type" : "string",
- "default" : "https://raw.githubusercontent.com/vcmi/vcmi-updates/master/vcmi-updates.json"
- },
- "lobbyUrl" : {
- "type" : "string",
- "description" : "ip address or web link to remote proxy server",
- "default" : "beholder.vcmi.eu"
- },
- "lobbyPort" : {
- "type" : "number",
- "description" : "connection port for remote proxy server",
- "default" : 5002
- },
- "lobbyUsername" : {
- "type" : "string",
- "description" : "username for the client on the remote proxy server",
- "default" : ""
- },
- "connectionTimeout" : {
- "type" : "number",
- "description" : "maximum time in ms, should be enough to establish socket connection to remote proxy server.",
- "default" : 2000
- }
- }
- },
- "gameTweaks" : {
- "type": "object",
- "default": {},
- "additionalProperties": false,
- "required": [
- "showGrid",
- "forceMovementInfo",
- "numericCreaturesQuantities",
- "availableCreaturesAsDwellingLabel",
- "compactTownCreatureInfo",
- "infoBarPick",
- "skipBattleIntroMusic"
- ],
- "properties": {
- "showGrid": {
- "type": "boolean",
- "default": false
- },
- "forceMovementInfo": {
- "type": "boolean",
- "default": false
- },
- "numericCreaturesQuantities": {
- "type": "boolean",
- "default": false
- },
- "availableCreaturesAsDwellingLabel" : {
- "type" : "boolean",
- "default" : false
- },
- "compactTownCreatureInfo" : {
- "type" : "boolean",
- "default" : false
- },
- "infoBarPick" : {
- "type" : "boolean",
- "default" : false
- },
- "skipBattleIntroMusic" : {
- "type" : "boolean",
- "default" : false
- }
- }
- }
- }
- }
|