Origins: Powerful Powers
» Getting startedPage 1 of 17

Getting started

These docs cover OPP 1.0.0. Changes between versions are in the changelog.

Requirements

Version
OPP1.0.0
Minecraft1.20.1
Fabric Loader0.19.3 or newer
Fabric APIany
Origins1.10.0 or newerincludes Apoli and Calio, which OPP builds on
Java17 or newer
Simple Voice Chatany, optionalfor the voice chat features (page 13)
Hardcore Revivalany, optionalfor is_downed (page 2)
Styled Nicknames1.2.1+1.20, optionalto obfuscate nicknames along with usernames (page 6)

Install OPP on the server and on every client. Clients need it for synced values, such as variables in HUD bars and the attributes.

Your first OPP power

An OPP type goes anywhere Origins accepts that kind of type, with the origins-powerful-powers: namespace.

data/mypack/powers/steady_aim.json: +20% damage while you stand still and your attack is fully charged.

json
{
  "type": "origins:modify_damage_dealt",
  "condition": {
    "type": "origins:and",
    "conditions": [
      {
        "type": "origins-powerful-powers:attack_cooldown_progress",
        "comparison": ">=",
        "compare_to": 1.0
      },
      {
        "type": "origins-powerful-powers:sprint_ticks",
        "comparison": "==",
        "compare_to": 0
      },
      {
        "type": "origins-powerful-powers:time_airborne",
        "comparison": "==",
        "compare_to": 0
      }
    ]
  },
  "modifier": {
    "operation": "multiply_total_multiplicative",
    "value": 0.2
  }
}

Add the power to an origin ("powers": ["mypack:steady_aim"] in data/mypack/origins/<origin>.json), or grant it to test:

mcfunction
power grant @s mypack:steady_aim

How these docs are laid out

Each type gets a block like the Origins docs:

Sprint ticks

origins-powerful-powers:sprint_ticksentity condition

What it checks, in one or two sentences.

FieldTypeDefaultDescription

An example with an explanation.

  • Field types use the Origins names: Comparison ("<", "<=", ">", ">=", "==", "!="), Integer, Float, Double, String, Identifier, and the Origins "type" data types, such as Bi-entity condition type.
  • Default: required means the field must be given.
  • Enum fields (like axis or component) accept any capitalization.
  • Confidence notes. Descriptions come from the mod's source code. Unconfirmed behavior is listed under Suspected bugs at the end of the contents page.

Things that apply to every page

  • Ticks. 20 ticks = 1 second, 1200 ticks = 1 minute.
  • Bi-entity pairs. The actor is the first entity, usually the power holder (self). The target is the second, the one being hit, looked at, and so on (other). This matches Origins.
  • Tracked values live on the server and aren't saved. Several conditions read values OPP records as things happen: last damage, recent damage, knockback, attack reach, shield angle, time since last meal, airborne and sprint ticks, crouch depth, vibration cooldown, and the voice chat state. They are:

    • kept in memory on the server, per entity
    • reset when the server restarts
    • forgotten when a non-player entity leaves the world by being killed, removed, or unloaded with its chunk. Changing dimension keeps them.
    • kept for players through deaths and logouts, until the player has been offline longer than the gamerule oppPlayerExpiryDays (real days, default 30, 0 = never). The global store uses the same gamerule for keys bound to a player.
    • 0 / false on the client. A condition Origins checks on the client, such as a hud_render condition, reads them as 0 or false. The attributes are synced to clients every tick, so use origins:attribute for client-side checks.
  • Player-only conditions are false for other entities. Each entry says so.