Side-view actor health threshold for "damaged" idle sprite?

This feels like a pretty basic question, but I can't find the answer anywhere and don't really know what to search to find an answer.

What is the health threshold for an actor in side-view mode to switch from their normal idle sprite to their "damaged" idle sprite (defaults to kneeling with a pained expression)?

Also, can this threshold be changed in any way, or is it baked into the engine?
According to the diagram of the sprite sheet that you can find in the help file under Asset Standards, that motion is called Near Death.

In the code, it's referred to as "dying" and it's referenced by this function:
Code:
Game_BattlerBase.prototype.isDying = function() {
    return this.isAlive() && this._hp < this.mhp / 4;
};

So the default is max HP divided by 4, or 25% health. You can change that equation to be anything you like, save the function in a text editor as a .js file in your plugins folder, and load it as a plugin.
According to the diagram of the sprite sheet that you can find in the help file under Asset Standards, that motion is called Near Death.

In the code, it's referred to as "dying" and it's referenced by this function:
Code:
Game_BattlerBase.prototype.isDying = function() {
    return this.isAlive() && this._hp < this.mhp / 4;
};

So the default is max HP divided by 4, or 25% health. You can change that equation to be anything you like, save the function in a text editor as a .js file in your plugins folder, and load it as a plugin.

Thank you very much, this will be helpful!

Original thread: https://forums.rpgmakerweb.com/threads/side-view-actor-health-threshold-for-damaged-idle-sprite.146152/