Jump to content
Sign in to follow this  
SpaceNavy

Using unchanged vanilla assets in custom faction?

Recommended Posts

So all day, I've been struggling with the following problem. Please explain why this doesn't work:

I want to create a custom faction.

I don't want to use any modded assets for this faction.

I want to use the Guerilla Apparel (classname: U_BG_Guerrilla_6_1) completely vanilla asset, NO re-textures.

So here is my CfgVehicle code for the unit:

class TEI_Ins_ER_Rebel: I_Soldier_base_F
{
	side 		= 0;
	scope		= 2;
	faction				= "TEI_Ins";
	author				= "Eridanus Insurrection Team";
	displayName			= "Rebel";
	vehicleClass			= "TEI_Ins_Man_ER_class";
	uniformAccessories[]			= {};
	nakedUniform 				= "U_BasicBody";
	uniformClass				= "U_BG_Guerrilla_6_1";
	weapons[]				= {"Throw","Put"};
	respawnWeapons[]		= {"Throw","Put"};
	Items[]				= {"FirstAidKit"};
	RespawnItems[]			= {"FirstAidKit"};
	magazines[]			= {};
	respawnMagazines[]		= {};
	linkedItems[] 			= {"ItemMap","ItemCompass","ItemWatch","ItemRadio"};
	respawnLinkedItems[] 	     = {"ItemMap","ItemCompass","ItemWatch","ItemRadio"};
	hiddenSelections[] 		= {};
	hiddenSelectionsTextures[] = {};
};

When you load this code in-game, you go to the editor and look for our unit.

It is on the OPFOR side and Insurrectionists faction like we wanted.

It has the same name as in both the vehicleClass and displayName as mentioned above.

However when you launch the unit, you get a soldier with a invisible uniform on (the uniform is also the default for the I_Soldier_base_F class: a AAF combat uniform) instead of the Guerilla Apparel uniform like we wanted. By invisible uniform, I mean the character is obviously wearing a uniform but in the inventory screen it shows he has no uniform on and no inventory space.

I've been discussing this problem with different people literally all today and no one is able to come up with an explanation as to why this does not work. If I were to list a vest under linkedItems, the character would spawn with a fully functional vest complete with inventory space. So why is it not the same for uniforms?

Let me remind you, that I am NOT creating a different re-textured uniform here. I am simply trying to take a uniform that is already in game and place it on a new character in a new faction created in configs.

I would actually like to hear from a developer at this point, because the more other people and myself look into this issue the more it smells like a bug rather than user error. I really, honestly hope I am wrong about that because I would be very happy to know the correct way to get this to work.

EDIT: I should also clarify that I know some work-arounds to get this to work, but not in the matter I am looking for. Mearning, I don't want to have to create a completely separate uniform that is exactly like the one that is already in-game. I want to equip the one that is in-game.

Edited by spacenavy90

Share this post


Link to post
Share on other sites

It's probably something to do with the modelsides parameter.

You are defining the side as East (0), but the modelsides for I_soldier_base_F is:

modelSides[] = {2, 3};

Try changing it to

modelSides[] = {0};

or maybe

modelSides[] = {0,1,2,3};

I haven't tested it but I think that might be the issue.

Share this post


Link to post
Share on other sites

That could be it and it's worth a try but I don't believe it will solve all my problems. The biggest issue right now is in most cases I will get the unit in game with the right uniform, but the uniform will not be a real uniform. It is not in your inventory so you can't take it off, replace it with another uniform or drop equipment inside it.

The actual model showing up though has been fixed.

Share this post


Link to post
Share on other sites

If that doesn't sort it then send me a test model + config and I'll see if I can fix it for you.

(I know you're doing a big Halo project so just send me a test model if you like and I'll have a look - no need to send the real thing).

Share this post


Link to post
Share on other sites

Okay well with the excellent help of Das Attorney via PMs, we've managed to get this working exactly as I was hoping to.

So here it is:

class CfgPatches
{
   class Testing_Vanilla_Uniforms
   {
       units[] = {};
       weapons[] = {};
       requiredVersion = 1;
       requiredAddons[] =  {a3_characters_f_bootcamp}; //needed for the unit we want
   };
};

