Animated busts and picture based animations.

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
709
Reaction score
559
First Language
French
Primarily Uses
Animated busts.
Hi everyone!
This small plugin was made to handle animated busts, but can be generalized to make picture based animations.

Features:
  • Create picture based animations and synchronize them to the message window, for easy speaking animations.
  • Any number of frames supported.
  • Customizable frame rate.
  • For out of message use: set the number of times the animation runs before pausing, or the time in between animation loops.
  • Text codes to set, start, synchronize and pause animations directly from within the message window.
How to use:
The video above, created by @Rhino explains all the features. You can also find all the possible actions within the help file of the plugin.
Simply download the plugin, name it whatever, save as a .js file and import it in your project. There are no parameters to set.
Spoiler'd below: the help file of the plugin.
Code:
 * ===================================================================
 * Animation setup:
 * ===================================================================
 * First, setup the pictures using the event commands.
 * Then use the following script call:
 * $gameScreen.picture(pictureId).setAnim([array],interval);
 * Replace array by the file names without the extension, surrounded by "" and
 * separated by ",".
 * Ex: ["mouth_closed","mouth_1","mouth_2","mouth_3"]
 * These will be, in order, the pictures displayed for the animations.
 * The first picture will be used when the animation is paused.
 *
 * Then replace interval by a number, this will be the number of frames
 * between image changes.
 * Ex: 5
 *
 * Ex: $gameScreen.picture(2).setAnim(["mouth_closed","mouth_1","mouth_2","mouth_3"],5)
 * This will cause the picture to loop between the frames you set in the array
 * until told to stop.
 *
 * ===================================================================
 * Freezing an animation
 * ===================================================================
 * You can tell a picture to stop looping by using:
 * $gameScreen.picture(pictureId).freeze();
 * It will set the picture to the first image in the list and stop it from looping.
 * Notice: when synching the animation to a message, it will freeze and unfreeze the
 * animation automatically when the message pauses. So you have to remove the animation
 * if you don't want it synching with a message, not freeze it.
 * This command is for out of message use.
 *
 * You can tell a picture to begin looping again by using:
 * $gameScreen.picture(pictureId).unfreeze();
 * This will make the picture start looping again, starting at the first frame.
 * Again, same disclaimer as for the freeze command: intended for out of message use.
 *
 * ===================================================================
 * Synchronizing an animation with a message box
 * ===================================================================
 * In order to synch up a picture looping animation to a message window use:
 * $gameMessage.setAnim(pictureId)
 *
 * Ex: $gameMessage.setAnim(2)
 * This will cause the picture to synch up its looping animation with the message
 * window: it will loop while text is writing, stop for pauses and between windows.
 * Using fast forward will make it skip the animation altogether.
 *
 * If you want a picture to no longer synch up with the message window, use:
 * $gameMessage.removeAnim(pictureId)
 *
 * Ex: $gameMessage.removeAnim(2)
 *
 * ===================================================================
 * Frozen or message end picture outside of animation loop
 * ===================================================================
 * By default the plugin will use the first image in the array as the frozen or
 * message end picture. If you would like to define a frozen picture outside of
 * the loop you can use the following command:
 * $gameScreen.picture(pictureId).setFrozenBmp(filename);
 *
 * Ex: $gameScreen.picture(2).setFrozenBmp("mouth_closed")
 *
 * If you would like to remove a frozen picture and start using the first picture
 * of the loop again, use the following command:
 *
 * $gameScreen.picture(pictureId).removeFrozenBmp()
 *
 * Ex: $gameScreen.picture(2).removeFrozenBmp()
 * ===================================================================
 * Wait time in between animation loops:
 * ===================================================================
 * If you want to pause the picture in between loops, use the following:
 * $gameScreen.picture(pictureId).setLoopInterval(number)
 *
 * Ex: $gameScreen.picture(2).setLoopInterval(60)
 * This will make the picture wait 60 frames before each animation loop.
 *
 * If you want to remove the wait between loops, use:
 * $gameScreen.picture(pictureId).removeLoopInterval();
 *
 * Ex: $gameScreen.picture(2).removeLoopInterval();
 *
 * Both of these commands are intended for out of message use.
 *
 * ===================================================================
 * Run animation loop only X times:
 * ===================================================================
 * If you'd like the animation loop to only run on certain amount of
 * times, use:
 * $gameScreen.picture(pictureId).setLoopTimes(number)
 * 
 * Ex: $gameScreen.picture(2).setLoopTimes(5)
 * This will cause the picture to loop 5 times and them freeze itself,
 * until the loop times are removed or set again.
 *
 * If you want to remiove the limitation, use:
 * $gameScreen.picture(pictureId).removeLoopTimes();
 *
 * Ex: $gameScreen.picture(2).removeLoopTimes();
 *
 * Both of these commands are intended for out of message use.
 *
 * ===================================================================
 * Text codes:
 * ===================================================================
 * This will also add several escape codes to use with message boxes:
 * \fa[pictureId] this will freeze the target picture animation. Again, if the animation
 * is synched it won't have any effect.
 *
 * \ufa[pictureId] this will unfreeze the target picture animation. Just as above,
 * if the animation is synched it won't have any effect.
 *
 * \da[pictureId] this will desynchronise the target picture animation with the 
 * message window and automatically freeze it. Unfreeze it after if you'd rather
 * it kept running.
 *
 * \sa[pictureId] this will synchronize the target picture animation with the
 * message window. 
 *
 * \ca[variableId] this will create an animation, you must have a picture already shown.
 * First you must setup a variable using the control variable: script command
 * the following way:
 * Control variables: script: [id,[spriteArray],interval,frozenBmp*,loopInterval*,loopTimes*].
 * Replace id by the picture id you want to animate.
 * Replace sprite array by the array of sprite names.
 * Replace interval by a number.
 * frozenBmp can be omitted, if it is present it will set the new animation to use
 * the file name you replace frozenBmp by as its frozen frame.
 * loopInterval can be omitted but you must provide a frozenBmp to be able to use it
 * it will set a wait time between loops, replace it with a number.
 * loopTimes can be omitted but you must provide a  frozenBmp and a loopInterval to
 * be able to use it. Replace it with a number, this will be the number of times the
 * animation will repeat. 
 *
 * Ex: Control variables: script:[1,["mouth_closed","mouth_1","mouth_2","mouth_3"],5,"mouth_frozen"];
 * Then in the message use \ca[variableId], replacing variableId by the id of the
 * variable you just used.
 * So if you used variable 1, use \ca[1].
 * This will start the animation on target picture (1 here) using the sprites in the array, 
 * and the interval there too, when the message reaches that point.
 * It will also synchronize it automatically.

