Placeholder Splitting

Splitting allows you to break down placeholders into multiple parts and use them separately. You can split by number of letters, before specific characters or words, numeric comparison, and regex.


Letter Splitting

Splits a placeholder into fixed-length parts.

placeholders:
  split_example:
    placeholder_splits:
      '%player_name%':
        split: [ '2_letters', '2_letters' ]
        outputs:
          first: '<green>First part: {part_1}'
          second: '<blue>Second part: {part_2}'
          remaining: '<yellow>Remaining: {part_3}'

Example Input: "Junkeh"

Output:

  • {part_1} = "Ju"

  • {part_2} = "nk"

  • {part_3} = "eh"

To use the placeholder to display the splits do this: %easyph_<custom>_<outputname>% so for this example %easyph_split_example_first% Will output: First part: Ju


Number Comparison Splitting

Compares a numeric value to a threshold and outputs based on whether it is greater or less than the value.

placeholders:
  split_number:
    placeholder_splits:
      '10 12':  # Example numbers or add placeholder
        split: [ 'greater_than', '10' ]
        outputs:
          above: '<gold>Level is above 10!'
          below: '<gray>Level is below or equal to 10!'

Example Input: "12" Output: <gold>Level is above 10! Example Input: "8" Output: <gray>Level is below or equal to 10!


Word Splitting

Splits a placeholder before a specific character or word.

placeholders:
  split_word:
    placeholder_splits:
      '%player_name%':
        split: [ 'before_character', '_' ]
        outputs:
          first: '<yellow>Before underscore: {part_1}'
          second: '<red>After underscore: {part_2}'

Example Input: "Junkeh_Dev"

Output:

  • {part_1} = "Junkeh"

  • {part_2} = "Dev"


Regex Splitting

Splits a placeholder using regex patterns.

placeholders:
  split_regex:
    placeholder_splits:
      'dpg32sasd': # Can be a placeholder
        split: [ 'regex', '[0-9]+' ]
        outputs:
          first: '<red>Before number: {part_1}'
          second: '<yellow>After number: {part_2}'

Example Input: "dpg32sasd"

Output:

  • {part_1} = "dpg"

  • {part_2} = "sasd"


Last updated