Skip to main content

Store Power (Entity Action Type)

Puts powers into the entity's own apoli:power_storage, takes them out, or empties it. A stored power is granted to the holder unless the storage sets grant: false, in which case it stays inert until apoli:run_stored_power fires it.

Type ID: apoli:store_power

The bi-entity form, apoli:store_power, stores into the target's storage instead, which is how one entity teaches another a power.

Fields

FieldTypeDefaultDescription
storageIdentifieroptionalOnly touches this storage power. Leave it out to apply to every apoli:power_storage the entity has.
powerIdentifier or listoptionalThe power IDs to store or remove.
tagsString or listoptionalEvery loaded power carrying one of these tags. Combined with power, both sets are used.
from_heldBooleanfalseTakes the IDs from the powers the entity holds, narrowed by power and tags, instead of from the IDs themselves.
operationStringaddadd, remove or clear. clear empties the storage and ignores the filters.

A power is refused if the storage is full (unless it sets replace_oldest), if it is already stored, if the storage's own powers or tags whitelist rejects it, or if no power with that ID is loaded. A storage can never hold another storage. With /apoli:dev_mode on, each attempt names the storage, the power and which of those happened.

Examples

Learn a spell:

{
  "type": "apoli:store_power",
  "storage": "example:spell_book",
  "power": "example:fireball"
}

Forget everything on death (in apoli:action_on_death the entity that died is the target):

{
  "type": "apoli:action_on_death",
  "bientity_action": {
    "type": "apoli:target_action",
    "action": {
      "type": "apoli:store_power",
      "operation": "clear"
    }
  }
}

Copy every spell-tagged power the entity holds into its book:

{
  "type": "apoli:store_power",
  "from_held": true,
  "tags": "spell"
}