Add compatibility for Dragonbones to Caethyril's Time Stop plugin

belatucadrus

Veteran
Veteran
Joined
Mar 6, 2017
Messages
78
Reaction score
13
First Language
french
Primarily Uses
RMMV
Hi,

Caethyril released a cool plugin which lets me add a "Time stop" skill. When an actor or a battler is affected by the "Timestopped" state, the battler stops being animated and stands still

This plugin works great with Yanfly's SVE plugin, but now I'm looking for a way to mak it compatible with Dragonbones. The plugin is easy to understand as all it does is refusing to update the battlers animation if they are affected by the "Timestopped" state.

So I guess all I have to find is the method which does the update of dragonbones graphics. I tried to do it myself, with no success.

Can someone give me a hand ?

Timestop plugin link :
YEP Dragonbone integration link : http://www.yanfly.moe/wiki/Dragonbones_Integration_(YEP)[/spoiler]
 

zaraku

Time Keeper
Veteran
Joined
Apr 19, 2018
Messages
39
Reaction score
36
First Language
English
Primarily Uses
RMMV
I'm not an avid programmer so I don't know the best way of implementing these into the plugin, but if you're using action sequences you can stop and play the animations for a battler using these script calls:

JavaScript:
// stop animation based on party index
dragonBonesIntegration.ArmatureDatabaseActor[x].armature.animation.stop();
// stop animation for enemy based on troop index
dragonBonesIntegration.ArmatureDatabaseEnemy[x].armature.animation.stop();

// resume animation
dragonBonesIntegration.ArmatureDatabaseActor[x].armature.animation.play();
dragonBonesIntegration.ArmatureDatabaseEnemy[x].armature.animation.play();
 
Last edited:

belatucadrus

Veteran
Veteran
Joined
Mar 6, 2017
Messages
78
Reaction score
13
First Language
french
Primarily Uses
RMMV
Just pasted it in the console, and it worked !

I have two questions tho.

1) How can I use this script call to stop the animation of all the enemies affected by the "Timestopped" state ?
2) How can I call the script call when the state wears off to restart animating the enemies ?
 

zaraku

Time Keeper
Veteran
Joined
Apr 19, 2018
Messages
39
Reaction score
36
First Language
English
Primarily Uses
RMMV
Just tested this and it's working for me so far. If you have Buff & States Core you can add these notetags to your timestopped state:

Code:
<Custom Apply Effect>
if (this.isEnemy()){
dragonBonesIntegration.ArmatureDatabaseEnemy[this.index()].armature.animation.stop();
} else {
dragonBonesIntegration.ArmatureDatabaseActor[this.index()].armature.animation.stop();
}
</Custom Apply Effect>

<Custom Remove Effect>
if (this.isEnemy()){
dragonBonesIntegration.ArmatureDatabaseEnemy[this.index()].armature.animation.play();
} else {
dragonBonesIntegration.ArmatureDatabaseActor[this.index()].armature.animation.play();
}
</Custom Remove Effect>
I added the actor check just in case your actors will ever get the state (and because I need it for my own time stop mechanic).
 

belatucadrus

Veteran
Veteran
Joined
Mar 6, 2017
Messages
78
Reaction score
13
First Language
french
Primarily Uses
RMMV
I do not use dragonbones for my actors, thus, pasting your code gives me an error, so I removed the actor part, and it doesn't work :( The enemies are still moving. Did I do something wrong ?

Code:
<Custom Apply Effect>

if (this.isEnemy()){

dragonBonesIntegration.ArmatureDatabaseEnemy[this.index()].armature.animation.stop();

}

</Custom Apply Effect>



<Custom Remove Effect>

if (this.isEnemy()){

dragonBonesIntegration.ArmatureDatabaseEnemy[this.index()].armature.animation.play();

}

</Custom Remove Effect>
 

zaraku

Time Keeper
Veteran
Joined
Apr 19, 2018
Messages
39
Reaction score
36
First Language
English
Primarily Uses
RMMV
Um, I'm not really sure why it wouldn't work for you. You are using Yanfly's Buff & States Core right? Can you also show me your state and plugin list?
 

belatucadrus

Veteran
Veteran
Joined
Mar 6, 2017
Messages
78
Reaction score
13
First Language
french
Primarily Uses
RMMV
It was a compatibility issue with another plugin (MrTS's States EX plugin)

Turning it off solved the problem :)

Now I can za warudo the game and do whatever I want ψ(`∇´)ψ

Thank you for the help !
 

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

Latest Threads

Latest Profile Posts

This is on the Amazon page for the FF7 Remake: 'If you get the game early, please think of others and don't spoil it for them. Please don't post videos or screenshots of the game until it is officially on sale on April 10.'
Gave my avatar an update, stay safe, people!
I'm currently available for hire for scripting (and perhaps other things).
Also, don't worry, the Advanced Minimap plugin is a work in progress.
Hallelujah! Work is getting stricter on humans in the store.
Day 3 of mapping... at least the whole game its just one location :3 (Still taking forever...)

Forum statistics

Threads
95,622
Messages
930,499
Members
125,929
Latest member
RitBro
Top