Jump to content
Sign in to follow this  
brad7

Config problem with retexture

Recommended Posts

Cant figure what the problem is:

error message ---> \config.cpp, line 0: .H_HelmetB: Undefined base class 'ItemCore'

My config:

class H_HelmetB : ItemCore {
       scope = 2;
       weaponPoolAvailable = 1;
       displayName = "Para helmet";
       picture = "\A3\characters_f\Data\UI\icon_H_HelmetB_CA.paa";
       model = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic";
       hiddenSelections[] = {"camo"};
       hiddenSelectionsTextures[] = {"C:\Users\Brad\Downloads\Texture Work\Helmet tex\Para helmet\Data.paa"};

       class ItemInfo : HeadgearItem {
           mass = 100;
           uniformModel = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic";
           modelSides[] = {3, 1};
           armor = 3*0.5;
           passThrough = 0.8;
           hiddenSelections[] = {"camo"};
       };
   };

Edited by Max Power

Share this post


Link to post
Share on other sites

Try adding class ItemCore; just above class H_HelmetB : ItemCore

Edit: You will most likely get similar errors for ItemInfo and HeadgearItem.

This line:

hiddenSelectionsTextures[] = {"C:\Users\Brad\Downloads\Texture Work\Helmet tex\Para helmet\Data.paa"};

Should be more like:

hiddenSelectionsTextures[] = {"pboName\data\textureName_co.paa"};

Is this all you have in your config.cpp file?

Edited by surpher

Share this post


Link to post
Share on other sites

Yeh that is the complete config shouild there be more? and ill try adding those now...

---------- Post added at 18:06 ---------- Previous post was at 17:43 ----------

Still getting errors?...

Share this post


Link to post
Share on other sites

This is an example config for a helmet posted by Stiltman

enum {
    //  = 2,    // Error parsing: Empty enum name
   DESTRUCTENGINE = 2,
   DESTRUCTDEFAULT = 6,
   DESTRUCTWRECK = 7,
   DESTRUCTTREE = 3,
   DESTRUCTTENT = 4,
   STABILIZEDINAXISX = 1,
   STABILIZEDINAXESXYZ = 4,
   STABILIZEDINAXISY = 2,
   STABILIZEDINAXESBOTH = 3,
   DESTRUCTNO = 0,
   STABILIZEDINAXESNONE = 0,
   DESTRUCTMAN = 5,
   DESTRUCTBUILDING = 1,
};

class CfgPatches {
   class example_helmet_config {
       units[] = {};
       weapons[] = {};
       requiredVersion = 0.1;
       requiredAddons[] = {"A3_Characters_F_BLUFOR"};
   };
};

class cfgWeapons {
   class ItemCore;
   class HeadgearItem;

   class example_HelmetB : ItemCore {
       scope = 2;
       weaponPoolAvailable = 1;
       displayName = "Example Helmet";
       picture = "\A3\characters_f\Data\UI\icon_H_HelmetB_CA.paa";
       model = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic";
       hiddenSelections[] = {"camo"};
       hiddenSelectionsTextures[] = {"pathtoyouraddonretexturefile.paa"};

       class ItemInfo : HeadgearItem {
           mass = 100;
           uniformModel = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic";
           modelSides[] = {3, 1};
           armor = 3*0.5;
           passThrough = 0.8;
           hiddenSelections[] = {"camo"};
       };
   };
};

Share this post


Link to post
Share on other sites

Thanks ive finally got into game but it dosent appear in game? - ive even tried with vas?

Share this post


Link to post
Share on other sites

Have you tried adding something like removeHeadgear this; this addHeadgear "class_name_of_your_helmet"; to a unit. Is the helmet invisible in game but casts a shadow? What are you using to pack the pbo?

Post your complete config so we can have a look.

Share this post


Link to post
Share on other sites

Is the classname the display name in the config?

enum { 
    //  = 2,    // Error parsing: Empty enum name 
   DESTRUCTENGINE = 2, 
   DESTRUCTDEFAULT = 6, 
   DESTRUCTWRECK = 7, 
   DESTRUCTTREE = 3, 
   DESTRUCTTENT = 4, 
   STABILIZEDINAXISX = 1, 
   STABILIZEDINAXESXYZ = 4, 
   STABILIZEDINAXISY = 2, 
   STABILIZEDINAXESBOTH = 3, 
   DESTRUCTNO = 0, 
   STABILIZEDINAXESNONE = 0, 
   DESTRUCTMAN = 5, 
   DESTRUCTBUILDING = 1, 
}; 

class CfgPatches { 
   class example_helmet_config { 
       units[] = {}; 
       weapons[] = {}; 
       requiredVersion = 0.1; 
       requiredAddons[] = {"A3_Characters_F_BLUFOR"}; 
   }; 
}; 

