Jump to content
BrendoB47

Help Using modelSides[] to allow INDFOR uniform to be worn by BLUFOR and INDFOR

Recommended Posts

I've tried everything the 5 relevant Google results have, and nothing is currently working, and have asked in other places to no avail.

I have a uniform U_I_E_Uniform_01_F_B which inherits from the base LDF uniform, U_I_E_Uniform_01_F_B. Inside the new uniform's class, I have set modelSides[] to BLU, IND, and CIV, as shown below. (The extra sides are because tried copying the Universal Uniforms config.cpp since it was not working.)

class U_I_E_Uniform_01_F;
class U_I_E_Uniform_01_F_B: U_I_E_Uniform_01_F{
  	author = "brendob47";
  	scope = 2;
  	displayName = "Combat Fatigues [LDFx]";
  	modelSides[]= { 0, 1, 2, 3, 4, 5, 6, 7 };//From Universal Uniforms config
  };

Furthermore, I have done the same thing in the classes of the BLUFOR units which are supposed to wear these uniforms, since I have read that the modelSides[] needs to be set in both the uniform and the unit.

class I_E_Soldier_F;
class L20S_Rifleman_B: I_E_Soldier_F
  {
    faction="L20S_LDF_2020s_B";
    side=1;
    author = "brendob47";
    displayName="Rifleman";
    editorPreview = "\L20S\data\preview_woodland\L20S_Rifleman.jpg";
    modelSides[]= { 0, 1, 2, 3, 4, 5, 6, 7 };
    uniformClass="U_I_E_Uniform_01_F_B";
    weapons[]={/*cropped out*/};
    respawnWeapons[]={/*cropped out*/};
    items[]={/*cropped out*/};
    respawnItems[]={/*cropped out*/};
    magazines[]={/*cropped out*/};
    respawnMagazines[]={/*cropped out*/};
    linkedItems[]={/*cropped out*/};
    respawnLinkedItems[]={/*cropped out*/};
    backpack="";
  };

The parent faction is also set to side=1;.

When I go to the editor and place a unit, they are shown with an AAF uniform, and the inventory has no uniform item. What can I do about this?

When I change the side of the unit to INDFOR, they show up properly and all. The uniform works on INDFOR units fine, but even with changing the modelSides[] parameter, the uniforms are unable to be worn or picked up by non-INDFOR units outside being set in the Arsenal or Loadout Editor.

Again, I want to be able to effectively simulate the effect of Universal Uniforms without creating a mod dependency, and I am obviously doing something wrong. How do I fix this?

 

As a side note, what is the proper way to do this: make a uniform which can be worn by both blu and ind, or make the blufor character able to wear both blu and ind uniforms?  I accounted for both by putting the modelSides[] parameter into both the uniform and unit classes.

Share this post


Link to post
Share on other sites

Your custom uniform still inherits its ItemInfo properties from the vanilla LDF uniform (U_I_E_Uniform_01_F) hence why it remains restricted to INDEP units only. You need to include your own ItemInfo class that inherits from the vanilla outfit but overrides its uniformClass value to link it to your custom uniform in CfgVehicles:

 

NOTE: Pay close attention to the inheritance structure!

 

	class UniformItem;
	class Uniform_Base;

	class U_I_E_Uniform_01_F: Uniform_Base
	{
		class ItemInfo;
	};

	class U_I_E_Uniform_01_F_B: U_I_E_Uniform_01_F
	{
		author="brendob47";
		displayName="Combat Fatigues [LDFx]";
		class ItemInfo: ItemInfo
		{
			uniformClass="L20S_Rifleman_B";
		};
	};

Also, the modelSides array isn't used in CfgWeapons for uniforms. The side checks only matter to the CfgVehicles side of things so there's no need to include it in the CfgWeapons class.

  • 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

×