Apply Stored Origin (Entity Action Type)

Entity action — sets the entity's origin from a previously stored key.

Sets the entity’s origin from an entry saved earlier by origins:store_origin.

Type ID: origins:apply_stored_origin — an entity action.

Needs the Origins mod. Registered by Origins, not core Apoli. It only works on players, and only on the server. See Origin storage for the system as a whole.

Fields

FieldTypeDefaultPurpose
keyStringrequiredWhich stored entry to apply.
layerIdentifieroptionalApply to this layer instead of the one recorded with the entry.
clearBooleanfalseRemove the entry once it has been applied.

Nothing happens if the key holds no origin, or if the layer or origin no longer exists — a data pack that removed an origin can’t strand a player on it.

The change goes through the normal origin-change path: powers are diffed rather than removed and re-added, so resources and apoli:inventory contents that both origins share are left alone. Gated layers are revalidated and every client is re-synced afterwards.

Examples

Give the player back what they were:

{
  "type": "origins:apply_stored_origin",
  "key": "before_curse",
  "clear": true
}

Apply a stored origin onto a different layer than it came from:

{
  "type": "origins:apply_stored_origin",
  "key": "stolen",
  "layer": "origins:copy"
}