class cfgWeapons { 
   class ItemCore; 
   class HeadgearItem; 

   class example_HelmetB : ItemCore { 
       scope = 2; 
       weaponPoolAvailable = 1; 
       displayName = "Para helmet"; 
       picture = "\A3\characters_f\Data\UI\icon_H_HelmetB_CA.paa"; 
       model = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic"; 
       hiddenSelections[] = {"camo"}; 
       hiddenSelectionsTextures[] = {"C:\Users\Brad\Downloads\Texture Work\Helmet tex\Para helmet\Data.paa"}; 

       class ItemInfo : HeadgearItem { 
           mass = 100; 
           uniformModel = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic"; 
           modelSides[] = {3, 1}; 
           armor = 3*0.5; 
           passThrough = 0.8; 
           hiddenSelections[] = {"camo"}; 
       }; 
   }; 
};

Edited by Max Power

Share this post


Link to post
Share on other sites
Is the classname the display name in the config?

No, in your case its example_HelmetB

Share this post


Link to post
Share on other sites

Allright got it working in game however there is no texture?

Share this post


Link to post
Share on other sites

Your texture path is still dodgy, it should point to the texture inside the pbo not the one on your hard drive. See post #2 above.

Share this post


Link to post
Share on other sites

Please use

 or [php] tags when posting code :)  It's not a rule but it makes it easier to read.

Share this post


Link to post
Share on other sites

Still get cannot load texture?

enum { 
    //  = 2,    // Error parsing: Empty enum name 
   DESTRUCTENGINE = 2, 
   DESTRUCTDEFAULT = 6, 
   DESTRUCTWRECK = 7, 
   DESTRUCTTREE = 3, 
   DESTRUCTTENT = 4, 
   STABILIZEDINAXISX = 1, 
   STABILIZEDINAXESXYZ = 4, 
   STABILIZEDINAXISY = 2, 
   STABILIZEDINAXESBOTH = 3, 
   DESTRUCTNO = 0, 
   STABILIZEDINAXESNONE = 0, 
   DESTRUCTMAN = 5, 
   DESTRUCTBUILDING = 1, 
}; 

class CfgPatches { 
   class example_helmet_config { 
       units[] = {}; 
       weapons[] = {}; 
       requiredVersion = 0.1; 
       requiredAddons[] = {"A3_Characters_F_BLUFOR"}; 
   }; 
}; 

class cfgWeapons { 
   class ItemCore; 
   class HeadgearItem; 

   class Parahelm : ItemCore { 
       scope = 2; 
       weaponPoolAvailable = 1; 
       displayName = "Para helmet"; 
       picture = "\A3\characters_f\Data\UI\icon_H_HelmetB_CA.paa"; 
       model = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic"; 
       hiddenSelections[] = {"camo"}; 
       hiddenSelectionsTextures[] = {"Para helmet\data\equip1_co.paa"}; 

       class ItemInfo : HeadgearItem { 
           mass = 100; 
           uniformModel = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballistic"; 
           modelSides[] = {3, 1}; 
           armor = 3*0.5; 
           passThrough = 0.8; 
           hiddenSelections[] = {"camo"}; 
       }; 
   }; 
};

Edited by Max Power

Share this post


Link to post
Share on other sites

Have you tried temporary replacing your texture with the original helmet texture to see if that loads, if it does load you know its a problem with your texture if not it could be the tool you are packing the pbo with. Config looks fine.

Share this post


Link to post
Share on other sites
Have you tried temporary replacing your texture with the original helmet texture to see if that loads, if it does load you know its a problem with your texture if not it could be the tool you are packing the pbo with. Config looks fine.

I dont see why i wouldnt work i did the same with a custum backpack?

Share this post


Link to post
Share on other sites
hiddenSelectionsTextures[] = {"Para helmet\data\equip1_co.paa"};

Don´t use spaces in file paths :nono:

Share this post


Link to post
Share on other sites

but thats not the reason it dosent work is it?...

Share this post


Link to post
Share on other sites
but thats not the reason it dosent work is it?...

No, I've just tested your config (as posted above) in game and other than the rogue spaces in these three lines your config works.

picture = "\A3\characters_f\Data\UI\icon_H_HelmetB_CA.pa a";
model = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballist ic";

uniformModel = "\A3\Characters_F\BLUFOR\headgear_b_helmet_ballist ic";

It looks like the forum is adding those spaces.

So your config is fine, the problem must be your texture or the tool you are packing the pbo with.

Share this post


Link to post
Share on other sites

Hey Brad7 don't forget to close your code tags! The closing tag looks like [/code]

Share this post


Link to post
Share on other sites

If you are using The eliteness tool to pack your PBO dont, that could very well be the cause of your problem, try using the BIS tools BinPBO tool to pack your pbo files. See if that fixes your problem.

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  

×