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.
| Field | Type | Default | Purpose |
|---|---|---|---|
type | Identifier | — | Required. Which power type this is. |
name | Text Component | auto | Display name. Falls back to a translation key. |
description | Text Component | auto | Description shown in menus. Falls back to a translation key. |
condition | Entity Condition | optional | The power is only active while this passes. |
hidden | Boolean | false | Hide 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:
| Family | What they do | Examples |
|---|---|---|
| Attribute & stat | Change numbers | Attribute (Power Type), Modify Damage (Power Type) |
| Movement | Flight, climbing, phasing | Creative Flight (Power Type), Climbing (Power Type) |
| Prevention & immunity | Take an ability away | Invulnerability (Power Type), Prevent Death (Power Type) |
| Action-driven | Fire actions on a trigger | apoli:action_on_hit, apoli:action_over_time |
| Resources & state | Store a number, timer, or group | apoli:resource, apoli:cooldown |
| Rendering & cosmetic | Colours, overlays, particles | apoli:model_color, apoli:particle |
| Item & inventory | Containers, recipes, projectiles | apoli:inventory, apoli:fire_projectile |
| Structural | Bundle or flag | apoli: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 grantcommand, - 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.