Origins: Powerful Powers
» Power tagsPage 16 of 17

Power tags

A power tag is a name for a group of powers, listed in a datapack file. You tag powers from outside, including powers from Origins itself or another pack, and keep "which powers does this apply to?" in one place.


The file

Each pack has one file: data/<namespace>/opp_power_tags.json. It maps a tag name to the powers in it.

json
{
  "movement": [
    "mypack:double_jump",
    "mypack:wall_climb",
    "gravity-shifter:*"
  ],
  "otherpack:unsilenceable": [
    "mypack:heartbeat"
  ]
}
  • * matches any run of characters, so gravity-shifter:* is every power in that pack, and mypack:fire_* is every power whose id starts that way.
  • A tag name without a namespace gets the pack's own. In data/mypack/opp_power_tags.json, "movement" is the tag mypack:movement, so two packs can each use short names without colliding. Write the full name, like "otherpack:unsilenceable" above, to add powers to another pack's tag.
  • Files from every pack are merged. If two packs both add to otherpack:unsilenceable, the tag holds both lists. Entries for powers from a missing pack match nothing.
  • Entries are unchecked. A typo matches no powers. Check with /opp powertag.
  • /reload reloads the file.

Tags cover powers. To group origins, tag a power each of those origins grants.


Has power tag

origins-powerful-powers:has_power_tagentity condition and bi-entity condition

True when the entity holds a power in that tag.

FieldTypeDefaultDescription
tagStringrequiredThe tag name. Without a namespace it gets this power's own namespace, so a power in mypack asking for "movement" means mypack:movement.
include_inactiveBooleanfalseBy default only active powers count (their own condition is true). true counts every power the entity has.
  • Hidden powers count, including the sub-powers of origins:multiple.
  • The bi-entity version tests the target.
  • It works for any entity that can have powers.

Example: an anti-magic aura. Hits from anyone holding a power tagged mypack:magic hurt you less.

json
{
  "type": "origins:modify_damage_taken",
  "bientity_condition": {
    "type": "origins-powerful-powers:has_power_tag",
    "tag": "mypack:magic"
  },
  "modifier": {
    "operation": "multiply_total_multiplicative",
    "value": -0.5
  }
}

Example: a speed bonus for players without a flight ability.

json
{
  "type": "origins:conditioned_attribute",
  "condition": {
    "type": "origins-powerful-powers:has_power_tag",
    "tag": "mypack:flight",
    "inverted": true
  },
  "modifier": {
    "attribute": "minecraft:generic.movement_speed",
    "operation": "multiply_base",
    "value": 0.15
  }
}

Listing tagged powers

The power_list power takes a tag field, so a list holds only the holder's powers in that tag:

json
{
  "type": "origins-powerful-powers:power_list",
  "variable": "my_magic",
  "tag": "mypack:magic",
  "only_active": true
}

From there, my_magic.size(), for_each and the other list tools work as usual (page 11).


/opp powertag

mcfunction
opp powertag list
opp powertag list <tag>
opp powertag of <power>

Shows what the tag files resolved to after loading. Use it to catch typos and overly broad wildcards.

SubcommandWhat it printsResult
listevery tag and how many loaded powers it coversthe number of tags
list <tag>the powers in that tag, and the entries it was written withhow many powers
of <power>every tag that power is inhow many tags
mcfunction
opp powertag list mypack:magic
opp powertag of origins:phantomize