Skip to content

Custom Buff Types

Journey’s buff system is extensible. Third-party Fabric mods can register new buff types that integrate with Journey’s reward system, MoLang scripts, and commands.


Journey ships with four built-in buff types: attribute, potion, script, and shiny_chance. Mod developers can register additional types using Journey’s BuffTypeRegistry API.

Once registered, server admins configure custom buffs the same way as built-in ones — JSON files in config/journey/buffs/ using the new type name.

Example: If a mod registers a daycare_speed buff type, admins would create:

File: config/journey/buffs/daycare_boost.json

{
"id": "daycare_boost",
"type": "daycare_speed",
"name": "Daycare Speed Boost",
"description": "Pokemon eggs hatch faster in the daycare",
"max_stacks": 3,
"is_debuff": false,
"hidden": false,
"speed_multiplier": 1.5
}

The type field tells Journey which registered handler to use. The remaining fields depend on what the mod developer supports.


If you’ve installed a mod that adds custom buff types to Journey:

  1. Check the mod’s documentation for the type name and available fields
  2. Create a JSON file in config/journey/buffs/ using the custom type
  3. Use it in rewards and MoLang scripts just like built-in buffs

Custom buffs work with all Journey systems:

  • Task and levelable rewards via "type": "buff"
  • MoLang functions: q.player.apply_buff(), q.player.has_buff(), q.player.remove_buff()
  • Commands: /journey buff give, /journey buff remove
  • Journey Client buff display

To create a custom buff type, you need to:

  1. Extend BuffDefinition — Define your buff’s configuration (loaded from JSON)
  2. Extend BuffInstance — Define your buff’s runtime behavior (apply, tick, remove)
  3. Register with BuffTypeRegistry — Map your type name to a factory that creates definitions from JSON
  4. Register instance deserializer — So Journey can load your buff from saved data

The key classes are in the aster.amo.journey.buff package:

  • BuffTypeRegistry — Register new buff types
  • BuffRegistry — Register instance deserializers, apply buffs to players
  • BuffDefinition — Base class for buff configuration
  • BuffInstance — Base class for active buff behavior
  • RemovalReason — Enum for why a buff was removed (EXPIRED, MANUAL, DEATH, SOURCE_REMOVED, REPLACED)

Refer to Journey’s built-in buff types as implementation examples. Registration should happen during your mod’s onInitialize() before Journey loads buff configs.