Difference between revisions of "Skill Format"
From VCMI Project Wiki
(→Main format) |
(→Skill level base format) |
||
Line 17: | Line 17: | ||
== Skill level base format == | == Skill level base format == | ||
Json object with data common for all levels can be put here. These configuration parameters will be default for all levels. All mandatory level fields become optional if they equal "base" configuration. | Json object with data common for all levels can be put here. These configuration parameters will be default for all levels. All mandatory level fields become optional if they equal "base" configuration. | ||
+ | |||
+ | == Skill level format == | ||
+ | <syntaxhighlight lang="javascript"> | ||
+ | { | ||
+ | //Optional, localizable description | ||
+ | //Use {xxx} for formatting | ||
+ | "description": "", | ||
+ | //Bonuses provided by skill at given level | ||
+ | //If different levels provide same bonus with different val, only the highest applies | ||
+ | "effects": | ||
+ | { | ||
+ | "firstEffect": {bonus format}, | ||
+ | "secondEffect": {bonus format} | ||
+ | //... | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> |
Revision as of 21:45, 1 September 2017
Main format
{
"skillName":
{
//optional base format, will be merged with basic/advanced/expert
"base": {Skill level base format},
//configuration for different skill levels
"basic": {Skill level format},
"advanced": {Skill level format},
"expert": {Skill level format}
}
}
Skill level base format
Json object with data common for all levels can be put here. These configuration parameters will be default for all levels. All mandatory level fields become optional if they equal "base" configuration.
Skill level format
{
//Optional, localizable description
//Use {xxx} for formatting
"description": "",
//Bonuses provided by skill at given level
//If different levels provide same bonus with different val, only the highest applies
"effects":
{
"firstEffect": {bonus format},
"secondEffect": {bonus format}
//...
}
}