Jump to content
Sign in to follow this  
Kydoimos

Setting the Texture of a Uniform on the Ground

Recommended Posts

Heya chaps!

There's probably a really easy way of doing this in the config but how would I set the texture of a modded uniform when it's on the ground? You know, when they look like this: https://www.dropbox.com/s/ihnyen0n6mxsp1w/icon_f_or_combatuniform_mcam_ca.png?dl=0.

At present, I'm just getting a flat white texture! Thank, as always, for any help - I've had a look through the config reference but couldn't find anything obvious.

Share this post


Link to post
Share on other sites

What are you doing? It's easier to help you if you tell us how you are trying to change it. Are you putting code in the init, or doing something in game or out of game. What texture are you changing, the uniform or the folded uniform? They are very different. What have you tried so far? Details please.

Share this post


Link to post
Share on other sites

@Victim9l3 - hi there! Essentially, I'm creating a uniform 'out of game' with a config.cpp file (below). The uniform I want to add a texture to is the 'folded uniform' that appears when you remove your uniform. Everything is working (UI icons, actual uniform texture on unit) but not the item when it is on the ground - it just appears white.

class CfgPatches
{
class CSAT_Russian
{
	units[]={};
	weapons[]={};
	requiredVersion=0.1;
	requiredAddons[]=
	{
		"A3_Characters_F_OPFOR"
	};
};
};
class CfgVehicles
{
class O_Soldier_base_F;
class OR_Soldier_F: O_Soldier_base_F
{
	_generalMacro="OR_Soldier_F";
	scope=2;
	displayName="Uniform Test Soldier";
	nakedUniform="U_BasicBody";
	uniformClass="U_OR_CombatUniform_Hex";
	hiddenSelections[]=
	{
		"Camo1",
		"camo2",
		"insignia"
	};
	hiddenSelectionsTextures[]=
	{
		"\Russian_CSAT\Data\U_OR_CombatUniform_Hex.paa",
		"\Russian_CSAT\Data\U_OR_CombatUniform_Tech.paa"
	};
	linkedItems[]=
	{
		"Vest_V_TacVestIR_Russian",
		"Headgear_H_HelmetOR_ocamo",
		"NVGoggles_OPFOR",
		"ItemMap",
		"ItemCompass",
		"ItemWatch",
		"ItemRadio"
	};
	respawnLinkedItems[]=
	{
		"Vest_V_TacVestIR_Russian",
		"Headgear_H_HelmetOR_ocamo",
		"NVGoggles_OPFOR",
		"ItemMap",
		"ItemCompass",
		"ItemWatch",
		"ItemRadio"
	};
};
};
class cfgWeapons
{
class Uniform_Base;
class UniformItem;
class U_OR_CombatUniform_Hex: Uniform_Base
{
	scope=2;
	displayName="$STR_A3_Iran_Fatigues_hex";
	picture="\Russian_CSAT\Data\icon_u_or_combatuniform_ocamo_ca.paa";
	model="\A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d";
	class ItemInfo: UniformItem
	{
		uniformModel="-";
		uniformClass="OR_Soldier_F";
		containerClass="Supply40";
		mass=80;
	};
};
class ItemCore;
class HeadgearItem;
class Headgear_H_HelmetOR_ocamo: ItemCore
{
	scope=2;
	weaponPoolAvailable=1;
	displayName="$STR_A3_H_HelmetO_ocamo0";
	picture="\Russian_CSAT\Data\icon_h_helmetor_ocamo_ca.paa";
	model="\A3\Characters_F\OPFOR\headgear_o_helmet_ballistic";
	hiddenSelections[]=
	{
		"camo"
	};
	hiddenSelectionsTextures[]=
	{
		"\Russian_CSAT\Data\U_OR_CombatUniform_Tech.paa"
	};
	class ItemInfo: HeadgearItem
	{
		mass=50;
		uniformModel="\A3\Characters_F\OPFOR\headgear_o_helmet_ballistic";
		modelSides[]={3,0};
		armor=5;
		passThrough=0.5;
		hiddenSelections[]=
		{
			"camo"
		};
	};
};
class Vest_NoCamo_Base;
class VestItem;
class Vest_V_TacVestIR_Russian: Vest_NoCamo_Base
{
	scope=2;
	displayName="Raven Vest";
	picture="\A3\characters_f\Data\UI\icon_V_TacVestIR_blk_CA.paa";
	model="\A3\Characters_F_Beta\INDEP\equip_ir_vest01";
	hiddenSelections[]=
	{
		"camo1", "camo2"
	};
	hiddenSelectionsTextures[]=
	{
		"\Russian_CSAT\Data\U_OR_CombatUniform_Tech.paa",
		"\Russian_CSAT\Data\U_OR_CombatUniform_Tech.paa"
	};
	class ItemInfo: VestItem
	{
		uniformModel="\A3\Characters_F_Beta\INDEP\equip_ir_vest01";
		containerClass="Supply100";
		mass=60;
		armor="20";
		passThrough=0.5;
		hiddenSelections[]=
		{
			"camo1",
			"camo2"
		};
	};
};
};

Share this post


Link to post
Share on other sites

Your CfgWeapons >> U_OR_CombatUniform_Hex also need hiddenSelections and hiddenSelectionTextures defined i believe, on comparing your config to a vanilla one this is what i see missing. In Uniform_Base these properties are blank so would account for no texture appearing.

Share this post


Link to post
Share on other sites

Na the uniform texture is defined on a unit. I think its not possibke because its not really a uniform on the ground there its a weaponholder with the uniform inside. I think these things have a special config somewhere. I guess you should take a look how bis did it. If they made a seperate config for it in the character one. Thats all i can think of. Unless its ansaprate model... Although..... I might have seen a folded texture somewhere in the files.....

Share this post


Link to post
Share on other sites
Na the uniform texture is defined on a unit.

Yes this is correct. As per his config CfgVehicles >> "OR_Soldier_F" >> "hiddenSelectionsTextures[]" = "\Russian_CSAT\Data\U_OR_CombatUniform_Hex.paa"

I think its not possibke because its not really a uniform on the ground there its a weaponholder with the uniform inside.

This has no relevance to creating a new uniform config.

I think these things have a special config somewhere.

Yes. CfgWeapons >> "U_OR_CombatUniform_Hex". Where you will see the model defined is the suitpack. The textures supplied in this config relate to the suitpack which you can see by checking any vanilla BIS config. e.g

CfgVehicles >> B_Soldier_F

hiddenSelectionsTextures[] = {"\a3\characters_f\blufor\data\clothing1_co.paa"}; // full uniform texture for units model

uniformClass = "U_B_CombatUniform_mcam";

CfgWeapons >> "U_B_CombatUniform_mcam"

model = "\A3\Characters_F\Common\Suitpacks\suitpack_universal_F.p3d"; //suit pack

hiddenSelectionsTextures[] = {"\A3\Characters_F\Common\Suitpacks\data\suitpack_soldier_blufor_co.paa"}; // suit pack

Then go and check the textures out in the files...

clothing1_co.paa is a full uniform including boots.

suitpack_soldier_blufor_co.paa is a simplified top and trouser leg

Now go in the editor and play as a B_Soldier_F and drop your unform on the ground that is the suitpack texture as defined in CfgWeapons >> "U_B_CombatUniform_mcam" which is missing from Kydoimos's config.

Even the item version ones "Item_U_B_CombatUniform_mcam" that you can place on the ground from the editor that are basically a fake container point straight back to "U_B_CombatUniform_mcam" under "TransportItems"

I maybe wrong but thats what im seeing from browsing the config.

Share this post


Link to post
Share on other sites

@All - thanks, chaps! That's really helpful! Makes sense now!

@Larrow - I think I get what you mean, how would the suitpack texture as defined in CfgWeapons >> "U_B_CombatUniform_mcam" look in the config.cpp? I've looked through BIS' configs but couldn't locate an example :) Thanks ever so, for your response matey!

@KBBW123 - thanks too, for your help!

Share this post


Link to post
Share on other sites

@All - brilliant chaps, have it working! Larrow, KBBW123, dudes, you're stars! :D

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  

×