본문 바로가기
RPG Maker MV/Messages

Animation Face | RPG Maker MV

by biud436 2023. 8. 12.

Introduction

This plugin allows you to show up the animation face in the messsage window. 

 

This plugin must be used to in RPG Maker MV v1.6.2 or more.

 

 

Preparing for face data

In this section, you'll learn how to define a custom animated face data. 

You can show up a lot of emotions such as an idle, run, sad, blink, die, and so on. 

In the plugin parameter called 'Set Animation Face', You need to define a new custom face data for your own purposes.

 

** id value :

When the message window indicates a face, it must detect whether the face 

is an animated type, so it need to a specific value. 

it is the ID value of the animated face.

 

You can define the ID value is to string type such as idle, blink, die.

 

** x and y values :

Next, You need to set the x and y internal coordinates. 

Normally, it is used by 0 in both values.

 

** width and height values :

The width and height values are the real frame width and height of the face image. 

it means width and height values of the first frame in the sprite sheet.

Normally, They are set as 144 px in both.

 

** cols value : 

Next, You should set the cols value in the sprite sheets.

For example, if there are four cols and two rows in the sprite sheet.

The number of frames will be 8 and then cols value is to 4.

 

** maxFrames value : 

if you set the maxFrames in custom data, you can want to limit a max frame 

less than originally frames.

 

** delay value :

The delay time is the elapsed time since the previous frame.

1.0 will be around 0.016s

For Example, 5.0 will be around 0.08s (0.016s5.0 = 0.08s)

 

** looping value :

if you set the looping value is to true, The animated face will never stop.

it is played forever until the message would be terminated.

 

 

Plugin Commands

This plugin provides a toggle functionality for animated face.

if you use this plugin command, you can show up an animated face in the message window.

 

ShowAnimationFace

 

You wish to hide the animated face after it indicates on the screen. it is returned back as a normal face if you use this plugin command.

 

HideAnimationFace

 

This plugin will be checked the ID value of activated face and then show up it when the next message opens up, so you need to set the ID of the animated face before the message window sets up. it will be already set in the plugin parameter called 'Set Animation Face' The ID value should be changed as your own purposes.

 

SetAnimationFace Id

 

For example, there is the face ID called 'blink' into it and you can use like this before the message window starts up, as follows.

 

ShowAnimationFace

SetAnimationFace blink

 

Next, you need to select the face image from the event command called 'Show Message' then, The animated face system makes to add all the frames for that image. In this part, you'll learn how to change the scale, rotation, position for the animated face sprites.

 

Once changed that, all of the faces are affected since changed it. 

Note that all of the parameters need to write in lower case.

 

For examples, if you want to rotate the animated-face by 60 degree, you must do like this. You have passed angle 60.0 in to the plugin command called 'ChangeParamAnimationFace'

 

ChangeParamAnimationFace angle 60.0

 

Into the message window, the position of the animated-face image is basically the relative coordinates to parent message window, so its coordinates are (0, 0) px.

 

ChangeParamAnimationFace x 0.0

ChangeParamAnimationFace y 0.0

 

and you can also apply the padding value into it, like this.

 

ChangeParamAnimationFace x 18.0

ChangeParamAnimationFace y 18.0

 

In this part, You'll learn how to change a scale of the animated face sprite. To scale the animated face, you passed scale to the plugin command ChangeParamAnimationFace, like this.

 

ChangeParamAnimationFace scale 1.0

 

The 1.0 is the default scale and 2.0 is to zoom in by double.

 

Download

Link (Github RAW) - 

https://github.com/biud436/MV/raw/master/RS_FaceAnimation.js

 

Change Log

2019.07.16 (v1.0.0) - First Release.

2019.07.17 (v1.0.1) :

- Fixed the issue that shows up the incorrect frame in the sprite sheet.

2023.08.12 (v1.0.2) :

- Fixed the issue that is not set the active state ID.

 


Terms of Use

Free for commercial and non-commercial use.

 

License

The MIT License (MIT)