Jump to content
Sign in to follow this  
OberSchutze

Vest Issue

Recommended Posts

Hello all,

 

After the APEX release none of my vest textures appear anymore. I am using the Kerry version Plate carrier. Any help would be appreciated.

Share this post


Link to post
Share on other sites

I suppose having the code helps.

	class Vest_Camo_Base;
	class VestItem;
	class V_PlateCarrier1_rgr;
	class V_PlateCarrierGL_rgr;
	class V_PlateCarrier3_rgr;
		#include "TF2031PlateCarriers.hpp"
		#include "TF2031UnitPC.hpp"
	class TF2031_OCP_PlateCarrier1_rgr: Vest_Camo_Base
	{
		scope = 2;
		displayName = "Task Force 2031 OCP Light Carrier";
		picture = "\A3\characters_f\Data\UI\icon_V_plate_carrier_1_CA.paa";
		model = "\A3\Characters_F_EPA\BLUFOR\equip_b_vest_kerry";
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Projects\TF_2031_Mod\addons\TF_2031_Units\data\textures\plate_carriers\TF2031_PC_MCAM_co.paa"};
		class ItemInfo: VestItem
		{
			uniformModel = "\A3\Characters_F_EPA\BLUFOR\equip_b_vest_kerry";
			containerClass = "Supply200";
			mass = 1;
			class HitpointsProtectionInfo
			{
				class Chest
				{
					HitpointName = "HitChest";
					armor = 20;
					PassThrough = 0.1;
				};
				class Diaphragm
				{
					HitpointName = "HitDiaphragm";
					armor = 20;
					PassThrough = 0.1;
				};
				class Abdomen
				{
					hitpointName = "HitAbdomen";
					armor = 20;
					passThrough = 0.1;
				};
				class Body
				{
					hitpointName = "HitBody";
					armor = 20;
					passThrough = 0.1;
				};
			};
		};
	};

Share this post


Link to post
Share on other sites

I had the same issue with my vests and helmets.

I can't really remember how I fixed it (as I tried several things at once and afterwards it worked), but you can try a couple of things

1) Define the hiddenselections array within the ItemInfo sub-class

OR

2) Remove the Iteminfo: Vestitem inheritance and simply make it ItemInfo

i) This however will cause another error given your current code which will complain about unknown container type, so you would need to define this (eg. containerClass = "Supply140";) with ItemInfo

Share this post


Link to post
Share on other sites
I'm going to tell you how to metaphorically fish, and then give you a fish. 

 

First, I would suggest is using something like Notepad++'s "Find in Files" option, and searching for a related term. For example, I see you are inheriting "Vest_Camo_Base", so I'm going to search for that with Notepad++. Alright cool, it found that 12 times in "a3\characters_f\config.cpp", now if I click one of the highlighted lines it will open that file and take me to that line. So I'll first look at where "Vest_Camo_Base" is defined, I see that in the "ItemInfo" it's inheriting "VestItem", just like you are. However, it defines a hiddenSelection of "camo" here. So then in your config you'll want to define that same hiddenSelection again for, but that hiddenSelection also needs an accompanying texture to go with it, so you'll want to define hiddenSelectionTexture for that vest as well.

 

After you made those changes your "ItemInfo" would look something like this, I've obviously cut it short for the sake of space on this post. 

class TF2031_OCP_PlateCarrier1_rgr: Vest_Camo_Base
{
...some stuff...
class ItemInfo: VestItem
{
uniformModel = "\A3\Characters_F_EPA\BLUFOR\equip_b_vest_kerry";
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {"\Projects\TF_2031_Mod\addons\TF_2031_Units\data\textures\plate_carriers\TF2031_PC_MCAM_co.paa"};
containerClass = "Supply200";
mass = 1;

...your HitpointsProtectionInfo here...
};
};

  • Like 1

Share this post


Link to post
Share on other sites

 

I'm going to tell you how to metaphorically fish, and then give you a fish. 
 
First, I would suggest is using something like Notepad++'s "Find in Files" option, and searching for a related term. For example, I see you are inheriting "Vest_Camo_Base", so I'm going to search for that with Notepad++. Alright cool, it found that 12 times in "a3\characters_f\config.cpp", now if I click one of the highlighted lines it will open that file and take me to that line. So I'll first look at where "Vest_Camo_Base" is defined, I see that in the "ItemInfo" it's inheriting "VestItem", just like you are. However, it defines a hiddenSelection of "camo" here. So then in your config you'll want to define that same hiddenSelection again for, but that hiddenSelection also needs an accompanying texture to go with it, so you'll want to define hiddenSelectionTexture for that vest as well.
 
After you made those changes your "ItemInfo" would look something like this, I've obviously cut it short for the sake of space on this post. 
class TF2031_OCP_PlateCarrier1_rgr: Vest_Camo_Base
{
	...some stuff...
	class ItemInfo: VestItem
	{
		uniformModel = "\A3\Characters_F_EPA\BLUFOR\equip_b_vest_kerry";
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\Projects\TF_2031_Mod\addons\TF_2031_Units\data\textures\plate_carriers\TF2031_PC_MCAM_co.paa"};
		containerClass = "Supply200";
		mass = 1;
		
