More Character Frames

● ARCHIVED · READ-ONLY
Started by Shaz 20 posts View original ↗
  1. More Character Frames

    2015.10.21

    by Shaz

    Introduction

    This plugin allows you to have more than 3 character frames on your on-map sprite.

    How to use

    Add to your plugins folder.  There are no parameters to set or plugin commands to call.

    Add [D L R U] to your character sheet name (with a $ prefix) to specify how many frames in each direction, where D, L, R, U are replaced by the number of frames for the down, left, right and up rows respectively.

    Character sheets with this added to the filename will loop from left to right repeatedly, rather than use the back-and-forth default pattern.

    The first frame should be the idle/still pose.

    eg: $Ralph [8 8 8 8].png is a character sheet consisting of 4 rows with 8 frames per row.  Animation will loop from frame 1 to 8, then start at 1 again.

    Plugin

    Download from pastebin

    Credit

    - Shaz

    Terms

    - free for use in commercial games
  2. Ooooohhhh. Niiice.

    I'd say that the only thing this plugin thread needs though, is a visual representation of what one of these new sprite-sheets would look like.
  3. Thanks! It look nice!
  4. Thanks for this!

    Any chance that you could do a similar plugin but for SV battler sprites instead? :D
  5. Shaz said:
    eg: $Ralph [8 8 8 8].png is a character sheet consisting of 4 rows with 8 frames per row.  Animation will loop from frame 1 to 8, then start at 1 again.
    I can't give you a visual representation because it's not my spritesheet.  If you asked nicely, Archeia may be able to.  Now that you've made me think about it, I think there may be a bug if you have spritesheets that don't have the same number of frames in each row.

    It is simply a spritesheet whose name starts with $, with 4 rows, and however many columns you need.
  6. First of all,This is awesome script! really put MV into more depth for creator
    Thank a lot Shaz for making it.

    Next sorry about my English I'm not Native speaker.

    I found one problem with my animation sprite.

    I create file name $walkTest [6 6 6 6] and put it in character folder, everything seem to work fine!

    but I notice something that my animation doesn't run smoothly.

    So I put number in each animated frame.

    And I found it run like this 1>2>3>4>5>6>1>2>1>2>3>4>5>6

    After complete first loop, on 2nd frame it go back to 1st frame before it continue to 3rd frame.

    I really don't know what I did wrong, It would be so kind If you could look into it.

    Thank you in advance.
  7. Thank you - I will take a look at it.

    Any chance I could get you to send me the image you're using?
  8. Thank for reply Shaz!

    The image I use for testing purpose  is extract from a commercial game.

    I don't know is it appropriate to share it or not.

    So I sent you a link in private.

    PS: It's kinda big sprite. 'Coz I want to make a game that has different look and feel from RPGMAKER style.
     
  9. Thanks for making this plugin Shaz!

    But I've got a little question for you:

    A few of us are looking for a plugin that would allow us to have an idle animation different from the walking animation. Do you think it would be better to make this a separate plugin or to add this functionality to this one? (sorry, my knowledge with plugins is very limited)

    Thanks again :)
  10. That would be better as a separate plugin.
  11. Ok thanks!
  12. I also agree with Torqus. My idle standing frame is not part of the walk cycle animation like the RTP. Thank you for your consideration.
  13. Just an idea, it may work or not I havent had a chance to look into it, but wouldn't it be possible to have a common event check for movement and change the actor sprite accordingly? Then you could use the actor stepping animation plugin to give your character an idling animation of however many frames as well. Like I said, just an idea, it might not even work but if it does it would be a work around and not put so much on the gracious plugin makers who are already workung so hard to meet our ever growing demands.

    I wish I could test this theory myself but sadly my need for money keeps me away from fun.
  14. Thank you shaz this is really useful, i have two problems.

    1) I have 6 frames animation for each directions, it works but the animations it's slow how can i make it faster?

    2) When i DASH the animation dont work 1 to 6 but is something like 123123

    How can i fix it?

    Best.
  15. MaxLionheart said:
    Yeah, I agree with you Torqus. There's another thread talking of that matter:

    http://forums.rpgmakerweb.com/index.php?/topic/46445-dashing-anime-different-from-walking/



    I guess both matters could be merged into one plugin, I don't know...
    MikeMakes said:
    I also agree with Torqus. My idle standing frame is not part of the walk cycle animation like the RTP. Thank you for your consideration.
    I'm with you guys, my idle animation is frame #1 and after the 7 other frames have finished it returns to frame #1 and slides my character along in an idle pose :(

    I'm keeping my eyes peeled and fingers crossed for an update for this one.

    Thanks in advance.
  16. Okay, folks, for those who were saying the animation plays too slow, or the frames weren't showing in the right order, I've done some work and I THINK it's better, but I'd really like it if YOU could try it out and let me know how it looks?

    There was an error when you stopped, it would come to rest on the second frame rather than the idle pose.

    Please replace the contents of your MoreCharacterFrames.js with the following text - I don't want to update the pastebin until I get some positive feedback.

    Spoiler
    Code:
    //=============================================================================// More Character Frames// by Shaz// Last Updated: 2015.09.21//============================================================================= /*: * @plugindesc Allows more than 3 Frames * @author Shaz * * @help This plugin does not provide plugin commands. * * Add [D L R U] to your character sheet name (with $ prefix) to specify how * many frames in each direction (Down, Left, Right, Up). * Spritesheets with this added to the file name will use a looping frame * animation rather than the back-and-forth default animation. * * The first frame should be the idle/still pose. * * eg. $Ralph [8 8 8 8].png *     is a character sheet consisting of 4 rows with 8 frames per row. *     Animation will go from frame 1 to 8 then start at 1 again. */ (function() {   ImageManager.isMultiFrameCharacter = function(filename) {    var frames = filename.match(/\[(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\]/);    return frames && frames.length === 5;  };   ImageManager.getCharacterFrameCount = function(filename) {    var frames = filename.match(/\[(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\]/);    if (!frames) {      return [3, 3, 3, 3];    } else {      return frames.splice(1, 4);    }  };   var _Game_CharacterBase_initMembers = Game_CharacterBase.prototype.initMembers;  Game_CharacterBase.initMembers = function() {    _Game_CharacterBase_initMembers.call(this);    this._isMultiFrame = false;    this._frames = [3, 3, 3, 3];  };   var _Game_CharacterBase_straighten = Game_CharacterBase.prototype.straighten;  Game_CharacterBase.prototype.straighten = function() {    _Game_CharacterBase_straighten.call(this);      if (this._isMultiFrame && (this.hasWalkAnime() || this.hasStepAnime())) {          this._pattern = 0;      }  };   var _Game_CharacterBase_animationWait = Game_CharacterBase.prototype.animationWait;  Game_CharacterBase.prototype.animationWait = function() {    if (!this._isMultiFrame) {      return _Game_CharacterBase_animationWait.call(this);    } else {      return (9 - this.realMoveSpeed()) * Math.ceil(9 / this.maxPattern());    }  };   var _Game_CharacterBase_maxPattern = Game_CharacterBase.prototype.maxPattern;  Game_CharacterBase.prototype.maxPattern = function() {    if (!this._isMultiFrame) {      return _Game_CharacterBase_maxPattern.call(this);    } else {      return this._frames[(this._direction / 2) - 1];    }  };   var _Game_CharacterBase_pattern = Game_CharacterBase.prototype.pattern;  Game_CharacterBase.prototype.pattern = function() {    if (!this._isMultiFrame) {      return _Game_CharacterBase_pattern.call(this);    } else {      return this._pattern < this._frames[this._direction / 2 - 1] ? this._pattern : 0;    }  };   var _Game_CharacterBase_isOriginalPattern = Game_CharacterBase.prototype.isOriginalPattern;  Game_CharacterBase.prototype.isOriginalPattern = function() {    if (!this._isMultiFrame) {      return _Game_CharacterBase_isOriginalPattern.call(this);    } else {      return this.pattern() === 0;    }  };   var _Game_CharacterBase_resetPattern = Game_CharacterBase.prototype.resetPattern;  Game_CharacterBase.prototype.resetPattern = function() {    if (!this._isMultiFrame) {      _Game_CharacterBase_resetPattern.call(this);    } else {      this.setPattern(0);    }  };   var _Game_CharacterBase_setImage = Game_CharacterBase.prototype.setImage;  Game_CharacterBase.prototype.setImage = function(characterName, characterIndex) {    _Game_CharacterBase_setImage.call(this, characterName, characterIndex);    this._isMultiFrame = ImageManager.isMultiFrameCharacter(characterName);    this._frames = ImageManager.getCharacterFrameCount(characterName);  };   var _Game_CharacterBase_setTileImage = Game_CharacterBase.prototype.setTileImage;  Game_CharacterBase.prototype.setTileImage = function(tileId) {    _Game_CharacterBase_setTileImage.call(this, tileId);    this._isMultiFrame = false;    this._frames = [3, 3, 3, 3];  };   Game_CharacterBase.prototype.isMultiFrame = function() {    return this._isMultiFrame;  };   Game_CharacterBase.prototype.getDirectionFrames = function() {    return this._frames[this._direction / 2 - 1];  };   Game_CharacterBase.prototype.getMaxFrames = function() {    return Math.max.apply(Math, this._frames);  };   var _Game_Event_initMembers = Game_Event.prototype.initMembers;  Game_Event.prototype.initMembers = function() {    _Game_Event_initMembers.call(this);    if (this._isMultiFrame) {      this._originalPattern = 0;    }  };   var _Sprite_Character_patternWidth = Sprite_Character.prototype.patternWidth;  Sprite_Character.prototype.patternWidth = function() {    if (!this._character.isMultiFrame()) {      return _Sprite_Character_patternWidth.call(this);    } else {      return this.bitmap.width / this._character.getMaxFrames();    }  }; })();
  17. Hello Shaz,

    first of all, thanks for working on this script, it's really appreciated :)

    I've tested your updated plugin with a walking cycle of 1 through 8 with the 6 different speeds in the game. Here are my results (note I didn't have the issue with the frame order)

    1- I think the adjustment in the wait before each frame is looking nice. I don't know if it's possible, but I think it would be interesting to make an option where the user could determine the waiting time before showing another frame. For example, we could get really smooth animations with a 16 walking cycle, but we'd need to reduce the time between each frame again. (I really think the ideal wait time is relative to the amount of frames we're using in the walking cycle, I don't know if it's something the plugin is already taking into account or not)

    2- The plugin seems to work fine with speeds 1-2-3-4. The animation looks pretty good.

    3- However, when I set the speed to 5-6, it seems the animation only shows the first 4 frames (I think 4) of  the animation, then cycle back to 1. There's clearly a difference in how the plugin animates my character when you set the speed at 5 or 6. (I haven't tested it with dashing, but I guess it only increases the speed by one, unless I'm mistaken)

    (if you want a test image to work with, just pm me)

    Thanks :)
  18. Okay, I tested at 4 and slower.  It sounds right though - frequency is taken into account when determining how long to wait.  I'll play a bit more.  Thanks for the feedback.
  19. Great Shaz is better, just an hint.

    In an animation, for example a walking cycle, the IDLE pose dont'work in a cycle...
    i'm not a developer but i know what i'm sayng as a designer.

    A walking cycle is incompatible with the standing IDLE pose.

    sample.jpg

    In My drawing for example the cycle walk from the second frame to the last, and the first frame is good only for IDLE.

    Is not only of my design, in any walking cyce with more than 3/4 frames the IDLE pose is incompatible.
  20. You're right Lakaroth (I have the same issue at the moment), but Shaz mentionned earlier that it would be better to have a separate plugin for that.

    There's a discussion on this topic (although it's not the main discussion of it):

    http://forums.rpgmakerweb.com/index.php?/topic/46445-dashing-anime-different-from-walking/

    Hudell mentionned he'd be working on it, but I don't know if that's still the case. You could try to ask him out.​