Attribute (Power Type)
Modifies one or more attributes on the entity for as long as the power is held.
Modifies one or more attributes on the entity for as long as the power is held.
Type ID: apoli:attribute (type-alias: apoli:conditioned_attribute for back-compat with Apace’s packs)
In Apace’s Apoli,
apoli:attributedid not accept aconditionfield; he later addedapoli:conditioned_attributeas a parallel type that did. In this rewrite,conditionis a property of every power (see Power JSON Format), so the same single type accepts conditions and theconditioned_attributeid is just an alias.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
modifier | Attribute Modifier | optional | A single modifier applied to its attribute. |
modifiers | Array of Attribute Modifier | optional | Multiple modifiers applied to their respective attribute fields. |
update_health | Boolean | true | When the modifier touches minecraft:generic.max_health, scale the player’s current health so their fill ratio is preserved. |
At least one of modifier or modifiers must be present; the attribute field inside each modifier is required when the modifier is used by this power (otherwise the codec rejects it with a clear error).
Examples
Single modifier:
{
"type": "apoli:attribute",
"modifier": {
"name": "Max health increase",
"attribute": "minecraft:generic.max_health",
"value": 4,
"operation": "addition"
}
} Multiple modifiers with a condition:
{
"type": "apoli:attribute",
"condition": {
"type": "apoli:status_effect",
"effect": "minecraft:strength"
},
"modifiers": [
{
"attribute": "minecraft:generic.attack_damage",
"operation": "multiply_total",
"value": 0.25
},
{
"attribute": "minecraft:generic.movement_speed",
"operation": "multiply_total",
"value": 0.1
}
]
} Modifier driven by a resource value (links a vanilla attribute to a apoli:resource):
{
"type": "apoli:attribute",
"modifier": {
"attribute": "minecraft:generic.attack_damage",
"operation": "addition",
"resource": "example:rage"
}
}