Skip to main content

Grant All Powers (Entity Action Type)

Grants every power that a named power source provides.

Type ID: apoli:grant_all_powers

Fields

FieldTypeDefaultDescription
fromIdentifier or Array of IdentifieroptionalThe sources to take powers from.
sourceIdentifierthe from IDThe source ID the grants are recorded under.
namespaceStringoptionalOnly grants powers in this namespace.
include_hiddenBooleantrueWhether to include powers marked hidden.

What counts as a source

from accepts anything that owns a list of powers:

  • an origin ID (needs Origins), such as example:phoenix
  • an origin layer ID, which resolves to every power of every origin in it
  • a skill tree ID, which resolves to its default_powers plus every skill under it
  • an apoli:multiple power ID, which resolves to its sub-powers

An ID that resolves to none of those is skipped with a warning in the log.

source defaults to the from ID, so apoli:revoke_all_powers with the same ID undoes the grant exactly. Set it yourself if you want several sources filed under one tag.

Examples

Grant everything one origin has:

{
    "type": "apoli:grant_all_powers",
    "from": "example:phoenix"
}

Grant the powers of two origins under a single source, so one action can take them all back:

{
    "type": "apoli:grant_all_powers",
    "from": ["example:phoenix", "example:merling"],
    "source": "example:absorbed"
}

Grant a skill tree's powers without the hidden helper ones:

{
    "type": "apoli:grant_all_powers",
    "from": "example:magic",
    "include_hidden": false
}
warning

With from left out, this grants every loaded power in the game, which hands a player every power of every origin in the pack. Always name a source.

The entity doesn't need to hold any powers already. One that has never had a power, such as a mob, an item or a projectile, gets them all the same.