To be completely upfront, I am absolutely horrendous at formatting code properly. I do not know the core principles to write it by hand. That being said, I am actually pretty decent at Frankensteining pieces of code together, so I think all I really need help with here is the formatting with how to do this.
What am I trying to accomplish?
I would like to call the BM_EquipCore plugin through my shop plugin as to display the custom equipcore data on the shop scene. I have already done this successfully with other plugins (shop, equip, item, etc), but they were more compatible than the one I am working with now. To do so before, I simply found the proper fields in mjshi's NPCDialogueShop.js and added the commented lines below:
This first edit calls a new function, and this new function links to the others. This works because YEP_ShopMenuCore and NPCDialogueShop call from the same parent(?) "Window_ShopStatus"
Now for the current plugin I am working with and trying to incorporate, it uses a slightly different naming convention, 'Window_EquipStatus'.
I think I can get this working by calling (or drawing?) Window_EquipStatus.prototype.refresh, or a similar function from this family found in the BM_EquipCore.js plugin, but I am a bit lost on the correct formatting to do this with.
Specific example of a line I want to try running from the shop base, would be this:
So what would be the correct way to format the code, say if I were to put the line under Window_ShopStatus.prototype.refresh = function (in NPCDialogueShop.js), as done in the first two code snippets, but to call (or draw the relevant info boxes provided by) BM.Equip.Window_EquipStatus_initialize instead?
Apologies for the long winded explanation, but I want to make sure my issue is understood clearly. Thank you.
Thinking about this more, is what I am trying to do even possible? Would the data carry over without error even though the function family(?) is different between the two plugins?
What am I trying to accomplish?
I would like to call the BM_EquipCore plugin through my shop plugin as to display the custom equipcore data on the shop scene. I have already done this successfully with other plugins (shop, equip, item, etc), but they were more compatible than the one I am working with now. To do so before, I simply found the proper fields in mjshi's NPCDialogueShop.js and added the commented lines below:
Code:
Window_ShopStatus.prototype.refresh = function() {
this.contents.clear();
if (this._item) {
var x = this.textPadding();
this.drawPossession(x, 0);
this.drawActorDatakoda(); //koda addition
if (this.isEquipItem()) {
this.drawEquipInfo(x, 0);
}
}
};
Code:
Window_ShopStatus.prototype.drawActorDatakoda = function() {
var actor = this.getActor();
// this.drawActorDisplayed(actor);
this.drawDarkRectEntries();
this.drawActorStatInfo(actor); // leads to YEP_ShopMenuCore which leads to ICFSoft_YEP_ShowParams linked to ICFSuite
this.drawEquipBody();
This first edit calls a new function, and this new function links to the others. This works because YEP_ShopMenuCore and NPCDialogueShop call from the same parent(?) "Window_ShopStatus"
Now for the current plugin I am working with and trying to incorporate, it uses a slightly different naming convention, 'Window_EquipStatus'.
I think I can get this working by calling (or drawing?) Window_EquipStatus.prototype.refresh, or a similar function from this family found in the BM_EquipCore.js plugin, but I am a bit lost on the correct formatting to do this with.
Specific example of a line I want to try running from the shop base, would be this:
Code:
BM.Equip.Window_EquipStatus_initialize = Window_EquipStatus.prototype.initialize;
Window_EquipStatus.prototype.initialize = function(x, y) {
this._item = null;
this._newItem = null;
var width = this.windowWidth();
var height = this.windowHeight();
Window_Base.prototype.initialize.call(this, x, y, width, height);
this._actor = null;
this.refresh();
};
So what would be the correct way to format the code, say if I were to put the line under Window_ShopStatus.prototype.refresh = function (in NPCDialogueShop.js), as done in the first two code snippets, but to call (or draw the relevant info boxes provided by) BM.Equip.Window_EquipStatus_initialize instead?
Apologies for the long winded explanation, but I want to make sure my issue is understood clearly. Thank you.
Thinking about this more, is what I am trying to do even possible? Would the data carry over without error even though the function family(?) is different between the two plugins?