Scaling Functions

Scaling functions control how values change based on enchantment level. They are used throughout enchantment YAML files for parameters like duration, amplifier, damage, chance, and more.

Types

Linear Scaling (default)

Values increase linearly with level: value = base + (per_level * level)

duration:
  base: 40
  per_level: 20
Level
Value

1

60 (40 + 20*1)

2

80 (40 + 20*2)

3

100 (40 + 20*3)

Fixed Scaling

Value stays the same regardless of level:

amplifier:
  scaling: fixed
  value: 2
Level
Value

1

2

2

2

3

2

Shorthand

For simple fixed values, you can use a plain number instead of a section:

Usage Examples

Chance (probability)

Potion Duration (ticks)

Attribute Amount

Fixed Value (same at all levels)

Where Scaling Functions Are Used

Scaling functions appear in many action parameters:

  • duration -- Potion effect / fire duration

  • amplifier -- Potion effect amplifier

  • amount -- Damage, health, attribute amounts

  • percentage -- Reflect damage percentage

  • multiplier -- XP/drop multipliers

  • radius -- Area of effect radius

  • chance (top-level) -- Activation probability

Last updated