Placeholder Math

Theres 2 sections, Math and Chance.


Chance-Based Outputs

Chance-based outputs allow randomized responses based on probability.

placeholders:
  random_greeting:
    chance_outputs:
      - chance: 50
        output: '<green>Hello %player_name%!'
      - chance: 30
        output: '<gold>Hi %player_name%!'
      - chance: 20
        output: '<red>Hey %player_name%!'

50% chance: <green>Hello Junkeh! 30% chance: <gold>Hi Junkeh! 20% chance: <red>Hey Junkeh!


Math Operations

Allows mathematical transformations on numeric placeholders.

placeholders:
  math_example:
    placeholders:
      - '%player_level%'
    math_operation: 'x2,+5,^2'
    output: '<red>Level transformed: {result}!'

Example Input: %player_level% = 3

Steps:

  • Multiply by 2 → 3 × 2 = 6

  • Add 5 → 6 + 5 = 11

  • Square the result → 11² = 121

Final Output: <red>Level transformed: 121!

Last updated