Terms of use:
They are detailed in the plugin file for reference, pasted here:
Code:
// Free for commercial and non commercial use, credits required: any of
// Astfgl/Astfgl (Pierre MATEO)/ Pierre MATEO.
// Edits and reposts allowed, as long as it is kept under the same terms of use.
// Do not remove this header, do not claim as your own.

Download: here on pastebin.

Additional ressources:
@Rhino was kind enough to draw mouth animations for all the standard RTP Sci Fi actors busts. You can find them showcased on the youtube video above.
You can download the ressources on her google drive here. Be sure to credit her if using those animations!
If you don't want to watch the video, here is a gif sample:

Credits:
  • Sample pictures and mouth animations created by Rhino.
  • Youtube video created by Rhino.
  • Plugin created by myself.
  • Original request thread, by Rhino, here.
And that's all for today. Good day, and happy making!
 

Celianna

Tileset artist
Global Mod
Joined
Mar 1, 2012
Messages
10,554
Reaction score
5,569
First Language
Dutch
Primarily Uses
RMMV
Well then, time to make blinking animations.
 

umbralshadows

the silks angel
Veteran
Joined
May 26, 2017
Messages
202
Reaction score
351
First Language
English
Primarily Uses
RMMV
Yeah was hoping this'd be made. Thanks yo. Now my draws can come ta life! :kaojoy:
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
709
Reaction score
559
First Language
French
Primarily Uses
Blinking animations, small hair movement or even much more complex things such as arms and clothes animations, there's so much that can be done using this. It's only really limited by what you can, and more importantly have the time to, draw.

