SwornHeroWiki
Configuration

Message pools

Configure firstJoin and returningJoin message pools, entries, weights, and lines.

Dynamic Join Greetings maintains two pools:

  • firstJoin — used the first time a UUID is recorded
  • returningJoin — used for every later join of that UUID

Pool fields

FieldRequiredDescription
enabledYesEnables or disables the pool.
audienceYesPLAYER, BROADCAST, or BOTH.
messagesYesArray of message entries.

Validation rules:

  • An enabled pool must contain at least one message.
  • Message id values must be unique within that pool.
  • weight must be finite and greater than zero.
  • lines must contain at least one string.
  • Each line must parse as valid Placeholder API Simplified Text Format after placeholder substitution.

Message entries

{
  "id": "return_welcome_back",
  "weight": 1.0,
  "lines": [
    "<gold>Welcome back, <yellow>{player}</yellow>!</gold>"
  ]
}
FieldDescription
idStable identifier used by selection history. Keep it unique inside the pool.
weightRelative chance during weighted selection. Higher weights are more likely.
linesOne or more chat lines delivered in order.

Weighted example

"messages": [
  {
    "id": "common",
    "weight": 5.0,
    "lines": ["<green>Welcome back, {player}!</green>"]
  },
  {
    "id": "rare",
    "weight": 1.0,
    "lines": ["<gold><bold>A legendary return!</bold></gold>"]
  }
]

In weighted random selection, common is five times as likely as rare.

Multi-line example

{
  "id": "first_welcome",
  "weight": 1.0,
  "lines": [
    "<gold><bold>Welcome to {server}, {player}!</bold></gold>",
    "<gray>Your first adventure begins here.</gray>"
  ]
}

See Messages for formatting and placeholder details.

Found a problem in these docs? Report a documentation issue on GitHub.

On this page