		...your HitpointsProtectionInfo here...
	};
};

 

I've done a bit of experimentation post 1.62 to fix issues that APEX and BI's back-end tinkering brought to my pack, and you're half right.

As my previous reply stated adding the hiddenselections array to ItemInfo is required, however provided there is a hiddenSelectionsTextures array within the body of the main class any further classes that inherit from it will work fine.

 

As an example, an addon I developed for my community uses 3 main types of vest in various camouflages. I defined the 3 base classes - see an example below:

	class SSQN_VestTest_01: Vest_Camo_Base
	{
		author = "S Squadron";
		scope = 0;
		scopeArsenal = 0;
		displayName = "Base Vest - Nobody will see this";
		descriptionShort = "Armor Level III";
		picture = "\A3\characters_f\Data\UI\icon_V_plate_carrier_1_CA.paa";
		model = "\A3\Characters_F\BLUFOR\equip_b_vest02";
		DLC = "SSQN";
		hiddenSelections[]={"camo"};
		hiddenSelectionsTextures[] = {"\SSQN_Equipment\Data\crye_vests_mx1_co.paa"};
		hiddenSelectionsMaterials[] = {"\SSQN_Equipment\Data\crye_vests.rvmat"};
		class ItemInfo: VestItem
		{
			uniformModel = "\A3\Characters_F\BLUFOR\equip_b_vest02";
			hiddenSelections[]={"camo"};
			containerClass = "Supply140";
			mass = 80;
			class HitpointsProtectionInfo 
			{
                		class Chest 
				{
                   			HitpointName = "HitChest";
                    			armor = 16;
                    			PassThrough = 0.2;
                		};

                		class Diaphragm 
				{
                    			HitpointName = "HitDiaphragm";
                    			armor = 16;
                    			PassThrough = 0.2;
                		};

                		class Abdomen 
				{
                    			HitpointName = "HitAbdomen";
                    			armor = 16;
                    			passThrough = 0.2;
                		};

                		class Body 
				{
                   			HitpointName = "HitBody";
                    			passThrough = 0.2;
                		};
            		};
		};
	};

This contains everything required to work, then the classes that inherit this (i.e. the classes that use the same model etc) only need the very bare-minimum info to be included in their defines, saving on config-clutter - VERY helpful when the config is already 3108 lines

	class SSQN_CryeCPC_01MCM: SSQN_VestTest_01
	{
		author = "S Squadron";
		scope = 2;
		scopeArsenal = 2;
		picture = "\A3\characters_f\Data\UI\icon_V_plate_carrier_1_CA.paa";
		displayName = "Crye CPC 1 (Multicam 1)";
		model = "\A3\Characters_F\BLUFOR\equip_b_vest02";
		hiddenSelectionsTextures[] = {"\SSQN_Equipment\Data\crye_vests_mcm_co.paa"};
		hiddenSelectionsMaterials[] = {"\SSQN_Equipment\Data\crye_vests.rvmat"};
		class ItemInfo: ItemInfo
		{
			uniformModel = "\A3\Characters_F\BLUFOR\equip_b_vest02.p3d";
		};
	};

	class SSQN_CryeCPC_01MX1: SSQN_CryeCPC_01MCM
	{
		author = "S Squadron";
		picture = "\A3\characters_f\Data\UI\icon_V_plate_carrier_1_CA.paa";
		displayName = "Crye CPC 1 (Multicam 2)";
		hiddenSelectionsTextures[] = {"\SSQN_Equipment\Data\crye_vests_mx1_co.paa"};
	};

Please note that in the CHILD classes of my new BASE class, instead of inheriting from ItemVest I inherit ItemInfo so as to retain ALL ItemInfo defines correctly from the parent class.

  • Like 2

Share this post


Link to post
Share on other sites

Worked great Pennyworth, thanks for explaining it to me. Jackal I think you have to do a bit more as you are making new item classes from scratch. I am inheriting most of the info from stock bis stuff. I haven't found a need for RVMATs yet.

Share this post


Link to post
Share on other sites

Worked great Pennyworth, thanks for explaining it to me. Jackal I think you have to do a bit more as you are making new item classes from scratch. I am inheriting most of the info from stock bis stuff. I haven't found a need for RVMATs yet.

No he's not really, he's still using the Vest_Camo_base for his default base class, he's also using the BiS stock model too. What's doing is still pretty much the same as you, by renaming the vest class to suit his needs, same as you have

 

class TF2031_OCP_PlateCarrier1_rgr

 

That's a custom class, not a default one, as you've edited the actual main class. ;) same as Jackal did here. 

 

SSQN_VestTest_01

 

 

both classes are inheriting the properties from Vest_Camo_Base.

 

All he's doing with the rvamts is getting the default vest to work with the custom texture, so that the nohq's are not the default vest, and don't show through the new texture making it look hideous. 

  • 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
Sign in to follow this  

×