Just as a reminder (or new information, if you didn't know) - you should never alter the core script files. Always copy your changes into a plugin file.
You can't change the editor. Even if you add more motions to the table, it won't show up there.
Yanfly's Visual State Effects allows you to choose any (existing) motion for the battler when they're affected by a state. You can also play a looping animation on them.
I can't use that plugin due to short money, so I was looking for alternative one
It seems that this is working, but somehow it's immediately gone after effects applied
So I use requestMotion('frozen') with this notetag applied in actors
Spoiler: Battler Notetag
<Sideview Battler Motion>
Name: Frozen
Index: 11
Loop
Frames: 1
Speed: 6
</Sideview Battler Motion>
I'm still looking forward about this about how to applied the motion permanently until the action ends
@ATT_Turan
I might able to add frozen state in here. But idk it's okay to make change on someone plugin (I assume not)
If I create another plugin for me, should it be like this? Or use Sprite_Actor.prototype?
Ok I just came back to my problem again since I was busy. It's working properly now
My work is using this tag (From plugin YED Sideview Battler), adding Frozen state
And also state that get Frozen
And then using Custom plugin made by me
JavaScript:
/*:
* Frozen State
*
* @plugindesc v1.0.0 This plugin allows user to use frozen state.
* @author Vyndicate
*
*
* @help
* There is no Plugin Command for this plugin.
*
* ============================================================================
* Add Frozen state motion
*
* ============================================================================
*/
(function () {
Game_Battler.prototype.frozenMotion = function () {
return 'frozen';
};
Game_Battler.prototype.isFrozen = function() {
return this.states().some(o => o.id == 12);
};
var _Frozen_State = Sprite_Actor.prototype.refreshMotion
Sprite_Actor.prototype.refreshMotion = function () {
var actor = this._actor;
if (!actor) return;
var motionGuard = Sprite_Actor.MOTIONS['guard'];
if (this._motion === motionGuard && !BattleManager.isInputting()) return;
var stateMotion = actor.stateMotionIndex();
if (actor.isFrozen()) {
this.startMotion(actor.frozenMotion());
} else if (actor.isInputting() || actor.isActing()) {
this.startMotion(actor.idleMotion());
} else if (stateMotion === 3) {
this.startMotion(actor.deadMotion());
} else if (stateMotion === 2) {
this.startMotion(actor.sleepMotion());
} else if (actor.isChanting()) {
this.startMotion(actor.chantMotion());
} else if (actor.isGuard() || actor.isGuardWaiting()) {
this.startMotion(actor.guardMotion());
} else if (stateMotion === 1) {
this.startMotion(actor.abnormalMotion());
} else if (actor.isDying()) {
this.startMotion(actor.dyingMotion());
} else if (actor.isUndecided()) {
this.startMotion(actor.idleMotion());
} else {
this.startMotion(actor.waitMotion());
}
}
}());
And since I use YEP BattleCoreEnginge, I copy the whole inside refreshMotion state and add isFrozen clause
The result is something like this
▶ Imgur image
It might be not perfect but it's a good start and I'll fix the rest
Thanks for advice
@ATT_Turan, I'll close this since no further question for me