Hello, thanks for checking this out.
Eli Face Window (MV) is a super cool plugin that lets us show a face easily seperate from the message box and make it larger and animated; so I'm basically using it as an easy way to get busts showing above my text box, and animated in sync with the message being displayed.
What I would like; if it is possible, is a slight modification to the plugin so that I can define a seperate start and end index and speed for the idle animation, vs. the talking animation. At the moment, the plugin only has a single speed, and the talking animation iterates first through the idle animation, then the talking animation.
Basically, I'd like lip flaps to be moderately fast (say every 0.3 seconds) but if we use that speed right now, then it is hyper-speed when in idle (and if my idle is an eye blink it looks crazy). Whereas if it's slow for the blink (we only want a blink, say, every 1.5 seconds at most) the talking animation ends up glacial. Moreover if the face blinks before each of the lip flaps, that ends up looking very odd (people don't blink every time they enunciate a word).
Bonus points if we can randomise the animation speeds between two numbers, as blinks and mouth movements are rarely uniform. But this isn't a requirement.
Eli is sadly no longer supporting his MV plugins. As per his terms, I can't post the plugin directly; but all of his MV plugins are freely available here and his terms allow others to alter/extend the plugins.
MV - [Resolved] Small Modification to Eli Face Window (MV)
● ARCHIVED · READ-ONLY
-
-
Hmmm, I quickly tried making some changes (idea is that idle frames 0-3, talk frames 4->). You can replace frameCount 90 for idle and change random numbers (currently -5 - 5). Seemed to work when I tested it quickly, but the talking frame stays for a bit before turning to idle. Anyway, you can try to make adjustments.
canChangeFaceIndex(){
if(SceneManager._scene._messageWindow._faceWindowAnimationState === "idle")
return this.frameCount >= 90 + (-5 + Math.randomInt(11))
if(SceneManager._scene._messageWindow._faceWindowAnimationState === "talking")
return this.frameCount >= Plugin.getFaceSettings().frameSpeed + (-5 + Math.randomInt(11))
}
changeFaceIndex(limitIndex){
if(SceneManager._scene._messageWindow._faceWindowAnimationState === "idle" && this.faceIndex > 3) {
this.faceIndex = Plugin.getFaceSettings().startIndex
} else if(SceneManager._scene._messageWindow._faceWindowAnimationState === "talking" && this.faceIndex < 4) {
this.faceIndex = 4
} else {
if(this.faceIndex >= limitIndex){
if(SceneManager._scene._messageWindow._faceWindowAnimationState === "idle") {
this.faceIndex = Plugin.getFaceSettings().startIndex
} else {
this.faceIndex = 4
}
}else{
this.faceIndex += 1
}
}
} -
Yep, fabulous, that works fine; just tweaked the timings a bit with some tests to 80 + (-11 + Math.randomInt(11)) for blinks (one frame in four) and (-1 + Math.randomInt(6)), with four talking frames.
As you say, the only problem is that there is no check for when it shunts to idle, which can look goofy for about a second if it stopped whilst it was on one of the mouth open frames (presumably since it immediately shifts to the new timing and doesn't update the frame until the new duration has elapsed). -
Cool.
For the immediate idle shift you can also try change above (seemed to work, but I don't have animated faces, just different face graphics, so it's difficult to see):
refreshAnimation(limitIndex){
if(this.hasAnimatedFace()){
if(SceneManager._scene._messageWindow._faceWindowAnimationState === "idle" && this.faceIndex > 3){
this.faceIndex = Plugin.getFaceSettings().startIndex
this.refreshFaceFrame(this.faceIndex)
this.frameCount = 0
} else {
this.frameCount++
if(this.canChangeFaceIndex()){
this.changeFaceIndex(limitIndex)
this.refreshFaceFrame(this.faceIndex)
this.frameCount = 0
}
}
}
} -
Sorry for the delay, work and all that.Cool.
For the immediate idle shift you can also try change above (seemed to work, but I don't have animated faces, just different face graphics, so it's difficult to see):
refreshAnimation(limitIndex){
if(this.hasAnimatedFace()){
if(SceneManager._scene._messageWindow._faceWindowAnimationState === "idle" && this.faceIndex > 3){
this.faceIndex = Plugin.getFaceSettings().startIndex
this.refreshFaceFrame(this.faceIndex)
this.frameCount = 0
} else {
this.frameCount++
if(this.canChangeFaceIndex()){
this.changeFaceIndex(limitIndex)
this.refreshFaceFrame(this.faceIndex)
this.frameCount = 0
}
}
}
}
But spot on, it's perfect! Thankyou very kindly rpgLord69, I shall include you in the game credits.
Topic is resolved and can be closed.