Powers

The top-level unit: What a power is and the fields every power shares.

A power is the top-level unit in Apoli: the thing an entity has. Every power is a JSON object with a type, and the type decides what the power does.

The shape of a power

{
   "name":"Tough",
   "description":"You have more health than most.",
   "type":"apoli:attribute",
   "modifiers":[
      {
         "attribute":"minecraft:generic.max_health",
         "operation":"add_base_early",
         "value":10
      }
   ]
}

Five fields are shared by every power type. Everything else is type-specific.

FieldTypeDefaultPurpose
typeIdentifierRequired. Which power type this is.
nameText ComponentautoDisplay name. Falls back to a translation key.
descriptionText ComponentautoDescription shown in menus. Falls back to a translation key.
conditionEntity ConditionoptionalThe power is only active while this passes.
hiddenBooleanfalseHide the power from origin/power screens.

The top-level condition is worth remembering: it’s how you make a power conditional without changing its type. A condition of apoli:sneaking means the power only works while sneaking.

Categories of power

There are over a hundred power types and every one has its own page in the Powers section of the sidebar. They fall into a few loose families:

FamilyWhat they doExamples
Attribute & statChange numbersAttribute (Power Type), Modify Damage (Power Type)
MovementFlight, climbing, phasingCreative Flight (Power Type), Climbing (Power Type)
Prevention & immunityTake an ability awayInvulnerability (Power Type), Prevent Death (Power Type)
Action-drivenFire actions on a triggerapoli:action_on_hit, apoli:action_over_time
Resources & stateStore a number, timer, or groupapoli:resource, apoli:cooldown
Rendering & cosmeticColours, overlays, particlesapoli:model_color, apoli:particle
Item & inventoryContainers, recipes, projectilesapoli:inventory, apoli:fire_projectile
StructuralBundle or flagapoli:multiple, apoli:simple

Powers are inert until granted

Writing a power file doesn’t do anything on its own. Something has to give the power to an entity:

  • a /power grant command,
  • an Origins origin (via a layer),
  • an action like Grant Power (Entity Action Type).

Once granted, Apoli applies the power’s effect and if it has a top-level condition, it keeps it active only while that condition holds.