[MV] Extra Movement Frames 1.0.3

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Extra Movement Frames
Version: 1.0.3
Author: modern algebra
Date: 10 November 2015

Version History


  • <Version 1.0.3> 2015-11-10 - Adopted a convention to enhance compatibility measures
  • <Version 1.0.2> 2015-11-07 - Fixed some errors and adjusted the way that default patterns work
  • <Version 1.0.1> 2015-11-01 - Minor adjustment to the code
  • <Version 1.0.0> 2015-11-01 - Original Release

Description


Set sprites with more than 3 frames of animation and customize their idle frame, the pattern by which they animate, and the amount of time it takes to cycle through an animation.

Features

  • Can create sprites with any number of custom frames
  • Can specify the amount of time for an animation cycle to complete
  • Can define the idle frame and the animation pattern
  • Can exclude the idle frame from the animation pattern
  • Can setup default patterns for sprites with a particular number of frames, thus letting you not specify the pattern in every filename using the same template

Instructions

Save the .js file in your plugins folder and import it through the Plugin Manager.

Please see the help pop-up in the plugin manager for instructions on how to use the plugin.

Plugin


You can download the .js file from Pastebin: http://pastebin.com/0UdSSDLF

Code: [Select]
//=============================================================================
//  ExtraMovementFrames.js
//=============================================================================
//  Version: 1.0.3
//  Date: 10 November 2015
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/*:
 * @author Modern Algebra (rmrk.net)
 * @plugindesc Set sprites with more than 3 frames of animation
 *
 * @param Cycle Time
 * @desc The normal number of frames to complete animation cycle for custom sprites
 * @default 60
 *
 * @param Default Idle Frame
 * @desc The idle frame for custom sprites unless changed in the filename
 * @default 0
 *
 * @param Default Pattern
 * @desc Set patterns for custom sprites unless changed in the filename.
 * @default []
 *
 * @help INSTRUCTIONS:
 *
 * To create sprites that have more than 3 frames of animation, you need
 * to rename the character graphic to something of the form:
 *
 *      RegularName%(x)
 *          x : the number of frames in each character sprite
 *
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * EXAMPLES:
 *
 *     $001-Fighter01%(4)
 *         // This graphic is a single character with four frames of animation.
 *
 *     022-Actors12%(6)
 *         // This graphic would be interpreted as a character sheet of 8
 *         // characters each having six frames of animation.
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *
 * Additionally, this script also allows you to specify the "idle" frame (the
 * frame where the sprite is not moving), and also the pattern if you wish to so
 * specify. In essence, all you need to do is add those integers after the
 * number of frames:
 *
 *     Regular_Name%(x y z1 z2 ... zn)
 *         x : the number of frames in each character sprite
 *         y : the idle frame (the frame shown when sprite is not moving)
 *         z1 ... zn : the pattern.
 *
 * If you choose to specify a pattern, then the idle frame is not automatically
 * included in the pattern and should be repeated if you want it to appear
 *
 * When naming your files, be aware that the first frame in a sprite is index 0,
 * the second frame is index 1, etc.
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * EXAMPLES:
 *
 *     $003-Fighter03%(4 2)
 *         // This graphic is a single character with four frames of animation.
 *         // The idle frame is 2 (the third one over). The pattern when moving
 *         // would be 2 3 0 1, 2 3 0 1, etc. (unless default patterns set -
 *         // see below)
 *
 *     032-People05%(4 0 1 0 3 2)
 *         // This graphic would be interpreted as a character sheet of 8
 *         // characters, each having four frames of animation. The idle frame is
 *         // 0 (the first in the sheet), and the pattern is 1 0 3 2,
 *         // 1 0 3 2, etc.
 *
 *     $003-Fighter03%(6 0 1 2 3 4 5)
 *         // This graphic is a single character with six frames of animation.
 *         // The idle frame is 0 (the first frame). The pattern when moving
 *         // is 1 2 3 4 5, 1 2 3 4 5, etc.
 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * PLUGIN SETTINGS:
 *
 *     Cycle Time = 60
 *
 * Cycle Time is the number of frames it will take to complete a full
 * animation cycle for custom sprites at normal speed. It must be set to an
 * integer.
 *
 *
 *     Default Idle Frame = 0
 *
 * If you do not specify an idle frame for custom sprites in the file name, then it
 * will be this frame. You must set this to an integer.
 *
 *     Default Pattern = []
 *
 * If you do not specify a pattern, then what happens depends on what you write
 * in the plugin setting for "Default Pattern". For this setting, you have the
 * option of writing in arrays of numbers in the following format:
 *
 *     [x y z1 z2 ... zn]
 *         x : number of frames in the sprites for which this pattern is default
 *         y : idle frame
 *         z1 z2 ... zn : the pattern
 *
 * If you have setup one of those arrays for the number of frames which this
 * custom sprite has, then it will use that pattern and idle frame.
 *
 * If you have not set up a default pattern for this number of frames, then the
 * animation will simply cycle through the number of frames, starting with the
 * idle frame and moving right. The idle frame will be included in the animation.
 *
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * EXAMPLES
 *
 *     Default Pattern = [5 1 2 3 4 3 2]
 *         // Whenever you set up a custom sprite that has 5 frames of animation
 *         // but do not specify a pattern, the idle frame will be 1 and the
 *         // pattern will be 2 3 4 3 2, 2 3 4 3 2, etc.
 *
 *     Default Pattern = [5 1 2 3 4 3 2], [6 0 1 2 5 4 3 0]
 *         // Whenever you set up a custom sprite that has 5 frames of animation
 *         // but do not specify a pattern, the idle frame will be 1 and the
 *         // pattern will be 2 3 4 3 2, 2 3 4 3 2, etc.
 *         // Whenever you set up a custom sprite that has 6 frames of animation
 *         // but do not specify a pattern, the idle frame will be 0 and the
 *         // pattern will be 1 2 5 4 3 0, 1 2 5 4 3 0, etc.
 */
