Skip to content

GroupDefinition ​

Inherits: DatabaseResource < Resource

A group is a tag that effects, abilities and items can be in (several at once). The group decides how its members interact:

Description ​

  • Exclusive effects: only max_active effects of the group can be active at the same time within the group's scope. A paladin's Seals

(one per paladin), Blessings (one per paladin on each target), Well Fed (one per target), Battle and Guardian Elixir (one each). An effect in several groups needs a free slot in each of them, so a Flask that is in both elixir groups replaces either elixir.

  • Shared cooldown: using any ability or consumable of the group puts all the others of the group on cooldown (potions, trinkets).
  • Matching: items and abilities can name a group instead of one id (any arrow, any reagent), and an effect that ends after N uses counts the abilities of a group.
  • Enchant slots: with the scope per item the group is a slot on one item (permanent enchant, temporary coating).

See docs/systems/ability-mechanics-plan.md.

Properties ​

ColorcolorColor.WHITE
intmax_active1
ScopescopeScope.TARGET
WhenFullwhen_fullWhenFull.REPLACE
boolpersists_through_deathfalse
boolshares_cooldownfalse
floatshared_cooldown_duration0.0

Methods ​

boolis_exclusive()
Stringget_scope_name()

Enumerations ​

enum Scope ​

The options of scope: target, originator on target, originator, item.

  • TARGET = 0 - one per target, whoever applied it (Well Fed, elixirs)
  • ORIGINATOR_ON_TARGET = 1 - each source has its own on each target (a paladin's blessing on a friend: two paladins' blessings stack)
  • ORIGINATOR = 2 - one per source, wherever it is (Seals; "at most 3 totems")
  • ITEM = 3 - one per item (enchants)

enum WhenFull ​

The options of when full: replace, refuse.

  • REPLACE = 0 - the oldest member goes and the new one takes its place (default)
  • REFUSE = 1 - the new one is rejected, the current ones stay

Property descriptions ​

Color color = Color.WHITE ​

The tint of the group in the editor

Exclusive Effects

int max_active = 1 ​

How many effects of the group can be active at once within the scope (0 = no limit: the group is only a tag for effects)

Scope scope = Scope.TARGET ​

What the limit of max_active is counted per: the target, each source on each target, each source, or each item

WhenFull when_full = WhenFull.REPLACE ​

What happens when a new member arrives and the group is full: the oldest member is replaced, or the new one is refused

bool persists_through_death = false ​

Does an effect of this group stay on its target when the target dies? (Flasks do, most combat buffs do not)

Shared Cooldown

bool shares_cooldown = false ​

Does using a member put the other abilities and consumables of the group on cooldown?

float shared_cooldown_duration = 0.0 ​

Length of the shared cooldown in seconds (0 = the cooldown of the member that was used)

Method descriptions ​

bool is_exclusive() ​

Does the group allow only some of its members to be active at once?

String get_scope_name() ​

The name of the scope of the group.