MV Vary frame rates for each of the three images read on a motion spritesheet

Hello!

I used a script to slow down the frame rate of sideview Battler motions as follows:

(function() {
Sprite_Actor.prototype.motionSpeed = function() {
return 18;
};
})();

Would there be a way to alter how much time is spent on each of the three frames?

I'd like it to be something like 18/24/18 to make animations more expressive, using the middle frame to build anticipation.

Thank you!
while it require a number, you might be add something like an array
if it's the same.

but if it's more dynamic, than it require a different approach, specially
for actor, depending on the skill, attack etc, depends what kind of mechanic
you want for those frames.

so we need a little bit more info if all attacks are the same or different
per skill/magic attack/physical attack so we know how to change it.
You could do something like this:
Code:
Sprite_Actor.prototype.updateMotionCount = function() {
    if (this._motion)
    {
      if (this._pattern == 1 && ++this._motionCount >= Math.ceil(this.motionSpeed() * 1.3) ||
          this._pattern != 1 && this._motionCount >= this.motionSpeed()) {
        if (this._motion.loop) {
            this._pattern = (this._pattern + 1) % 4;
        } else if (this._pattern < 2) {
            this._pattern++;
        } else {
            this.refreshMotion();
        }
        this._motionCount = 0;
    }
  }
};

That should make it so the second frame of the motion requires one and a third as much time (18 increases to 24).
You could do something like this:
Code:
Sprite_Actor.prototype.updateMotionCount = function() {
    if (this._motion)
    {
      if (this._pattern == 1 && ++this._motionCount >= Math.ceil(this.motionSpeed() * 1.3) ||
          this._pattern != 1 && this._motionCount >= this.motionSpeed()) {
        if (this._motion.loop) {
            this._pattern = (this._pattern + 1) % 4;
        } else if (this._pattern < 2) {
            this._pattern++;
        } else {
            this.refreshMotion();
        }
        this._motionCount = 0;
    }
  }
};

That should make it so the second frame of the motion requires one and a third as much time (18 increases to 24).
Thank you so much!

Right now it stops the motions for me, I'm trying to figure out if I have any conflicting plugins

I haven't been able to get it to work as my js experience isn't great

The animations still freeze when I have the script turned on
does it also freeze if this is the only plugin running?
does it also freeze if this is the only plugin running?
It still doesn't work unfortunately
You could do something like this:
Code:
Sprite_Actor.prototype.updateMotionCount = function() {
    if (this._motion)
    {
      if (this._pattern == 1 && ++this._motionCount >= Math.ceil(this.motionSpeed() * 1.3) ||
          this._pattern != 1 && this._motionCount >= this.motionSpeed()) {
        if (this._motion.loop) {
            this._pattern = (this._pattern + 1) % 4;
        } else if (this._pattern < 2) {
            this._pattern++;
        } else {
            this.refreshMotion();
        }
        this._motionCount = 0;
    }
  }
};

That should make it so the second frame of the motion requires one and a third as much time (18 increases to 24).

Sorry to bug you Turan! I couldn't get this to work unfortunately. The animations on SV actors stalled when using the script; I tried with a fresh new project as well as the one I'm working on.

Original thread: https://forums.rpgmakerweb.com/threads/vary-frame-rates-for-each-of-the-three-images-read-on-a-motion-spritesheet.173559/