Jump to content

Recommended Posts

Hello everyone. I'm new in coding and I was about to create a mod to retexture a vest skin. The model I wanna retexture is the "V_PlateCarrierSpec_rgr".

I inspired my code from other posts in the forum.

 

Here is my full config.cpp :

/// Vest_Camo_Base config ///

class cfgWeapons
{

	class ItemCore;
	class VestItem;
	class Vest_Camo_Base: ItemCore
	{
		class ItemInfo;
	};
	class LRI_Vest : Vest_Camo_Base
	{
		author = "xorellioin";
		scope = public;
		displayName="LRI VEST";
		weaponPoolAvailable = 1;
		allowedSlots[] = {901};			// This means the vest can be put into a backpack.
		picture = "\A3\Characters_F_Mark\Data\UI\icon_carrier_spec_rig_grn.paa";
		model = "\A3\Characters_F\BLUFOR\equip_b_carrier_spec_rig.p3d";
		hiddenSelectionsTextures[] = {"\A3\Characters_F_Mark\BLUFOR\Data\carrier_gl_rig_blk_co.paa"};
		class ItemInfo: VestItem
		{
			uniformModel = "\A3\Characters_F\BLUFOR\equip_b_carrier_spec_rig.p3d";
			containerClass = Supply100;
			mass = 120;

			class HitpointsProtectionInfo
			{
				class Neck
				{
					hitpointName="HitNeck";
					armor=8;
					passThrough=0.5;
				};
				class Arms
				{
					hitpointName="HitArms";
					armor=8;
					passThrough=0.5;
				};
				class Chest
				{
					hitpointName="HitChest";
					armor=24;
					passThrough=0.1;
				};
				class Diaphragm
				{
					hitpointName="HitDiaphragm";
					armor=24;
					passThrough=0.1;
				};
				class Abdomen
				{
					hitpointName="HitAbdomen";
					armor=24;
					passThrough=0.1;
				};
				class Body
				{
					hitpointName="HitBody";
					passThrough=0.1;
				};
			};
		};
	};
};

My idea was that I maybe forgot something in class ItemInfo or before the CfgWeapons class.

 

What's wrong with it ? When I open the game a message appear : No entry 'bin\config.bin/CfgWeapons/ItemInfo.scope' and I can't find it in the arsenal.

 

Thx for help.

Apologize my English.

Share this post


Link to post
Share on other sites

There are a few mistakes in your config, try this version...

class cfgWeapons
{

	class ItemCore;
	class Vest_Camo_Base: ItemCore
	{
		class ItemInfo;
	};
	class LRI_Vest : Vest_Camo_Base
	{
		author = "xorellioin";
		scope = 2;
		displayName="LRI VEST";
		weaponPoolAvailable = 1;
		allowedSlots[] = {901};			// This means the vest can be put into a backpack.
		picture = "\A3\Characters_F_Mark\Data\UI\icon_carrier_spec_rig_grn.paa";
		model = "\A3\Characters_F\BLUFOR\equip_b_carrier_spec_rig.p3d";
		hiddenSelectionsTextures[] = {"\A3\Characters_F_Mark\BLUFOR\Data\carrier_gl_rig_blk_co.paa"};
		class ItemInfo: ItemInfo
		{
			uniformModel = "\A3\Characters_F\BLUFOR\equip_b_carrier_spec_rig.p3d";
			containerClass = "Supply100";
			mass = 120;

			class HitpointsProtectionInfo
			{
				class Neck
				{
					hitpointName="HitNeck";
					armor=8;
					passThrough=0.5;
				};
				class Arms
				{
					hitpointName="HitArms";
					armor=8;
					passThrough=0.5;
				};
				class Chest
				{
					hitpointName="HitChest";
					armor=24;
					passThrough=0.1;
				};
				class Diaphragm
				{
					hitpointName="HitDiaphragm";
					armor=24;
					passThrough=0.1;
				};
				class Abdomen
				{
					hitpointName="HitAbdomen";
					armor=24;
					passThrough=0.1;
				};
				class Body
				{
					hitpointName="HitBody";
					passThrough=0.1;
				};
			};
		};
	};
};

For reference:

You don't need class VestItem  

Scope should be set to 2, not public.

class ItemInfo: VestItem should read class ItemInfo: ItemInfo 

containerClass = Supply100 should read containerClass = "Supply100"

 

Hopefully this new version works for you.

  • Like 1

Share this post


Link to post
Share on other sites

So I corrected my code but the vest isn't showing itself in the arsenal.

Isn't it a question of writing a CfgPatches or CfgVehicles ?

Share this post


Link to post
Share on other sites
19 minutes ago, Xorellion said:

So I corrected my code but the vest isn't showing itself in the arsenal.

 

Did you try the amended config I gave you? That should work as it's based of one of my own vest config which work just fine....

Spoiler

