Jump to content
Sign in to follow this  
TheBombDoctor

Assigning faces via config.cpp

Recommended Posts

Hey everyone, I have two two questions:

1. How do I produce random faces for units in my config?

2. How do I produce permanent faces for specific units? IE: I drop them I the editor and don't have to use the setidentity in every in it box every time? I have an identity set (face and voice) in the units cfg in my cfgvehicles.hpp, but it seems that A3 bypasses it or I've got something wrong.

I've included a copy of the section of the config in question.

class UFFA_Leader2: B_Soldier_base_F

{

side = 1; //Blufor

faction = "UFFA"; //Your Faction

//backpack = ""; //Backpack

vehicleclass = "Leaders"; //Unit Group

author = "Stychiz";

_generalMacro = "UFFA_Leader"; //Class Name

scope = 2;

displayName = "Xian" //In-Game Name

Weapons[] = {"srifle_mas_m24_v_h","hgun_mas_m9_F","Rangefinder","Throw","Put"};

respawnWeapons[] = {"srifle_mas_m24_v_h","hgun_mas_m9_F","Rangefinder","Throw","Put"};

magazines[] = {mag_20("5Rnd_mas_762x51_Stanag"),mag_3("15Rnd_mas_9x21_Mag"), mag_2("HandGrenade")};

Items[] = {mag_1("FirstAidKit")};

RespawnItems[] = {mag_1("FirstAidKit")};

respawnMagazines[] = {mag_20("5Rnd_mas_762x51_Stanag"),mag_3("15Rnd_mas_9x21_Mag"), mag_2("HandGrenade")};

cost = 300000;

threat[] = {1,0.7,0.3};

linkedItems[] = {"V_mas_cer_PlateCarrier1_rgr","G_Spectacles_Tinted","H_mas_cer_c2","ItemMap","ItemCompass","ItemWatch","ItemRadio"};

respawnLinkedItems[] = {"V_mas_cer_PlateCarrier1_rgr","G_Spectacles_Tinted","H_mas_cer_c2","ItemMap","ItemCompass","ItemWatch","ItemRadio"};

model = "UFFA\data\o_officer1.p3d"; //Path to model

uniformClass = "UF15"; //uniform you are using

camouflage = .2;

sensitivity = .2;

hiddenSelections[] = {"camo"};

HiddenSelectionsTextures[] = {"UFFA\data\camo\GsX.paa"}; //Uniform textures

identityTypes[] = {"Male02GRE

","WhiteHead_17"};

};

Share this post


Link to post
Share on other sites

Hey stychiz,

The CfgVehicle config entry that specified faces is:

identityTypes[] = { "Male02GRE", "WhiteHead_17" };

The identityTypes array is a list of "tags" that indirectly link not just to faces, but also to glasses and voices ("Male02GRE" is a tag used for voice selection if I recall correctly). The way the tag links to faces is pretty simple; each face specifies one or more "identityTypes" tags:

class CfgFaces
{
class Man_A3: Default
{
	class AfricanHead_01 : Default
	{
		identityTypes[] = {"Head_NATO","Head_African"};
		// ...

};

This face is then included in the pool of random faces for any character that has an identityTypes[] containing either Head_NATO or Head_African.

If you want a special head for a particular character, you can simply create a tag that is unique to the identityTypes[] array in your CfgFaces, and also unique to the CfgVehicles identityTypes[] array. It's exactly how BIS does it for campaign characters.

In your CfgVehicles identityTypes[] you may also have tags that are for glasses (e.g. "G_NATO_pilot") and tags that are for voices (e.g. "LanguageGRE_F"). Glasses don't work quite the same way; they have weighted probabilities instead.

Share this post


Link to post
Share on other sites

Since I can't start my own topic, even though I've been a member for 5 years, I'll ask my question on this thread since it somewhat relates, in a way. I'm at the very end of a mod and a part of that mod is retextured FIA units to be CSAT. Using the normal procedures I am only able to give the FIA units MiddleEastern faces but there arms stay white.

 

This is in my config:

  identityTypes[]=
  {
   "LanguagePER_F",
   "Head_TK",
   "G_IRAN_default"
  };

 

I also am using the opfor as inheritance

CSAT_GUE1_SquadLeader: O_Soldier_F

 

But the arms stay with white skin color. So they have bodies of white people with middle eastern head. How do I fix that? Thanks

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  

×