Jump to content
y-shin

[SOLVED] Need help with uniform config

Recommended Posts

I'm somewhat a noob about modding and recently I've been trying some retexturing.

I've done a baseball cap and a tactical vest successfully, but I can't get the uniform texture working.

 

If I place a random character in the editor and change his clothes to mine, or spawn in a mission and try to get my uniform from arsenal, my custom texture isn't applied. But the texture of the inherited uniform is applied instead.

 

I'm inheriting uniform config from U_Marshal, which is a marshal clothes from Karts DLC, and which is worn by C_Marshal_F (or at least that's what I think I'm doing).
Here's the config:

class CfgPatches {
	class CCG_Police_Clothes {
		author = "y-shin";
		name = "CCG Police Clothes";
		requiredVersion = 0.1;
		requiredAddons[] = {"A3_Characters_F"};
		units[] = {
			"CCG_C_Police_F";
		};
		weapons[] = {
			"CCG_U_Police_Uniform_1";
		};
	};
};

class cfgVehicles {
	class C_Marshal_F;
	class CCG_C_Police_F : C_Marshal_F
	{
		scope = 1;
		model = "\A3\Characters_F\Civil\c_poloshirtpants.p3d";
		hiddenSelections[] = {"Camo", "insignia"};
		hiddenSelectionsMaterials[] = {};
		hiddenSelectionsTexture[] = {"\ccg_police_clothes\data\ccg_uniform_police_1.paa"};
	};
};

class cfgWeapons {
	class U_Marshal;
	class UniformItem;
	class CCG_U_Police_Uniform_1 : U_Marshal
    {
		author = "y-shin";
		scope = 2;
		scopeCurator = 2;
		displayName = "CCG Police Uniform";
		picture = "\ccg_police_clothes\icon\logo_small.paa";
		hiddenSelections[] = {"Camo"};
		hiddenSelectionsTexture[] = {"\ccg_police_clothes\data\ccg_uniform_police_1.paa"};
		class ItemInfo : UniformItem {
			uniformModel = "-";
			uniformClass = CCG_C_Police_F;
			containerClass = "Supply20";
			mass = 60;
		};
	};
};

Any idea what I am doing wrong?

Share this post


Link to post
Share on other sites

Hey man, wrong section, maybe should have been posted in configs and scripting:rthumb:

 

To my very untrained eye there are a few things wrong or missing from your config....

Spoiler

class CfgPatches {
	class CCG_Police_Clothes {
		author = "y-shin";
		name = "CCG Police Clothes";
		requiredVersion = 0.1;
		requiredAddons[] = {"A3_Characters_F"};
		units[] = {
			"CCG_C_Police_F"; //remove this semicolon
		};
		weapons[] = {
			"CCG_U_Police_Uniform_1"; // remove this semicolon
		};
	};
};

class cfgVehicles {
	class C_Marshal_F; // try either B_RangeMaster_F or B_Soldier_base_F
	class CCG_C_Police_F : C_Marshal_F // try either B_RangeMaster_F or B_Soldier_base_F
	{
		scope = 1;
		model = "\A3\Characters_F\Civil\c_poloshirtpants.p3d";
		hiddenSelections[] = {"Camo", "insignia"};
		hiddenSelectionsMaterials[] = {};
		hiddenSelectionsTexture[] = {"\ccg_police_clothes\data\ccg_uniform_police_1.paa"};
	};
};

class cfgWeapons {
	class U_Marshal; // Replace U_Marshal with Uniform_base 
    class UniformItem;
	class CCG_U_Police_Uniform_1 : U_Marshal // Replace U_Marshal with Uniform_base
    {
		author = "y-shin";
		scope = 2;
		scopeCurator = 2;
		displayName = "CCG Police Uniform";
		picture = "\ccg_police_clothes\icon\logo_small.paa";
		model="\A3\Characters_F\Common\Suitpacks\suitpack_Civilian_F.p3d"; // Add this line 
		hiddenSelections[] = {"Camo"}; // Remove this line, not required here 
		hiddenSelectionsTexture[] = {"\ccg_police_clothes\data\ccg_uniform_police_1.paa"}; // Remove this line, not required here
		class ItemInfo : UniformItem {
			uniformModel = "-";
			uniformClass = CCG_C_Police_F; // No quotations around uniformcClass, this entry should also match your uniform classname "CCG_U_Police_Uniform_1" 
			containerClass = "Supply20";
			mass = 60;
		};
	};
};

 

 

Maybe try this config with the above changes....(not tested)

