(AEF)Duck 12 Posted March 29, 2016 Hey All,So I am working on a config.cpp for a mod of mine, Just a retexture of the Vanilla items, and I have come across something odd. My new items are working fine, but some of them seem to be removing the originals from the VA. Either completely, or showing up in he list with no model on the unit (shadow still appears). I am not getting any errors show up either. Bellow is a sample that is messing with me, H_HelmetB is working fine, mine is showing, and so is the vanilla one, but the H_Beret_02 is where it is messing up. If anyone can point me in the right direction, that would help me out a lot, cheers These are the other ones I am having trouble with: H_Booniehat_khk_hs H_PilotHelmetHeli_B H_Cap_red H_MilCap_gry class cfgWeapons { class ItemCore; class H_Beret_02: ItemCore { class ItemInfo; }; class H_HelmetB: ItemCore { class ItemInfo; }; class AEF_ECH_Tac_Base : H_HelmetB { author = "(AEF)Duck"; _generalMacro = "AEF_ECH_Tac_Base"; scope = 2; picture = "\A3\Characters_F\data\ui\icon_H_HelmetB_light_black_ca.paa"; displayName = "[AEF] ECH Lite, Tac"; hiddenSelections[] = {"camo"}; hiddenSelectionsTextures[] = {"aef_headgear_v2\hat\Data\completed\aef_ech_tac_base.paa"}; model = "\A3\Characters_F\BLUFOR\headgear_b_helmet_light"; descriptionShort = "Armour Level I"; class ItemInfo : ItemInfo { uniformModel = "\A3\Characters_F\BLUFOR\headgear_b_helmet_light"; mass = 30; class HitpointsProtectionInfo { class Head { HitpointName = "HitHead"; armor = 6; PassThrough = 0.5; }; }; }; }; class AEF_beret_members : H_Beret_02 { author = "(AEF)Duck"; _generalMacro = "AEF_beret_member"; scope = 2; picture = "\aef_headgear_v2\hat\Data\UI\icon_beret_m.paa"; displayName = "[AEF] Beret, Member"; hiddenSelections[] = {"camo"}; hiddenSelectionsTextures[] = {"aef_headgear_v2\hat\Data\completed\aef_beret_member.paa"}; model = "\A3\Characters_F_EPB\BLUFOR\headgear_beret02"; descriptionShort = "No Armour"; class ItemInfo : ItemInfo { uniformModel = "\A3\Characters_F_EPB\BLUFOR\headgear_beret02"; mass = 6; class HitpointsProtectionInfo { class Head { HitpointName = "HitHead"; armor = 0; PassThrough = 0.0; }; }; }; }; }; Share this post Link to post Share on other sites
Jackal326 1181 Posted March 29, 2016 Try changing: class cfgWeapons { class ItemCore; class H_Beret_02: ItemCore { class ItemInfo; }; class H_HelmetB: ItemCore { class ItemInfo; }; to: class cfgWeapons { class ItemCore; class H_Beret_02; class H_HelmetB; Share this post Link to post Share on other sites
(AEF)Duck 12 Posted March 30, 2016 I just tried your suggestion. When I went to pack the file using the addon builder, I got the following error: Build failed. Result code=1 CfgConvert task failed. File E:\ etc... \config.cpp, line 54: /cfgWeapons/ AEF_ECH_Tac_Base.ItemInfo: Underfined base class 'ItemInfo' Config : some input after EndOfFile. Error reading config 'E:\ etc...\config.cp Class destroyed with lock count 1 Lines 53 - 55 hiddenSelections[] = {"camo"}; hiddenSelectionsTextures[] = {"aef_headgear_v2\hat\Data\completed\aef_ech_tac_base.paa"}; model = "\A3\Characters_F\BLUFOR\headgear_b_helmet_light"; When I converted back to my original, it will repack. Share this post Link to post Share on other sites
Locklear 214 Posted March 30, 2016 Try inheriting the beret from H_Beret_blk. Concerning other headgear, the inheritance should go as follows: H_Booniehat_khk_hs: H_Booniehat_khk H_PilotHelmetHeli_B: H_HelmetB H_Cap_red: HelmetBase H_MilCap_gry: H_MilCap_oucamo The original structure with the ItemInfo subclass is correct. That's because there's another hiddenSelections[] property there; when it's missing, the texture doesn't appear when a soldier wears the item. PS: You actually don't have to keep the aforementioned inheritance, the point is not to omit the hiddenSelections[] property, but it should just be easier to do it that way, since the item keeps the original configuration. Share this post Link to post Share on other sites
(AEF)Duck 12 Posted March 30, 2016 Thanks for the reply, I have tried your suggestion (see LINK for my config.cpp) and there was progress with some of them and not so much with others. H_Booniehat_khk - Retexture is working, Vanilla is showing in VA with no model H_Beret_blk - Retexture is working, Vanilla is showing in VA with no model H_HelmetB - (Heli Pilot) Retexture and Vanilla working fine HelmetBase - (Cap) Retexture and Vanilla working fine H_MilCap_oucamo - Retexture is working, Vanilla is showing in VA. Blue, Grey and AAF have no model, Hex and MTP working correctly. Share this post Link to post Share on other sites
Locklear 214 Posted March 30, 2016 Hm, random idea, could you please try putting Characters_F_Mark instead of Characters_F_EPB in the requiredAddons[] property in CfgPatches? Share this post Link to post Share on other sites
Jackal326 1181 Posted March 30, 2016 class cfgWeapons { class ItemCore; class H_Beret_02; class H_HelmetB; Change it to: class cfgWeapons { class ItemCore; class ItemInfo; class H_Beret_02; class H_HelmetB; Share this post Link to post Share on other sites
(AEF)Duck 12 Posted March 31, 2016 hey all, after some tweaking with jackal's suggestion everything seems to be working correctly. Thanks both of you for your input. Duck 1 Share this post Link to post Share on other sites
Locklear 214 Posted March 31, 2016 Let me offer a couple of thoughts to expand on this a little bit. My concern with Jackal's solution is that it solves the inheritance issue, but kind of formally, with some tricky points to be aware of. There is no ItemInfo class in CfgWeapons in the game, so the class is effectively empty. There's no point in inheriting ItemInfo of the gear from an empty ItemInfo class, then, so it's quite possible that the whole "class ItemInfo;" at the beginning and ": ItemInfo" inheritance in gear's classes can be simply removed. However, that means that everything needed has to be explicitly defined in the ItemInfo subclasses (which most likely is, considering the config posted above). My approach was based on a guess that the way the original classes are declared in this new config overwrites ItemInfo subclasses of the original gear, thus creating issues with models/textures. That could be caused by the order of loading addons, which is handled via requiredAddons[] in CfgPatches. I hope it makes some sense. :D However, as long as those ItemInfos have everything needed, it should work anyways. I merely thought it might be useful to offer more info for anyone interested. :) 1 Share this post Link to post Share on other sites
(AEF)Duck 12 Posted March 31, 2016 It is defiantly interesting to have that explained. It makes some other things I had noticed in other works I had done make a bit more sense. I had noticed in other items, that although I could get the visuals to work, the item specs, i.e. weight, ballistic and explosive protection where not getting transferred across, but now that makes sense why. Thanks again for the help, I was pleasantly surprised to see a BI Dev respond so quickly, I was not expecting that :) Share this post Link to post Share on other sites
Locklear 214 Posted March 31, 2016 Glad to help. :) Share this post Link to post Share on other sites