Not easily, as far as I know. Battlers and sprites are separate objects, and by default the reference is one-way: the sprite retrieves information from the battler and updates itself accordingly every frame. Yanfly's
Battle Engine Core registers a reverse lookup table to make this easier (confusingly, you can retrieve the sprite via the
battler function); if you're using that, I believe this would be the general form of the necessary script call:
Code:
battler.battler().scale.x = scale;
You'd also need an appropriate trigger to add/remove the scaling, e.g. from Yanfly's
Buffs & States Core...
Spoiler: Suggested state notetags
Code:
<Custom Apply Effect>
user.battler().scale.x = 1.2;
user.battler().scale.y = 1.2;
</Custom Apply Effect>
<Custom Remove Effect>
user.battler().scale.x = 1;
user.battler().scale.y = 1;
</Custom Remove Effect>
I haven't tested this approach, but hopefully it'll work.
🙏
Alternatively I wrote a small standalone plugin:
Spoiler: Full code
Code:
/*:
* @plugindesc Scale battlers to fixed values via notetags.
* @author Caethyril
* @help Actor/Class/Weapon/Armor/State/Enemy notetag:
* <Battler Scale: x>
* - replace x with a number: 1 = 100%, 2.5 = 250%, etc
* - multiple tags will combine multiplicatively
*
* Known issues: possible performance impact (recalculates every frame).
*
* Terms of use:
* Free to use and modify.
*/
(function() {
'use strict';
const TAGNAME = 'Battler Scale';
Sprite_Battler.prototype.updateScale = function() {
if (!this._battler) return;
let scale = this._battler.traitObjects().reduce(function(a, c) {
let s = Number(c.meta[TAGNAME]);
return isNaN(s) ? a : a *= s;
}, 1);
this.scale.x = scale;
this.scale.y = scale;
};
(function(alias) {
Sprite_Battler.prototype.update = function() {
alias.call(this);
this.updateScale();
};
})(Sprite_Battler.prototype.update);
})();