//=============================================================================

var Imported = Imported || {};
Imported.MA_ExtraMovementFrames = true;

var ModernAlgebra = ModernAlgebra || {};
ModernAlgebra.EMF = {};

(function() {

// Get Script Name, in case user unexpectedly altered it
var path = document.currentScript.src;
var scriptName = path.substring(path.lastIndexOf('/')+1).match(/^(.+?)(\.[^.]*$|$)/)[1];

// Set Parameters
  ModernAlgebra.EMF.parameters = PluginManager.parameters(scriptName);
ModernAlgebra.EMF.cycleTime = (+ModernAlgebra.EMF.parameters['Cycle Time']) || 60; // Default = 60
ModernAlgebra.EMF.idleFrame = (+ModernAlgebra.EMF.parameters['Default Idle Frame']) || 0; // Default = 0
ModernAlgebra.EMF.defaultPattern = [];

var emfPattMatch = ModernAlgebra.EMF.parameters['Default Pattern'].match(/\[.+?\]/g); // Default []
if (emfPattMatch) {
// Get all arrays of numbers
for (var i = 0; i < emfPattMatch.length; i++) {
digitMatch = emfPattMatch[i].match(/\d+/g);
if (digitMatch) { ModernAlgebra.EMF.defaultPattern.push(digitMatch.map(Number)); }
}
}

//=========================================================================
// ImageManager
//=========================================================================
// isEmfCharacter - Checks if filename is a customly animated sprite
ImageManager.isEmfCharacter = function(filename) {
return !!filename.match(/\%[\(\[][\d\s]+[\)\]]/); // check filename for %() or %[]
};

//=========================================================================
// Game_CharacterBase
//=========================================================================
// initMembers
ModernAlgebra.EMF.GameCharacterBase_initMembers =
Game_CharacterBase.prototype.initMembers;
Game_CharacterBase.prototype.initMembers = function() {
this.maClearEmfCharacterState();
ModernAlgebra.EMF.GameCharacterBase_initMembers.apply(this, arguments); // original method
};

// maClearEmfCharacterState
Game_CharacterBase.prototype.maClearEmfCharacterState = function() {
this._isEmfCharacter = false;
this._emfCharacterState = { frameNum: 3, idleFrame: ModernAlgebra.EMF.idleFrame, pattern: [2, 1, 0, 1] };
};

// isEmfCharacter - Check whether a customly animated sprites
Game_CharacterBase.prototype.isEmfCharacter = function() {
return this._isEmfCharacter;
};

// emfCharacterState - makes this._emfCharacterState public
Game_CharacterBase.prototype.emfCharacterState = function() {
return this._emfCharacterState;
};

// setImage - adjusts to call EMF setup method
ModernAlgebra.EMF.GameCharacterBase_setImage =
Game_CharacterBase.prototype.setImage;
Game_CharacterBase.prototype.setImage = function() {
ModernAlgebra.EMF.GameCharacterBase_setImage.apply(this, arguments); // original method
this.maemfSetupEmfCharacter();
this.resetPattern();
};

// maSetupEmfCharacter - setup custom animation sprite
Game_CharacterBase.prototype.maemfSetupEmfCharacter = function() {
this.maClearEmfCharacterState();
var charName = this.characterName();
if (ImageManager.isEmfCharacter(charName)) {
var sign = charName.match(/(?:\%[\(\[])[\d\s]+(?:[\)\]])/);
var signArgs = sign[0].match(/\d+/g); // array of digit strings
if (signArgs) {
this._isEmfCharacter = true;
// Map arguments in file name to an array of numbers
signArgs = signArgs.map(Number);
signArgsLength = signArgs.length;
this.emfCharacterState().frameNum = signArgs.shift();
this.emfCharacterState().idleFrame = (signArgsLength > 1) ? signArgs.shift() : ModernAlgebra.EMF.idleFrame;
if (signArgsLength > 2) {
this.emfCharacterState().pattern = signArgs;
} else {
var success = false;
// Check for a default match for this number of frames
for (var i = 0; i < ModernAlgebra.EMF.defaultPattern.length; i++) {
if (ModernAlgebra.EMF.defaultPattern[i][0] === this.emfCharacterState().frameNum) {
this.emfCharacterState().idleFrame = ModernAlgebra.EMF.defaultPattern[i][1];
this.emfCharacterState().pattern = ModernAlgebra.EMF.defaultPattern[i].slice(2, (ModernAlgebra.EMF.defaultPattern[i].length));
success = true;
break;
}
}
// If still no pattern specified
if (!success) {
// Populate pattern with a simple cycle starting after idle
this.emfCharacterState().pattern = [];
var idleFramePlus = this.emfCharacterState().idleFrame + 1;
for (var i = 0; i < this.emfCharacterState().frameNum; i++) {
this.emfCharacterState().pattern.push((i + idleFramePlus) % this.emfCharacterState().frameNum);
}
}
}
}
}
};

// animationWait
ModernAlgebra.EMF.GameCharacterBase_animationWait =
Game_CharacterBase.prototype.animationWait;
Game_CharacterBase.prototype.animationWait = function() {
// If EMF Character
if (this.isEmfCharacter()) {
var realSpeed = this.realMoveSpeed();
var frameNum = this.maxPattern();
return Math.floor((8 - realSpeed)*(ModernAlgebra.EMF.cycleTime / (4*frameNum))); // CycleTime divided by number of frames in animation
} else {
// Run Default Method - approx. 60 frames at normal speed
return ModernAlgebra.EMF.GameCharacterBase_animationWait.apply(this, arguments) // original method
}
};

// maxPattern
ModernAlgebra.EMF.GameCharacterBase_maxPattern =
Game_CharacterBase.prototype.maxPattern;
Game_CharacterBase.prototype.maxPattern = function() {
if (this.isEmfCharacter()) {
return this.emfCharacterState().pattern.length; // Length of pattern array
} else {
return ModernAlgebra.EMF.GameCharacterBase_maxPattern.apply(this, arguments); // original method
}
};

// pattern
ModernAlgebra.EMF.GameCharacterBase_pattern =
Game_CharacterBase.prototype.pattern;
Game_CharacterBase.prototype.pattern = function() {
if (this.isEmfCharacter()) {
if (this._pattern < 0) {
return this.emfCharacterState().idleFrame; // Idle Frame if _pattern < 0
} else {
var patternIndex = (this._pattern % this.emfCharacterState().pattern.length);
return this.emfCharacterState().pattern[patternIndex]; // index of pattern array
}
} else {
return ModernAlgebra.EMF.GameCharacterBase_pattern.apply(this, arguments); // original method
}
};

// isOriginalPattern - Original pattern is -1 for custom sprites
ModernAlgebra.EMF.GameCharacterBase_isOriginalpattern =
Game_CharacterBase.prototype.isOriginalPattern;
Game_CharacterBase.prototype.isOriginalPattern = function() {
if (this.isEmfCharacter()) {
return this.pattern() === -1;
} else {
return ModernAlgebra.EMF.GameCharacterBase_isOriginalpattern.apply(this, arguments); // original method
}
};

// straighten - Straighten to original pattern
ModernAlgebra.EMF.GameCharacterBase_straighten =
Game_CharacterBase.prototype.straighten;
Game_CharacterBase.prototype.straighten = function() {
if (this.isEmfCharacter()) {
if (this.hasWalkAnime() || this.hasStepAnime()) {
this._pattern = -1;
}
this._animationCount = 0;
} else {
ModernAlgebra.EMF.GameCharacterBase_straighten.apply(this, arguments)
}
};

// resetPattern - Idle is -1 for custom sprites
ModernAlgebra.EMF.GameCharacterBase_resetPattern =
Game_CharacterBase.prototype.resetPattern;
Game_CharacterBase.prototype.resetPattern = function() {
if (this.isEmfCharacter()) {
this.setPattern(-1);
} else {
ModernAlgebra.EMF.GameCharacterBase_resetPattern.apply(this, arguments); // original method
}
};

//=========================================================================
// Game_Event
//=========================================================================
// setupPageSettings - adjust original pattern
ModernAlgebra.EMF.GameEvent_setupPageSettings =
Game_Event.prototype.setupPageSettings;
Game_Event.prototype.setupPageSettings = function() {
ModernAlgebra.EMF.GameEvent_setupPageSettings.apply(this, arguments);
// Original pattern is always idle for custom sprites
if (this.isEmfCharacter()) { this._originalPattern = -1; }
this.resetPattern();
};

//=========================================================================
// Sprite_Character
//=========================================================================
// patternWidth - afjust based on number of frames
ModernAlgebra.EMF.SpriteCharacter_patternWidth =
Sprite_Character.prototype.patternWidth;
Sprite_Character.prototype.patternWidth = function() {
var pw = ModernAlgebra.EMF.SpriteCharacter_patternWidth.apply(this, arguments)
if (this._character.isEmfCharacter()) {
var frameNum = this._character.emfCharacterState().frameNum;
return ((pw*3) / frameNum);
} else {
return pw;
}
};

})();