Spoiler

class CfgPatches
{
	class CCG_Police_Clothes
        {
		author = "y-shin";
		name = "CCG Police Clothes";
		requiredVersion = 0.1;
		requiredAddons[] = {"A3_Characters_F"};
		units[] = {"CCG_C_Police_F"};
		weapons[] = {"CCG_U_Police_Uniform_1"};
	};
};

class cfgVehicles
{
	class B_Soldier_base_F
	class CCG_C_Police_F : B_Soldier_base_F
	{
		scope = 1;
		model = "\A3\Characters_F\Civil\c_poloshirtpants.p3d";
		hiddenSelections[] = {"Camo", "insignia"};
		hiddenSelectionsMaterials[] = {};
		hiddenSelectionsTexture[] = {"\ccg_police_clothes\data\ccg_uniform_police_1.paa"};
	};
};

class cfgWeapons
{
	class ItemCore;
	class UniformItem;
	class Uniform_Base: ItemCore
	{
		class ItemInfo;
	};
	class CCG_U_Police_Uniform_1 : Uniform_base
        { 
		author = "y-shin";
		scope = 2;
		scopeCurator = 2;
		displayName = "CCG Police Uniform";
		picture = "\ccg_police_clothes\icon\logo_small.paa";
		model="\A3\Characters_F\Common\Suitpacks\suitpack_Civilian_F.p3d";
		class ItemInfo : UniformItem {
			uniformModel = "-";
			uniformClass = "CCG_U_Police_Uniform_1"; 
			containerClass = "Supply20";
			mass = 60;
		};
	};
};

 

 

Share this post


Link to post
Share on other sites

Thank you for the reply!

18 hours ago, EO said:

Hey man, wrong section, maybe should have been posted in configs and scripting:rthumb:

And yes sir, that was what I did wrong obviously...😭

Dear Moderators, if you could kindly move this thread to where it's supposed to be, I'd very much appreciate it. I'm sorry for the mistake.

 

I've done the exact same thing you mentioned to the config.cpp and turned out it didn't show any clothes at all (the character was naked).

So I reverted this line in cfgWeapons:

uniformClass = "CCG_U_Police_Uniform_1";

to this:

uniformClass = "CCG_C_Police_F";

and the clothes show up again, but with the original (vanilla) texture.

 

Also when I changed this line in cfgVehicles:

class CCG_C_Police_F : B_Rangemaster_F

to this:

class CCG_C_Police_F : B_Soldier_base_F

Then this came out:

54aa3093b921789165e11f41f33add60.png

 

So the model is loaded correctly, but the texture is from vanilla NATO soldier uniform.

 

I'll try to dig deeper on this and try tweaking more, and will report if anything comes up.
Any additional help will always be appreciated!

Share this post


Link to post
Share on other sites
3 hours ago, y-shin said:

Any additional help will always be appreciated!

 

If your willing to send me your pbo (by PM) I'd be happy to take a look at what you have and try and fix it for you.

Share this post


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

 

If your willing to send me your pbo (by PM) I'd be happy to take a look at what you have and try and fix it for you.

Awesome! I just sent you the PM so if you could kindly look into it, I'd very much appreciate it.
I did further tweaking as well as had a look into the work of others for study but so far no luck.

EDIT: I thought I sent you the PM but maybe your setting doesn't allow any PMs?

Share this post


Link to post
Share on other sites

Oh shit yeah, forgot about that PM thing, it’s related to my forum name apparently.

If your comfortable providing a link to your pbo here, I’m still happy to take a look, or if you prefer send me a Steam friend request, we could do it that way.🙂

 

Share this post


Link to post
Share on other sites
16 hours ago, EO said:

Oh shit yeah, forgot about that PM thing, it’s related to my forum name apparently.

If your comfortable providing a link to your pbo here, I’m still happy to take a look, or if you prefer send me a Steam friend request, we could do it that way.🙂

 

Got it! Here's the link (will delete upon solved).

 

Again, I appreciate it!

EDIT: deleted the link cuz solved

  • Like 1

Share this post


Link to post
Share on other sites

No problem, currently at work so I’ll look into it this evening. 🙂

  • Like 1

Share this post


Link to post
Share on other sites

Looks good now...

Spoiler

eZLFXQh.png

 

Here's your updated config, tidied it up a bit and lint checked. (no errors) 

Spoiler

