mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
loading secondary skill bonuses from config/skills.json works (kind of)
This commit is contained in:
parent
9811fbe02c
commit
05cf95400c
@ -76,5 +76,9 @@
|
||||
"config/spells/other.json",
|
||||
"config/spells/timed.json",
|
||||
"config/spells/ability.json"
|
||||
],
|
||||
"skills" :
|
||||
[
|
||||
"config/skills.json"
|
||||
]
|
||||
}
|
||||
|
33
config/schemas/skill.json
Normal file
33
config/schemas/skill.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
|
||||
"type":"object",
|
||||
"$schema": "http://json-schema.org/draft-04/schema",
|
||||
|
||||
"title" : "VCMI skill format",
|
||||
"description" : "Format used to replace bonuses provided by secondary skills in VCMI",
|
||||
|
||||
"definitions" : {
|
||||
|
||||
"skillBonus":{
|
||||
"description": "Set of bonuses provided by skill at given level",
|
||||
"type": "array",
|
||||
"items":{
|
||||
"$ref" : "vcmi:bonus"
|
||||
}
|
||||
},
|
||||
|
||||
"required" : ["basic", "advanced", "expert"],
|
||||
|
||||
"properties": {
|
||||
"basic":{
|
||||
"$ref" : "#/definitions/skillBonus"
|
||||
},
|
||||
"advanced":{
|
||||
"$ref" : "#/definitions/skillBonus"
|
||||
},
|
||||
"expert":{
|
||||
"$ref" : "#/definitions/skillBonus"
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
29
config/skills.json
Normal file
29
config/skills.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"estates" : {
|
||||
"index" : 13,
|
||||
"basic" : [
|
||||
{
|
||||
"subtype" : 13,
|
||||
"type" : "SECONDARY_SKILL_PREMY",
|
||||
"val" : 250,
|
||||
"valueType" : "BASE_NUMBER"
|
||||
}
|
||||
],
|
||||
"advanced" : [
|
||||
{
|
||||
"subtype" : 13,
|
||||
"type" : "SECONDARY_SKILL_PREMY",
|
||||
"val" : 500,
|
||||
"valueType" : "BASE_NUMBER"
|
||||
}
|
||||
],
|
||||
"expert" : [
|
||||
{
|
||||
"subtype" : 13,
|
||||
"type" : "SECONDARY_SKILL_PREMY",
|
||||
"val" : 1000,
|
||||
"valueType" : "BASE_NUMBER"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -23,6 +23,7 @@
|
||||
#include "CStopWatch.h"
|
||||
#include "IHandlerBase.h"
|
||||
#include "spells/CSpellHandler.h"
|
||||
#include "CSkillHandler.h"
|
||||
|
||||
CIdentifierStorage::CIdentifierStorage():
|
||||
state(LOADING)
|
||||
@ -420,6 +421,7 @@ CContentHandler::CContentHandler()
|
||||
handlers.insert(std::make_pair("objects", ContentTypeHandler(VLC->objtypeh, "object")));
|
||||
handlers.insert(std::make_pair("heroes", ContentTypeHandler(VLC->heroh, "hero")));
|
||||
handlers.insert(std::make_pair("spells", ContentTypeHandler(VLC->spellh, "spell")));
|
||||
handlers.insert(std::make_pair("skills", ContentTypeHandler(VLC->skillh, "skill")));
|
||||
handlers.insert(std::make_pair("templates", ContentTypeHandler((IHandlerBase *)VLC->tplh, "template")));
|
||||
|
||||
//TODO: any other types of moddables?
|
||||
|
Loading…
Reference in New Issue
Block a user