Jump to content
maihym

Profile Editor Head

Recommended Posts

Does anyone know how I can replicate the rotating head in the profile editor and make it use someone else's head in MP? If anyone could find me the snippet of code or the dialog that controls this that would be a huge help.

Share this post


Link to post
Share on other sites

This is pretty complicated. I couldn't find a solution but here is what I got. Maybe somone else can find out something about this since I am really interested in setting textures on object class type dialog controls.

 

First of all, the dialog that contains the face preview is called "RscDisplayLogin". There is also "RscDisplayNewUser" which conatains the same model ("\A3\ui_f\objects\face_preview"). You can find these either in the config viewer or under "A3\ui_f\config.bin". I debinarized it and here is the content of said class:

Spoiler

[...]
class RscStandardDisplay
{
	movingEnable=1;
	enableSimulation=1;
	enableDisplay=1;
};
[...]
class RscDisplayLogin: RscStandardDisplay
{
	scriptName="RscDisplayLogin";
	scriptPath="GUI";
	onLoad="[""onLoad"",_this,""RscDisplayLogin"",'GUI'] call 	(uinamespace getvariable 'BIS_fnc_initDisplay')";
	onUnload="[""onUnload"",_this,""RscDisplayLogin"",'GUI'] call 	(uinamespace getvariable 'BIS_fnc_initDisplay')";
	class controlsBackground
	{
		class Vignette: RscVignette
		{
			idc=114998;
		};
		class TileGroup: RscControlsGroupNoScrollbars
		{
			idc=115099;
			x="safezoneXAbs";
			y="safezoneY";
			w="safezoneWAbs";
			h="safezoneH";
			class Controls
			{
				class Background: RscText
				{
					idc=114999;
					x=0;
					y=0;
					w="safezoneWAbs";
					h="safezoneH";
					colorBackground[]={0,0,0,0.5};
				};
			};
		};
		class TitleBackground: RscText
		{
			idc=1080;
			x="1 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="38 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
			colorBackground[]=
			{
				"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])",
				"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])",
				"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])",
				"(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])"
			};
		};
		class TabsBackground: RscText
		{
			colorBackground[]={0,0,0,1};
			idc=1081;
			x="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="2.1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="24 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class ListBoxBackground: RscText
		{
			idc=1081;
			x="1 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="2.1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="13.9 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="20.8 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
			colorBackground[]={0,0,0,0.69999999};
		};
		class MainBackground: RscText
		{
			idc=1082;
			x="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="3.1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="24 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="19.8 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
			colorBackground[]={0,0,0,0.69999999};
		};
		class HeadBackground: RscText
		{
			idc=1083;
			x="32.55 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="3.6 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="6.25 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="7.3 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
			colorBackground[]={0.5,0.5,0.5,0.5};
		};
	};
	class objects
	{
		class Head: RscObject
		{
			model="\A3\ui_f\objects\face_preview";
			modelWoman="\A3\ui_f\objects\face_preview";
			idc=109;
			type=80;
			x="35.8 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="6.6 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			z=0.38;
			xBack=0.75;
			yBack=0.89999998;
			zBack=0.25;
			scale=0.20999999;
			direction[]={0,0,1};
			up[]={0,1,0};
			faceType="Man_A3";
			selectionLBrow="lBrow";
			selectionMBrow="mBrow";
			selectionRBrow="rBrow";
			selectionLMouth="lMouth";
			selectionMMouth="mMouth";
			selectionRMouth="rMouth";
			selectionEyelid="eyelids";
			selectionLip="LLip";
			boneHead="head";
			boneLEye="l_eye";
			boneREye="r_eye";
			boneLEyelidUp="eye_upl";
			boneREyelidUp="eye_upr";
			boneLEyelidDown="eye_lwl";
			boneREyelidDown="eye_lwr";
			boneLPupil="l_pupila";
			boneRPupil="r_pupila";
			selectionPersonality="personality";
			selectionGlasses="eyelids";
		};
	};
	class controls
	{
		delete B_OK;
		delete B_Cancel;
		delete B_Delete;
		delete B_Edit;
		delete B_Discard;
		delete B_New;
		delete TextUser;
		delete ValueUser;
		delete TextName;
		delete ValueName;
		delete ValueId;
		delete TextFace;
		delete ValueFace;
		delete TextGlasses;
		delete ValueGlasses;
		delete TextSpeaker;
		delete ValueSpeaker;
		delete TextPitch;
		delete ValuePitch;
		delete TextSquad;
		delete ValueSquad;
		class Title: RscTitle
		{
			style=0;
			idc=1000;
			text="$STR_A3_RscDisplayLogin_Title";
			x="1 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class PlayersName: Title
		{
			idc=601;
			style=1;
			colorBackground[]={0,0,0,0};
			x="16 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="23 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class ButtonAvatar: RscButtonMenu
		{
			idc=115;
			text="$STR_A3_RSCDISPLAYLOGIN_TAB_AVATAR";
			x="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="2.1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="8 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class ButtonUnit: RscButtonMenu
		{
			idc=116;
			text="$STR_A3_RSCDISPLAYLOGIN_TAB_UNIT";
			x="23 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="2.1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="8 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class BX_Ok: RscButtonMenuOK
		{
			x="32.75 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="23 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="6.25 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class BX_Cancel: RscButtonMenuCancel
		{
			x="1 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="23 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="6.25 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class ValueUser2: RscListBox
		{
			idc=101;
			rows=10;
			style=16;
			colorBackground[]={0,0,0,0};
			x="1 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="2.1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="13.9 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="19.5 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class BX_New: RscButtonMenu
		{
			idc=103;
			text="$STR_CA_NEW";
			x="8.5 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="21.7 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="6.25 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class BX_Edit: RscButtonMenu
		{
			idc=102;
			shortcuts[]=
			{
				"0x00050000 + 2"
			};
			text="$STR_CA_EDIT";
			x="32.55 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="11 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="6.25 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class BX_Discard: RscButtonMenu
		{
			idc=114;
			shortcuts[]={1};
			text="$STR_A3_RscDisplayLogin_BX_Discard";
			x="22 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="11 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="6.25 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class BX_Delete: RscButtonMenu
		{
			idc=104;
			text="$STR_CA_DELETE";
			x="1.2 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="21.7 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="6.25 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class CA_TextPlayer2: RscText
		{
			style=1;
			idc=1002;
			text="$STR_DISP_NEW_USER_NAME";
			x="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="3.6 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="7 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class CA_NameValue: RscEdit
		{
			idc=105;
			x="22 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="3.6 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="10.4 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class CA_FaceText: RscText
		{
			style=1;
			idc=1003;
			text="$STR_DISP_NEW_USER_FACE";
			x="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="5 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="7 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class CA_FaceValue: RscCombo
		{
			idc=106;
			rows=3;
			x="22 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="5 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="10.4 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class CA_GlassText: CA_FaceText
		{
			idc=1004;
			text="$STR_DISP_NEW_USER_GLASSES";
			x="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="6.5 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="7 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class CA_ValueGlasses2: RscCombo
		{
			idc=110;
			x="22 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="6.5 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="10.4 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class CA_SpeakerText: CA_FaceText
		{
			idc=1005;
			text="$STR_DISP_NEW_USER_SPEAKER";
			x="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="8 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="7 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class CA_ValueSpeaker2: RscCombo
		{
			idc=107;
			x="22 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="8 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="10.4 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class CA_TextPitch2: CA_FaceText
		{
			idc=1006;
			text="$STR_DISP_NEW_USER_PITCH";
			x="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="9.5 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="7 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class CA_ValuePitch2: RscXSliderH
		{
			idc=108;
			x="22 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="9.5 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="10.4 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class TextUnit: RscText
		{
			style=1;
			idc=1009;
			text="$STR_DISP_ARCUNIT_VEHICLE";
			x="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="3.6 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="7 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class ValueUnit: RscCombo
		{
			idc=117;
			x="22 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="3.6 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="10.45 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class ButtonRefresh: RscButtonMenu
		{
			idc=123;
			text="$STR_DISP_MULTI_REFRESH";
			x="32.55 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="3.6 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="6.25 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class CA_SquadText: RscText
		{
			idc=113;
			style=1;
			text="$STR_A3_RSCDISPLAYLOGIN_SQUAD_XML";
			x="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="5.1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="7 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class CA_SquadValue: RscEdit
		{
			idc=112;
			x="22 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="5.1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="16.8 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class TextPlayerID: RscText
		{
			idc=122;
			style=1;
			text="$STR_A3_RscDisplayLogin_TextPlayerID";
			x="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="6.6 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="7 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class ValuePlayerID: RscEdit
		{
			idc=111;
			canModify=0;
			x="22 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="6.6 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="16.8 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class UnitLogo: RscPicture
		{
			idc=118;
			x="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="10 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="4 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="4 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class UnitName: RscText
		{
			idc=119;
			shadow=0;
			colorText[]=
			{
				"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])",
				"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])",
				"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])",
				1
			};
			x="19.5 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="10 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="19.4 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="1 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
		};
		class DescriptionGroup: RscControlsGroup
		{
			idc=2302;
			class HScrollbar: HScrollbar
			{
				height=0;
			};
			x="15 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="14.5 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			w="23.9 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
			h="8.3 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
			class controls
			{
				class UnitDescription: RscStructuredText
				{
					idc=121;
					shadow=0;
					x="0 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
					y="0 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
					w="23.6 * 					(			((safezoneW / safezoneH) min 1.2) / 40)";
					h="8.2 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
				};
			};
		};
	};
};

 

 

(uinamespace getvariable 'BIS_fnc_initDisplay') contains the following code. It is always called when a new dialog is created. The most importan part here is the path to the onLoad script.

Spoiler

/*
	Author:
		Karel Moricky, improved by Killzone_Kid

	Description:
		Initialize displays during preStart or init GUI display and run its script
		The config class of the display is available in "BIS_fnc_initDisplay_configClass" stored on display
			Example: _display getVariable "BIS_fnc_initDisplay_configClass";
		Display is also stored in uiNamespace variable with config class name
			Example: uiNamespace getVariable "RscAvCamera";

	Parameter(s):
		ARRAY - [] init displays during preStart
		or
		0: STRING - mode, can be "onLoad" or "onUnload"
		1: ARRAY - params passed from "onLoad" or "onUnload" event handler, contains only DISPLAY
		2: STRING - display class
		3: STRING - script path from CfgScriptPaths

	Returns:
		NOTHING
*/

#define CONFIG_CLASS_VAR "BIS_fnc_initDisplay_configClass"
#define INIT_GAME_VAR "BIS_initGame"

// init displays during preStart (moved from BIS_fnc_initDisplays)
if (_this isEqualTo []) exitWith
{
	{
		{
			if (getNumber (_x >> "scriptIsInternal") isEqualTo 0) then //--- Ignore internal scripts, they're recompiled first time they're opened
			{
				_scriptName = getText (_x >> "scriptName");
				_scriptPath = getText (_x >> "scriptPath");

				if (_scriptName isEqualTo "" || _scriptPath isEqualTo "") exitWith
				{
					[
						'Undefined param(s) [scriptPath: "%2", scriptName: "%3"] while trying to init display "%1"',
						configName _x,
						_scriptPath,
						_scriptName
					]
					call BIS_fnc_logFormat;
				};

				_script = _scriptName + "_script";

				if (uiNamespace getVariable [_script, 0] isEqualType {}) exitWith {}; //--- already compiled

				uiNamespace setVariable
				[
					_script,
					compileFinal
					(
						format ["scriptName '%1'; _fnc_scriptName = '%1'; ", _scriptName]
						+
						preprocessFileLineNumbers format ["%1%2.sqf", getText (configFile >> "CfgScriptPaths" >> _scriptPath), _scriptName]
					)
				];
			};
		}
		forEach ("isText (_x >> 'scriptPath')" configClasses _x);
	}
	forEach
	[
		configFile,
		configFile >> "RscTitles",
		configFile >> "RscInGameUI",
		configFile >> "Cfg3DEN" >> "Attributes"
	];

	nil
};

//--- Register/unregister display
with uiNamespace do
{
	params
	[
		["_mode", "", [""]],
		["_params", []],
		["_class", "", [""]],
		["_path", "default", [""]],
		["_register", true, [true, 0]]
	];

	_display = _params param [0, displayNull];
	if (isNull _display) exitWith {nil};

	if (_register isEqualType true) then {_register = parseNumber _register};
	if (_register > 0) then
	{
		_varDisplays = _path + "_displays";
		_displays = (uiNamespace getVariable [_varDisplays, []]) - [displayNull];

		if (_mode == "onLoad") exitWith
		{
			//--- Register current display
			_display setVariable [CONFIG_CLASS_VAR, _class];
			uiNamespace setVariable [_class, _display];

			_displays pushBackUnique _display;
			uiNamespace setVariable [_varDisplays, _displays];

			if !(uiNamespace getVariable [INIT_GAME_VAR, false]) then
			{
				//--- tell loading screen it can stop using ARMA 3 logo which is shown only before main menu
				//--- and start using the classic terrain picture
				uiNamespace setVariable [INIT_GAME_VAR, _path == "GUI" && {ctrlIdd _x >= 0} count _displays > 1];
			};
		};

		if (_mode == "onUnload") exitWith
		{
			//--- Unregister current display
			_displays = _displays - [_display];
			uiNamespace setVariable [_varDisplays, _displays];
		};
	};

	//--- Call script in public version
	if (!cheatsEnabled) exitWith
	{
		[_mode, _params, _class] call (uiNamespace getVariable (_class + "_script"));
		nil
	};

	//--- Recompile in the internal version
	uinamespace setvariable
	[
		_class + "_script",
		compileFinal
		(
			format ["scriptName '%1'; _fnc_scriptName = '%1'; ", _class]
			+
			preprocessFileLineNumbers format ["%1%2.sqf", getText (configFile >> "CfgScriptPaths" >> _path), _class]
		)
	];

	//--- Call script in internal version
	if !(uiNamespace getVariable ["BIS_disableUIscripts", false]) then
	{
		[_mode, _params, _class] call (uiNamespace getVariable (_class + "_script"));
		nil
	};
};

 

 

And here is the onLoad script from "A3\ui_f\scripts\GUI\RscDisplayLogin.sqf":

Spoiler

#include "\A3\ui_f\hpp\defineCommonGrids.inc"
#include "\A3\Ui_f\hpp\defineResincl.inc"

_mode = _this select 0;
_params = _this select 1;
_class = _this select 2;

//BI Account controls
_BIAccountControls = [
			IDC_LOGIN_UNIT_SELECT,
			IDC_LOGIN_REFRESH,
			IDC_LOGIN_SQUAD_TEXT,
			IDC_LOGIN_SQUAD,
			IDC_LOGIN_ID_TEXT,
			IDC_LOGIN_ID,
			IDC_LOGIN_UNIT_NAME,
			//IDC_LOGIN_UNIT_DESCRIPTION, //No need to add, the whole ControlsGroup will be hidden.
			IDC_LOGIN_UNIT_LOGO,
			IDC_LOGIN_UNIT_MOTTO,
			1009, 2302
		     ];

//Properties controls (109-head, 1083-head background)
_propertiesControls = [
			IDC_LOGIN_NAME,
			IDC_LOGIN_FACE,
			IDC_LOGIN_GLASSES,
			IDC_LOGIN_SPEAKER,
			IDC_LOGIN_PITCH,
			IDC_LOGIN_HEAD,
			1083, 1002, 1003, 1004, 1005, 1006
		      ];


switch _mode do
{
	//--- Display load
	case "onLoad":
	{
		//--- set player's name
		(_display displayctrl 601) ctrlSetText profileName;
		[_display, 601] call (uinamespace getvariable 'BIS_fnc_setIDCStreamFriendly');

		//Sets all texts toUpper
		["RscDisplayLogin",["RscText","RscTitle","CA_FaceText"],["PlayersName","UnitMotto"]] call bis_fnc_toUpperDisplayTexts;
		
		//Properties button
		_control = _display displayctrl IDC_LOGIN_TAB_AVATAR;
		_control ctrladdeventhandler ["buttonclick","with uinamespace do {['properties',_this,''] call RscDisplayLogin_script};"];
		//Highlight Properties button
		_control ctrlSetBackgroundColor [1,1,1,1];
		_control ctrlSetTextColor [0,0,0,1];
		
		//BI Account button
		_control = _display displayctrl IDC_LOGIN_TAB_UNIT;
		_control ctrladdeventhandler ["buttonclick","with uinamespace do {['biaccount',_this,''] call RscDisplayLogin_script};"];
		
		//Hide BI Account controls
		{
			(_display displayctrl _x) ctrlShow false;
		} forEach _BIAccountControls;
	};
	
	
	//Properties button
	case "properties":
	{
		_ctrl = _params select 0;
		_display = ctrlparent _ctrl;
		
		//Enable Properties		
		{
			(_display displayctrl _x) ctrlShow true;
		} forEach _propertiesControls;
		
		//Disable BI Account
		{
			(_display displayctrl _x) ctrlShow false;
		} forEach _BIAccountControls;
		
		//Move the Edit/Apply and Discard buttons downwards to their original position.
		_buttonEdit = _display displayctrl IDC_LOGIN_EDIT;
		_buttonEdit ctrlSetPosition [(32.55 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X), (11 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y)];
		_buttonEdit ctrlCommit 0;
		
		_buttonDiscard = _display displayctrl IDC_LOGIN_DISCARD;
		_buttonDiscard ctrlSetPosition [(22 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X), (11 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y)];
		_buttonDiscard ctrlCommit 0;
		
		//Highlight the selected tab (change background and text colours of all tabs)
		_PropertiesButton = _display displayctrl IDC_LOGIN_TAB_AVATAR;
		_BIAccountButton = _display displayctrl IDC_LOGIN_TAB_UNIT;
		
		_PropertiesButton ctrlSetBackgroundColor [1,1,1,1];
		_PropertiesButton ctrlSetTextColor [0,0,0,1];
		
		_BIAccountButton ctrlSetBackgroundColor [0,0,0,1];
		_BIAccountButton ctrlSetTextColor [1,1,1,1];		
	};
	
	//BI Account button
	case "biaccount":
	{
		_ctrl = _params select 0;
		_display = ctrlparent _ctrl;

		//Enable BI Account
		{
			(_display displayctrl _x) ctrlShow true;
		} forEach _BIAccountControls;
		
		//Disable Properties		
		{
			(_display displayctrl _x) ctrlShow false;
		} forEach _propertiesControls;
		
		//Move the Edit/Apply and Discard buttons a bit upwards.
		_buttonEdit = _display displayctrl IDC_LOGIN_EDIT;
		_buttonEdit ctrlSetPosition [(32.55 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X), (7.8 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y)];
		_buttonEdit ctrlCommit 0;
		
		_buttonDiscard = _display displayctrl IDC_LOGIN_DISCARD;
		_buttonDiscard ctrlSetPosition [(22 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X), (7.8 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y)];
		_buttonDiscard ctrlCommit 0;
		
		//Highlight the selected tab (change background and text colours of all tabs)
		_PropertiesButton = _display displayctrl IDC_LOGIN_TAB_AVATAR;
		_BIAccountButton = _display displayctrl IDC_LOGIN_TAB_UNIT;
		
		_BIAccountButton ctrlSetBackgroundColor [1,1,1,1];
		_BIAccountButton ctrlSetTextColor [0,0,0,1];
		
		_PropertiesButton ctrlSetBackgroundColor [0,0,0,1];
		_PropertiesButton ctrlSetTextColor [1,1,1,1];
	};
	
	case "onUnload":
	{
		//--- Init colors and grids
		true call bis_fnc_displayColorGet;
		false call bis_fnc_guiGridToProfile;
	};
};

 

 

These scripts are called in the onLoad script:

  • [_display, 601] call (uinamespace getvariable 'BIS_fnc_setIDCStreamFriendly');
  • Spoiler
    
    /*
    	Author: Muf, optimized by Karel Moricky
    
    	Description:
    	Shows or hides UI control according to state of the Stream Friendly UI switch in Game Options.
    
    	Parameter(s):
    		0: DISPLAY or CONTROL
    		1: NUMBER - control IDC when the first parameter is a display
    
    	Returns:
    	BOOL - true when the control is visible, false when it's not
    */
    
    private ["_display","_idc","_control"];
    _display = _this param [0,displaynull,[displaynull,controlnull]];
    _idc = _this param [1,-1,[0]];
    
    _control = if (typename _display == typename displaynull) then {_display displayctrl _idc} else {_display};
    _control ctrlshow !isStreamFriendlyUIEnabled;
    ctrlshown _control

     

     

  • _control ctrladdeventhandler ["buttonclick","with uinamespace do {['properties',_this,''] call RscDisplayLogin_script};"];
  • ^This is the same script as the onLoad script, just a different code block.

 

 

 

The thing is that even when the dialog is created with createDialog "RscDisplayLogin" there is no head. After creating a test dialog which has the same structure as KK's dialog with object there is no head to be seen but the dialog is created since you can see your mouse cursor. The test dialog:

Spoiler

class TER_RscTest {
	idd = 15545;
	movingEnable = 0;
	onLoad = "0 = _this execVM ""GUI\onLoad.sqf""";
	class objects
	{
		class Can
		{

			onObjectMoved = "systemChat str _this";

			idc = -1;
			type = 82;
			model = "\A3\ui_f\objects\face_preview.p3d";
			scale = 1;

			direction[] = {0, -0.35, -0.65};
			up[] = {0, 0.65, -0.35};

			//position[] = {0,0,0.2}; optional

			x = 0.5;
			y = 0.5;
			z = 0.2;

			//positionBack[] = {0,0,1.2}; optional

			xBack = 0.5;
			yBack = 0.5;
			zBack = 1.2;

			inBack = 1;
			enableZoom = 1;
			zoomDuration = 0.001;
		};
		/*
		class Head: RscObject
		{
			model="\A3\ui_f\objects\face_preview.p3d";
			modelWoman="\A3\ui_f\objects\face_preview.p3d";
			idc=109;
			type=80;
			x="35.8 * 					(			((safezoneW / safezoneH) min 1.2) / 40) + 		(safezoneX + (safezoneW - 					((safezoneW / safezoneH) min 1.2))/2)";
			y="6.6 * 					(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + 		(safezoneY + (safezoneH - 					(			((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
			z=0.38;
			xBack=0.75;
			yBack=0.89999998;
			zBack=0.25;
			scale=0.20999999;
			direction[]={0,0,1};
			up[]={0,1,0};
			faceType="Man_A3";
			selectionLBrow="lBrow";
			selectionMBrow="mBrow";
			selectionRBrow="rBrow";
			selectionLMouth="lMouth";
			selectionMMouth="mMouth";
			selectionRMouth="rMouth";
			selectionEyelid="eyelids";
			selectionLip="LLip";
			boneHead="head";
			boneLEye="l_eye";
			boneREye="r_eye";
			boneLEyelidUp="eye_upl";
			boneREyelidUp="eye_upr";
			boneLEyelidDown="eye_lwl";
			boneREyelidDown="eye_lwr";
			boneLPupil="l_pupila";
			boneRPupil="r_pupila";
			selectionPersonality="personality";
			selectionGlasses="eyelids";
		};
		*/
	};
	class controlsBackground {

	};
	class controls {
	};
};

class Head is copied from the confg.bin.

 

This is probably my longest post and it has no added value. But I just wanted to let you know that your question didn't go unnoticed it is just not easy to answer. There is one missing piece in all the scripts that set the face and let's it rotate. Also at some point the listboxes must be filled which isn't the case when creating the dialog with createDialog "RscDisplayLogin". There is no command in the onLoad script either.

Share this post


Link to post
Share on other sites

Its probably a mix mash of SQF and the other chunk that makes the magic happen is hidden behind the SQF wall, which would indicate that it is written in C++

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

×