Jump to content
Sign in to follow this  
ryan_h

Retexture Config.CPP trouble

Recommended Posts

Hello all,  I am working on my first retexture config of the CUP BDU.  I can get the unit to load into the editor but I get the error "cannot load texture".  I have tested the texture with the SetObjectTexture and it works fine.  I have spent the last week searching these forums and the web to find a solution to my problem but none of it is making sense to me.  I have came to my ropes end and I don't know what I'm missing so any help would be much appreciated.  I got the config template from a YouTube tutorial.  I treid a couple of different ones but all ended with the same result.

 

Quote

class CfgPatches 

    class My_Mod_Config 
    { 
        units[] = {"Custom_Uniform_Mod"}; 
        weapons[] = {}; 
        requiredVersion = 0.1; 
        requiredAddons[] = {"A3_Characters_F"}; 
    }; 
}; 

//************************************************************************************************************************************************************************************************
//*****        Factions                  *********************************************************************************************************************************************************
//************************************************************************************************************************************************************************************************
class cfgFactionClasses 

    class Custom_Faction 
    { 
        displayName = "My Custom Faction"; 
        priority = 3; // Position in list. 
        side = 1; // Opfor = 0, Blufor = 1, Indep = 2. 
        icon = ""; //Custom Icon 
    };  
};

class CfgUnitInsignia
{
    class Custom_Insignia
    {
        displayName = "My Custom Patch"; // Name displayed in Arsenal
        author = "ryanh"; // Author displayed in Arsenal
        texture = "\Custom_Uniform\UI\custom_patch_co.paa"; // Image path
        textureVehicle = ""; // Does nothing currently, reserved for future use
    };
}; 

class UniformSlotInfo 

    slotType = 0; 
    linkProxy = "-"; 
}; 

class CfgVehicles 
{     
    //************************************************************************************************************************************************************************************************
    //*****             Units                *********************************************************************************************************************************************************
    //************************************************************************************************************************************************************************************************
    class B_Soldier_base_F; 
    
    class Custom_Uniform: B_Soldier_base_F {
        author = "ryanh"; 
        _generalMacro = "B_Soldier_base_F"; 
        scope = 2; 
        displayName = "Custom Soldier"; 
        identityTypes[] = {"Head_NATO", "G_NATO_default"}; 
        genericNames = "NATOMen"; 
        faction = "Custom_Faction";
        model = "\CUP\Creatures\People\Military\CUP_Creatures_People_Military_USArmy\CUP_u_BDUv2.p3d"; //Default NATO 
        uniformClass = "Custom_Camo"; 
        hiddenSelections[] = {"Camo1","Camo2","Camo3","Camo4","Flag","Insignia"}; 
        hiddenSelectionsTextures[] = {"custom_uniform\x\rmh\addons\uniforms\BDU\camo\US_BDU_RACS.paa","custom_uniform\x\rmh\addons\uniforms\BDU\camo\US_BDU_RACS.paa","custom_uniform\x\rmh\addons\uniforms\BDU\camo\US_BDU_RACS.paa","custom_uniform\x\rmh\addons\uniforms\BDU\camo\US_BDU_RACS.paa"};  
         weapons[] = {"arifle_TRG20_ACO_Flash_F","Throw","Put"}; 
        respawnWeapons[] = {"arifle_TRG20_ACO_Flash_F","Throw","Put"}; 
        magazines[] = {"HandGrenade","HandGrenade","SmokeShell","SmokeShellGreen","Chemlight_green","Chemlight_green"}; 
        respawnMagazines[] = {"HandGrenade","HandGrenade","SmokeShell","SmokeShellGreen","Chemlight_green","Chemlight_green"};
        linkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio"}; 
        respawnLinkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio"}; 
    };


};

class cfgWeapons 

    //********************************************************************************************************************************************************************************************
    //*****            Uniforms              *****************************************************************************************************************************************************
    //********************************************************************************************************************************************************************************************
    class ItemCore; 
    class UniformItem; 
    class Uniform_Base: ItemCore 
    { 
        class ItemInfo; 
    }; 

    class Custom_Camo: Uniform_Base 
    { 
        scope = 2; 
        displayName = "Custom Camo"; 
        picture = "-"; 
        model = "\A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d"; 
        class ItemInfo : UniformItem { 
            uniformClass = "Custom_Uniform"; 
            containerClass = "Supply50"; 
            mass = 50; 
        }; 
    };
}; 

 

Share this post


Link to post
Share on other sites

Your Path to the file looks incorrect, for textures and such you need to go from your addon name. I can't tell if you have named it custom_uniform because your folder structure is weird.

\myAddonName\data\Uniform_Name\myCoolTexture.paa

Would be the correct path for a texture file

IF your addon does follow this path you have, then just add a \ at the start of the path to the texture and it will find it. I would suggest changing this to a simplier, more intuitive structure though, like the one I put above.

 

Also you have a unit in the cfgPatches called "Custom_Uniform_Mod" but it doesn't exist in the config so its not needed and if you're using CUP assets add the addon to the required addon section of cfgPatches so it will load properly.

Share this post


Link to post
Share on other sites

Thanks 56Curious, I got it all worked out and in game.  Now I understand what I was doing wrong with the texture path.  When I was packing the PBO from the P drive, I was putting into another folder I had created in the P drive that was giving it another prefix the I was not adding in the path.  

 

Link to my retexture working in game

https://imgur.com/a/wZYAWgK

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×