2013-04-02 20:06:43 +03:00
|
|
|
// 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",
|
2015-11-20 23:32:23 +02:00
|
|
|
"required" : [ "general", "video", "adventure", "pathfinder", "battle", "server", "logging", "launcher" ],
|
2013-04-06 20:45:02 +03:00
|
|
|
"definitions" : {
|
2017-06-04 19:33:28 +02:00
|
|
|
"logLevelEnum" : {
|
|
|
|
"type" : "string",
|
2013-04-06 20:45:02 +03:00
|
|
|
"enum" : [ "trace", "debug", "info", "warn", "error" ]
|
|
|
|
}
|
2013-04-11 22:24:14 +03:00
|
|
|
},
|
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03:00
|
|
|
"properties":
|
|
|
|
{
|
|
|
|
"general" : {
|
|
|
|
"type" : "object",
|
2013-04-03 00:39:32 +03:00
|
|
|
"default": {},
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2023-01-16 12:26:43 +02:00
|
|
|
"required" : [
|
|
|
|
"playerName",
|
|
|
|
"showfps",
|
|
|
|
"music",
|
|
|
|
"sound",
|
|
|
|
"encoding",
|
|
|
|
"swipe",
|
|
|
|
"saveRandomMaps",
|
|
|
|
"saveFrequency",
|
|
|
|
"notifications",
|
|
|
|
"extraDump",
|
|
|
|
"userRelativePointer",
|
|
|
|
"relativePointerSpeedMultiplier"
|
|
|
|
],
|
2013-04-02 20:06:43 +03:00
|
|
|
"properties" : {
|
|
|
|
"playerName" : {
|
|
|
|
"type":"string",
|
|
|
|
"default" : "Player"
|
|
|
|
},
|
|
|
|
"showfps" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : false
|
|
|
|
},
|
|
|
|
"music" : {
|
|
|
|
"type" : "number",
|
|
|
|
"default" : 88
|
|
|
|
},
|
|
|
|
"sound" : {
|
|
|
|
"type" : "number",
|
|
|
|
"default" : 88
|
2013-09-21 21:29:26 +03:00
|
|
|
},
|
|
|
|
"encoding" : {
|
|
|
|
"type" : "string",
|
2013-10-26 00:45:14 +03:00
|
|
|
"default" : "CP1252"
|
2017-05-25 19:57:20 +02:00
|
|
|
},
|
|
|
|
"swipe" : {
|
|
|
|
"type" : "boolean",
|
2017-06-07 22:42:41 +02:00
|
|
|
"default" : true
|
2017-05-25 19:57:20 +02:00
|
|
|
},
|
2017-06-04 19:33:28 +02:00
|
|
|
"saveRandomMaps" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : false
|
2018-03-18 17:29:09 +02:00
|
|
|
},
|
|
|
|
"lastMap" : {
|
|
|
|
"type":"string",
|
|
|
|
"default" : "Maps/Arrogance"
|
|
|
|
},
|
|
|
|
"lastSave" : {
|
|
|
|
"type":"string",
|
|
|
|
"default" : "NEWGAME"
|
|
|
|
},
|
|
|
|
"lastCampaign" : {
|
|
|
|
"type":"string",
|
|
|
|
"default" : ""
|
2018-04-03 03:37:09 +02:00
|
|
|
},
|
|
|
|
"saveFrequency" : {
|
|
|
|
"type" : "number",
|
|
|
|
"default" : 1
|
2020-03-22 15:57:13 +02:00
|
|
|
},
|
|
|
|
"notifications" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : false
|
2020-12-02 08:28:57 +02:00
|
|
|
},
|
|
|
|
"extraDump" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : false
|
2023-01-16 12:26:43 +02:00
|
|
|
},
|
|
|
|
"userRelativePointer" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : false
|
|
|
|
},
|
|
|
|
"relativePointerSpeedMultiplier" : {
|
|
|
|
"type" : "number",
|
|
|
|
"default" : 1
|
2017-06-04 19:33:28 +02:00
|
|
|
}
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"video" : {
|
|
|
|
"type" : "object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-03 00:39:32 +03:00
|
|
|
"default": {},
|
2017-07-08 18:01:58 +02:00
|
|
|
"required" : [ "screenRes", "bitsPerPixel", "fullscreen", "realFullscreen", "spellbookAnimation","driver", "showIntro", "displayIndex" ],
|
2013-04-02 20:06:43 +03:00
|
|
|
"properties" : {
|
|
|
|
"screenRes" : {
|
|
|
|
"type" : "object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-02 20:06:43 +03:00
|
|
|
"required" : [ "width", "height" ],
|
|
|
|
"properties" : {
|
|
|
|
"width" : { "type" : "number" },
|
|
|
|
"height" : { "type" : "number" }
|
|
|
|
},
|
|
|
|
"default": {"width" : 800, "height": 600 }
|
|
|
|
},
|
|
|
|
"bitsPerPixel" : {
|
|
|
|
"type" : "number",
|
2014-05-21 22:29:36 +03:00
|
|
|
"default" : 32
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
2017-07-08 18:01:58 +02:00
|
|
|
"fullscreen": {
|
|
|
|
"type": "boolean",
|
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
"realFullscreen" : {
|
2013-04-02 20:06:43 +03:00
|
|
|
"type" : "boolean",
|
|
|
|
"default" : false
|
2013-10-27 16:05:01 +03:00
|
|
|
},
|
2014-08-04 14:03:57 +03:00
|
|
|
"showIntro" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : true
|
|
|
|
},
|
2013-10-27 16:05:01 +03:00
|
|
|
"spellbookAnimation" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : true
|
|
|
|
},
|
2014-05-24 15:14:37 +03:00
|
|
|
"driver":{
|
|
|
|
"type" : "string",
|
|
|
|
"default" : "opengl",
|
|
|
|
"description" : "preferred graphics backend driver name for SDL2"
|
2016-08-30 20:38:31 +02:00
|
|
|
},
|
|
|
|
"displayIndex" : {
|
|
|
|
"type" : "number",
|
|
|
|
"default" : 0
|
2014-05-24 15:14:37 +03:00
|
|
|
}
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"adventure" : {
|
|
|
|
"type" : "object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-03 00:39:32 +03:00
|
|
|
"default": {},
|
2013-06-23 10:54:33 +03:00
|
|
|
"required" : [ "heroSpeed", "enemySpeed", "scrollSpeed", "heroReminder", "quickCombat" ],
|
2013-04-02 20:06:43 +03:00
|
|
|
"properties" : {
|
|
|
|
"heroSpeed" : {
|
|
|
|
"type" : "number",
|
|
|
|
"default" : 2
|
|
|
|
},
|
|
|
|
"enemySpeed" : {
|
|
|
|
"type" : "number",
|
|
|
|
"default" : 2
|
|
|
|
},
|
|
|
|
"scrollSpeed" : {
|
|
|
|
"type" : "number",
|
|
|
|
"default" : 1
|
|
|
|
},
|
|
|
|
"heroReminder" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : true
|
2013-06-23 10:54:33 +03:00
|
|
|
},
|
|
|
|
"quickCombat" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : false
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2015-11-20 23:32:23 +02:00
|
|
|
"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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2013-04-02 20:06:43 +03:00
|
|
|
"battle" : {
|
|
|
|
"type" : "object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-03 00:39:32 +03:00
|
|
|
"default": {},
|
2017-07-20 06:08:49 +02:00
|
|
|
"required" : [ "animationSpeed", "mouseShadow", "cellBorders", "stackRange", "showQueue", "queueSize" ],
|
2013-04-02 20:06:43 +03:00
|
|
|
"properties" : {
|
|
|
|
"animationSpeed" : {
|
|
|
|
"type" : "number",
|
2013-07-31 14:36:42 +03:00
|
|
|
"default" : 0.63
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
|
|
|
"mouseShadow" : {
|
|
|
|
"type":"boolean",
|
|
|
|
"default" : true
|
|
|
|
},
|
|
|
|
"cellBorders" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : false
|
|
|
|
},
|
|
|
|
"stackRange" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : true
|
|
|
|
},
|
|
|
|
"showQueue" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : true
|
2017-07-20 06:08:49 +02:00
|
|
|
},
|
|
|
|
"queueSize" : {
|
|
|
|
"type" : "string",
|
|
|
|
"default" : "auto",
|
|
|
|
"enum" : [ "auto", "small", "big" ]
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"server" : {
|
|
|
|
"type" : "object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-03 00:39:32 +03:00
|
|
|
"default": {},
|
2022-11-08 02:44:34 +02:00
|
|
|
"required" : [ "server", "port", "localInformation", "playerAI", "friendlyAI","neutralAI", "enemyAI", "reconnect", "uuid", "names" ],
|
2013-04-02 20:06:43 +03:00
|
|
|
"properties" : {
|
|
|
|
"server" : {
|
|
|
|
"type":"string",
|
|
|
|
"default" : "127.0.0.1"
|
|
|
|
},
|
|
|
|
"port" : {
|
|
|
|
"type" : "number",
|
|
|
|
"default" : 3030
|
|
|
|
},
|
|
|
|
"localInformation" : {
|
|
|
|
"type" : "number",
|
|
|
|
"default" : 2
|
|
|
|
},
|
|
|
|
"playerAI" : {
|
|
|
|
"type" : "string",
|
|
|
|
"default" : "VCAI"
|
|
|
|
},
|
2017-01-17 13:17:37 +02:00
|
|
|
"friendlyAI" : {
|
|
|
|
"type" : "string",
|
|
|
|
"default" : "BattleAI"
|
|
|
|
},
|
2013-04-02 20:06:43 +03:00
|
|
|
"neutralAI" : {
|
|
|
|
"type" : "string",
|
|
|
|
"default" : "StupidAI"
|
2017-01-17 13:17:37 +02:00
|
|
|
},
|
|
|
|
"enemyAI" : {
|
|
|
|
"type" : "string",
|
|
|
|
"default" : "BattleAI"
|
2022-10-01 16:28:45 +02:00
|
|
|
},
|
|
|
|
"reconnect" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : false
|
|
|
|
},
|
|
|
|
"uuid" : {
|
|
|
|
"type" : "string",
|
|
|
|
"default" : ""
|
2022-10-04 03:09:03 +02:00
|
|
|
},
|
|
|
|
"names" : {
|
|
|
|
"type" : "array",
|
2022-10-25 03:27:53 +02:00
|
|
|
"default" : [],
|
2022-10-04 03:09:03 +02:00
|
|
|
"items":
|
|
|
|
{
|
|
|
|
"type" : "string",
|
|
|
|
"default" : ""
|
|
|
|
}
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
}
|
2013-04-05 13:29:46 +03:00
|
|
|
},
|
|
|
|
"logging" : {
|
|
|
|
"type" : "object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-05 13:29:46 +03:00
|
|
|
"default" : {},
|
2013-04-09 17:31:36 +03:00
|
|
|
"required" : [ "console", "file", "loggers" ],
|
2013-04-05 13:29:46 +03:00
|
|
|
"properties" : {
|
|
|
|
"console" : {
|
|
|
|
"type" : "object",
|
2013-04-09 17:31:36 +03:00
|
|
|
"default" : {},
|
|
|
|
"required" : [ "format", "threshold", "coloredOutputEnabled", "colorMapping" ],
|
2013-04-05 13:29:46 +03:00
|
|
|
"properties" : {
|
|
|
|
"format" : {
|
|
|
|
"type" : "string",
|
2013-04-11 22:24:14 +03:00
|
|
|
"default" : "%m"
|
2013-04-05 13:29:46 +03:00
|
|
|
},
|
|
|
|
"threshold" : {
|
2013-04-06 20:45:02 +03:00
|
|
|
"$ref" : "#/definitions/logLevelEnum",
|
2013-08-20 22:32:21 +03:00
|
|
|
"default" : "info"
|
2013-04-05 13:29:46 +03:00
|
|
|
},
|
|
|
|
"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",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-09 17:31:36 +03:00
|
|
|
"default" : {},
|
2013-04-05 13:29:46 +03:00
|
|
|
"required" : [ "domain", "level", "color" ],
|
|
|
|
"properties" : {
|
|
|
|
"domain" : { "type" : "string" },
|
2013-04-06 20:45:02 +03:00
|
|
|
"level" : { "$ref" : "#/definitions/logLevelEnum" },
|
2013-04-05 13:29:46 +03:00
|
|
|
"color" : { "type" : "string", "enum" : [ "default", "green", "red", "magenta", "yellow", "white", "gray", "teal" ] }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"file" : {
|
|
|
|
"type" : "object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-09 17:31:36 +03:00
|
|
|
"default" : {},
|
|
|
|
"required" : [ "format" ],
|
2013-04-05 13:29:46 +03:00
|
|
|
"properties" : {
|
|
|
|
"format" : {
|
|
|
|
"type" : "string",
|
2019-01-15 05:00:00 +02:00
|
|
|
"default" : "%l %n [%t] - %m"
|
2013-04-05 13:29:46 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"loggers" : {
|
2013-04-09 17:31:36 +03:00
|
|
|
"type" : "array",
|
2013-04-20 14:34:01 +03:00
|
|
|
"default" : [ { "domain" : "global", "level" : "trace" } ],
|
2013-04-09 17:31:36 +03:00
|
|
|
"items" : {
|
|
|
|
"type" : "object",
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2013-04-09 17:31:36 +03:00
|
|
|
"required" : [ "level", "domain" ],
|
2013-04-05 13:29:46 +03:00
|
|
|
"properties" : {
|
2013-04-09 17:31:36 +03:00
|
|
|
"domain" : { "type" : "string" },
|
|
|
|
"level" : { "$ref" : "#/definitions/logLevelEnum" }
|
2013-04-05 13:29:46 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-08-19 14:50:53 +03:00
|
|
|
},
|
|
|
|
"launcher" : {
|
|
|
|
"type" : "object",
|
|
|
|
"default": {},
|
|
|
|
"additionalProperties" : false,
|
2022-11-16 02:22:48 +02:00
|
|
|
"required" : [ "repositoryURL", "enableInstalledMods", "extraResolutionsModPath", "autoCheckRepositories", "updateOnStartup", "updateConfigUrl", "lobbyUrl", "lobbyPort", "lobbyUsername", "connectionTimeout" ],
|
2013-08-19 14:50:53 +03:00
|
|
|
"properties" : {
|
|
|
|
"repositoryURL" : {
|
|
|
|
"type" : "array",
|
2013-08-26 13:03:47 +03:00
|
|
|
"default" : [
|
2022-09-04 18:32:48 +02:00
|
|
|
"https://raw.githubusercontent.com/vcmi/vcmi-mods-repository/develop/github.json"
|
2013-08-26 13:03:47 +03:00
|
|
|
],
|
2013-08-19 14:50:53 +03:00
|
|
|
"items" : {
|
|
|
|
"type" : "string"
|
2013-08-22 17:22:49 +03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
"enableInstalledMods" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : true
|
2014-11-03 17:47:37 +02:00
|
|
|
},
|
2022-09-27 10:55:03 +02:00
|
|
|
"extraResolutionsModPath" : {
|
|
|
|
"type" : "string",
|
|
|
|
"default" : "/vcmi-extras/Mods/extraResolutions/Content/config/resolutions.json"
|
|
|
|
},
|
2014-11-03 17:47:37 +02:00
|
|
|
"autoCheckRepositories" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : true
|
2022-09-04 18:32:48 +02:00
|
|
|
},
|
|
|
|
"updateOnStartup" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"default" : true
|
|
|
|
},
|
|
|
|
"updateConfigUrl" : {
|
|
|
|
"type" : "string",
|
|
|
|
"default" : "https://raw.githubusercontent.com/vcmi/vcmi-updates/master/vcmi-updates.json"
|
2022-10-23 21:24:33 +02:00
|
|
|
},
|
|
|
|
"lobbyUrl" : {
|
|
|
|
"type" : "string",
|
2022-11-16 02:22:48 +02:00
|
|
|
"description" : "ip address or web link to remote proxy server",
|
2022-11-08 02:44:34 +02:00
|
|
|
"default" : "beholder.vcmi.eu"
|
2022-10-23 21:24:33 +02:00
|
|
|
},
|
|
|
|
"lobbyPort" : {
|
|
|
|
"type" : "number",
|
2022-11-16 02:22:48 +02:00
|
|
|
"description" : "connection port for remote proxy server",
|
2022-10-23 21:24:33 +02:00
|
|
|
"default" : 5002
|
|
|
|
},
|
|
|
|
"lobbyUsername" : {
|
|
|
|
"type" : "string",
|
2022-11-16 02:22:48 +02:00
|
|
|
"description" : "username for the client on the remote proxy server",
|
2022-10-23 21:24:33 +02:00
|
|
|
"default" : ""
|
2022-11-16 02:22:48 +02:00
|
|
|
},
|
|
|
|
"connectionTimeout" : {
|
|
|
|
"type" : "number",
|
|
|
|
"description" : "maximum time in ms, should be enough to establish socket connection to remote proxy server.",
|
|
|
|
"default" : 2000
|
2013-08-19 14:50:53 +03:00
|
|
|
}
|
|
|
|
}
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|