METACHASER

Villager
Member
Joined
Jan 25, 2021
Messages
12
Reaction score
1
First Language
ENGLISH
Primarily Uses
RMMV
Hi,

I am trying to use a summoning plugin in order to summon a additional actor who fights in front of the actor who summoned him, but I am encountering problems after I defeat a Dragonbones animated enemy.

I am using SRD_SummonCore plugin summon system and also use the Yanfly and Kelyep's Dragonbones enemies to animate enemies. The animated enemy I am fighting against is one created by Aekashicks, and I used the unaltered Dragonbones settings provided for that character. The summoning process works and fighting animations work, but when the enemy is defeated I get the following error message (instead of a victory message telling the player they won).

1613972763602.png

This is what it shows in the console when I run it in playtest mode.

1613972926898.png

I am using the following plugins.

1613973023682.png


I have set the current party size to 6 in the Yep_PartySystem. There are only 5 actors on the screen. This problem started occurring after I tried to do summoning system. I also tested fighting a non-animated static enemy, and I got the same error, so it looks like the error might be in Dragonbones, or I might have to alter something in the Notes of the enemy.

If anyone knows what the problem is and how to fix, please let me know.

Thanks!
 
Last edited:

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
49
Reaction score
10
First Language
br portuguese
Primarily Uses
RMMV
i dont know all these plugins but have you tried filling the whole party to see what happens?

it seems to me that one plugin is taking into account the max party capacity (instead of the current party members) and trying to do something, but as its with one less member, the plugin fails. its probably the srd plugin, since the other 2 are made by yanfly.
 

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
604
Reaction score
315
First Language
German
Primarily Uses
One possible problem might be that the sprites for summons seem to work a bit different from regular actors and seem to not use the "battler" property the animated enemy plugin is trying to access, which could lead to the shown error when a summon tries to use an entry- or exit-animation.

I haven't actually tried it yet, but you could try to add this as a plugin somewhere below the animated enemy plugin to hopefully fix the issue:
Code:
/*:
* @plugindesc Compatibility Patch: YEP_X_AnimatedSVEnemies / SRD_SummonCore
* @help Fixes entry-/exit-summon-animations
* Place this plugin anywhere below YEP_X_AnimatedSVEnemies.
*/
(function() {
   
    var lastUpdatePosition = Sprite_Animation.prototype.updateSvePosition;
    Sprite_Animation.prototype.updateSvePosition = function() {
        if (this._target.parent._battler !== null) {
            lastUpdatePosition.call(this);
        }
    };
})();
 

METACHASER

Villager
Member
Joined
Jan 25, 2021
Messages
12
Reaction score
1
First Language
ENGLISH
Primarily Uses
RMMV
@Another Fen
Could you let me know where you found the above code, or if you created it yourself? I am not sure when or how this function would be called, if I just create a plugin with the code you provided

The issue definitely does appear to be tied with the following function with the Yanfly SV Animated Enemys plugin:

Sprite_Animation.prototype.updateSvePosition = function()

I was checking the SRD site, and one person replaced an If statement in this function, and by doing the summon error can be avoided. However, the fix also breaks a lot of other functionality in the Enemys plugin, to the extent that its features kind of don't work anymore. For instance, the Breathing effect does not work and also actually using SV Actors as enemeies also does not work, so its a fix that introduces more bugs.


@oooNUKEooo
Filling the party or changing the party sizes doesn't make a difference. The issue appears at the end of the battle.

I have rearranged all plugins so they match the descrition on Yanflys site, so it is not an ordering issue.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
763
Reaction score
416
First Language
English
Primarily Uses
RMMV
I'm not sure why there would necessarily be any interaction between the summon plugin and the animated enemies, since you summon an actor, not an animated enemy...so the code from one shouldn't ever need to interact with the other.

The patch that AnotherFen provided is not a function you need to call, it overwrites the function in one of your other plugins.
 

METACHASER