Credit


  • modern algebra

Thanks


  • Acolyte, for suggesting improvements to the old VXA script
  • kadena1984, for suggesting improvements to the old VXA script

Support


Post in this thread if you have any comments or questions. It is perfectly fine to post here even if this topic has not been posted in for a very long time.

Please do not message me privately, as any concerns you have are likely shared by others and they will benefit from our correspondence being public. Additionally, I am often absent, and posting publicly will allow other members to assist you when I am unable to do so quickly.

Known Compatibility Issues

Spoiler for Yanfly Core Engine 1.0.5:
Some people reported an error with Yanfly's Core Engine where the sprites would sometimes reset patterns sporadically. The issue was fixed when Yanfly updated that plugin to version 1.0.6. Please update your version of that script at http://yanfly.moe/2015/10/09/yep-1-core-engine/

Terms of Use


You are welcome to use this script in any project of yours, whether it is commercial or non-commercial. There is no need to credit me, and please feel free to modify the plugin in whatever ways suit your project.

Basically, my plugin is your plugin, but please do not re-post this plugin or any modified version of it on another forum or website without checking with me first.
« Last Edit: November 11, 2015, 01:40:21 AM by modern algebra »

*
The Hero of Rhyme
Rep:
Level 82
( ͡° ͜ʖ ͡°)
2014 Best RPG Maker User - StoryProject of the Year 20142014 Queen of RMRK2011 Best Newbie2014 Best RPG Maker User - Creativity2014 Kindest Member2013 Queen of RMRKBronze SS AuthorBronze Writing ReviewerSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.GOOD!For frequently finding and reporting spam and spam bots2012 Best Yuyubabe Smiley2012 Best RPG Maker User (Creativity);o
Beautiful! ;~; It's wonderful to see some of your stuff coming to MV! ^_^
Spoiler for My Games and Art:
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]


*
i am satin die lol
Rep:
Level 96
welcom to hel
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
You are the light in the darkness.

**
Rep: +0/-0Level 34
RMRK Junior
This was a good weekend :D!

Thanks!

やれやれだぜ。

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Zero to Hero2014 Best IRC Quote2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
He said he would do it and he did it! Amazing!

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Hey, why do you sound so surprised? :P

I updated the plugin to version 1.0.1 to fix an issue with the code.

*
A-pow 2015
Rep:
Level 80
2014 Best RPG Maker User - GraphicsFor frequently finding and reporting spam and spam bots2013 Most Unsung MemberSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.a^2 + b^2 = c^2How can I help you? :DSecret Santa 2012 ParticipantSilver - GIAW 10Silver - GIAW 9Bronze - GIAW HalloweenGold - Game In A Week VII
Who da best? You da best.
Thanks

**
Rep: +0/-0Level 23
RMRK Junior
Great plugin MA :) Thanks for your hard work, this plugin is essential for my project!

A little something that might interest you though...

It seems there's a little conflict with Yanfly's Core Engine (v. 1.05). I'm using a 9 frames sprite sheet with 0 as an idle stance and when I'm using your plugin with Yanfly's, it seems to influence the way frames are read. It's hard to explain what is happening, as the effects look a bit random... Sometimes, the character will behave normally and go through his walking cycle normally, but sometimes (after turning in another direction), the game will not show the frames as it's supposed to. Sometimes, it'll look like it only show 3 frames of animation per cycle, sometimes 7, etc... It seems pretty random.

