This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
arma2:config:custom_face [2010-08-23 16:51] snakeman created custom_face initial page. |
arma2:config:custom_face [2010-09-20 09:17] snakeman added more data. |
||
---|---|---|---|
Line 121: | Line 121: | ||
PMCTODO :) | PMCTODO :) | ||
+ | |||
+ | ====== CfgFaces ====== | ||
+ | |||
+ | ArmA 2 CfgFaces | ||
+ | |||
+ | Used in conjunction with setFace. | ||
+ | <code cpp> | ||
+ | person SetFace "cfgFaces.ClassName"; // quotes required | ||
+ | |||
+ | this SetFace "Marylin"; | ||
+ | soldier1 SetFace "Face33"; | ||
+ | </code> | ||
+ | |||
+ | "Face01" to "Face107". | ||
+ | |||
+ | A subset of 6 Camo faces are available for each of above. | ||
+ | |||
+ | The full set of class names for "face77" would be: | ||
+ | |||
+ | Face77, Face77_camo1, Face77_camo2, Face77_camo3, Face77_camo4, Face77_camo5 and Face77_camo6 | ||
+ | |||
+ | |||
+ | ====== Structure ====== | ||
+ | |||
+ | <code cpp> | ||
+ | class CfgFaces | ||
+ | { | ||
+ | class Default; // held in engine's ca_bin | ||
+ | class Man: Default | ||
+ | { | ||
+ | class Default; // held in ca_chars | ||
+ | class FaceWhatever: Default | ||
+ | { | ||
+ | name = "$STR_Whatever"; // every class, different string name | ||
+ | texture = "\some\texture\somewhere.paa"; // THE face for this | ||
+ | head = defaultHead; //classname in cfgHeads | ||
+ | material = "\some\rvmat\somewhere.rvmat"; | ||
+ | disabled = false; // always TRUE for inherited camo faces | ||
+ | }; | ||
+ | |||
+ | class OneOfSixCamos: FaceWhatever | ||
+ | { | ||
+ | /* uses the same face texture (obviously) */ | ||
+ | disabled = true; // always | ||
+ | name = "$STR_UniqueName"; | ||
+ | head = "alwaysOneOf6Classes"; // changes wounds | ||
+ | material = "\AlwaysOneOfSix\Different\FacePaints.rvmat"; | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | One single head model is used for ALL faces. On which, a different base texture is applied for EVERY 'face'. | ||
+ | |||
+ | Separately, each of these faces have different face paint, and they, require a separate head class to reflect the different wound appearances. | ||
+ | |||
+ | ALL of the camo derivatives use one of six common face paints. | ||
+ | |||
+ | Specifying \root and .paa extension are essential. | ||
+ | |||
+ | head = inevitably leads to one, single, defaultp3d held in \ca\characters\man\defaulthead\defaulthead.p3d; | ||
+ | |||
+ | |||
+ | ====== Subset themes ====== | ||
+ | |||
+ | The above 107 faces are duplicated, class wise in black and green masks also a women models, and, a few face models for some special US soldiers. | ||
+ | |||
+ | |||
+ | ====== Adding a Face ====== | ||
+ | |||
+ | Camouflage subclasses are not required. | ||
+ | <code cpp> | ||
+ | class CfgFaces | ||
+ | { | ||
+ | class Default; // held in engine's ca_bin | ||
+ | class Man: Default | ||
+ | { | ||
+ | class Default; // held in ca_chars | ||
+ | class FaceWhatever: Default | ||
+ | { | ||
+ | disabled = false; // should be part of default, but was overlooked | ||
+ | |||
+ | name = "$STR_Whatever"; | ||
+ | texture = "\some\texture\somewhere.paa"; // THE face for this | ||
+ | identityTypes[] = | ||
+ | { | ||
+ | "Default", | ||
+ | "Head_USMC", | ||
+ | "Head_USMC_CO", | ||
+ | "", | ||
+ | "", | ||
+ | "Head_CDF", | ||
+ | "Head_CDF_CO", | ||
+ | "", | ||
+ | "Head_GUE", | ||
+ | "Head_CIV", | ||
+ | "" | ||
+ | }; | ||
+ | }; | ||
+ | </code> |