It was quite simple to code too, so I'd like to thank Rhino again for having the idea, and providing free ressources to boot. The youtube presentation video was the icing on the cake.

I haven't said it in the opening post, but if you find any bugs, be sure to let me know by posting here or sending me a PM.
I'm also open about hearing requests about additional features you think are missing, though I make no promises.
 

Rhino

~Inactive~
Veteran
Joined
Feb 28, 2017
Messages
482
Reaction score
787
First Language
English
Primarily Uses
RMMV
Blinking animations can be done with a parallel event (I actually made a tutorial on this,) but it is so much nicer just to have everything you need in one event where it's easy to keep track of. :kaoluv:

Making the video was pretty fun. I was just so excited to show off what this plugin was capable of! You may have found it simple to code, but I would have had absolutely no idea where to start :guffaw: I'm glad we could put our skills together and make something cool!
 

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,949
Reaction score
2,916
First Language
English
Primarily Uses
RMMV
This is very nice. I look forward to using it in a contest or game jam.
 

Plueschkatze

Veteran
Veteran
Joined
Aug 4, 2016
Messages
522
Reaction score
1,547
First Language
German
Primarily Uses
N/A
I'll look into this plugin! I hope I can use it as a 1:1 replacement for what I currently have~
Since I currently have my busts drawn infront of the textbox and from the bottom of the screen.
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
So I clearly misunderstood Busts. But either way this looks great. Thank you.
 

phamtruong1992

Green Dragon
Veteran
Joined
Nov 22, 2015
Messages
198
Reaction score
223
First Language
English
Primarily Uses
RMMV
Idk about you guys, but this is a must have for me. It requires tons of works but worth it.
 

Plueschkatze

Veteran
Veteran
Joined
Aug 4, 2016
Messages
522
Reaction score
1,547
First Language
German
Primarily Uses
N/A
Yeah, this is an awesome plugin, I just implemented it into a project.
The possibilities of how to use this plugin are endless, haha! Love it.
 

aiden_jayce

Villager
Member
Joined
Jun 3, 2017
Messages
17
Reaction score
1
First Language
English
Primarily Uses
RMMV
Hello! I dunno if this is the right section to ask for this, but can somebody help me? I really have no clue what I did wrong because I got this error.
I just tried to copy what I have understood from the tutorial vid. Im still new to this xD

i have included the error pics. ty
 

Attachments

Plueschkatze

Veteran
Veteran
Joined
Aug 4, 2016
Messages
522
Reaction score
1,547
First Language
German
Primarily Uses
N/A
@aiden_jayce do you use other plugins in that project? I've got the same problem because of a conflict with another plugin I'm using.
 

aiden_jayce

Villager
Member
Joined
Jun 3, 2017
Messages
17
Reaction score
1
First Language
English
Primarily Uses
RMMV
@Plueschkatze yup. right now yanfly ones and srdude's camera one.
may i know what caused yours? if you know it. thanks


LOL just edited this post. it's working now. i turned off the Camera core plug in from SRDUde.

thanks for telling me about the plug in conflict possibility @plue
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
709
Reaction score
559
First Language
French
Primarily Uses
Hi everyone!
I've made a small update to fix the compatibility issue between this and SRD's Camera core.
Why SRD moves the picture container outside of the spritest and puts it directly in the scene is beyond me, but it was simple enough to pinpoint.

The pastebin link has been updated in the main post.

Also included: a small update I made some time ago but forgot to include officially: you can now change the frame rate of an animation using the following command:
Code:
$gameScreen.picture(pictureId).setFrameRate(number)
As usual, please report incompatibilities and bugs in the thread, or by PM.

