Jump to content
DCCVIII

Pistol light and Mini sight re-texture problem

Recommended Posts

I have successfully re-textured the Glock 19 and its magazine so I wanted to re-texture the Pistol flashlight and Pistol mini sights (separate mods) to go with it. My problem is with the config.cpp as I cannot figure out the correct class names, I have no errors when creating the PBO's but my textures do not load in game.

Any help would be greatly appreciated.

Pistol flashlight config

 class CfgPatches {
    class DCM_Attachments {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {"DZ_Data"};
    };
};
class cfgVehicles 
{
class Switchable_Base;    // External class reference
    
    class TLRLight: Switchable_Base {
        displayName = "TLS3 Pistol Flashlight";
        descriptionShort = "TLS3 Pistol Flashlight";
        hiddenSelections[] = {"zbytek"};
        hiddenSelectionsTextures[] = {"DCMTLS3\data\tls3_co.paa"};
        hiddenSelectionsMaterials[] = {"DCMTLS3\data\tls3.rvmat"};
        
        class DamageSystem {
            class GlobalHealth {
                class Health {
                    hitpoints = 200;
                    healthLevels[] = {{1.0, {"DCMTLS3\data\tls3.rvmat"}}, {0.7, {"DCMTLS3\data\tls3.rvmat"}}, {0.5, {"DCMTLS3\data\tls3_damage.rvmat"}}, {0.3, {"DCMTLS3\data\tls3_damage.rvmat"}}, {0.0, {"DCMTLS3\data\tls3_destruct.rvmat"}}};
                };
            };
        };
    };
};

 

Mini sights config


class CfgPatches {
    class DCM_PistolOptic {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {"DZ_Data"};
    };
};

class cfgVehicles {
    class PistolOptic_base;    // External class reference
    
    class PistolOptic : PistolOptic_base {
        displayName = "MRDS Optic";
        descriptionShort = "MRDS Optic";
        hiddenSelections[] = {"zbytek"};
        hiddenSelectionsTextures[] = {"DCM45MRDS\data\mrds_co.paa"};
        hiddenSelectionsMaterials[] = {"DCM45MRDS\data\mrds.rvmat"};
            };
        class DamageSystem {
            class GlobalHealth {
                class Health {
                    hitpoints = 150;
                    healthLevels[] = {{1.0, {"DCM45MRDS\data\mrds.rvmat"}}, {0.7, {"DCM45MRDS\data\mrds.rvmat"}}, {0.5, {"DCM45MRDS\data\mrds_damage.rvmat"}}, {0.3, {"DCM45MRDS\data\mrds_damage.rvmat"}}, {0.0, {"DCM45MRDS\data\mrds_destruct.rvmat"}}};
                };
            };
        };
    };

Share this post


Link to post
Share on other sites
18 hours ago, DCCVIII said:

I have successfully re-textured the Glock 19 and its magazine so I wanted to re-texture the Pistol flashlight and Pistol mini sights (separate mods) to go with it. My problem is with the config.cpp as I cannot figure out the correct class names, I have no errors when creating the PBO's but my textures do not load in game.

Any help would be greatly appreciated.

Pistol flashlight config

 class CfgPatches {
    class DCM_Attachments {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {"DZ_Data"};
    };
};
class cfgVehicles 
{
class Switchable_Base;    // External class reference
    
    class TLRLight: Switchable_Base {
        displayName = "TLS3 Pistol Flashlight";
        descriptionShort = "TLS3 Pistol Flashlight";
        hiddenSelections[] = {"zbytek"};
        hiddenSelectionsTextures[] = {"DCMTLS3\data\tls3_co.paa"};
        hiddenSelectionsMaterials[] = {"DCMTLS3\data\tls3.rvmat"};
        
        class DamageSystem {
            class GlobalHealth {
                class Health {
                    hitpoints = 200;
                    healthLevels[] = {{1.0, {"DCMTLS3\data\tls3.rvmat"}}, {0.7, {"DCMTLS3\data\tls3.rvmat"}}, {0.5, {"DCMTLS3\data\tls3_damage.rvmat"}}, {0.3, {"DCMTLS3\data\tls3_damage.rvmat"}}, {0.0, {"DCMTLS3\data\tls3_destruct.rvmat"}}};
                };
            };
        };
    };
};

 

Mini sights config


class CfgPatches {
    class DCM_PistolOptic {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {"DZ_Data"};
    };
};

class cfgVehicles {
    class PistolOptic_base;    // External class reference
    
    class PistolOptic : PistolOptic_base {
        displayName = "MRDS Optic";
        descriptionShort = "MRDS Optic";
        hiddenSelections[] = {"zbytek"};
        hiddenSelectionsTextures[] = {"DCM45MRDS\data\mrds_co.paa"};
        hiddenSelectionsMaterials[] = {"DCM45MRDS\data\mrds.rvmat"};
            };
        class DamageSystem {
            class GlobalHealth {
                class Health {
                    hitpoints = 150;
                    healthLevels[] = {{1.0, {"DCM45MRDS\data\mrds.rvmat"}}, {0.7, {"DCM45MRDS\data\mrds.rvmat"}}, {0.5, {"DCM45MRDS\data\mrds_damage.rvmat"}}, {0.3, {"DCM45MRDS\data\mrds_damage.rvmat"}}, {0.0, {"DCM45MRDS\data\mrds_destruct.rvmat"}}};
                };
            };
        };
    };

I guess you're not quite good understanding the way how you can retexture the objects.

The Glock was made with ability for texturing but pistol flashlight might has no such ability because the textures and rvmats migh be hardcored inputted into the P3D model of the object.

For example like the Military Belt - you may switch the textures but until you'll not dress it on your character it would be green.

 

But you may try to find the weapons_supports.pbo, unpack it and debin config.bin into .cpp.

There would be the full description of that object and for additional feature you may override you new pfl with make child to the original item like:

class MyTLRLight : TLRLight {

Blah-blah-blah.

 

That point may help you a bit.

  • Like 1

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

×