Jump to content
Sign in to follow this  
Brostrom.A | Evul

"Uniform is not allowed for soldier class" no matter what

Recommended Posts

Hello!

I've been making some custom classes using different uniforms and different weapons for easy usage but run in to a little problem. Suddenly the uniform stops working and don't appear anymore on the soldiers I've made.

 

21:22:40 ERROR: Switch uniform! Uniform is not supported by soldier
21:22:40 Uniform U_O_SpecopsUniform_ocamo is not allowed for soldier class CAV_TO_SL
21:22:40 soldier[CAV_TO_SL]:Some of magazines weren't stored in soldier Vest or Uniform?
21:22:41 Fresnel k must be >0, given n=1.4,k=0
21:22:42 "0 - MCC Headless Client available: false"
21:22:42 "0 - MCC Local Headless Client: false"
...
21:23:05 Deinitialized shape [Class: "CAV_TO_SL"; Shape: "a3\characters_f\opfor\o_soldier_01.p3d";]
 

And this is the case for all new units what is wrong?

Below you can find the config.cpp and a snip from CfgVeichles.hpp

 

#define ReadAndWrite		0
#define ReadAndCreate		1
#define ReadOnly			2
#define ReadOnlyVerified	3

#define TEast				0
#define TWest				1
#define TGuerrila			2
#define TCivilian			3
#define TSideUnknown		4
#define TEnemy				5
#define TFriendly			6
#define TLogic				7

#define private				0
#define protected			1
#define public				2

class CfgPatches {
	class CAV_F_TERROR {
		author[] = {"A.Brostrom"};
		authorUrl = "";
		units[] = {"CAV_TO_BASE","CAV_TO_SL","CAV_TO_FTL","CAV_TO_R","CAV_TO_AR","CAV_TO_M","CAV_TO_MEDIC","CAV_TO_AA","CAV_TO_LAT","CAV_TO_AT","CAV_TO_SCIENTIST","CAV_TO_SCIENTIST_ARMED","CAV_TO_SCIENTIST_SOLDIER","CAV_TO_MP_SL","CAV_TO_MP_R","CAV_TO_MP_MEDIC","CAV_TO_ADMIN_01","CAV_TO_ADMIN_01_ARMED","CAV_TO_ADMIN_02","CAV_TO_ADMIN_02_ARMED","CAV_W_srifleDMR_TO","CAV_W_srifleDMR_01_TO","CAV_W_srifleDMR_02_TO","CAV_U_HighTechFatigues01_TO","CAV_U_HighTechFatigues02_TO"};
		weapons[] = {"CAV_W_srifleDMR_TO","CAV_W_srifleDMR_01_TO","CAV_W_srifleDMR_02_TO","CAV_U_HighTechFatigues01_TO","CAV_U_HighTechFatigues02_TO"};
		magazines[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"A3_Characters_F","A3_Characters_F_Common","A3_Characters_F_Common","A3_Characters_F_OPFOR"};
	};
};

#include "CfgFaction.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicleIcons.hpp"
class CfgVehicles {
#include "CfgVehicles.hpp"
};
 

	class CAV_TO_BASE : O_Soldier_base_F {
		scope = private;
		author = "Brostrom.A";
		faction = "CAV_Faction_TO";
		side = 2;
		identityTypes[] = {"LanguageENG_F","Head_NATO","G_NATO_default"};
		genericNames = "EnglishMen";
		icon = "iconMan";
	};
	class CAV_TO_SL : CAV_TO_BASE {
		scope = public;
		displayName = "Squad Leader";
		icon = "iconManLeader";
		backpack = "";
		uniformClass = "U_O_SpecopsUniform_ocamo";
		uniformAccessories[] = {};
		weapons[] = {"CAV_W_srifleDMR_01_TO","rhs_weap_pya","Binocular","Throw","Put"};
		respawnWeapons[] = {"CAV_W_srifleDMR_01_TO","rhs_weap_pya","Binocular","Throw","Put"};
		Items[] = {
			"ACE_MapTools",
			"ACE_EarBuds",
			"ACE_fieldDressing",
			"ACE_fieldDressing",
			"ACE_Morphine",
			"ACE_CableTie",
			"ACE_CableTie"
		};
		RespawnItems[] = {
			"ACE_MapTools",
			"ACE_EarBuds",
			"ACE_fieldDressing",
			"ACE_fieldDressing",
			"ACE_Morphine",
			"ACE_CableTie",
			"ACE_CableTie"
		};
		magazines[] = {
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"rhs_mag_9x19_17",
			"rhs_mag_9x19_17",
			"HandGrenade",
			"HandGrenade",
			"SmokeShell",
			"SmokeShellGreen",
			"Chemlight_red",
			"Chemlight_red",
			"Chemlight_blue",
			"Chemlight_blue",
			"Chemlight_green",
			"Chemlight_green"
		};
		respawnMagazines[] = {
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"20Rnd_762x51_Mag",
			"rhs_mag_9x19_17",
			"rhs_mag_9x19_17",
			"HandGrenade",
			"HandGrenade",
			"SmokeShell",
			"SmokeShellGreen",
			"Chemlight_red",
			"Chemlight_red",
			"Chemlight_blue",
			"Chemlight_blue",
			"Chemlight_green",
			"Chemlight_green"
		};
		linkedItems[] = {"H_HelmetB_black","V_PlateCarrier1_blk","ItemMap","ItemCompass","ItemWatch","tf_anprc154","ItemAndroid","rhsusf_ANPVS_14"};
		respawnLinkedItems[] = {"H_HelmetB_black","V_PlateCarrier1_blk","ItemMap","ItemCompass","ItemWatch","tf_anprc154","ItemAndroid","rhsusf_ANPVS_14"};
	};