Your plugin works great alone, and I've tested it with several other plugins, and only Yanfly's Core Engine seems to conflict with it. I don't know if you're interested in compatibility issues or not, but considering Yanfly's Core Engine is a pretty major plugin, I thought you might be interested.

Thanks! :)

Edit: I did some other tests... The results I posted above were with a basic character speed of 5 (no dashing). I just tested it out with a basic speed of 4 (the default one), and it seems to work fine... I'll test it with other base speeds.
« Last Edit: November 06, 2015, 04:32:43 AM by MaxLionheart »

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Thanks. I'll take a look this weekend and see if I can figure out what's going on.

**
Rep: +0/-0Level 23
RMRK Junior
Glad to be of assistance!

I just tested it out with other speeds, and it seems to work fine with speeds 2, 4 and 6, but it seems sometimes broken with a speed of 3, and almost always with a speed of 5. I wasn't able to tell anything with a speed of 1, since the animation goes way too fast to tell.

By the way, I just recalled... Shaz made a plugin allowing more frames per walking cycle. Her plugin worked well with the basic version of Yanfly's Core Engine, but once it got updated, it changed something that conflicted with Shaz's plugin. I remember testing it out, finding that it was working well with a speed of 4, but not with a speed of 5. I don't know if this helps you or not, but I thought you might like to know.

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
I couldn't repeat the error that you mentioned, but I did notice a few errors in the code while I was playing around with it so I have updated this script to version 1.0.2. There was an issue with my resetPattern function, so it is possible that was what was causing the glitches you noticed.

The only major change from the user's perspective was that I changed the way that default patterns work. Before, it just included the active pattern, so a person would still have to include both the number of frames and the idle frame in the filename. Now, it works so that you set up the default pattern just like you would name a filename (i.e. #frames, idleFrame, pattern). You just need to include the number of frames in the filename, and the idle frame will be selected from the default pattern associated with that number of frames.

**
Rep: +0/-0Level 23
RMRK Junior
Thank you for checking this out.

I've been testing out again and here are my results with the update on your plugin. I've tested with Yanfly's Core Engine 1.05, with a sprite sheet of 9 frames (1 idle frame and 8 frames in a walking cycle of 1-2-3-4-5-6-7-8), and no dashing (except to test out "speed 7").

With Yanfly's Core Engine set to Off: Everything seems to work perfectly fine!

With Yanfly's Core Engine set to On: It varies depending on the speed of the character...

Speed 1: the animation seems to works correctly, but will sometimes make the character shake, as if it were trembling.
Speed 2 and 3: the animation is often stable but sometimes the walking cycle will be broken (as if it were using less than 8 frames of the animation maybe?). Most of the time, when I have my character stop and change direction, the walking cycle will reset to its correct pattern. At these speeds, the sprite often seems to tremble, like with Speed 1.
Speed 4 and 5: There's no more trembling, but there are still frame issues in the walking cycle here and now (like Speed 2 and 3).
Speed 6: Everything looks good!
Speed 7 (Speed 6 + Dashing): Very hard to say… it looks like the game only reads like 3 frames and then repeat them ultra quickly, it's too quick to say what's happening, but it's definitely wrong.

