RMMV Dragonbones integration interfering with sprite flashing & colour effects (solved)

SuzuPazuzu

Villager
Member
Joined
Apr 19, 2012
Messages
20
Reaction score
4
First Language
English
Primarily Uses
RMMV
I'm currently using the dragonbones 2d animation integration plugin for MV (found at: https://forums.rpgmakerweb.com/index.php?threads/rmmv-dragonbones-2d-animation-integration.81027/ )

I was noticing that for some reason, my normal non-dragonbones enemies weren't flashing, or responding to any colour effects. I went through my plugins thoroughly to check where this issue was coming up, and I managed to isolate a specific piece of code.

This piece of code is supposedly a fix for dragonbones enemies not responding to colour effects like flashing. Certainly, this code DOES fix that (without it, they don't respond to colour effects). However, this code also disables colour effects for non-dragonbones sprites.

Here is the specific excerpt that causes this issue:
JavaScript:
Sprite_Base.prototype.setBlendColor = function(color) {
  if (this._battler) {
    if (this._dragonboneSprite) this.setDragonbonesSpriteFlashColor(color);
  } else if (this.parent._battler) {
    if (this.parent._dragonboneSprite) this.parent.setDragonbonesSpriteFlashColor(color);
  }
};

Here is the larger "fix" that'd added (the rest of the fix isn't causing issues as far as I can tell)
JavaScript:
// Code provided by Irina and Swift Illusion
Sprite_Base.prototype.setBlendColor = function(color) {
  if (this._battler) {
    if (this._dragonboneSprite) this.setDragonbonesSpriteFlashColor(color);
  } else if (this.parent._battler) {
    if (this.parent._dragonboneSprite) this.parent.setDragonbonesSpriteFlashColor(color);
  }
};

Sprite_Battler.prototype.setDragonbonesSpriteFlashColor = function(color) {
    this.setupDragonbonesSpriteFlashFilter();
    this.updateDragonbonesSpriteFlashFilter(color);
};

Sprite_Battler.prototype.setupDragonbonesSpriteFlashFilter = function() {
    var sprite = this._dragonboneSprite;
    sprite._filters = sprite._filters || [];
    if (sprite._flashFilter) return;
    sprite._flashFilter = new PIXI.filters.DragonbonesFilter();
    sprite._filters.push(sprite._flashFilter);
};

This fix starts at line 1102 of KELYEP_Dragonbones.js, which is the specific plugin.

I am half-assuming there's a very obvious alteration to the "Sprite_Base.prototype.setBlendColor" section that can remedy this issue and allow both normal and dragonbones enemies to flash/change colour/etc.

But on the other hand, I have no idea how it works specifically.

Assistance would be greatly appreciated, and I'll provide any more details should they be necessary. Thanks!

Here's some possible extra info that may be useful:
Currently, dragonbones is relying on Yanfly's "Action Sequence Pack 2" for floating effects. This pack has features which allow for custom colour commands for sprites, but that doesn't appear to work either.
And, of course, this also relies on Yanfly's core engine. I don't believe the conflict is here either, though.

Solved: Affixed the old blend function to dragonbones' blend function so it draws either. Feel free to lock or anything like that.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

I'm gonna riff on Macross's "Deculture" and adopt "Descope" as my motto! :wub God knows I'm gonna need it...

As an aside, did any of ya sweeties watch Macross Delta and if so, was it good, bad, or horrible?
Is an extension for the jam time limit from 20 min to 30 min possible? :ysad::ysad::ysad: My entry will have a few battles, it seems >.<
Background and composition study
GAbBmfDaIAAEzVM
Ho, ho, ho and mwah, ha, ha. It appears that I will be getting a leg up on the inclusion of Krampus in the 2023 Game Jam. We arrived in Orlando, FL yesterday and my wife found a Krampus Festival for us to attend tonight! Maybe I will be going home with a Krampus!

Forum statistics

Threads
136,708
Messages
1,268,985
Members
180,430
Latest member
rpgmakergerhnam
Top