YEP EquipRequirements not loading...

● ARCHIVED · READ-ONLY
Started by Roguedeus 12 posts View original ↗
  1. Solved. See last post.

    I've been gone from the forum for some time and returned only to find that Yanfly appears to have locked the main support thread and made it impossible to contact him outside Patreon, which has a terrible feedback section that Yanfly doesn't even appear to be checking. (Which has me reconsidering my continued support, after several years now)... So...

    I'm here to ask if anyone is using YEP_X_EquipRequirements.js plugin successfully?

    Reason being, under normal conditions, it doesn't load for me at all.
    I've never tried to use it till today.
    I've figured out how to fix it, but it makes no sense, really, and I'm no stranger to JavaScript.

    Code:
    if (Imported.YEP_EquipCore) {
    
    //all code between
    
    }

    That is broken... It shouldn't be, but it is. There are other plugins making the same check, and they work. So, it's not a spelling error, or a syntax issue, because the game starts up just fine and reports no code issues at all... The plugin simply doesn't load.

    Proof...
    18_0822_equipRequirementIssue_1.JPG

    Changing the boolean check to this...

    Code:
    if (true) {
    
    //all code between
    
    }

    Fixes the issue...

    (Edit: It isn't a plugin order issue either...)

    Proof...
    18_0822_equipRequirementIssue_1b.JPG

    (Edit: It isn't a version, or accidental edit issue either. Fresh version from Yanfly's plugin page...)

    Proof...
    18_0822_equipRequirementIssue_1c.JPG

    Now, before you ask... Yes, I am using EquipCore. As a matter of fact, I have several plugins that depend on it, and they make the exact same check for it, and they work fine... As mentioned above.

    So, I am here wondering if anyone is actually using it successfully without having to make this change?

    Any feedback is appreciated!

    Thanks!


    (Update: It appears the problem isn't the plugin, but that my editor is not saving the order of plugins correctly for some reason... Detailed below)
  2. Did you place YEP_X_EquipRequirements below YEP_EquipCore?

    Can you show a screenshot of your plugin manager?
  3. Aloe Guvner said:
    Did you place YEP_X_EquipRequirements below YEP_EquipCore?

    Can you show a screenshot of your plugin manager?

    Thanks for the quick feedback Aloe, but yes.
    I assure you, it is not a plugin order issue.
    If it were, I'd be crying of embarrassment. ;)

    I'll add that as a caveat to the OP.
  4. I just started using it recently as I started working on class changing equipment. Haven't had to touch the code at all. Maybe try downloading it again from the site.
  5. You can put breakpoints in the debugger for when Imported.YEP_EquipCore is set to "true" in the Equip Core and another breakpoint when the boolean is checked in the Equip Requirements.
    Make sure it hits both breakpoints when the game is booted and check the values.
  6. JGreene said:
    I just started using it recently as I started working on class changing equipment. Haven't had to touch the code at all. Maybe try downloading it again from the site.

    Thanks as well for the quick feedback!
    It is not a version, or accidental edit issue either... I double checked after you mentioned it to be sure.

    Adding it as a caveat to the OP.
  7. Aloe Guvner said:
    You can put breakpoints in the debugger for when Imported.YEP_EquipCore is set to "true" in the Equip Core and another breakpoint when the boolean is checked in the Equip Requirements.
    Make sure it hits both breakpoints when the game is booted and check the values.

    That is how I figured out it wasn't loading...

    As a regular debug tool, when things make no sense that is, I place console.log reports periodically in the code.

    Everything works, as long as I effectively remove the check for YEP_EquipCore.

    Edit: To clarify. I also searched my entire code base for any moment that Imported.YEP_EquipCore value is set, and it happens only at the beginning of Yanfly's EquipCore plugin.
  8. Not sure if I'm the only one who does this, but I put the YEP_X prefixed plugins below all the other ones. I just don't pair up the extensions with their cores. And I even have some below other plugins. For example:
    z9aGkjG.png
    The gauge didn't allow common events to play. This is at the bottom of my plugin list.

    Glad you got it to work though. :)
  9. JGreene said:
    Not sure if I'm the only one who does this, but I put the YEP_X prefixed plugins below all the other ones. I just don't pair up the extensions with their cores. And I even have some below other plugins. For example:
    z9aGkjG.png
    The gauge didn't allow common events to play. This is at the bottom of my plugin list.

    Glad you got it to work though. :)

    I totally understand.
    As a rule, I just copy the order Yanfly places plugins, in the Plugin Sample Project.
    Just to be sure.
  10. Well, here is proof that I'm not crazy...

    I placed console.log reports of the variable in the code again.

    18_0822_equipRequirementIssue_2b.JPG

    18_0822_equipRequirementIssue_2c.JPG

    This is the output.

    18_0822_equipRequirementIssue_2d.JPG

    Notice that it is inverted in order?

    Well, just for proof, they are not inverted in the Editor. (This is a new capture)

    18_0822_equipRequirementIssue_2aa.JPG

    So, I made a clean project and added the two plugins. With the same log reports...

    Same order of plugins.

    18_0822_equipRequirementIssue_2a.JPG

    And here is the output.

    18_0822_equipRequirementIssue_2.JPG

    NOT Inverted.

    Can anyone explain how this happens? Or better yet, how I might fix it?

    I've already tried deleting the plugins.js file and having the editor rebuild it.
  11. Well bloody hell... I had a duplicate addition of the EquipRequirements plugin in the list...

    18_0822_equipRequirementIssue_2e.JPG

    /facepalm

    Thanks for all the attention I wasted.
    Lesson learned. ;)
  12. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.