Sign in to follow this  
Runewulv

Crafting question.

7 posts in this topic

Hello,

I'm trying to make it so that players can scrap their GPS, Radio, Watch, XM8, etc using the crafting system. Obviously the item has to be in the inventory, but for some reason it does not recognize the item is in your inventory or on your belt when you open the crafting recipe. So you click on Scrap XM8, for instance, it recognizes all the tools you need but instead of showing the XM8 as a component it shows it as blank and 0/1. It's correctly written, the class name is correct, just does not want to recognize the item. 

I had this trouble when trying to make a deploy vehicle with ExAd. I wanted to make it so that it consumed your XM8 or GPS for the vehicle and you could pack the vehicle to get the tool back. However, it was doing the same thing then. Despite the right class name it does not recognize the item in the inventory. Am I using the wrong class name? is it not ItemGps or Exile_Item_XM8?

Share this post


Link to post
Share on other sites

My guess, not knowing the code right now it'll look into inventory and since you have xm8/gps equipped it's not in your inventory.

Try to drag the item from equipped slot into your inventory (backpack, uniform, vest) - should work tho.

Share this post


Link to post
Share on other sites
Advertisement

as i mentioned in the post above, the recipe was attempted both in the tool belt and in the inventory and both said does not have xm8 or gps

 

Spoiler

class DeconGPS: Exile_AbstractCraftingRecipe
{
    name = "Scrap GPS";
    pictureItem = "ItemGPS";
    requiresFire = 0;
    returnedItems[] =
    {
        {1, "DDR_Item_Electrical_Component"},
        {1, "DDR_Item_Fiberglass"},
        {1, "Exile_Item_MetalWire"}
    };
    requiredInteractionModelGroup = "Workbench2";
    tools[] =
    {
        "Exile_Item_CordlessScrewdriver",
        "Exile_Item_Pliers"
    };
    components[] =
    {
       {1, "ItemGPS"}
    };
    
    category = "Exile Item";    
    
};
class DeconRadio: Exile_AbstractCraftingRecipe
{
    name = "Scrap Radio";
    pictureItem = "ItemRadio";
    requiresFire = 0;
    returnedItems[] =
    {
        {2, "DDR_Item_Electrical_Component"},
        {1, "Exile_Item_JunkMetal"},
        {1, "Exile_Item_MetalWire"}
    };
    requiredInteractionModelGroup = "Workbench2";
    tools[] =
    {
        "Exile_Item_CordlessScrewdriver",
        "Exile_Item_Pliers"
    };
    components[] =
    {
       {1, "ItemRadio"}
    };
    
    category = "Exile Item";    
    
};
class DeconWatch: Exile_AbstractCraftingRecipe
{
    name = "Scrap Watch";
    pictureItem = "ItemWatch";
    requiresFire = 0;
    returnedItems[] =
    {
        {1, "DDR_Item_Electrical_Component"},
        {1, "DDR_Item_Fiberglass"},
        {1, "Exile_Item_MetalWire"}
    };
    requiredInteractionModelGroup = "Workbench2";
    tools[] =
    {
        "Exile_Item_CordlessScrewdriver",
        "Exile_Item_Pliers"
    };
    components[] =
    {
       {1, "ItemWatch"}
    };
    
    category = "Exile Item";    
    
};

class DeconXM8: Exile_AbstractCraftingRecipe
{
    name = "Scrap XM8";
    pictureItem = "Exile_Item_XM8";
    requiresFire = 0;
    returnedItems[] =
    {
        {1, "DDR_Item_Electrical_Component"},
        {1, "DDR_Item_Fiberglass"},
        {1, "Exile_Item_MetalWire"}
    };
    requiredInteractionModelGroup = "Workbench2";
    tools[] =
    {
        "Exile_Item_CordlessScrewdriver",
        "Exile_Item_Pliers"
    };
    components[] =
    {
       {1, "Exile_Item_XM8"}
    };
    
    category = "Exile Item";    
    
};

 

Edited by Runewulv

Share this post


Link to post
Share on other sites

I have them posted in a spoiler just above you. Maybe a fresh set of eyes can see a mistake I dont see.

 

Edited by Runewulv

Share this post


Link to post
Share on other sites
19 hours ago, Runewulv said:

the recipe was attempted both in the tool belt and in the inventory and both said does not have xm8 or gps

Must have skiped that part, sorry.

The "problem" however, is located in ExileClient_gui_crafting_show/ExileClient_gui_crafting_show:

_componentItemName = getText(configFile >> "CfgMagazines" >> _componentItemClassName >> "displayName");

XM8, GPS, Radio, Watch and so on are not defined in CfgMagazines, they're defined in CfgWeapons. 

This might help you out:

https://github.com/Novax69/weaponsCrafting/tree/master/If you dont use CDAH/Custom/weaponsCraft/data

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.