Custom Uniform and Vehicle Textures

Workshop for all Mission Engineer Comrades. Home of the FA Mission Making Template.
Post Reply
User avatar
laverniusregalis
Posts: 9
Joined: Tue Jun 28, 2016 10:09 pm
Location: Soviet Folk

Custom Uniform and Vehicle Textures

Post by laverniusregalis »

I previously kept all this stuff in a Dropbox folder, but it's getting to be a fairly big collection, so I'm posting it to a Google Drive folder instead. Everything should be accessible through the link below. All fairly self-explanatory, use remoteExec for setObjectTexture whether for vehicles or for players, like so:

Code: Select all

[_object, [0, "filename.paa"]] remoteExec ["setObjectTexture", 0, true];
Call this in an object's init field or via assignGear, whichever suits your purpose best.

https://drive.google.com/drive/folders/ ... sp=sharing

If any of the textures are too large, they can be converted back to PNG format with TexView2 (Arma 3 Tools) pretty easily, and then shrunk down to half-size before re-converting to PAA format. Works wonders on the file size, usually a 1024x1024 texture is only around 500 KB.

Additionally, here is an SQF that allows you to display textures in the Eden editor, graciously provided by POLPOX from the Bohemia Interactive forums:

Code: Select all

with uiNamespace do {
	profileNamespace setVariable ["rscdebugconsole_expression","[] execVM 'showTex.sqf'"] ;
	_img = "a3\characters_f_enoch\uniforms\data\clothing_mcam_wdl_co.paa";
	_sizeX = 2048 ;
	_sizeY = 2048 ;
	_mode = true ;//true: diffuse false: alpha
	_col = [0,1,0,1] ;
	disableSerialization ;
	display = findDisplay 313 createDisplay "RscDisplayEmpty";
	bgControl = display ctrlCreate ["RscBackground",1233] ;
	bgControl ctrlSetBackgroundColor _col ;
	bgControl ctrlSetPosition [safeZoneX,safeZoneY,safeZoneW,safeZoneH] ;
	bgControl ctrlCommit 0 ;
	textControl = display ctrlCreate ["RscText",1235] ;
	textControl ctrlSetScale 3 ;
	textControl ctrlSetPosition [0,0,0.1,0.1] ;
	texControl = display ctrlCreate ["RscPictureKeepAspect",1234] ;
	texControl ctrlSetText _img ;

	texControls = [texControl] ;

	if (!_mode) then {
		texControl ctrlSetTextColor [0,0,0,1] ;
		bgControl ctrlSetBackgroundColor [1,1,1,1] ;
	} else {
		//bgControl ctrlSetBackgroundColor [0,0,0,1] ;
	} ;

	_screenX = getResolution select 0 ;
	_screenY = getResolution select 1 ;

	texControl ctrlSetPosition [safeZoneX,safeZoneY,(_sizeX)*pixelW,(_sizeY)*pixelH] ;
	texControl ctrlCommit 0 ;
	if (_screenX < _sizeX or _screenY < _sizeY) then {
		[_sizeX,_sizeY] spawn {
			params ["_sizeX","_sizeY"] ;
			_screenX = getResolution select 0 ;
			_screenY = getResolution select 1 ;
			disableSerialization ;
			_ctrltxt = uiNamespace getVariable "textControl" ;
			_ctrl = uiNamespace getVariable "texControls" ;

			if (_screenX < _sizeX and _screenY > _sizeY) then {
				_ctrltxt ctrlSetPosition [safeZoneX,safeZoneY] ;
				_ctrltxt ctrlSetText "Left" ;
				_ctrltxt ctrlCommit 0 ;
				{
					_x ctrlSetPosition [
						safeZoneX+safeZoneW-(_sizeX*0.5*pixelW),
						safeZoneY
					] ;
					_x ctrlCommit 0 ;
				} forEach _ctrl ;

				uiSleep 1 ;
				_ctrltxt ctrlSetPosition [safeZoneX+safeZoneW-0.5,safeZoneY] ;
				_ctrltxt ctrlSetText "Right" ;
				_ctrltxt ctrlCommit 0 ;
				{
					_x ctrlSetPosition [
						safeZoneX-(_sizeX*0.5*pixelW),
						safeZoneY
					] ;
					_x ctrlCommit 0 ;
				} forEach _ctrl ;
			} ;

			if (_screenX > _sizeX and _screenY < _sizeY) then {
				_ctrltxt ctrlSetPosition [safeZoneX,safeZoneY] ;
				_ctrltxt ctrlSetText "Top" ;
				_ctrltxt ctrlCommit 0 ;
				{
					_x ctrlSetPosition [
						safeZoneX,
						safeZoneY+safeZoneH-(_sizeY*0.5*pixelH)
					] ;
					_x ctrlCommit 0 ;
				} forEach _ctrl ;

				uiSleep 1 ;
				_ctrltxt ctrlSetPosition [safeZoneX+safeZoneW-0.5,safeZoneY] ;
				_ctrltxt ctrlSetText "Bottom" ;
				_ctrltxt ctrlCommit 0 ;
				{
					_x ctrlSetPosition [
						safeZoneX,
						safeZoneY-(_sizeY*0.5*pixelH)
					] ;
					_x ctrlCommit 0 ;
				} forEach _ctrl ;
			} ;

			if (_screenX < _sizeX and _screenY < _sizeY) then {
				_ctrltxt ctrlSetPosition [safeZoneX,safeZoneY] ;
				_ctrltxt ctrlSetText "TopLeft" ;
				_ctrltxt ctrlCommit 0 ;
				{
					_x ctrlSetPosition [
						safeZoneX+safeZoneW-(_sizeX*0.5*pixelW),
						safeZoneY+safeZoneH-(_sizeY*0.5*pixelH)
					] ;
					_x ctrlCommit 0 ;
				} forEach _ctrl ;

				uiSleep 1 ;
				_ctrltxt ctrlSetPosition [safeZoneX+safeZoneW-0.5,safeZoneY] ;
				_ctrltxt ctrlSetText "TopRight" ;
				_ctrltxt ctrlCommit 0 ;
				{
					_x ctrlSetPosition [
						safeZoneX-(_sizeX*0.5*pixelW),
						safeZoneY+safeZoneH-(_sizeY*0.5*pixelH)
					] ;
					_x ctrlCommit 0 ;
				} forEach _ctrl ;

				uiSleep 1 ;
				_ctrltxt ctrlSetPosition [safeZoneX+safeZoneW-0.5,safeZoneY+safeZoneH-0.5] ;
				_ctrltxt ctrlSetText "BottomRight" ;
				_ctrltxt ctrlCommit 0 ;
				{
					_x ctrlSetPosition [
						safeZoneX-(_sizeX*0.5*pixelW),
						safeZoneY-(_sizeY*0.5*pixelH)
					] ;
					_x ctrlCommit 0 ;
				} forEach _ctrl ;

				uiSleep 1 ;
				_ctrltxt ctrlSetPosition [safeZoneX,safeZoneY+safeZoneH-0.5] ;
				_ctrltxt ctrlSetText "BottomLeft" ;
				_ctrltxt ctrlCommit 0 ;
				{
					_x ctrlSetPosition [
						safeZoneX+safeZoneW-(_sizeX*0.5*pixelW),
						safeZoneY-(_sizeY*0.5*pixelH)
					] ;
					_x ctrlCommit 0 ;
				} forEach _ctrl ;
			} ;
		} ;
	} ;
} ;
Save it as "showTex.sqf" or whatever, and then press tilde (~) in Eden and execVM it from your mission folder to display a texture. Works well with getObjectTextures. I was able to use it to get the textures for the CBRN equipment and the Gorka suits from the Contact DLC. Useful therefore for getting textures from assets that are contained in .EBO files, rather than .PBO.

Post Reply