RMMV Yanfly STB System & SRD Timed Attack Conflict (SOLVED)

Bloodynewmoon

Villager
Member
Joined
May 26, 2012
Messages
7
Reaction score
3
Primarily Uses
TypeError: Cannot read property 'isActor' of null

If an actor has a status effect that causes them to skip a turn (ex. sleep), the error comes up. I only found one other thread discussing this specific problem and it wasn't solved. After experimenting I believe the issue is with the SRD Timed Attack Core since it's the first plugin on the error list to pop up - [at Function.BattleManager.startAction (SRD_TimedAttackCore.js:464:19)].

Untitled.png

Rearranging the order of plugins did not solve the issue. Putting SRD before Yanfly prevents SRD from working, and placing it between the Battle Engine Core and STB System didn't work. STB System works when SRD Timed Attack turned off. SRD Timed Attack works when STB System is turned off. I have Yanfly's plugins listed in recommended order as seen here. SRD's Mash extension doesn't have anything to do with it since I still get the error when it's off.

Untitled.png

I don't know what to change in the code so any help would be appreciated.
 
Last edited:

Bloodynewmoon

Villager
Member
Joined
May 26, 2012
Messages
7
Reaction score
3
Primarily Uses
I looked into the code itself, and using the numbers provided in the error I found this.

var _BattleManager_startAction = BattleManager.startAction; BattleManager.startAction = function() { _BattleManager_startAction.call(this); if(this._subject.isActor() && this._subject.currentAction() && this._subject.currentAction().makeTargets()) { var subject = this._subject; var action = subject.currentAction(); var targets = action.makeTargets(); this[_.pass + "Temp Subject"] = subject; this[_.pass + "Temp Action"] = action; this[_.pass + "Temp Targets"] = targets; $gameTemp.setTemporarilyDisableLogWindow(true); this._logWindow.push('performActionStart', subject, action);

I believe the 'isActor' is referring to an issue with this part. Normally turns would be pre-selected, but with STB that doesn't happen since you're meant to move directly on to the next person, and therefore skipping a turn is causing an issue somehow. I haven't run into any other conflicts using the two plugins together. You can still get SRD's Timed Attack plugin here if you want to look at the whole thing and see where I got it from.
 

Bloodynewmoon

Villager
Member
Joined
May 26, 2012
Messages
7
Reaction score
3
Primarily Uses
Added the full error list. Not sure if it will help, but it's better than nothing.
 

gimmer_

Veteran
Veteran
Joined
Jan 13, 2021
Messages
75
Reaction score
52
First Language
English
Primarily Uses
RMMV
Replace:
if(this._subject.isActor() && this._subject.currentAction() && this._subject.currentAction().makeTargets()) {

with:
if(this._subject && this._subject.isActor() && this._subject.currentAction() && this._subject.currentAction().makeTargets()) {
 

Latest Threads

Latest Posts

Latest Profile Posts

It's not about your writing, it's about your mapping.
Newbie, please be gentle
reworkMZ.png
To keep myself motivated to make the MZ SF tiles normal and usable modern tiles I like to make tiny maps and toggle between the options :3
Character selection in games be like
Special Tractor Operation! :kaojoy:

Forum statistics

Threads
122,083
Messages
1,146,355
Members
160,369
Latest member
Akirakill
Top