Skip to content

Ranks Configuration

TheIllusiveC4 edited this page Mar 4, 2021 · 3 revisions

Overview

The champions-ranks.toml file is generated automatically when loading up a world with Champions for the first time. It is located in the serverconfig folder in your world save folder. This page will provide detailed explanations about the properties of the toml objects.

TOML Fields

Tier

tier = <integer>

The tier field holds the unique integer value for the rank. Essentially, this represents where this rank falls on the overall hierarchy of all champions, with higher numbers being better.

This is a required field.

Color

defaultColor = <integer>

The defaultColor field holds the integer color value (or hex, e.g. "0xffffff") to be associated with the rank. This controls particle colors and health bar colors. Note that this is just a default and this color can be overridden client-side.

Affixes

numAffixes = <integer>

The numAffixes field holds an integer value that controls how many affixes are given to each rank. This number is absolute, the champion will always spawn with exactly that many affixes.

Growth Factor

growthFactor = <integer>

The growthFactor field holds an integer value that controls the multiplier given to the stats of champions of that rank. How much each stat increments is dependent on the values listed in the champions.cfg file.

Chance

chance = <decimal number between 0.0 and 1.0>

The chance field holds a decimal number between 0.0 and 1.0 that controls how often each rank will spawn. Note that each chance is multiplicative. For example, lowering the chance for any given tier will also lower the chance for all tiers above it. This is because this chance is applied to every successive tier when the champion spawns.

Effects

effects = [<list of potion effects>]

The effects field holds a list of potion effect in the format "resourcelocation", or "resourcelocation;amplifier" if an amplifier needs to be specified. All of these effects will be applied for 10 seconds, every 5 seconds. Thus, these are permanent effects on the champion.

Preset Affixes

presetAffixes = [<list of affixes>]

The presetAffixes field holds a list of affix identifier names that a champion of this rank will always spawn with. This will count towards the total number of affixes they can get and may even be higher than that number.

Example

[[ranks]]
  tier = 4
  numAffixes = 4
  defaultColor = 13382655
  chance = 0.2
  growthFactor = 16
  effects = ["minecraft:invisibility","minecraft:regeneration;2"]

From this configuration, the rank is given a tier of 4 which places it above ranks 0, 1, 2, and 3. Champions of this rank will be given a purplish color, 4 affixes, have their respective stats incremented by a factor of 16, and has a 20% chance to be given to a mob that was already given tier 3. Champions will permanently have the Invisibility potion and the Regeneration 3 potion active.