At any rate, I thank you to have checked this out. I don't know if you want to investigate further or not, but if so, I could make you a video so you could get a better idea.

Edit: I think the error I seldom see with the animation is that the idle frame will sometimes be swapped with another frame, and that the idle frame will end up being within the walking cycle. Then, when the character stops for a moment and begins walking in another direction, the idle frame will be correctly replaced outside the cycle.
« Last Edit: November 07, 2015, 07:28:44 PM by MaxLionheart »

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
I would like to resolve the issue, but I am still having a lot of trouble reproducing the error. Thanks for offering to make a video, but it wouldn't help much unless I could print what was happening on the console.

I've been looking at Yanfly Core, and it is hard to see what could be causing the error apart from a possibility that it might prematurely reset the pattern occasionally by fiddling with the stop count. To help me diagnose the problem, try commenting out the following lines at 1066-1084 of Yanfly Core and see if you still get the error:

Code: [Select]

Game_CharacterBase.prototype.update = function() {
    if (this.isJumping()) {
        this.updateJump();
    } else if (this.isMoving()) {
        this.updateMove();
    }
    if (!this.isMoving()) {
        this.updateStop();
    }
    this.updateAnimation();
};

Yanfly.Core.Game_CharacterBase_updateMove =
  Game_CharacterBase.prototype.updateMove;
Game_CharacterBase.prototype.updateMove = function() {
    Yanfly.Core.Game_CharacterBase_updateMove.call(this);
    if (!this.isMoving()) this.updateStop();
};

In other words, replace it with the following:

Code: [Select]
/*
Game_CharacterBase.prototype.update = function() {
    if (this.isJumping()) {
        this.updateJump();
    } else if (this.isMoving()) {
        this.updateMove();
    }
    if (!this.isMoving()) {
        this.updateStop();
    }
    this.updateAnimation();
};

Yanfly.Core.Game_CharacterBase_updateMove =
  Game_CharacterBase.prototype.updateMove;
Game_CharacterBase.prototype.updateMove = function() {
    Yanfly.Core.Game_CharacterBase_updateMove.call(this);
    if (!this.isMoving()) this.updateStop();
};
*/

If that fixes the error, then I'll at least know where to start.
« Last Edit: November 07, 2015, 08:44:41 PM by modern algebra »

**
Rep: +0/-0Level 23
RMRK Junior
Yup, I think you got this!

I've been running around with all kinds of different settings for like 15 minutes, and I haven't been able to replicate the glitch at any speed. It also corrected the speed 7 issue.

Good find :)

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
I'm glad that the situation has improved.

It's not a great patch though, since it might re-break whatever it was that Yanfly had fixed. However, I've reviewed the code and I don't believe that there will be any problems.

Anyway, it's not a good idea to directly modify another plugin. I've made the compatibility patch a separate plugin: http://pastebin.com/W7yxdrCk. You can reverse the changes to the Core Engine plugin that I instructed you to make and add this compatibility patch to your plugin list instead. You have to put it immediately below Yanfly Core Engine in the plugin list.
« Last Edit: November 08, 2015, 12:45:10 AM by modern algebra »

**
Rep: +0/-0Level 23
RMRK Junior
Thank you for the patch plugin! Really appreciated!

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Yanfly has just updated his Core Engine plugin to version 1.0.6, and there should no longer be an error if you update your version of that plugin. You could therefore delete the patch that I wrote.

**
Rep: +0/-0Level 23
RMRK Junior
Yeah, I just tested it and it seems to work fine now...

Oh well, I apologize for the extra work :(

Thanks again though! :)

*
Rep: +0/-0Level 20
RMRK Junior
I'm grateful for this thanks, was using Galv's diagonal, idle and extra frames plugins for the playable character but couldn't find a plugin for my event frames until this. It works if I put it before the Galv ones.

*
Rep: +0/-0Level 15
RMRK Junior
Hi there MA, absolutely loving this script so far ... is there a script or plugin command where we can manually advance the animation frame by frame instead of always resorting to vertical animations.