class CfgPatches
{
	class ccg_police_clothes
	{
		author="y-shin";
		name="CCG British Police Clothes";
		requiredVersion = 0.1;
		requiredAddons[] = 
		{
			"A3_Characters_F",
			"A3_Characters_F_Beta",
			"A3_Characters_F_Bootcamp"
		};
                units[] = {};
		weapons[] = {};
	};
};
class cfgVehicles
{
	class B_Soldier_base_F;
	class CCG_U_Police_Uniform_1: B_Soldier_base_F
	{
		scope = 1;
		displayName="CCG Police Uniform";
		model="\A3\Characters_F\Civil\c_poloshirtpants.p3d";
		modelSides[] = {3,2,1,0};
		uniformClass="CCG_U_Police_Uniform_1";
		hiddenSelectionsTextures[]=
                {
                        "\ccg_police_clothes\data\ccg_uniform_police_1.paa"
                };
	};
};
class cfgWeapons
{
	class H_Cap_police;
	class CCG_H_Police_Cap_1 : H_Cap_police
	{
		author="y-shin";
		scope=2;								
		scopeCurator=2;						
		displayName="CCG Police Cap";	
		picture="\ccg_police_clothes\icon\logo_small.paa"; 
                model = "\A3\Characters_F\common\capb";	
		hiddenSelectionsTextures[]={"\ccg_police_clothes\data\ccg_cap_police_1.paa"}; 
		editorCategory="EdCat_Equipment";
		editorSubcategory="EdSubcat_Hats";
	};
	class ItemCore;
	class Vest_Camo_Base: ItemCore
	{
		class ItemInfo;
	};
        class CCG_V_Police_Vest_1: Vest_Camo_Base
	{
		author="y-shin";
		scope=2;								
		scopeCurator=2;			
         	displayName="CCG Police Vest";	
		picture="\ccg_police_clothes\icon\logo_small.paa"; 							
		model="A3\Characters_F\Common\equip_tacticalvest"; 	
		hiddenSelectionsTextures[] = {"\ccg_police_clothes\data\ccg_vest_police_1.paa"}; 
		descriptionShort="$STR_A3_SP_AL_I";
		class ItemInfo : ItemInfo
                {
			mass = 10; 					
			containerClass = "Supply80";
			uniformModel = "\A3\Characters_F\Common\equip_tacticalvest"; 
			class HitpointsProtectionInfo 
			{
				class Chest
				{
					hitpointName="HitChest";
					armor=8;
					passThrough=0.5;
				};
				class Diaphragm
				{
					hitpointName="HitDiaphragm";
					armor=8;
					passThrough=0.5;
				};
				class Abdomen
				{
					hitpointName="HitAbdomen";
					armor=8;
					passThrough=0.5;
				};
				class Body
				{
					hitPointName = "HitBody";
					passThrough = 0.5;
				};
			};
		};
	};
	class Uniform_Base;
	class UniformItem;
	class CCG_U_Police_Uniform_1: Uniform_Base
        {
		author="y-shin";
		scope=2;
		scopeCurator=2;
		displayName = "CCG Police Uniform";
		picture = "\ccg_police_clothes\icon\logo_small.paa";
		model="\A3\Characters_F\Common\Suitpacks\suitpack_original_F.p3d";
		hiddenSelections[] = 
		{
			"camo"
		};
		hiddenSelectionsTextures[] = 
		{
                        "\ccg_police_clothes\data\ccg_uniform_police_1.paa"
		};
		class ItemInfo : UniformItem
                {
			uniformModel="-";
			uniformClass="CCG_U_Police_Uniform_1";
			containerClass="Supply20";
			mass=60;
		};
	};
};

 

 

Hope that helps. :rthumb:

  • Thanks 1

Share this post


Link to post
Share on other sites

O.M.G. Thank you so so so much for the fix! It works and it's brilliant!

 

For future reference I'm trying to find the difference between my initial one and the fixed one from you, and it looks like the following are what I did wrong (or should've done):

 

- requiredAddons wasn't defined enough in cfgPatches (I need to look into what will be needed for a specific asset)

- units and weapons can be empty in cfgPatches (I've seen a few tutorials and threads including biki saying this has to be defined so I'm still confused)

- character definition in cfgVehicles requires modelSides

- but at the same time doesn't require hiddenSelection[] = {'camo'}

- should use B_Soldier_base_F instead of C_Marshal_F for character definition

- should use Uniform_Base instead of U_Marshal (or anything else) in defining uniform in cfgWeapons

 

And also, thank you as well for fixing my cap and vest (especially defining hitpoints). You are a legend, sir!

  • 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

×