V-DeLuna

Veteran
Veteran
Joined
Apr 20, 2021
Messages
64
Reaction score
9
First Language
English
Primarily Uses
RMMV
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
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,930
Reaction score
4,770
First Language
English
Primarily Uses
RMMV
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.
 

V-DeLuna

Veteran
Veteran
Joined
Apr 20, 2021
Messages
64
Reaction score
9
First Language
English
Primarily Uses
RMMV
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
 

V-DeLuna

Veteran
Veteran
Joined
Apr 20, 2021
Messages
64
Reaction score
9
First Language
English
Primarily Uses
RMMV
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
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,930
Reaction score
4,770
First Language
English
Primarily Uses
RMMV
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;
        }
    }
};
 
Last edited:

V-DeLuna

Veteran
Veteran
Joined
Apr 20, 2021
Messages
64
Reaction score
9
First Language
English
Primarily Uses
RMMV
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.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,930
Reaction score
4,770
First Language
English
Primarily Uses
RMMV
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.
 

V-DeLuna

Veteran
Veteran
Joined
Apr 20, 2021
Messages
64
Reaction score
9
First Language
English
Primarily Uses
RMMV
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.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,930
Reaction score
4,770
First Language
English
Primarily Uses
RMMV
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?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,930
Reaction score
4,770
First Language
English
Primarily Uses
RMMV
Awesome, then I'll post it up as a mod for the plugin.
 

V-DeLuna

Veteran
Veteran
Joined
Apr 20, 2021
Messages
64
Reaction score
9
First Language
English
Primarily Uses
RMMV
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.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,930
Reaction score
4,770
First Language
English
Primarily Uses
RMMV
The Like button doesn't have anything appropriate attached, so let me just say :|

:guffaw:

Sure, send me a link.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,930
Reaction score
4,770
First Language
English
Primarily Uses
RMMV
I had one number wrong :stickytongue:

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

V-DeLuna

Veteran
Veteran
Joined
Apr 20, 2021
Messages
64
Reaction score
9
First Language
English
Primarily Uses
RMMV
I had one number wrong :stickytongue:

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.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,930
Reaction score
4,770
First Language
English
Primarily Uses
RMMV
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?
 

V-DeLuna

Veteran
Veteran
Joined
Apr 20, 2021
Messages
64
Reaction score
9
First Language
English
Primarily Uses
RMMV
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

Hi sweethearts! :kaoluv: Check out my review of @EntangledPear's totally oldskool The Stuff Fairy Tales Are Made Of!
When you spend all day at work distracted by things you want to work on or try in your project and then by the time you get home, you are too mentally tired to concentrate so you just browse the forum instead and think of more things you won’t get to work on for a while.
Time to write some enemy behaviors, here's the stream link for those interested.

Call of duty 1&2 had an interesting cheat prevention method. Between levels the game unloads and reloads the engine dll. If you ever employ this method, make sure to include at least an md5 hash check. Otherwise I can just edit that dll and implant cheats into it.
Hi-Fi Rush is one of the coolest games I've seen in a while. I don't have a way to play it so I watched a friend and wow... I really wish I had a powerful enough computer for it.

Forum statistics

Threads
128,277
Messages
1,193,257
Members
168,732
Latest member
Thot123
Top