There's a know incompatibility with Kino's slow text. It's quite tricky, and I don't have the time to look into it right now. If anyone wants to check it out, feel free. The problem is Kino waits between each letter and my plugin freezes the animation each wait. So you'd have to tell the engine when it's an automated wait for the slow text and when it's not and freeze or unfreeze accordingly.

That's all for today.
Have a nice day, and happy making!
 

aiden_jayce

Villager
Member
Joined
Jun 3, 2017
Messages
17
Reaction score
1
First Language
English
Primarily Uses
RMMV
Hi everyone!
I've made a small update to fix the compatibility issue between this and SRD's Camera core.
Why SRD moves the picture container outside of the spritest and puts it directly in the scene is beyond me, but it was simple enough to pinpoint.

The pastebin link has been updated in the main post.

Also included: a small update I made some time ago but forgot to include officially: you can now change the frame rate of an animation using the following command:
Code:
$gameScreen.picture(pictureId).setFrameRate(number)
As usual, please report incompatibilities and bugs in the thread, or by PM.

There's a know incompatibility with Kino's slow text. It's quite tricky, and I don't have the time to look into it right now. If anyone wants to check it out, feel free. The problem is Kino waits between each letter and my plugin freezes the animation each wait. So you'd have to tell the engine when it's an automated wait for the slow text and when it's not and freeze or unfreeze accordingly.

That's all for today.
Have a nice day, and happy making!
thanks for the update and for this plug in as well. :)
 

Plueschkatze

Veteran
Veteran
Joined
Aug 4, 2016
Messages
522
Reaction score
1,547
First Language
German
Primarily Uses
N/A
Wow, thanks for that update. Funny enough I had the same plugin causing the issue. ;)
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
709
Reaction score
559
First Language
French
Primarily Uses
Hi everyone!
I got around adding compatibility with Kino's Slow text.
You can download the update using the pastebin link in the main post.

Slow text must be placed above this plugin to work. I recommend placing it above all other message plugins too because it overwrites a function instead of aliasing it. If you place it below yanfly's message extension pack, you'll lose all extension text codes for example.

As usual, have fun and happy making!
 

white90

Villager
Member
Joined
Oct 29, 2015
Messages
23
Reaction score
1
First Language
Italiano
Primarily Uses
RMMV
Hey, simple and great work man! I use your script for simple loop animation of background picture in my map.
The event is :
Show picture
animate picture
erase event (It won't work without this)
The problem is (in-game), if i open the inventory the image stop animating, and the event can't loop if is erased. i must exit and enter the map
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
709
Reaction score
559
First Language
French
Primarily Uses
That's not really something to do with my plugin.
You can do what you want by using a switch instead of erasing the event and a plugin that executes a common event when exiting the menu, such as Yanfly's utility common events.

Like this:
Event requires switch to be ON and is parallel process
show picture
animate picture
switch off

On exiting menu:
Turn switch on

On entering map:
Turn switch on

You could probably take a look at an animated parallax plugin too, as it sounds to be what you want to achieve.
 
Last edited:

white90

Villager
Member
Joined
Oct 29, 2015
Messages
23
Reaction score
1
First Language
Italiano
Primarily Uses
RMMV
Off couse i tried many other plugin, but yours is simple and easy to use. I try with the common event plugin.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Thanks to a post in a forum thread we can better create MV/MZ plugins in Haxe.
Latest video of my adventures in Kingdom Hearts 3~
Imagine every unfunny joke gets a laugh track, and it doesn't top until you genuinely laugh at that unfunny joke.
I miss lockdown already. Since the pubs reopened, there's been nothing but loudmouthed drunks wandering about my neighbourhood.
Twitter is making me embarrassed to be a Persona 5 fan rn
I don't wanna be called out when I say P5R is my favorite game :kaoswt2:

Forum statistics

Threads
99,558
Messages
966,710
Members
131,195
Latest member
HikariHason
Top