I have used different uniforms diffrend base classes and it does not work :( what is wrong?

Share this post


Link to post
Share on other sites

The problem most likely is 'modelSides'. The OPFOR uniform probably isn't setup for the Independent faction (side = 2).

 

modelSides[] = {3, 1};

 

I'm not sure what the attribute for that particular uniform is, but the example above means it can only be used for BLUFOR (side = 1) and CIV (side = 3).

 

You're trying to inherit a uniform from OPFOR (side = 0) and then assign it to BLUFOR. In your second class you're trying to assign it a uniformClass that's incompatible with your chosen side. The second line of your error log is telling you that your uniform is not wearable by your new class, because of the modelSides issue.

 

I'm not at my home PC, so I can't tell you exactly where that attribute goes, but I would look for it in the cfgWeapons of the uniform (U_O_SpecopsUniform_ocamo) in the config viewer. In order to get it to work you'd have to do a replacement config to modify the vanilla assets, which is a whole different task.

 

modelSides[] = {3, 2, 1, 0}; would mean it can be used by all four sides.

Share this post


Link to post
Share on other sites

Change scope to 2.

 

 

The problem most likely is 'modelSides'. The OPFOR uniform probably isn't setup for the Independent faction (side = 2).

 

modelSides[] = {3, 1};

 

I'm not sure what the attribute for that particular uniform is, but the example above means it can only be used for BLUFOR (side = 1) and CIV (side = 3).

 

You're trying to inherit a uniform from OPFOR (side = 0) and then assign it to BLUFOR. In your second class you're trying to assign it a uniformClass that's incompatible with your chosen side. The second line of your error log is telling you that your uniform is not wearable by your new class, because of the modelSides issue.

 

I'm not at my home PC, so I can't tell you exactly where that attribute goes, but I would look for it in the cfgWeapons of the uniform (U_O_SpecopsUniform_ocamo) in the config viewer. In order to get it to work you'd have to do a replacement config to modify the vanilla assets, which is a whole different task.

 

modelSides[] = {3, 2, 1, 0}; would mean it can be used by all four sides.

 

Thx for the advice!

I've added modelsides, changed the scope but it seams not to work. The only thing that did work was moving it from side 2 to 0.  :unsure: So i am considering moving the faction there instead. But if there is a solution to keep them in side 2 it would be awesome.

 

EDIT:

 

I have made my own uniform based of the oppfor uniform and tried to add a ItemInfo and custom uniformClass but did not work I only get errors when i add that.

Share this post


Link to post
Share on other sites

Some good points were made, I'd like to offer some additional information and clarification. Uniforms usually can't be used by soldiers of another faction. Your soldier class has a different faction from a soldier whose uniform you want to use – that causes the error you have. The modelSides[] property should help, if you use the right numbers. Those are 0 for OPFOR, 1 for BLUFOR, 2 for AAF, and 3 for civilians, therefore modelSides[] = {0}; should solve your problem. (Of course you can add more sides to the modelSides[] array, if you wish so.)

Share this post


Link to post
Share on other sites

I have made my own uniform based of the oppfor uniform and tried to add a ItemInfo and custom uniformClass but did not work I only get errors when i add that.

 

Can you post your code for that uniform in cfgWeapons?

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  

×