1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
vcmi/config/schemas/settings.json

596 lines
14 KiB
JSON
Raw Normal View History

// 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",
2023-05-19 20:14:01 +02:00
"$schema" : "http://json-schema.org/draft-04/schema",
2023-08-20 14:14:47 +02:00
"required" : [ "general", "video", "adventure", "battle", "input", "server", "logging", "launcher", "lobby", "gameTweaks" ],
"definitions" : {
"logLevelEnum" : {
"type" : "string",
"enum" : [ "trace", "debug", "info", "warn", "error" ]
}
},
"additionalProperties" : false,
2023-05-19 20:14:01 +02:00
"properties" :
{
"general" : {
"type" : "object",
2023-05-19 20:14:01 +02:00
"default" : {},
"additionalProperties" : false,
2023-01-16 12:26:43 +02:00
"required" : [
"playerName",
"music",
"sound",
2023-06-16 11:59:20 +02:00
"saveRandomMaps",
"lastMap",
2023-01-29 18:21:55 +02:00
"language",
"gameDataLanguage",
2023-06-16 11:59:20 +02:00
"lastSave",
"lastSettingsTab",
2023-06-16 11:59:20 +02:00
"lastCampaign",
2023-01-16 12:26:43 +02:00
"saveFrequency",
"notifications",
"extraDump",
"userRelativePointer",
"relativePointerSpeedMultiplier",
"hapticFeedback",
2023-07-08 18:47:38 +02:00
"longTouchTimeMilliseconds",
"autosaveCountLimit",
"useSavePrefix",
"savePrefix",
"startTurnAutosave"
2023-01-16 12:26:43 +02:00
],
"properties" : {
"playerName" : {
2023-05-19 20:14:01 +02:00
"type" : "string",
"default" : "Player"
},
"music" : {
"type" : "number",
"default" : 88
},
"sound" : {
"type" : "number",
"default" : 88
},
"saveRandomMaps" : {
"type" : "boolean",
"default" : false
},
"lastMap" : {
2023-05-19 20:14:01 +02:00
"type" : "string",
"default" : "Maps/Arrogance"
},
2022-12-25 23:06:22 +02:00
"language" : {
2023-05-19 20:14:01 +02:00
"type" : "string",
2023-07-28 02:33:42 +02:00
"enum" : [ "english", "czech", "chinese", "finnish", "french", "german", "hungarian", "italian", "korean", "polish", "portuguese", "russian", "spanish", "swedish", "turkish", "ukrainian", "vietnamese" ],
2022-12-25 23:06:22 +02:00
"default" : "english"
},
"gameDataLanguage" : {
2023-05-19 20:14:01 +02:00
"type" : "string",
2023-07-28 02:33:42 +02:00
"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" ],
"default" : "auto"
},
"lastSave" : {
2023-05-19 20:14:01 +02:00
"type" : "string",
"default" : "NEWGAME"
},
"lastSettingsTab" : {
"type" : "number",
"default" : 0
},
"lastCampaign" : {
2023-05-19 20:14:01 +02:00
"type" : "string",
"default" : ""
},
"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
2023-06-16 11:59:20 +02:00
},
"longTouchTimeMilliseconds" : {
"type" : "number",
"default" : 1000
2023-07-08 18:47:38 +02:00
},
"hapticFeedback" : {
"type" : "boolean",
"default" : false
},
"autosaveCountLimit" : {
"type" : "number",
"default": 5
},
"useSavePrefix" : {
"type": "boolean",
"default": true
},
"savePrefix" : {
"type": "string",
"default": ""
},
"startTurnAutosave" : {
"type": "boolean",
"default": false
}
}
},
"video" : {
"type" : "object",
"additionalProperties" : false,
2023-05-19 20:14:01 +02:00
"default" : {},
"required" : [
"resolution",
"reservedWidth",
"fullscreen",
"realFullscreen",
"cursor",
"showIntro",
"spellbookAnimation",
"driver",
"displayIndex",
"showfps",
"targetfps"
],
"properties" : {
"resolution" : {
"type" : "object",
"additionalProperties" : false,
"required" : [ "width", "height", "scaling" ],
"properties" : {
"width" : { "type" : "number" },
"height" : { "type" : "number" },
"scaling" : { "type" : "number" }
},
"defaultIOS" : {"width" : 800, "height" : 600, "scaling" : 200 },
"defaultAndroid" : {"width" : 800, "height" : 600, "scaling" : 200 },
2023-05-19 20:14:01 +02:00
"default" : {"width" : 800, "height" : 600, "scaling" : 100 }
},
"reservedWidth" : {
"type" : "number",
"defaultIOS" : 0.1, // iOS camera cutout / notch is excluded from available area by SDL
"default" : 0
},
2023-05-19 20:14:01 +02:00
"fullscreen" : {
"type" : "boolean",
"default" : false
},
"realFullscreen" : {
"type" : "boolean",
"default" : false
},
"cursor" : {
"type" : "string",
"enum" : [ "hardware", "software" ],
"default" : "hardware"
},
"showIntro" : {
"type" : "boolean",
"default" : true
},
"spellbookAnimation" : {
"type" : "boolean",
"default" : true
},
2023-05-19 20:14:01 +02:00
"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
}
}
},
"input" : {
"type" : "object",
"additionalProperties" : false,
"default" : {},
"required" : [ "radialWheelGarrisonSwipe" ],
"properties" : {
"radialWheelGarrisonSwipe" : {
"type" : "boolean",
"default" : true
}
}
},
"adventure" : {
"type" : "object",
"additionalProperties" : false,
2023-05-19 20:14:01 +02:00
"default" : {},
2023-08-27 00:33:52 +02:00
"required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "forceQuickCombat", "borderScroll", "leftButtonDrag", "smoothDragging" ],
"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
},
"forceQuickCombat" : {
"type" : "boolean",
"default" : false
2023-06-01 17:48:31 +02:00
},
"borderScroll" :
{
"type" : "boolean",
"defaultIOS" : false,
"defaultAndroid" : false,
2023-06-01 17:48:31 +02:00
"default" : true
},
"leftButtonDrag" : {
"type" : "boolean",
"default" : false
2023-08-27 00:33:52 +02:00
},
"smoothDragging" : {
"type" : "boolean",
"default" : true
}
}
},
"battle" : {
"type" : "object",
"additionalProperties" : false,
2023-05-19 20:14:01 +02:00
"default" : {},
"required" : [ "speedFactor", "mouseShadow", "cellBorders", "stackRange", "movementHighlightOnHover", "rangeLimitHighlightOnHover", "showQueue", "swipeAttackDistance", "queueSize", "stickyHeroInfoWindows" ],
"properties" : {
"speedFactor" : {
"type" : "number",
"default" : 2
},
"mouseShadow" : {
2023-05-19 20:14:01 +02:00
"type" : "boolean",
"default" : true
},
"cellBorders" : {
"type" : "boolean",
"default" : false
},
"stackRange" : {
"type" : "boolean",
"default" : true
},
"movementHighlightOnHover" : {
"type" : "boolean",
"default" : true
},
"rangeLimitHighlightOnHover" : {
2023-05-14 20:07:47 +02:00
"type" : "boolean",
"default" : false
2023-05-14 20:07:47 +02:00
},
"showQueue" : {
"type" : "boolean",
"default" : true
Spells configuration version 2 (effect-based) * Indirect spell effects loading * Json serializer improvements * spell->canBeCastAt do not allow useless cast for any spell * Added proxy caster class for spell-created obstacles * Handle damage from spell-created obstacles inside mechanics * Experimental GameState integration/regression tests * Ignore mod settings and load only "vcmi" mod when running tests * fixed https://bugs.vcmi.eu/view.php?id=2765 (with tests) * Huge improvements of BattleAI regarding spell casts * AI can cast almost any combat spell except TELEPORT, SACRIFICE and obstacle placement spells. * Possible fix for https://bugs.vcmi.eu/view.php?id=1811 * CStack factored out to several classes * [Battle] Allowed RETURN_AFTER_STRIKE effect on server side to be optional * [Battle] Allowed BattleAction have multiple destinations * [Spells] Converted limit|immunity to target condition * [Spells] Use partial configuration reload for backward compatibility handling * [Tests] Started tests for CUnitState * Partial fixes of fire shield effect * [Battle] Do HP calculations in 64 bits * [BattleAI] Use threading for spell cast evaluation * [BattleAI] Made AI be able to evaluate modified turn order (on hypothetical battle state) * Implemented https://bugs.vcmi.eu/view.php?id=2811 * plug rare freeze when hypnotized unit shots vertically * Correctly apply ONLY_MELEE_FIGHT / ONLY_DISTANCE_FIGHT for unit damage, attack & defense * [BattleAI] Try to not waste a cast if battle is actually won already * Extended JsonSerializeFormat API * fixed https://bugs.vcmi.eu/view.php?id=2847 * Any unit effect can be now chained (not only damage like Chain Lightning) ** only damage effect for now actually uses "chainFactor" * Possible quick fix for https://bugs.vcmi.eu/view.php?id=2860
2017-07-20 06:08:49 +02:00
},
"swipeAttackDistance" : {
"type" : "number",
"default" : 250
},
Spells configuration version 2 (effect-based) * Indirect spell effects loading * Json serializer improvements * spell->canBeCastAt do not allow useless cast for any spell * Added proxy caster class for spell-created obstacles * Handle damage from spell-created obstacles inside mechanics * Experimental GameState integration/regression tests * Ignore mod settings and load only "vcmi" mod when running tests * fixed https://bugs.vcmi.eu/view.php?id=2765 (with tests) * Huge improvements of BattleAI regarding spell casts * AI can cast almost any combat spell except TELEPORT, SACRIFICE and obstacle placement spells. * Possible fix for https://bugs.vcmi.eu/view.php?id=1811 * CStack factored out to several classes * [Battle] Allowed RETURN_AFTER_STRIKE effect on server side to be optional * [Battle] Allowed BattleAction have multiple destinations * [Spells] Converted limit|immunity to target condition * [Spells] Use partial configuration reload for backward compatibility handling * [Tests] Started tests for CUnitState * Partial fixes of fire shield effect * [Battle] Do HP calculations in 64 bits * [BattleAI] Use threading for spell cast evaluation * [BattleAI] Made AI be able to evaluate modified turn order (on hypothetical battle state) * Implemented https://bugs.vcmi.eu/view.php?id=2811 * plug rare freeze when hypnotized unit shots vertically * Correctly apply ONLY_MELEE_FIGHT / ONLY_DISTANCE_FIGHT for unit damage, attack & defense * [BattleAI] Try to not waste a cast if battle is actually won already * Extended JsonSerializeFormat API * fixed https://bugs.vcmi.eu/view.php?id=2847 * Any unit effect can be now chained (not only damage like Chain Lightning) ** only damage effect for now actually uses "chainFactor" * Possible quick fix for https://bugs.vcmi.eu/view.php?id=2860
2017-07-20 06:08:49 +02:00
"queueSize" : {
"type" : "string",
"default" : "auto",
"enum" : [ "auto", "small", "big" ]
},
"stickyHeroInfoWindows" : {
"type" : "boolean",
"default" : true
}
}
},
"server" : {
"type" : "object",
"additionalProperties" : false,
2023-05-19 20:14:01 +02:00
"default" : {},
"required" : [ "server", "port", "localInformation", "playerAI", "alliedAI", "friendlyAI", "neutralAI", "enemyAI", "reconnect", "uuid", "names" ],
"properties" : {
"server" : {
2023-05-19 20:14:01 +02:00
"type" : "string",
"default" : "127.0.0.1"
},
"port" : {
"type" : "number",
"default" : 3030
},
"localInformation" : {
"type" : "number",
"default" : 2
},
"playerAI" : {
"type" : "string",
2023-03-25 13:17:35 +02:00
"default" : "Nullkiller"
},
"alliedAI" : {
"type" : "string",
"default" : "VCAI"
},
"friendlyAI" : {
"type" : "string",
"default" : "BattleAI"
},
"neutralAI" : {
"type" : "string",
"default" : "StupidAI"
},
"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" : [],
2023-05-19 20:14:01 +02:00
"items" :
2022-10-04 03:09:03 +02:00
{
"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",
2023-05-19 20:14:01 +02:00
"default" : {},
"additionalProperties" : false,
"required" : [
"setupCompleted",
"defaultRepositoryEnabled",
"defaultRepositoryURL",
"extraRepositoryURL",
"extraRepositoryEnabled",
"enableInstalledMods",
"autoCheckRepositories",
"updateOnStartup",
"updateConfigUrl",
"lobbyUrl",
"lobbyPort",
"lobbyUsername",
"connectionTimeout"
],
"properties" : {
"defaultRepositoryEnabled" : {
"type" : "boolean",
"default" : true,
},
"defaultRepositoryURL" : {
"type" : "string",
"default" : "https://raw.githubusercontent.com/vcmi/vcmi-mods-repository/develop/vcmi-1.3.json",
},
"extraRepositoryEnabled" : {
"type" : "boolean",
"default" : false,
},
"extraRepositoryURL" : {
"type" : "string",
"default" : "",
},
2023-03-11 00:57:55 +02:00
"setupCompleted" : {
"type" : "boolean",
"default" : false
},
"enableInstalledMods" : {
"type" : "boolean",
"default" : true
},
"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"
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
}
}
},
2023-08-20 14:14:47 +02:00
"lobby" : {
"type" : "object",
"additionalProperties" : false,
"default" : {},
"required" : [ "mapPreview" ],
"properties" : {
"mapPreview" : {
"type" : "boolean",
"default" : true
}
}
},
"gameTweaks" : {
2023-05-19 20:14:01 +02:00
"type" : "object",
"default" : {},
"additionalProperties" : false,
"required" : [
"showGrid",
"forceMovementInfo",
"numericCreaturesQuantities",
"availableCreaturesAsDwellingLabel",
"compactTownCreatureInfo",
"infoBarPick",
"skipBattleIntroMusic",
"infoBarCreatureManagement"
],
2023-05-19 20:14:01 +02:00
"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
},
"infoBarCreatureManagement": {
"type" : "boolean",
"default" : false
}
}
}
}
}