Grant Origin (Entity Action Type)
Gives a player one named origin. On a normal layer it becomes their pick, and on a swappable layer it is added to their swap pool.
Type ID: origins:grant_origin
note
This action comes from the Origins mod and only runs for players.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
origin | Identifier | required | The origin to grant. Unknown IDs and origins:empty do nothing. |
layer | Identifier | origins:origin | The layer to grant it on. |
to_pool | Boolean | false | On a normal layer, puts the origin in that layer's swap pool instead of making it the player's pick. It is ignored on a swappable layer, where a grant always goes to the pool. swappable works as an alias. |
What granting does on each kind of layer
layer is | Result |
|---|---|
| A normal layer | The origin becomes the player's pick there, exactly as /origin set would make it. |
A normal layer, with to_pool: true | The origin is added to the swap pool for that layer. The player can swap to it, and their own origin is untouched. |
| A swappable layer | The origin is added to that pool. |
Pool grants are stored for each player and aren't checked against the layer's origins list, so a swappable layer can ship empty and be filled entirely at run time.
Examples
{
"type": "origins:grant_origin",
"origin": "origins:phantom",
"layer": "origins:origin"
}This gives the player the Phantom origin on the main layer.
{
"type": "origins:grant_origin",
"origin": "example:wolf_form",
"layer": "origins:origin",
"to_pool": true
}This unlocks example:wolf_form as an extra form the player can swap into, without changing their current origin.
origins:revoke_origin takes an origin back, and origins:transfer_origin moves one between two players.