mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
Now `compatibilityIdentifers` field is supported for all game entities. As result it is now possible for mods to provide compatibility support for loading mods and saves made with older version of the mod. Also, added docs to specify what exactly breaks saves with mods updates and ways to avoid that
103 lines
2.3 KiB
JSON
103 lines
2.3 KiB
JSON
{
|
|
"type" : "object",
|
|
"$schema" : "http://json-schema.org/draft-04/schema",
|
|
"title" : "VCMI map object type format",
|
|
"description" : "Description of map object type, used only as sub-schema of object",
|
|
"required" : [ ],
|
|
"additionalProperties" : true, // may have type-dependant properties
|
|
"properties" : {
|
|
"compatibilityIdentifiers" : {
|
|
"type" : "array",
|
|
"items" : {
|
|
"type" : "string"
|
|
},
|
|
"description" : "Additional identifiers that may refer to this object, to provide compatibility after object has been renamed"
|
|
},
|
|
"index" : {
|
|
"type" : "number"
|
|
},
|
|
"aiValue" : {
|
|
"type" : "number"
|
|
},
|
|
"base" : {
|
|
"additionalProperties" : true, // Not validated on its own - instead data copied to main object and validated as part of it
|
|
"type" : "object"
|
|
},
|
|
"rmg" : {
|
|
"additionalProperties" : false,
|
|
"type" : "object",
|
|
"properties" : {
|
|
"value" : {
|
|
"type" : "number"
|
|
},
|
|
"mapLimit" : {
|
|
"type" : "number"
|
|
},
|
|
"zoneLimit" : {
|
|
"type" : "number"
|
|
},
|
|
"rarity" : {
|
|
"type" : "number"
|
|
}
|
|
}
|
|
},
|
|
"name" : {
|
|
"type" : "string"
|
|
},
|
|
"templates" : {
|
|
"type" : "object",
|
|
"additionalProperties" : {
|
|
"$ref" : "objectTemplate.json"
|
|
}
|
|
},
|
|
|
|
"battleground" : {
|
|
"anyOf" : [
|
|
{
|
|
"description" : "Battleground that will be used for combats in this object. Overrides terrain this object was placed on",
|
|
"type" : "string"
|
|
},
|
|
{
|
|
"description" : "Battlegrounds that will be used for combats in this object. Overrides terrain this object was placed on. Will choosen random",
|
|
"type" : "array",
|
|
"items" : {
|
|
"type" : "string"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"sounds" : {
|
|
"type" : "object",
|
|
"additionalProperties" : false,
|
|
"description" : "Sounds used by this object",
|
|
"properties" : {
|
|
"ambient" : {
|
|
"type" : "array",
|
|
"description" : "Background sound of an object",
|
|
"items" : {
|
|
"type" : "string",
|
|
"format" : "soundFile"
|
|
}
|
|
},
|
|
"visit" : {
|
|
"type" : "array",
|
|
"description" : "Sound that played on object visit",
|
|
"items" : {
|
|
"type" : "string",
|
|
"format" : "soundFile"
|
|
}
|
|
},
|
|
"removal" : {
|
|
"type" : "array",
|
|
"description" : "Sound that played on object removal",
|
|
"items" : {
|
|
"type" : "string",
|
|
"format" : "soundFile"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|