Skip to content

Text Replacements

Text replacements allow you to modify text components in the game, such as item names and lore.

Definition

Definitions should be placed in: assets/<namespace>/catharsis/text_replacements/item/<id>.json.

A text replacement object
  • priority: Optional. Higher numbers are processed later. Defaults to 0.
  • replacer: The replacer definition to use.

Replacer Types

Regex (catharsis:regex)

Replaces text using regular expressions.

Root regex replacer object
  • type: catharsis:regex
  • regex: The regular expression pattern to match.
  • replacement: The replacement text. Supports regex groups (e.g. $1).
  • propagate: Optional. If false, stops further replacements in the chain if this one matches. Defaults to true.

Composite (catharsis:composite)

Groups multiple replacers together to run them in sequence.

Root composite replacer object
  • type: catharsis:composite
  • replacers: A list of replacer definitions.
  • propagate: Optional. If false, stops the chain if a sub-replacer triggers a break. Defaults to true.