Skip to main content

Scale (Power Type)

Resizes the entity for as long as it has the power. 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:baseThe scale types this power multiplies.
scaleFloat or ExpressionoptionalA plain multiplier. 2 is twice the size and 0.5 is half.
modifierAttribute ModifieroptionalA modifier applied to scale, or to 1.0 when there is no scale.
modifiersArray of Attribute ModifieroptionalSeveral modifiers, applied in operation order.

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

The power multiplies the size instead of replacing it. Two apoli:scale powers on the same entity both apply, and a value set with the /apoli:scale command multiplies on top of them.

Examples

Twice as big while the power is held:

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

Several scale types get the same factor, each measured against its own current value. This makes the model five times bigger in every direction and leaves the hitbox alone:

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

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)"
    }
}

Leave the hitbox alone and only change what people see:

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

Make the inventory preview bigger. The preview ignores every other scale type, so on its own this leaves the entity's real size alone:

{
    "type": "apoli:scale",
    "scale_types": "apoli:doll",
    "scale": 2
}
note

A scale that affects the hitbox moves the entity's bounding box. Shrinking is safe, and growing in a tight space pushes the entity out the way vanilla does when it stands up from crawling.