class CfgPatches
{
	class eo_vests
	{
		units[]={};
		weapons[]={};
		requiredVersion=0.1;
		requiredAddons[]={};
	};
};
class CfgWeapons
{
	class ItemCore;
	class Vest_Camo_Base: ItemCore
	{
		class ItemInfo;
	};
	class eo_platecarrier_1: Vest_Camo_Base
	{
		author="EO";
		scope=2;
		displayName="EO PlateCarrier (BLK)";
		picture="\A3\characters_f\Data\UI\icon_V_plate_carrier_1_CA.paa";
		model="\A3\Characters_F\BLUFOR\equip_b_vest02";
		hiddenSelectionsTextures[]=
		{
			"eo_vests\data\eo_platecarrier_1.paa"
		};
		descriptionShort="$STR_A3_SP_AL_III";
		class ItemInfo: ItemInfo
		{
			uniformModel="\A3\Characters_F\BLUFOR\equip_b_vest02";
			containerClass="Supply140";
			mass=80;
			class HitpointsProtectionInfo
			{
				class Chest
				{
					HitpointName="HitChest";
					armor=16;
					PassThrough=0.30000001;
				};
				class Diaphragm
				{
					HitpointName="HitDiaphragm";
					armor=16;
					PassThrough=0.30000001;
				};
				class Abdomen
				{
					hitpointName="HitAbdomen";
					armor=16;
					passThrough=0.30000001;
				};
				class Body
				{
					hitpointName="HitBody";
					passThrough=0.30000001;
				};
			};
		};
	};
};

 

 

22 minutes ago, Xorellion said:

Isn't it a question of writing a CfgPatches or CfgVehicles ?

 

As you can see from my config, it doesn't require CfgVehicles.  

Share this post


Link to post
Share on other sites

Thx it works ! I'm going to base my config on yours. I Just wanna know what does CfgPatches is for ?

Share this post


Link to post
Share on other sites

And what if I want to add a uniform to my addon ?

 

Do I have to add (that I will modificate later) 

/// Uniform config ///

class cfgWeapons
{
	class UniformItem;
		
	class U_B_soldier_new: Uniform_Base
	{
		author = "Splendid Modder";
		scope = 2;
		displayName = "New Uniform";
		picture = "\A3\characters_f\data\ui\icon_u_b_soldier_new_ca.paa";
		model = "\A3\Characters_F\Common\Suitpacks\suitpack_original_F.p3d";
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\A3\Characters_F_New\BLUFOR\Data\b_soldier_new.paa"};
			
		class ItemInfo: UniformItem
		{
			uniformModel = "-";
			uniformClass = B_soldier_new;
			containerClass = Supply40;
			mass = 40;
		};
	};
};

Can I also remove the CfgWeapons and put it from UniformItem to its end inside my last CfgWeapons?

 

Or is it a CfgVehicles for the uniform ?

  • Like 1

Share this post


Link to post
Share on other sites

First off, bookmark the encoding guide, it really is your friend...https://community.bistudio.com/wiki/Arma_3:_Characters_And_Gear_Encoding_Guide :icon_biggrin:

 

If your building a mod with vests uniforms etc. to keep your workflow simple I'd recommend keeping vest, uniforms, backpacks in separate pbo's (just my personal preference)

 

For reference here is a sample of a working retextured uniform config, It might help....

class CfgPatches
{
	class eo_uniforms
	{
		units[]={};
		weapons[]=
		{
			""
		};
		requiredVersion=0.1;
		requiredAddons[]=
		{
			"A3_Data_F_Exp"
		};
	};
};
class CfgWeapons
{
	class UniformItem;
	class U_B_CTRG_Soldier_F;
	class eo_bandit: U_B_CTRG_Soldier_F
	{
		scope=2;
		author="EO";
		displayName="EO Bandit Fatigues";
		model="\A3\Characters_F\Common\Suitpacks\suitpack_original_F.p3d";
		class ItemInfo: UniformItem
		{
			uniformmodel="-";
			uniformClass="eo_bandit";
			containerclass="Supply80";
			armor=50;
			mass=30;
		};
	};
};
class cfgVehicles
{
	class B_CTRG_Soldier_base_F;
	class eo_bandit: B_CTRG_Soldier_base_F
	{
		scope=1;
		displayName="EO Bandit Fatigues";
		model="\A3\Characters_F_Exp\BLUFOR\B_CTRG_Soldier_01_F.p3d";
		uniformClass="eo_bandit";
		hiddenSelections[]=
		{
			"camo",
			"insignia"
		};
		hiddenSelectionsTextures[]=
		{
			"\eo_uniforms\data\eo_bandit.paa"
		};
		class Wounds
		{
			tex[]={};
			mat[]=
			{
				"a3\characters_f_exp\blufor\data\U_B_CTRG_Soldier_F.rvmat",
				"A3\Characters_F_Exp\BLUFOR\Data\U_B_CTRG_Soldier_F_injury.rvmat",
				"A3\Characters_F_Exp\BLUFOR\Data\U_B_CTRG_Soldier_F_injury.rvmat"
			};
		};
	};
};

 

 

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

×