Item synthesis and Item upgrades

Hey guys I have been using yanfly's item core, item synthesis, and item upgrade try to use an item as a ingredient while still giving that item upgrade slots. Is there a way to do this with these plugins or any other combination of plugins? As always any help is appreciated thank you for your time.
~V
I recently made this post about using independent items for a crafting plugin:

I have not tested it personally, and I'm uncertain whether the poster was responding to me with "thank you, it worked," or just thanking me for replying.

Give it a shot, let us know if it works or report any errors.
I recently made this post about using independent items for a crafting plugin:

I have not tested it personally, and I'm uncertain whether the poster was responding to me with "thank you, it worked," or just thanking me for replying.

Give it a shot, let us know if it works or report any errors.
So I switched everything around so that I was using the same crafting system and got most everything to work except for two things. 1. The crafted sword should have two slots not one and 2. when I go to craft the item it comes up with this bug.
Crafting Error.jpg
so I tried shortening the name I gave the plugin that you said to create and everything worked this time except for the part where I went to actually craft then it came up with this bug.
Crafting Error 1.jpg
So I switched everything around so that I was using the same crafting system and got most everything to work except for two things.
You shouldn't need to change any plugins unless you want to - nothing I posted there is specific to that crafting plugin.

so I tried shortening the name I gave the plugin that you said to create and everything worked this time except for the part where I went to actually craft then it came up with this bug.
That's a good start - none of the files in your game should have spaces in the filenames, so that's something you might want to check now. If you get to the point where you try to distribute the game to other people, spaces and special characters can cause a variety of bugs.

For the error, try replacing the plugin code with this. I only changed a portion but figured replacing the whole body was easier than describing which portion to edit.
Code:
Game_Party.prototype.loseItem = function(item, amount, includeEquip) {
    if (!DataManager.isIndependent(item))
    {
        this.gainItem(item, -amount, includeEquip);
        return;
    }
    var group, found=0;
    if (item.etypeId)
        group=item.etypeId==1 ? this.weapons() : this.armors();
    else
        group=this.items();
    switch (item._dataClass)
    {
        case 'item':
            group=this.items();
            break;
        case 'weapon':
            group=this.weapons();
            break;
        case 'armor':
            group=this.armors();
            break;
    }
    for (var i=0; i<group.length; i++)
    {
        if (!group[i])
            continue;
        if (group[i].baseItemId && group[i].baseItemId==item.id)
        {
            found++;
            this.removeIndependentItem(group[i], includeEquip);
            if (found==amount)
                break;
        }
    }
};
You shouldn't need to change any plugins unless you want to - nothing I posted there is specific to that crafting plugin.


That's a good start - none of the files in your game should have spaces in the filenames, so that's something you might want to check now. If you get to the point where you try to distribute the game to other people, spaces and special characters can cause a variety of bugs.

For the error, try replacing the plugin code with this. I only changed a portion but figured replacing the whole body was easier than describing which portion to edit.
Code:
Game_Party.prototype.loseItem = function(item, amount, includeEquip) {
    if (!DataManager.isIndependent(item))
    {
        this.gainItem(item, -amount, includeEquip);
        return;
    }
    var group, found=0;
    if (item.etypeId!=undefined)
        group=item.etypeId==0 ? this.weapons() : this.armors();
    else
        group=this.items();
    switch (item._dataClass)
    {
        case 'item':
            group=this.items();
            break;
        case 'weapon':
            group=this.weapons();
            break;
        case 'armor':
            group=this.armors();
            break;
    }
    for (var i=0; i<group.length; i++)
    {
        if (!group[i])
            continue;
        if (group[i].baseItemId && group[i].baseItemId==item.id)
        {
            found++;
            this.removeIndependentItem(group[i], includeEquip);
            if (found==amount)
                break;
        }
    }
};
Changed the code to this one in the new plugin, but now it's giving making the ingredient sword have 0 of 1 slots where it should be 1/1 and not consuming the ingredient sword when crafting the new sword oddly enough the newly crafted sword has the number of slots it's supposed to have.
Changed the code to this one in the new plugin, but now it's giving making the ingredient sword have 0 of 1 slots where it should be 1/1 and not consuming the ingredient sword when crafting the new sword oddly enough the newly crafted sword has the number of slots it's supposed to have.
Sorry, that's about what I have from just reading through the code.

If you have demo items set up in a project that you're willing to share, I could probably find some time tomorrow to take a look at what's not working correctly. Otherwise, have to see if someone else has a better idea than I do.
Sorry, that's about what I have from just reading through the code.

If you have demo items set up in a project that you're willing to share, I could probably find some time tomorrow to take a look at what's not working correctly. Otherwise, have to see if someone else has a better idea than I do.
Not a problem. Thank you very much for all your help. With your help I was able to figure out what was still going wrong. It was the Slot Variance setting in the yanfly slot upgrade plugin. It needs to be set to zero.
To be clear, @V-DeLuna, does that mean it works now? It takes your independent items as ingredients and there's no more error in the code?
To be clear, @V-DeLuna, does that mean it works now? It takes your independent items as ingredients and there's no more error in the code?
Correct. No more error code for the time being.
Awesome, then I'll post it up as a mod for the plugin.
Awesome, then I'll post it up as a mod for the plugin.
Sorry sorry I got ahead of myself. Everything is working as it should except it's not consuming the ingredient sword when you craft.
I have that demo if you would like me to send it.
The Like button doesn't have anything appropriate attached, so let me just say :|

🤣

Sure, send me a link.
The Like button doesn't have anything appropriate attached, so let me just say :|

🤣

Sure, send me a link.
I had one number wrong 😛

I updated my previous post with the fixed code. Let me know if you run into any other trouble.
I had one number wrong 😛

I updated my previous post with the fixed code. Let me know if you run into any other trouble.
Brilliant! Lol. Thank you very much! Works now! ^_-
I had one number wrong 😛

I updated my previous post with the fixed code. Let me know if you run into any other trouble.
Well it took me a minute but I found the next problem still having to do with the same demo I sent. When you equip the weapon then look back at your inventory it says you have 2 but shows the same "1/100" next to each.
So...just out of curiosity...with just the changes to the crafting plugin, not using the extra snippet that I provided at all...doesn't it work fine?
So...just out of curiosity...with just the changes to the crafting plugin, not using the extra snippet that I provided at all...doesn't it work fine?
Yea you're right. It does. Completely missed that the first time around. Thank you.
Heh, me too!

Original thread: https://forums.rpgmakerweb.com/threads/item-synthesis-and-item-upgrades.154349/