Villager
Member
Joined
Jan 25, 2021
Messages
12
Reaction score
1
First Language
ENGLISH
Primarily Uses
RMMV
@ATT_Turan
Thanks for the explanation. That makes sense. I am not too familiar with Javascript , although I have used other programming languages like Java and PHP/MySQL before.

The two plugins don't seem like they are related, but when I was researching the issue at least some other people run into this same issue, but their fixes (if there are fixes) seem to cause more issues or break other functionality. This specific issue occurs at the end of the battle, everything works fine until the "enemy" is defeated.

@Another Fen
Thanks for providing the code! I created the plugin and it looks like it is working so far. I am not entirely sure what other tests I should run to see if I can break the code or check to see if there were any additional issues created by replacing the function. But so far the code appears to be working. The breathing for the SVAnimatedEnemies is working, as well as, the calls to SV Actors to be used as SV Enemies.
 

METACHASER

Villager
Member
Joined
Jan 25, 2021
Messages
12
Reaction score
1
First Language
ENGLISH
Primarily Uses
RMMV
For reference, this is the function that has the issues:

Code:
 Sprite_Animation.prototype.updateSvePosition = function() {
  if (typeof this._target.parent._battler != 'undefined' && this._target.parent._battler.isEnemy() && typeof this._target.parent._mainSprite != 'undefined'){
    if (this._animation.position !== 3) {
      if (this._animation.position === 0) {
        this.y += this._target.parent._mainSprite.height - this._target.parent.texture.height;
      } else if (this._animation.position === 1) {
        this.y += (this._target.parent._mainSprite.height - this._target.parent.texture.height) / 2;
      }
    }
  }
};


The fix proposed by JustifydWarrior on SRD's site is:



Code:
 Sprite_Animation.prototype.updateSvePosition = function() {

  if (this._target.parent._battler && this._target.parent._battler.isEnemy() && typeof this._target.parent._mainSprite != ‘undefined’){

    if (this._animation.position !== 3) {

      if (this._animation.position === 0) {

        this.y += this._target.parent._mainSprite.height - this._target.parent.texture.height;

      } else if (this._animation.position === 1) {

        this.y += (this._target.parent._mainSprite.height - this._target.parent.texture.height) / 2;

      }

    }

  }

};

This is the current fix that is being tested:

Code:
(function() {
  
    var lastUpdatePosition = Sprite_Animation.prototype.updateSvePosition;
    Sprite_Animation.prototype.updateSvePosition = function() {
        if (this._target.parent._battler !== null) {
            lastUpdatePosition.call(this);
        }
    };
})();
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,911
Reaction score
14,550
First Language
English
Primarily Uses
RMMV

@METACHASER , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.



Any chance you added an enemy to your troop and then deleted them from the Enemies tab? Try clearing that troop and adding all the enemies back again.
 

METACHASER

Villager
Member
Joined
Jan 25, 2021
Messages
12
Reaction score
1
First Language
ENGLISH
Primarily Uses
RMMV
@Shaz
I will avoid double posting and use the edit function in the future. I don't think the issue is with the troops, but thanks for the suggestion.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,448
Reaction score
697
First Language
indonesian
@Shaz
I will avoid double posting and use the edit function in the future. I don't think the issue is with the troops, but thanks for the suggestion.
you can try making a small size demo with all the plugin you have... then recreate the bugs you encountered... maybe someone could help you fix the bug with that demo... hope this help.
 

Latest Threads

Latest Posts

Latest Profile Posts

Why is parallexing so time-consuming? Ive been at it for 8hrs and i havent even finished the map yet :/
It seems MogHunter Twitter is back...
1618970067646.png
Feedback would be appreciated. To me it feels like the Dad does look a bit too normal and boring.
I think he's missing some features that make him more unique. Opinions?
recovering from surgery that covid caused me to have, im back trying to work on the newer engine on my game. We will see how this goes. I have no idea what to do about conversions
The wings got worse than I expected ... but for now it looks like this:
index.php

Forum statistics

Threads
110,589
Messages
1,054,474
Members
143,715
Latest member
natzma
Top