BilOlson 0 Posted October 3, 2007 Working on a new unit(s), everything working fine but cant seem to get the cfgFaces correct. Anyone with a example of a single unit with a custom face (cfg Faces included) in the .cpp? Close as I got was "white textures" for Face, so Im assuming its a path problem. Tried it the way it was done in OFP but it seems it has changed slightly?? Any help is very appreciated... Share this post Link to post Share on other sites
weedomatic 0 Posted October 7, 2007 I hope the code "highlighting" is self-explanatory. Units set to MyFaces config will randomly select one of the defined faces in the CfgFaces class. Have not tried using custom faces, though. Not much time, here I/you go. /* *************** CODE *************** */ class CfgVehicles {  class SoldierGB;  class MySoldier_A: SoldierGB  {   // …   faceType = "MyFaces";   // …  };  class MySoldier_B: MySoldier_A  {   // …   // Inherits faceType from MySoldier_A if faceType is not overwritten   // …  }; }; // … class CfgFaces {  class MyFaces{   class Default   {    name = " MyFaces Default";    texture = "\ca\characters\hhl\hhl_33_CO.paa";    east = false;    west = false; // racs..   };   class Face1   {    name = " MyFaces 1";    texture = "\ca\characters\hhl\hhl_26_CO.paa";    east = true;    west = true; // racs...   };   class Face2   {    name = " MyFaces 2";    texture = "\ca\characters\hhl\hhl_27_CO.paa";    east = true;    west = true;   };   // …  }; }; Share this post Link to post Share on other sites
weedomatic 0 Posted October 7, 2007 Did a quick test and it works with custom skins. W.r.t. "path problem", this is what I wrote in the face-classes texture-attribute defined in CfgFaces (check code above) : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> texture = "\MyModFolder\data\custom1.jpg"; Naturally, this assumes that this folder hierarchy plus the jpg exist. Maybe you put CA or something as the root in your path?! Share this post Link to post Share on other sites
BilOlson 0 Posted October 8, 2007 Thanks for the reply...You are gentleman and a scholar ... Share this post Link to post Share on other sites
Minon 0 Posted October 28, 2007 Can you help me to integrate cfg Faces to my config please ? class CfgPatches { class BISoldier { units[]={"Fox Unit"}; weapons[]={}; requiredVersion = 1.05; requiredAddons[]={}; }; }; class CfgVehicleClasses { class BISoldier { displayName="Fox Unit"; }; }; class CfgSkeletons { class Default; class Head { isDiscrete = 0; skeletonInherit = ""; skeletonBones[] ={"neck","","neck1","neck","head","n eck1","lBrow","head","mBrow","head","rBr ow","head","lMouth","head","mMouth","hea d","rMouth","head","eyelids","head","LLi p","head"}; }; class OFP2_ManSkeleton { isDiscrete = 0; skeletonInherit = "Head"; skeletonBones[] = {"weapon","","launcher","","Camera",&quo t;","Spine","","Spine1","","Spine2" ,"","Spine3","","Pelvis","","LeftSh oulder","","LeftArm","","LeftArmRoll","& quot;,"LeftForeArm","","LeftForeArmRoll",""," LeftHand","", "LeftHandRing","","LeftHandRing1","","LeftHan dRing2","","LeftHandRing3","","LeftHandPinky1" ;,"","LeftHandPinky2","","LeftHandPinky3","&q uot;,"LeftHandMiddle1","","LeftHandMiddle2","", "LeftHandMiddle3","","LeftHandIndex1","","Lef tHandIndex2","","LeftHandIndex3","","LeftHandThumb 1","","LeftHandThumb2","","LeftHandThumb3",&q uot;","RightShoulder","","RightArm","", "RightArmRoll","","RightForeArm","","RightFor eArmRoll","","RightHand","","RightHandRing",& quot;","RightHandRing1","","RightHandRing2","" ;,"RightHandRing3","","RightHandPinky1","", "RightHandPinky2","","RightHandPinky3","","Ri ghtHandMiddle1","","RightHandMiddle2","","RightHan dMiddle3","","RightHandIndex1","","RightHandIndex2 ","","RightHandIndex3","", "RightHandThumb1","","RightHandThumb2","","Ri ghtHandThumb3","","LeftUpLeg","","LeftUpLegRoll&qu ot;,"","LeftLeg","","LeftLegRoll","",&qu ot;LeftFoot","","LeftToeBase","","RightUpLeg" ,"", "RightUpLegRoll","","RightLeg","","RightLegRo ll","","RightFoot","","RightToeBase","&q uot;}; }; class Flag: Default {}; class FlagCarrier: Default { skeletonInherit = "Default"; skeletonBones[] = {"stozar","","vlajka",""}; }; }; class CfgMovesMaleSdr; class BI_PeopleMoves : CfgMovesMaleSdr { skeletonName = "OFP2_ManSkeleton"; collisionVertexPattern[] = {"1a", "2a", "3a", "4a", "5a", "6a", "7a", "8a", "1c", "2c", "3c", "4c", "5c", "6c", "7c", "8c", "1f", "2f", "3f", "4f", "5f", "6f", "7f", "8f"}; collisionGeomCompPattern[] = {1, 3, 6}; }; class CfgModels { class Default; class flag_vojak : Default { sections[] = {"latka"}; }; class Head: Default { skeletonName = "Head"; sections[] = {"swap_hhl","hide_eyewear"}; sectionsInherit=""; }; class BISoldier: Default { skeletonName = "OFP2_ManSkeleton"; sectionsInherit="Head"; sections[] = {"weapon","","launcher","","Camera",&quo t;","Spine","","Spine1","","Spine2" ,"","Spine3","","Pelvis","","LeftSh oulder","","LeftArm","","LeftArmRoll","& quot;,"LeftForeArm","","LeftForeArmRoll",""," LeftHand","", "LeftHandRing","","LeftHandRing1","","LeftHan dRing2","","LeftHandRing3","","LeftHandPinky1" ;,"","LeftHandPinky2","","LeftHandPinky3","&q uot;,"LeftHandMiddle1","","LeftHandMiddle2","", "LeftHandMiddle3","","LeftHandIndex1","","Lef tHandIndex2","","LeftHandIndex3","","LeftHandThumb 1","","LeftHandThumb2","","LeftHandThumb3",&q uot;","RightShoulder","","RightArm","", "RightArmRoll","","RightForeArm","","RightFor eArmRoll","","RightHand","","RightHandRing",& quot;","RightHandRing1","","RightHandRing2","" ;,"RightHandRing3","","RightHandPinky1","", "RightHandPinky2","","RightHandPinky3","","Ri ghtHandMiddle1","","RightHandMiddle2","","RightHan dMiddle3","","RightHandIndex1","","RightHandIndex2 ","","RightHandIndex3","", "RightHandThumb1","","RightHandThumb2","","Ri ghtHandThumb3","","LeftUpLeg","","LeftUpLegRoll&qu ot;,"","LeftLeg","","LeftLegRoll","",&qu ot;LeftFoot","","LeftToeBase","","RightUpLeg" ,"", "RightUpLegRoll","","RightLeg","","RightLegRo ll","","RightFoot","","RightToeBase","&q uot;}; }; class OFP2_ManSkeleton: BISoldier{}; }; class CfgVehicles { class Land; class Man: Land { class ViewPilot; }; class CAManBase; class SoldierWB; class BISoldier: SoldierWB { model="\Fox_Unit\BIsoldier.p3d"; moves="BI_PeopleMoves"; accuracy=5; displayName= "Fox Unit CQB"; nameSound = "specNas"; picture = "\Ca\characters\data\Ico\i_SF_CA.paa"; Icon = "\Ca\characters\data\map_ico\i_komandos_CA.paa"; weapons[] = {M4A1SD,M9SD,"Throw","Put","Binocular",}; magazines[] = {"30Rnd_556x45_StanagSD", "30Rnd_556x45_StanagSD", "30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD", "30Rnd_556x45_StanagSD", "30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Sta nagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rn d_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD" ;,"15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD",&quo t;15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rn d_9x19_M9SD","HandGrenade","HandGrenade","TimeBomb",&qu ot;TimeBomb",}; camouflage=0.5; vehicleClass = "BISoldier"; threat[] = {1, 0.1, 0.1}; class Wounds{ tex[]={}; mat[] = {"Fox_Unit\data\us_molle_webbings.rvmat", "ca\characters\data\np_hhl_wound2.rvmat", "Fox_Unit\data\us_soldier_body.rvmat", "Fox_Unit\data\us_soldier_equip.rvmat", "ca\characters\data\np_soldier_b_body_wound2.rvmat","Fox_Unit\data\us_soldier_equip.rvmat","Fox_Unit\data\us_hhl.rvmat"}; }; }; }; Share this post Link to post Share on other sites
BilOlson 0 Posted October 30, 2007 With the help weedomatic was very nice to lend me, I can help YOU now btw Weed, thank you for the idea of the seperate cfgFaces so I could get appropriate faces on approriate soldiers without all that random going on...worked like a charm...<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches { class BISoldier { units[]={"Fox Unit"}; weapons[]={}; requiredVersion = 1.05; requiredAddons[]={}; }; }; class CfgFaces // CfgFaces Starts here { class MyFaces{ class Default { name = " MyFaces Default"; texture = "\ca\characters\hhl\hhl_33_CO.paa"; east = false; west = false; // racs.. }; class Face1 { name = " MyFaces 1"; texture = "\ca\characters\hhl\hhl_26_CO.paa"; east = true; west = true; // racs... }; class Face2 { name = " MyFaces 2"; texture = "\ca\characters\hhl\hhl_27_CO.paa"; east = true; west = true; }; // … }; }; // CfgFaces Ends here class CfgVehicleClasses { class BISoldier { displayName="Fox Unit"; }; }; I put the cfgFaces into your code I seperated it out with first line and last line of cfgFaces commented..Any other questions PM me and I can help. Hope this helps.. Share this post Link to post Share on other sites
Minon 0 Posted October 30, 2007 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class BISoldier: SoldierWB { model="\Fox_Unit\BIsoldier.p3d"; moves="BI_PeopleMoves"; accuracy=5; displayName= "Fox Unit CQB"; nameSound = "specNas"; picture = "\Ca\characters\data\Ico\i_SF_CA.paa"; Icon = "\Ca\characters\data\map_ico\i_komandos_CA.paa"; weapons[] = {M4A1SD,M9SD,"Throw","Put","Binocular",}; magazines[] = {"30Rnd_556x45_StanagSD", "30Rnd_556x45_StanagSD", "30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD", "30Rnd_556x45_StanagSD", "30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","HandGrenade","HandGrenade","TimeBomb","TimeBomb",}; camouflage=0.5; facetype = "Masked"; vehicleClass = "BISoldier"; threat[] = {1, 0.1, 0.1}; class Wounds{ <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgFaces // CfgFaces Starts here { class Masked{ class Default { name = "MyFaces Default"; texture = "\ca\characters\hhl\hhl_33_CO.paa"; east = true; west = true; // racs.. }; class Face1 { name = "MyFaces 1"; texture = "\Fox_Unit\hhl\face8.paa"; east = true; west = true; // racs... }; class Face2 { name = "MyFaces 2"; texture = "\Fox_Unit\hhl\face16.paa"; east = true; west = true; }; // … }; }; // CfgFaces Ends here Nothing changes damn it .... Share this post Link to post Share on other sites
BilOlson 0 Posted October 30, 2007 Sorry about that, I dont know for a fact but when you call MyFaces it loads the first unit with the MyFace Default, so to overcome this I did the following... Before <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Default { name = "MyFaces Default"; texture = "\ca\characters\hhl\hhl_33_CO.paa"; east = true; west = true; // racs.. }; class Face1 { name = "MyFaces 1"; texture = "\Fox_Unit\hhl\face8.paa"; east = true; west = true; // racs... }; Replace the BIS Texture with one of your own... After <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Default { name = "MyFaces Default"; texture = "\Fox_Unit\hhl\face8.paa"; // Set this to one of your Faces not a BIS default... east = true; west = true; // racs.. }; class Face1 { name = "MyFaces 1"; texture = "\Fox_Unit\hhl\face8.paa"; east = true; west = true; // racs... }; Hope this helps Oops almost forgot if this unit your working on is Independent(RACS), youll have to go through cfgFaces and set "racs = true" for all of them, otherwise that could be a problem also... Share this post Link to post Share on other sites
BilOlson 0 Posted October 30, 2007 Wow nice Yac, wished I would've saw that a few weeks ago.... Share this post Link to post Share on other sites
Minon 0 Posted October 31, 2007 I think i get it,i mean why faces dont work... i found in data folder hhl_22_co.paa - this is a face,that always work...but if i remove it,the whole head and hands are untextured. And if i just replace it with need one,it just for ONE soldier... Share this post Link to post Share on other sites
BilOlson 0 Posted November 1, 2007 You j ust have to replace path to one of your textures for MyFaces Default, instead of that BIS face. You DO NOT want to overwrite BIS files, this will cause you problems in MP Share this post Link to post Share on other sites
HGuderian 0 Posted November 2, 2007 Hi! Is there a way to change all SLA faces in black faces (nn. 26 to 40 of standard BIS faces)? I've tried with MadMed sqf via eventhandler but it work since I save a game...when I reload the play SLA have white faces. Any solution? Thanks a lot Share this post Link to post Share on other sites
BilOlson 0 Posted November 5, 2007 Definitly possible...You want these faces all the time for SLA units? Let me see what I can come up with, got whole day off.... ** Update 1 I just checked out the script for African Militia from MADMED..very effective, but I added a single line to check to see if unit belongs to East or not and if he does turn his face black...Works great here..But of course right now I'm running it in unit's init in editor.. But could be easily converted to an addon I would think...or at least some better way of doing it...Working my brain now and testing stuff out will get back to this thread will repost on my findings... I added: ?((side _unit) == east) : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = _this select 0; _array = ["face26","face27","face28","face29","face30","face31","face32","face33","face34","face35","face36","face37","face38","face39","face40"]; _facial = (_array select (random ((count _array) - 1))); ?((side _unit) == east) : _unit setface _facial; exit Share this post Link to post Share on other sites
BilOlson 0 Posted November 5, 2007 Hi!Is there a way to change all SLA faces in black faces (nn. 26 to 40 of standard BIS faces)? I've tried with MadMed sqf via eventhandler but it work since I save a game...when I reload the play SLA have white faces. Any solution? Thanks a lot You got this working via Event Handler? How? I just tried for about an hour it does NOT like this line of code: Generic Expression Error <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _facial = (_array select (random ((count _array) - 1))); Alot of this is still new to me ... 1) It DOES work if added to mission folder and called in Unit's init line in Editor, flawlessly, almost... Does'nt work on units placed by game engine Ex: AI T-72, AI BMP...they're still caucasian.. 2) Tried "replacement type addon" config with event handler, no go, once its put into this situation it gets the error I stated above...Tried all Man and tried using to check if it was East or not...Then i also took check out and tried individual East classes (SoldierE, SoldierEB, etc..) Still does not like that one line... 3) Gotta ask.. Why would you want to change em "all" to black? Except for a few units, they look so freaking ridiculous. For them to even look half way decent you'd need camo changes etc for one, then you'd be doing an addon anyways and would do this exactly like MADMED did, or via CfgFaces like in the config i did for WP_Insurgentsv1.0. (Although its not Random, individual units have specific faces...done by a little Cfg Faces trickery (tip supplied by weedomatic, thanks again bro worked like a charm ) 4) Damn you... Now I can't seem to stop trying to get this to work, arrrrgh I'm goingto get it.. Share this post Link to post Share on other sites