SOLUTION FOUND IN NEXT POST
So, I've run into this problem myself (not sure if one month is considered necro).
The
exact problem seems to be when the summon gets either A: desummoned, B: killed, or C: Battle ends, and thus it gets desummoned. The summon attacking and being attacked with action sequences and the like isn't a problem at all.
I've been sniffing through srd's and Yanfly's plugin's and I
think I've identified the code which causes the problem:
Yanfly battlecore snippet:
Code:
BattleManager.registerSprite = function(battler, sprite) {
if (!this._registeredSprites) this._registeredSprites = {};
if (battler.isActor()) var id = 100000 + battler.actorId();
if (battler.isEnemy()) var id = 200000 + battler.index();
this._registeredSprites[id] = sprite;
};
BattleManager.getSprite = function(battler) {
if (!this._registeredSprites) this._registeredSprites = {};
if (battler.isActor()) var id = 100000 + battler.actorId();
if (battler.isEnemy()) var id = 200000 + battler.index();
return this._registeredSprites[id];
};
SRD Summon snippet:
This appears to be where the notetag info gets loaded in
Code:
const summon = $gameParty.summonActor(id, lvl, turns, introAni, exitAni, this._subjectActorId);
and
Code:
BattleManager._spriteset.registerSummonSprite(summon);
And
Code:
Spriteset_Battle.prototype.registerSummonSprite = function(battler) {
for(let i = 0; i < this._summonSprites.length; i++) {
const summon = this._summonSprites[i];
if(!summon.hasBattler()) {
battler.setBattleSprite(summon);
summon.setBattler(battler);
this.reorganizeSummonSprites();
return summon;
}
}
Here's where the debug
actually seems to fail in yanfly's animated side view enemies:
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;
}
}
}
};
Of course, in the debug battlecore isn't referenced at all, but the problem seems to be that the value registered isn't recognized or that there is no value passed to the "battler" property, or maybe it's the ID property? I dunno
Anyway, I'm a crap coder (took a javascript course a while back for funsies) and not terribly familiar with MV's base functions and how they tie in here, but I'm trying to fiddle with this anyway. Looking for some direction.
I'm of two minds here on how to proceed. I'd like to only mess with one end to fix it(preferably the SRD end), but I'm not sure that's possible.
A: I'm wondering if I can call the yanfly registration functions in SRD's plugin and get the plugin to spoof an "isactor" positive check to the battlecore and things would just work from there. Of course there are so many functions connected to that I don't know if it wouldn't just cause other problems and I'm not
quite sure how to do so, I feel like referencing the actor switch yanfly plugin might have a registration check I can copy.
B: I'm wondering if I can just append a third conditional to the Yanfly registration implementing the "summon" type to the battlers. Though, I feel like that won't solve the problem without also changing the animated side view enemies conditional that check isenemy. And then I might have to change other yanfly plugins that do the same thing? Or maybe not, since the summon only seems to have one actual failure point.
Anywho, any pointers would be greatly appreciated.
Edit:
Actually, third possibility:
Code:
Spriteset_Battle.prototype.removeSummonSprite = function(battler) {
this._summonSprites.forEach(function(summon) {
if(summon.isBattler(battler)) {
summon.setBattler(null);
}
}, this);
};
This is the summon removal function it seems. So, I'm wondering if this particular function wasn't at the bottom of the load order if it would be able to avoid the whole issue?
Yeah, I have very little idea of what I'm talking about, so again, help appreciated.