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

397 lines
9.3 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",
"$schema": "http://json-schema.org/draft-04/schema",
"required" : [ "general", "video", "adventure", "pathfinder", "battle", "server", "logging", "launcher" ],
"definitions" : {
"logLevelEnum" : {
"type" : "string",
"enum" : [ "trace", "debug", "info", "warn", "error" ]
}
},
"additionalProperties" : false,
"properties":
{
"general" : {
"type" : "object",
"default": {},
"additionalProperties" : false,
2022-05-16 11:09:00 +02:00
"required" : [ "playerName", "showfps", "music", "sound", "encoding", "swipe", "saveRandomMaps", "saveFrequency", "notifications", "extraDump" ],
"properties" : {
"playerName" : {
"type":"string",
"default" : "Player"
},
"showfps" : {
"type" : "boolean",
"default" : false
},
"music" : {
"type" : "number",
"default" : 88
},
"sound" : {
"type" : "number",
"default" : 88
},
"encoding" : {
"type" : "string",
"default" : "CP1252"
},
"swipe" : {
"type" : "boolean",
"default" : true
},
"saveRandomMaps" : {
"type" : "boolean",
"default" : false
},
"lastMap" : {
"type":"string",
"default" : "Maps/Arrogance"
},
"lastSave" : {
"type":"string",
"default" : "NEWGAME"
},
"lastCampaign" : {
"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
}
}
},
"video" : {
"type" : "object",
"additionalProperties" : false,
"default": {},
"required" : [ "screenRes", "bitsPerPixel", "fullscreen", "realFullscreen", "spellbookAnimation","driver", "showIntro", "displayIndex" ],
"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
},
"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
}
}
},
"adventure" : {
"type" : "object",
"additionalProperties" : false,
"default": {},
"required" : [ "heroSpeed", "enemySpeed", "scrollSpeed", "heroReminder", "quickCombat" ],
"properties" : {
"heroSpeed" : {
"type" : "number",
"default" : 2
},
"enemySpeed" : {
"type" : "number",
"default" : 2
},
"scrollSpeed" : {
"type" : "number",
"default" : 1
},
"heroReminder" : {
"type" : "boolean",
"default" : true
},
"quickCombat" : {
"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": {},
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
"required" : [ "animationSpeed", "mouseShadow", "cellBorders", "stackRange", "showQueue", "queueSize" ],
"properties" : {
"animationSpeed" : {
"type" : "number",
"default" : 0.63
},
"mouseShadow" : {
"type":"boolean",
"default" : true
},
"cellBorders" : {
"type" : "boolean",
"default" : false
},
"stackRange" : {
"type" : "boolean",
"default" : true
},
"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
},
"queueSize" : {
"type" : "string",
"default" : "auto",
"enum" : [ "auto", "small", "big" ]
}
}
},
"server" : {
"type" : "object",
"additionalProperties" : false,
"default": {},
"required" : [ "server", "port", "localInformation", "playerAI", "friendlyAI","neutralAI", "enemyAI" ],
"properties" : {
"server" : {
"type":"string",
"default" : "127.0.0.1"
},
"port" : {
"type" : "number",
"default" : 3030
},
"localInformation" : {
"type" : "number",
"default" : 2
},
"playerAI" : {
"type" : "string",
"default" : "VCAI"
},
"friendlyAI" : {
"type" : "string",
"default" : "BattleAI"
},
"neutralAI" : {
"type" : "string",
"default" : "StupidAI"
},
"enemyAI" : {
"type" : "string",
"default" : "BattleAI"
}
}
},
"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" : "%l %n [%t] - %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,
2022-08-25 03:09:20 +02:00
"required" : [ "repositoryURL", "enableInstalledMods", "autoCheckRepositories", "updateOnStartup", "updateConfigUrl" ],
"properties" : {
"repositoryURL" : {
"type" : "array",
"default" : [
2022-08-30 19:35:03 +02:00
"https://raw.githubusercontent.com/vcmi/vcmi-mods-repository/develop/github.json"
],
"items" : {
"type" : "string"
},
},
"enableInstalledMods" : {
"type" : "boolean",
"default" : true
},
"autoCheckRepositories" : {
"type" : "boolean",
"default" : true
2022-08-25 01:43:58 +02:00
},
"updateOnStartup" : {
"type" : "boolean",
"default" : true
2022-08-25 03:09:20 +02:00
},
"updateConfigUrl" : {
"type" : "string",
2022-08-26 20:26:56 +02:00
"default" : "https://raw.githubusercontent.com/vcmi/vcmi-updates/master/vcmi-updates.json"
}
}
}
}
}