More Character Frames

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,167
Reaction score
12,445
First Language
English
Primarily Uses
RMMV
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
 

Silent Darkness

Robomage
Veteran
Joined
Nov 28, 2013
Messages
2,284
Reaction score
324
First Language
English
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.
 

Matratos

Warper
Member
Joined
Oct 24, 2015
Messages
3
Reaction score
0
First Language
French
Primarily Uses
RMMV
Thanks! It look nice!
 

DustyCat Media

Indie Game Purrfector
Veteran
Joined
Oct 15, 2012
Messages
115
Reaction score
71
First Language
English
Thanks for this!

Any chance that you could do a similar plugin but for SV battler sprites instead? :D
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,167
Reaction score
12,445
First Language
English
Primarily Uses
RMMV
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.
 

Whalewheeze

Warper
Member
Joined
Oct 25, 2015
Messages
2
Reaction score
0
First Language
English
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,167
Reaction score
12,445
First Language
English
Primarily Uses
RMMV
Thank you - I will take a look at it.

Any chance I could get you to send me the image you're using?
 

Whalewheeze

Warper
Member
Joined
Oct 25, 2015
Messages
2
Reaction score
0
First Language
English
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.
 
 
Last edited by a moderator:

MaxLionheart

Veteran
Veteran
Joined
Aug 23, 2015
Messages
98
Reaction score
29
First Language
French
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 :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,167
Reaction score
12,445
First Language
English
Primarily Uses
RMMV
That would be better as a separate plugin.
 

MikeMakes

Veteran
Veteran
Joined
Sep 30, 2015
Messages
164
Reaction score
41
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

ksart

Artist
Veteran
Joined
Oct 18, 2015
Messages
152
Reaction score
185
First Language
English
Primarily Uses
N/A
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.
 

Lakaroth

Veteran
Veteran
Joined
Dec 9, 2014
Messages
272
Reaction score
130
First Language
English
Primarily Uses
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.
 

danrs88

Villager
Member
Joined
Aug 19, 2012
Messages
24
Reaction score
1
First Language
English
Primarily Uses
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...
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,167
Reaction score
12,445
First Language
English
Primarily Uses
RMMV
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.

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();    }  }; })();
 

MaxLionheart

Veteran
Veteran
Joined
Aug 23, 2015
Messages
98
Reaction score
29
First Language
French
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 :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,167
Reaction score
12,445
First Language
English
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

Lakaroth

Veteran
Veteran
Joined
Dec 9, 2014
Messages
272
Reaction score
130
First Language
English
Primarily Uses
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.



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.
 

MaxLionheart

Veteran
Veteran
Joined
Aug 23, 2015
Messages
98
Reaction score
29
First Language
French

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Potato The game! Few concepts for characters to my game.
Well, well, well, well....Lemme get a look at this fanart.
The Google Play rating for one of my games finally rose above 4.0 after getting review-bombed from a $0 sale. Now the game's sales are doing much better when discounted, so that's nice.
I'm getting close to releasing a demo. Working on formatting my Games in Development post.
I always see a few people asking for C# in next engine and I always thought: Do I not know enough about that language to tell it will affect extensibility and customizability to the negative? Watching a video from SumRndmDde today I feel confirmed.

Forum statistics

Threads
98,227
Messages
950,542
Members
129,529
Latest member
berriefarm
Top