Skip to content

Parameter Types

Skill parameters (skill_parameters) define values that can change by skill level and can be referenced by scripts, costs, and display templates.

Types

TypeAliasesDescription
expressionexpr, formulaMath expression using variables such as %level%.
stringstr, textString value.
random_textrandom_lines, random_line, text_lines, random_text_linesRandomly selects one line.
random_charrandom_chars, char_random, chars_randomPicks one candidate with equal probability.
weighted_random_charweighted_random_chars, weighted_char, weighted_chars, weighted_char_randomPicks one candidate by weight.
conditional_charcondition_char, case_char, if_charPicks one candidate by condition branch.
booleanbool, flagBoolean value with expression support.
constantconst, fixedFixed value. Unrecognized type values also fall back to this.
rangeRange value.
uniformUniform random number.
gaussiannormalGaussian random number.
skew_normalskewnormalSkew-normal random number.
triangleTriangle distribution random number.

string, random_text, random_char, weighted_random_char, conditional_char, and boolean are non-numeric types; min, max, and decimals do not apply to them.

Fields

FieldDescription
typeParameter type.
valueValue or expression.
minLower clamp.
maxUpper clamp.
decimalsDecimal precision; 0 means integer-like output.
defaultFallback value when parsing fails.

Examples

yaml
skill_parameters:
  damage:
    type: expression
    value: "10 + %level% * 5"
    min: 10
    max: 100
    decimals: 0
  bonus_damage:
    type: uniform
    value: "5~15"
    decimals: 0
  cast_message:
    type: random_text
    values:
      - "<red>Flame Burst!"
      - "<red>Burn!"
  is_aoe:
    type: boolean
    value: "%level% >= 5"

Using parameters in scripts

Parameters can be referenced in action lines, conditions, and text with %parameter% syntax:

yaml
script:
  actions:
    cast:
      - 'damage amount=%damage%'
      - '@if="%is_aoe% == true" particle particle=EXPLOSION at=target count=10'

Level overrides

yaml
upgrade:
  max_level: 10
  levels:
    5:
      parameters:
        damage:
          value: "50 + %level% * 8"