MV YEP_BattleEngineCore compatibility with SDR_Timedattackcore Help

RPG MAKER MV

I am using SRD_TimedAttackCore. I have have no issues with it working. However, I wanted to change the timed attacks to work off of the Actor's weapon notetag instead of skill notetag. When I did this I got a type error. This error only happens when switching from skill based timed attacks to weapons. I have narrowed it down to be come sort of incompatibility with YEP_BattleEngineCore. But I can't quit seem to fix it myself.

I have checked all other plugins and both plugins work, but just not with each other. I included a console and error code image along with the plugins themselves.

*Notably* The console does so other errors with some other plugins, but I think this is directly related to the issues with the YEP and SRD plugins. Only happens when those two try to interact.

Any help would be awesome.

Thank you.

http://sumrndm.site/timed-attack-core/
http://www.yanfly.moe/wiki/Battle_Engine_Core_(YEP)

1717268564473.png


Spoiler: Console
rpg_managers.js:1949 TypeError: Cannot read property 'type' of undefined
at Function.BattleManager.updatePhase (SRD_TimedAttackCore.js:485)
at Function.BattleManager.update (YEP_BattleEngineCore.js:1910)
at Scene_Battle.updateBattleProcess (rpg_scenes.js:2265)
at Scene_Battle.updateBattleProcess (MOG_EmergeMotion.js:167)
at Scene_Battle.update (rpg_scenes.js:2257)
at Scene_Battle.update (YEP_BattleEngineCore.js:4550)
at Scene_Battle.update (YEP_X_TurnOrderDisplay.js:646)
at Scene_Battle.update (MOG_BattleTransitions.js:684)
at Scene_Battle.update (MOG_BattleHud.js:2449)
at Scene_Battle.update (MOG_BattleCursor.js:327)

**POST REMOVED TO CORRECT FORUM PAGE - THANK YOU ADMINS**
Include links to the plugins, do not redistribute them.
Include links to the plugins, do not redistribute them.
FIXED.....Thank you!

*UPDATE* - I was able to get the type error to be removed by replacing the BattleManager code within SRD_TimedAttackCore plugin with the following.


Spoiler: Code
Code:
if ((this._action.item().meta["SRD TAS"] && this._action.item().meta["SRD TAS"].type === "actor") || (_.default === 'actor' && !this._action.item().meta["SRD TAS"])) {
    if (this._subject.actor().meta["SRD TAS"]) {
        this._tasAttackFrameWindow.setItem(this._subject.actor().meta["SRD TAS"]);
        this._tasAttackFrameWindow.open();
        this._tasAttackFrameWindow.start();
        this[_.pass + "Allow TAS"][1] = false;
    } else {
        this.endTASAttackThing();
    }
} else if ((this._action.item().meta["SRD TAS"] && this._action.item().meta["SRD TAS"].type === "class") || (_.default === 'class' && !this._action.item().meta["SRD TAS"])) {
    if (this._subject.currentClass() && this._subject.currentClass().meta["SRD TAS"]) {
        this._tasAttackFrameWindow.setItem(this._subject.currentClass().meta["SRD TAS"]);
        this._tasAttackFrameWindow.open();
        this._tasAttackFrameWindow.start();
        this[_.pass + "Allow TAS"][1] = false;
    } else {
        this.endTASAttackThing();
    }
} else if ((this._action.item().meta["SRD TAS"] && this._action.item().meta["SRD TAS"].type === "weapon") || (_.default === 'weapon' && !this._action.item().meta["SRD TAS"])) {
    if (this._subject.weapons()[0] && this._subject.weapons()[0].meta["SRD TAS"]) {
        this._tasAttackFrameWindow.setItem(this._subject.weapons()[0].meta["SRD TAS"]);
        this._tasAttackFrameWindow.open();
        this._tasAttackFrameWindow.start();
        this[_.pass + "Allow TAS"][1] = true;
    } else {
        this.endTASAttackThing();
    }
} else if (this._action.item().meta["SRD TAS"]) {
    this._tasAttackFrameWindow.setItem(this._action.item().meta["SRD TAS"]);
    this._tasAttackFrameWindow.open();
    this._tasAttackFrameWindow.start();
    this[_.pass + "Allow TAS"][1] = false;

1717290909818.png


Now, the button image is showing. You can still hear sounds for the timed attack, but the attack ever happens.

FIXED.....Thank you!

*UPDATE* - I was able to get the type error to be removed by replacing the BattleManager code within SRD_TimedAttackCore plugin with the following.


Spoiler: Code
Code:
if ((this._action.item().meta["SRD TAS"] && this._action.item().meta["SRD TAS"].type === "actor") || (_.default === 'actor' && !this._action.item().meta["SRD TAS"])) {
    if (this._subject.actor().meta["SRD TAS"]) {
        this._tasAttackFrameWindow.setItem(this._subject.actor().meta["SRD TAS"]);
        this._tasAttackFrameWindow.open();
        this._tasAttackFrameWindow.start();
        this[_.pass + "Allow TAS"][1] = false;
    } else {
        this.endTASAttackThing();
    }
} else if ((this._action.item().meta["SRD TAS"] && this._action.item().meta["SRD TAS"].type === "class") || (_.default === 'class' && !this._action.item().meta["SRD TAS"])) {
    if (this._subject.currentClass() && this._subject.currentClass().meta["SRD TAS"]) {
        this._tasAttackFrameWindow.setItem(this._subject.currentClass().meta["SRD TAS"]);
        this._tasAttackFrameWindow.open();
        this._tasAttackFrameWindow.start();
        this[_.pass + "Allow TAS"][1] = false;
    } else {
        this.endTASAttackThing();
    }
} else if ((this._action.item().meta["SRD TAS"] && this._action.item().meta["SRD TAS"].type === "weapon") || (_.default === 'weapon' && !this._action.item().meta["SRD TAS"])) {
    if (this._subject.weapons()[0] && this._subject.weapons()[0].meta["SRD TAS"]) {
        this._tasAttackFrameWindow.setItem(this._subject.weapons()[0].meta["SRD TAS"]);
        this._tasAttackFrameWindow.open();
        this._tasAttackFrameWindow.start();
        this[_.pass + "Allow TAS"][1] = true;
    } else {
        this.endTASAttackThing();
    }
} else if (this._action.item().meta["SRD TAS"]) {
    this._tasAttackFrameWindow.setItem(this._action.item().meta["SRD TAS"]);
    this._tasAttackFrameWindow.open();
    this._tasAttackFrameWindow.start();
    this[_.pass + "Allow TAS"][1] = false;

1717290909818.png


Now, the button image is showing. You can still hear sounds for the timed attack, but the attack ever happens.

***EDIT*** I figured this out. Has a false set to true in the code and the parameters and both were working against each other. Thank you!
This thread is closed due to being reported as solved. If you need it reopened, let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/yep_battleenginecore-compatibility-with-sdr_timedattackcore-help.169188/