Modify Falling (Power Type)
Changes how fast the entity that has the power falls, and whether it takes fall damage. Vanilla gravity is 0.08, or 0.01 with Slow Falling.
Type ID: apoli:modify_falling
Fields
| Field | Type | Default | Description |
|---|---|---|---|
velocity | Float or Expression | optional | The gravity to fall with. When several apoli:modify_falling powers apply, the lowest value wins, and vanilla gravity is one of the candidates, so velocity can only slow a fall down. |
modifier | Attribute Modifier | optional | A single modifier applied to the gravity left after the velocity step. Unlike velocity, a modifier can make a fall faster. |
modifiers | Array of Attribute Modifier | optional | Several modifiers, applied in operation order. |
take_fall_damage | Boolean | true | Whether the entity takes fall damage. |
velocity runs first and lowers the gravity. The modifiers from every power that applies are then gathered and applied to the result, so a power with only modifiers scales vanilla gravity directly. A power with neither field still applies take_fall_damage.
take_fall_damage: false cancels the damage on the landing tick and nowhere else. The fall distance keeps counting all the way down, so apoli:fall_distance, the fall_distance expression variable and apoli:action_on_land all still see a real fall.
Examples
{
"type": "apoli:modify_falling",
"modifier": {
"operation": "multiply_base_multiplicative",
"value": 1.0
},
"take_fall_damage": false,
"condition": {
"type": "apoli:sneaking"
}
}While sneaking, the player falls twice as fast and takes no fall damage.
Gravity as a fraction of vanilla, which velocity alone can't express:
{
"type": "apoli:modify_falling",
"modifier": {
"operation": "multiply_base_multiplicative",
"value": -0.5
}
}An expression reads the entity's own state, so the fall gets gentler as the resource fills up:
{
"type": "apoli:modify_falling",
"velocity": "0.08 * (1 - resource('mypack:glide_charge') / 20)",
"take_fall_damage": false
}