class CfgFactionClasses {
   class Faction_class {
       displayname = "Faction Name";
       icon = "\a3\Data_f\cfgFactionClasses_OPF_ca.paa"; //OPFOR Icon
       priority = 1;
       side = 0; //OPFOR Side
   };
};

class CfgVehicleClasses {
   class Faction_Man_class {
       displayName = "Sub-Class of Faction";
   };
};

class CfgWeapons {
   class Uniform_Base;
   class UniformItem;
   class U_IG_Guerrilla_6_1 : Uniform_Base { //Guerilla apparel uniform
       class ItemInfo : UniformItem {
           uniformModel = "-";
           uniformClass = "Faction_Unit_class";
           containerClass = "Supply30";
           mass = 30;
       };
   };
};

class CfgVehicles {
   class I_Soldier_base_F; //indepedent soldier base
   // SOLDIERS    
   class Faction_Unit_class: I_Soldier_base_F {
       modelSides[]                     = {0,1,2,3};
       side                            = 0; //OPFOR side
       scope                            = 2;
       faction                            = "Faction_class";
       author                            = "Das Attorney / SpaceNavy";
       displayName                        = "Man Unit Name";
       vehicleClass                    = "Faction_Man_class";
       uniformClass                    = "U_IG_Guerrilla_6_1";
       model                            = "a3\characters_f_bootcamp\Guerrilla\ig_guerrilla_6_1.p3d"; //BI Guerilla apparel model
       weapons[]                        = {"Throw","Put"};
       respawnWeapons[]                = {"Throw","Put"};
       Items[]                            = {"FirstAidKit"};
       RespawnItems[]                    = {"FirstAidKit"};
       magazines[]                        = {};
       respawnMagazines[]                = {};
       linkedItems[]                    = {"ItemMap","ItemCompass","ItemWatch","ItemRadio"};
       respawnLinkedItems[]            = {"ItemMap","ItemCompass","ItemWatch","ItemRadio"};
       headgearProbability             = 0;
       allowedHeadgear[]                = {};
       backpack                         = "";
	hiddenSelections[] 				= {"-"};
	hiddenSelectionsTextures[] 		= {"a3\characters_f_bootcamp\Guerrilla\Data\ig_guerrilla_6_1_co.paa"}; //BI Guerilla apparel texture
   };    
};  

With this, you'll see that we were trying to make a complete new faction on the OPFOR side. We were trying to assign a working uniform with cargo space and it now works perfectly.

You'll have to find the model and texture (if it applies) location in the A3 Pbos but then just follow the config above and it should work out.

Share this post


Link to post
Share on other sites

Just to build on from what spacenavy90 says:

If you need to make a new uniform, then be aware that whatever classname you put into the "uniformClass" param will dictate which side can wear that uniform.

It doesn't matter what class you enter, but the side is crucial. Personally I think BIS did it this way so units could determine if the correct unit is wearing the right uniform for their abandoned stealth system. It would have been easier to use 0,1,2,3 like they do sides but I think they didn't convert the system to integers once they stopped checking by class.

Anyway, some examples using inheritance from game classes:

// allied to east

class CfgWeapons {
class Uniform_Base;
class UniformItem;
class U_IG_Guerrilla_6_1;
class MyNewUniform : U_IG_Guerrilla_6_1 {
	class ItemInfo : UniformItem {
		uniformModel = "-";
		uniformClass = "SoldierEB";
		containerClass = "Supply30";
		mass = 30;
	};
};
};

// allied to west

class CfgWeapons {
class Uniform_Base;
class UniformItem;
class U_IG_Guerrilla_6_1;
class MyNewUniform : U_IG_Guerrilla_6_1 {
	class ItemInfo : UniformItem {
		uniformModel = "-";
		uniformClass = "B_Soldier_diver_base_F";
		containerClass = "Supply30";
		mass = 30;
	};
};
};

I tried class "all" and class "CAManBase" just to see if I could make the uniforms universal but no dice there.

Share this post


Link to post
Share on other sites

Couldn't you use modelSides[] = {6};

to make it universal?

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  

×