Scale (Power Type)

Resizes the entity — hitbox, model, eye height and the physics that follow from size — for as long as the power is held.

Resizes the entity for as long as the power is held. One power can drive several scale types at once, and the value can be an Expression, so size can follow health, a resource, or anything else you can compute.

Type ID: apoli:scale

Fields

FieldTypeDefaultDescription
scale_typesScale Type or Array of themapoli:baseWhich scale types this power multiplies.
scaleFloat or ExpressionoptionalA straight multiplier. 2 is twice the size, 0.5 is half.
modifierAttribute ModifieroptionalA modifier applied to scale (or to 1.0 when scale is absent).
modifiersArray of Attribute ModifieroptionalSeveral modifiers, applied in operation order.

scale_type is accepted as a spelling of scale_types, and a pehkui: namespace resolves to the matching Apoli scale type, so a Pehkui-flavoured id like pehkui:height works.

The power multiplies; it never replaces. Two apoli:scale powers on the same entity both apply, and a /apoli:scale value set by a command multiplies on top of them.

Examples

Twice as big while the power is held:

{
    "type": "apoli:scale",
    "scale_types": "apoli:base",
    "scale": 2
}

Shrink as you lose health, using an expression:

{
    "type": "apoli:scale",
    "scale_types": ["apoli:width", "apoli:height"],
    "modifier": {
        "operation": "set_total",
        "amount": "clamp(health / max_health, 0.35, 1)"
    }
}

Keep the hitbox alone and only change what people see:

{
    "type": "apoli:scale",
    "scale_types": ["apoli:model_width", "apoli:model_height"],
    "scale": 1.6
}

A scale that affects the hitbox moves the entity’s bounding box. Shrinking is safe; growing inside a tight space pushes the entity the way vanilla does when it stands up from a crawl.