- 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:
Here is the larger "fix" that'd added (the rest of the fix isn't causing issues as far as I can tell)
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.
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: