FINAL: Things are working! So... turns out ItemCore doesn't play nice with my(DreamX) auto-equip integrated with my DynamicActors plugin. At least with an initial equipment set. So the solution? Empty out the initial equipment, and just give it to the player via Event in-game. *phew*
Can't believe it took me this long to figure it out, but still... thank you to all those who have been patient with me and working with me. 🙂
UPDATES (in spoiler text) - last updated 06/24/2019 @15:53pm (PST)
EDIT: The problem was somewhere between the changeEquip(), notetags, or initEquips()... I'm still not 100% sure, but at the moment it's working. When more plugins that change/alias the changeEquip() function are added however... it breaks again.
Can't believe it took me this long to figure it out, but still... thank you to all those who have been patient with me and working with me. 🙂
UPDATES (in spoiler text) - last updated 06/24/2019 @15:53pm (PST)
Update10: Still unable to determine the "main" culprit behind this, however I am noticing a pattern.... multiple "changeEquip()" aliases seem to be digging themselves into an infinite loop. Example:
LordV_ObjBasedSwVar.js I made it so it overwrote the original method, adding in compatability here and there for YEP_EquipCore, the original function, etc. And then in LordV_DynamicActors, it saves the 'current' item (if any), calls the original (or in this case the overwrote method from LordV_ObjBasedSwVar.js), and continues about its day..... now here comes the fun part... any further plugins that alias changeEquip() after that seem to be called back in this infinite loop.
I guess it's because the later plugins override and if their method is called they call the overrides? I don't know exactly how it works, but it is a problem >:( Everything was working fine until I activated another plugin that overwrites changeEquip() and now I'm having the blackout issue again.
-----
Update9: I think I understand where the loop is coming from.... when the changeEquip() is called from DynamicActors (lowest in plugin order), it makes a call back to the original - or previously alias'd method - which is in ObjBasedSwVar... which then makes a call to the original/previously alias'd method, etc (But DynamicActors overrides it, so I think it calls that one again...
I think that means that THAT is the main problem here. I'm going to try to just flat out override changeEquip (copying the original code in, and adding in a compatability section for YEP_EquipCore) and see if that works.
------
Update8: A minor setback... copying over the 'working' scripts into the main project has brought me back to the equips() problem and a few others as mentioned in previous updates here. So I tried putting some console messages in YEP_EquipCore's equips() function and this is what I got...
I even put some console.logs in my changeEquip() function (LordV_ObjBasedSwVar.js) and.... can't even show you the log there, as it seems to loop on forever.
------
Update7: Progress is being made... setting independent items back to all 0, and a change in initEquips to account for YEP_EquipCore compatibility has made things stable.... however, I really want to use YEP_ItemCore's independent items. See Update5's screenshot for the current problem.
------
Update6: Still messing around here, trying to solve this, but I came across something interesting - but annoying. My System.json data is still reading actors 1-4 with their old initial data (when you first start a project).... Even though I have deleted the actors from both the party setup, from the Actors tab itself, reduced maximums to 1 ("our Test subject") and changed up the equips....
------
Update5: When I comment out my initEquips (that scans starting equips for meta tags for the dynamic actors system), it gives THIS error instead:
------
Update4: Alright so I put the plugins (YEP_CoreEngine, YEP_ItemCore, YEP_EquipCore, LordV_ObjBasedSwVar, and LordV_DynamicActors) in a separate project. After I copied over my resources (characters, faces, etc for the dynamic actors plugin) I loaded it up and everything was fine... however... I had forgotten the notetags. So I put those in, and now the game starts up blank (frozen) and can't open the console menu. So something is locking up somewhere...
------
Update3: Thought the "this._equips[slotId].object()" would've been the item problem with Function.DataManager.isItem, so I changed it back to this.equips()[slotId], then I'm back to the same problem (bunch of changeEquips logged, and at the top YEP_EquipCore = line 467 "Game_Actor.prototype.equips"... UGH!
------
Update2: Welp, got the weird error again (moving ObjBasedSwVar below ItemCore but above EquipCore):
------
Update1: @caethyril Well setting max weapons/armors to 0 -at first- seemed to solve the issue, but the moment (at character creation) I switch (which changes outfits) it cropped up a different error .. which I can't seem to replicate now. I tried changing from
to
which got rid of the other unexpected error (about registering the item or something from YEP_ItemCore). However, now I still get the changeEquip max call stack error since I've just bypassed equips() is all....
LordV_ObjBasedSwVar.js I made it so it overwrote the original method, adding in compatability here and there for YEP_EquipCore, the original function, etc. And then in LordV_DynamicActors, it saves the 'current' item (if any), calls the original (or in this case the overwrote method from LordV_ObjBasedSwVar.js), and continues about its day..... now here comes the fun part... any further plugins that alias changeEquip() after that seem to be called back in this infinite loop.
I guess it's because the later plugins override and if their method is called they call the overrides? I don't know exactly how it works, but it is a problem >:( Everything was working fine until I activated another plugin that overwrites changeEquip() and now I'm having the blackout issue again.
-----
Update9: I think I understand where the loop is coming from.... when the changeEquip() is called from DynamicActors (lowest in plugin order), it makes a call back to the original - or previously alias'd method - which is in ObjBasedSwVar... which then makes a call to the original/previously alias'd method, etc (But DynamicActors overrides it, so I think it calls that one again...
I think that means that THAT is the main problem here. I'm going to try to just flat out override changeEquip (copying the original code in, and adding in a compatability section for YEP_EquipCore) and see if that works.
------
Update8: A minor setback... copying over the 'working' scripts into the main project has brought me back to the equips() problem and a few others as mentioned in previous updates here. So I tried putting some console messages in YEP_EquipCore's equips() function and this is what I got...
Code:
Yanfly.Equip.Game_Actor_equips = Game_Actor.prototype.equips;
Game_Actor.prototype.equips = function() {
var debug = this.currentClass().equipSlots.length;
console.log("YEP_EquipCore: equips: length = "+String(debug)); // DEBUG
for (var i = 0; i < this.currentClass().equipSlots.length; ++i) {
if (this._equips[i] === undefined || this._equips[i] === null) {
console.log("equip"+String(i)+" initialized"); // DEBUG
this._equips[i] = new Game_Item();
}
}
return Yanfly.Equip.Game_Actor_equips.call(this);
};
------
Update7: Progress is being made... setting independent items back to all 0, and a change in initEquips to account for YEP_EquipCore compatibility has made things stable.... however, I really want to use YEP_ItemCore's independent items. See Update5's screenshot for the current problem.
------
Update6: Still messing around here, trying to solve this, but I came across something interesting - but annoying. My System.json data is still reading actors 1-4 with their old initial data (when you first start a project).... Even though I have deleted the actors from both the party setup, from the Actors tab itself, reduced maximums to 1 ("our Test subject") and changed up the equips....
------
Update5: When I comment out my initEquips (that scans starting equips for meta tags for the dynamic actors system), it gives THIS error instead:
------
Update4: Alright so I put the plugins (YEP_CoreEngine, YEP_ItemCore, YEP_EquipCore, LordV_ObjBasedSwVar, and LordV_DynamicActors) in a separate project. After I copied over my resources (characters, faces, etc for the dynamic actors plugin) I loaded it up and everything was fine... however... I had forgotten the notetags. So I put those in, and now the game starts up blank (frozen) and can't open the console menu. So something is locking up somewhere...
------
Update3: Thought the "this._equips[slotId].object()" would've been the item problem with Function.DataManager.isItem, so I changed it back to this.equips()[slotId], then I'm back to the same problem (bunch of changeEquips logged, and at the top YEP_EquipCore = line 467 "Game_Actor.prototype.equips"... UGH!
------
Update2: Welp, got the weird error again (moving ObjBasedSwVar below ItemCore but above EquipCore):
------
Update1: @caethyril Well setting max weapons/armors to 0 -at first- seemed to solve the issue, but the moment (at character creation) I switch (which changes outfits) it cropped up a different error .. which I can't seem to replicate now. I tried changing from
Code:
var oldItem = this.equips()[slotId];
Code:
var oldItem = this._equips[slotId].object();
EDIT: The problem was somewhere between the changeEquip(), notetags, or initEquips()... I'm still not 100% sure, but at the moment it's working. When more plugins that change/alias the changeEquip() function are added however... it breaks again.