Jump to content

[HOW-TO] Reskin/Retexture Vehicles


Brockie

Recommended Posts

  • 2 weeks later...

I would like to add some skins however I don't want to overwrite current vehicle skins for vehicle classes I already have. How can I create new vehicle class names for SUV's so I can re texture them instead? Thanks.

 

@Link

 

use unused variations for example maybe try SUV_TK_EP1_DZE1 or DZE2 or DZE3 or DZE4 etc.

Link to comment
Share on other sites

@Link

 

use unused variations for example maybe try SUV_TK_EP1_DZE1 or DZE2 or DZE3 or DZE4 etc.

 

Yeah I did this on the additional DZE variants and its working fine now.

 

I'd rather then change texture from only ONE vehicle of a kind, using my script above, I think it is then easier. Don't you think so?

 

The script is good, ill likely use it for staff only vehicles or something :)

Link to comment
Share on other sites

  • 2 weeks later...

To set texture for yourself (for skins):

/* defining myself */
ChangeSkin1 = player;
/* textuing function */
_texturing = "
[] spawn
{
 while {alive player} do
 {
  ChangeSkin1 setObjectTexture [0,'path\to\my\skin\texture.paa'];
 };
};";
/* this is required, saw it on the forums */
_sheepi = createAgent ["Sheep", [4000,4000,0], [], 0, "FORM"];
_do = _texturing;
_sheepi addMPEventHandler ["MPKilled", _do];
_sheepi setDamage 2;
deleteVehicle _sheepi;

SEE IMPORTANT NOTES FOR USE!!

 

To set texture of cursorTarget (target with your cursor the vehicle):

/* defining cursorTarget */
ChangeTarget1 = cursorTarget;
/* Texturing while true = true; */
_texturing = "
[] spawn
{
while {true} do
{
ChangeTarget1 setObjectTexture [0,'path\to\my\texture.paa'];
};
};";
/* exeuting _Texturing */
player setVehicleInit _texturing;
processInitCommands;
clearVehicleInit player;

SEE IMPORTANT NOTES FOR USE!!

 

IMPORTANT NOTES

How to use;

I use it as admin_start.sqf and execute it using infistar ALT+F11 while being admin

 

Didn't try to do it parmanently but I think it can.. or maybe it is even if I don't think so :)

 

Have fun with it :)

 

 

 

For those who don't use Infistar and run a missionpbo Admin Tool and want to change the vehicle textures on the run.

I recommend the following code, because the one above is producing tons of failures in my Server .RPT AND the texture is the old one again, if YOU Admin have relogged!

With this it is permanent UNTIL RESTART.

private ["_target","_testVehicleTexture","_texturing"];

_target = cursorTarget;

_testVehicleTexture = ["\z\addons\dayz_epoch\textures\suv_body_pink_co.paa"];

if ((typeOf _target) == "Mi17_Civilian_DZ") then { _testVehicleTexture = ["\CA\air\data\mi8_body_g_CHDKZ_CO.paa", "ca\air\data\mi8_det_g_co.paa", "ca\air\data\clear_empty.paa", "ca\air\data\mi8_decals_ca.paa"]; };
if ((typeOf _target) == "Mi17_DZE") then { _testVehicleTexture = ["\CA\air_E\data\mi17_body_UN_CO.paa", "\CA\air_E\data\mi17_det_UN_CO.paa", "\ca\air_E\Data\mi17_decals2_UN_CA.paa", "\ca\air_E\Data\mi17_decals_UN_CA.paa"]; };

_texturing = "";
for "_i" from 0 to (count _testVehicleTexture) - 1 do {
	_texturing = _texturing + format ["this setObjectTexture [%1, '%2'];", _i, (_testVehicleTexture select _i)];
};
/* executing _Texturing */
diag_log _texturing;
_target setVehicleInit _texturing;
processInitCommands;

This code will change the texture always to the one of the Pink SUV, on every Vehicle. Regardless if this texture suits the targeted vehicle or not. (its kind of funny on some vehicles...)

Because the default texture to set is always the Pink SUV one:

_testVehicleTexture = ['\z\addons\dayz_epoch\textures\suv_body_pink_co.paa'];

Here you can specify the texture for specific vehicles, just add another line with your vehicle and textures:

if ((typeOf _target) == "Mi17_Civilian_DZ") then { _testVehicleTexture = ["\CA\air\data\mi8_body_g_CHDKZ_CO.paa", "ca\air\data\mi8_det_g_co.paa", "ca\air\data\clear_empty.paa", "ca\air\data\mi8_decals_ca.paa"]; };
if ((typeOf _target) == "Mi17_DZE") then { _testVehicleTexture = ["\CA\air_E\data\mi17_body_UN_CO.paa", "\CA\air_E\data\mi17_det_UN_CO.paa", "\ca\air_E\Data\mi17_decals2_UN_CA.paa", "\ca\air_E\Data\mi17_decals_UN_CA.paa"]; };

These ones are for Helicopters, which need more than one texture!

 

The second one for "Mi17_DZE" unfortunately doesn't work! Because the chosen vehicle NEEDs to have something written in this class array hiddenselectionstextures!

 

You can check this here http://browser.six-projects.net/cfg_vehicles/tree?utf8=%E2%9C%93&version=66&commit=Change

Click on the vehicle class of the vehicle you want to retexture and then on CONFIG. The vehicle class will open, if you cant find hiddenselectionstextures then press on SHOW FULL at the top or use a Top-class of your vehicle.

 

Also here you can find textures from Arma Vehicles, which are not implemented in Epoch to change in. Just copy the hiddenselectionstextures array in the _testVehicleTexture array.

 

You WILL NOT find the Epoch vehicles here! The "Mi17_DZE" Epoch Helicopter has the Top-class "Mi17_base" and the hiddenselectionstextures array is empty for this, so the texture can't be changed.

 

At least with this methode, perhaps someone knows how it works in another way?!

 

 

Hope this was understandable ^^.

 

regards

Link to comment
Share on other sites

Instead of

if (_type == "SUV_TK_CIV_EP1") then {_object setVehicleInit 'this setObjectTexture [0, ''custom\suv.jpg''];';};
if (_type == "SUV_Camo") then {_object setVehicleInit 'this setObjectTexture [0, ''custom\suv1.jpg''];';};
if (_type == "ArmoredSUV_PMC_DZE") then {_object setVehicleInit 'this setObjectTexture [0, ''custom\suv2.jpg''];';};

You might wanna use this method

call {
    if (_type == "SUV_TK_CIV_EP1")            exitWith {_object setVehicleInit 'this setObjectTexture [0, ''custom\suv.jpg''];';};
    if (_type == "SUV_Camo")                exitWith {_object setVehicleInit 'this setObjectTexture [0, ''custom\suv1.jpg''];';};
    if (_type == "ArmoredSUV_PMC_DZE")        exitWith {_object setVehicleInit 'this setObjectTexture [0, ''custom\suv2.jpg''];';};
};

Which will act like a switch (but faster) and exits the call as soon as it finds a match.

 

--

 

Thanks for this tutorial, i'm gonna use these as levelled perks for our Hero and Bandit players.

Link to comment
Share on other sites

Hi guys, after a long night of mistrials i finally decided to ask you for help...

Whateever i try neither bought or dynamicly spawned vehicles get their skins changed.

 

I tried using the custom textures of ispann55 and others (i also tried using different vehicles and .paa's instead of .jpg's).

I hope you guys can find what i fail to see!

 

server_monitor.sqf:

http://pastebin.com/BBdQh3q2

 

server_publishVehicle2.sqf

http://pastebin.com/aGcMp2Sc

 

server_publishVehicle3.sqf

http://pastebin.com/k6f5veXq

Link to comment
Share on other sites

Did you place the textures inside your mission/custom/ folder?

 

I placed it into mission.pbo\custom\*placed skins here*.

Is that the right folder?

 

//edit

 

Fixed it using this method:

http://epochmod.com/forum/index.php?/topic/12989-paint-vehicles/page-2?hl=textures#entry124103

 

I recommend it for everone since you only have to edit 1 File when adding new vehicles.

Link to comment
Share on other sites

Does anyone know how to reskin heli's utilizing this method and if so, are there any transparent Helicopter skins available? 

 

Read my post

 

And a transparent texture? Don't know, make it yourself with one of the arma textures. What else you can do is set empty Strings in the _testVehicleTexture Array.

 

example:

if ((typeOf _target) == "SUV_TK_CIV_EP1") then { _testVehicleTexture = [""]; };
if ((typeOf _target) == "Mi17_Civilian_DZ") then { _testVehicleTexture = ["", "", "", ""]; };

Then there will be NO Textures on the outside...Only the seats and all inner textures will be shown^^...

Link to comment
Share on other sites

Hey Dudes,

 

Iam trying your addings and works fine! thanks for that  B)

 

Now i tried to add a selfmade .paa for the C130J picture size is 1024 x 512 pixels.

It works also fine, but all planes / choppers or Trucks are just half painted -.-

So Means eg: C130J has body in camouflage and Wings in normal gray paint. Horrible :D

Some ideas?^^

Link to comment
Share on other sites

Hey Dudes,

 

Iam trying your addings and works fine! thanks for that  B)

 

Now i tried to add a selfmade .paa for the C130J picture size is 1024 x 512 pixels.

It works also fine, but all planes / choppers or Trucks are just half painted -.-

So Means eg: C130J has body in camouflage and Wings in normal gray paint. Horrible :D

Some ideas?^^

 

Again^^, read my post:

 

Helicopter and planes and some other vehicles, have more than one texture!

Link to comment
Share on other sites

Again^^, read my post:

 

Helicopter and planes and some other vehicles, have more than one texture!

This is where I need to be for trying to get it working using my format.

 

Thanks for your post and instructions, but I was wondering if you could assist me in a possible hybridization of my method and yours.

 

 I currently use the method here to remove my vehicles weapons and ammo but it can also be used to call for a  re-skinning of vehicles

 http://opendayz.net/threads/release-remove-weapons-ammunition-thermal-from-vehicle-epoch-version.18044/ .

 

What I did from that was use the same SQF to also retexture my SUV's

like this

if (_object isKindOf "SUV_TK_CIV_EP1") then {

_object setVehicleInit "this setObjectTexture [0, ""vehicleskins\suv_nebula.jpg""]";
};" 
 
That like will reskin my SUV's just fine
 
So I re-did my Mi24D and it works  with the one which I am currently using.
Example :
if (_object isKindOf "Mi24_D") then {
_object setVehicleInit "this setObjectTexture [0, ""vehicleskins\mi24D.jpg""]";
};   
So the reskin works but it some of the tail and wings the base color. Which mean I am not also calling for the hidden textures to be reskinned. 
 
With the link you provided to 6config browser I was able to find this
class Mi24_D: Mi24_Base_CDF {
	accuracy = 1000;
	crew = "CDF_Soldier_Pilot";
	displayname = "Mi-24D Hind-D";
	hiddenselectionstextures[] = {"\ca\air2\mi35\data\mi35_001_co.paa", "\ca\air2\mi35\data\mi35_002_co.paa"};
	magazines[] = {"128Rnd_57mm", "120Rnd_CMFlareMagazine"};
	model = "\x\ace\addons\m_vehicle\mi24\ace_mi24d";
	scope = 2;
	typicalcargo[] = {"CDF_Soldier_Pilot", "CDF_Soldier_Pilot", "CDF_Soldier_AR", "CDF_Soldier_RPG", "CDF_Soldier"};
	vehicleclass = "Air";
	weapons[] = {"57mmLauncher_128", "CMFlareLauncher"};
	class Turrets: Turrets {
		class MainTurret: MainTurret {
			ace_sys_missileguidance_limits[] = {15, 15, -4, 0};
			magazines[] = {"1470Rnd_127x108_YakB", "4Rnd_AT2_Mi24D"};
			weapons[] = {"YakB", "AT2Launcher"};
		};
I was wondering how could I incorporate  this : 
hiddenselectionstextures[] = {"\ca\air2\mi35\data\mi35_001_co.paa", "\ca\air2\mi35\data\mi35_002_co.paa"};
 
Into the method I'm using ,so do you think if I write it like below I will get a total reskin covering the tail section and wings?
 
if (_object isKindOf "Mi24_D") then {
_object setVehicleInit "this setObjectTexture [0, ""vehicleskins\mi24D.jpg"",""vehicleskins\mi24D.jpg"",""vehicleskins\mi24D.jpg""]";
};

 

 

 
Will the way I wrote that also now color the hiddenselectionstextures? Or is my logic flawed? Which it very well could be 8) 
 
Answered my own question 

 

if (_object isKindOf "Mi24_D") then {

_object setVehicleInit "this setObjectTexture [0, ""vehicleskins\mi24D.jpg"",""vehicleskins\mi24D.jpg"",""vehicleskins\mi24D.jpg""]";
}

Does not work...  

I also tried this :

if ((typeOf _target) == "Mi24_D") then { _testVehicleTexture = ["\ca\air2\mi35\data\mi35_001_vehicleskins\mi24D.jpg", "\ca\air2\mi35\data\mi35_002_vehicleskins\mi24D.jpg"]; };

 

I'm officially at a loss how to adjust the 2nd and 3rd textures 

Link to comment
Share on other sites

This is where I need to be for trying to get it working using my format.

 

Thanks for your post and instructions, but I was wondering if you could assist me in a possible hybridization of my method and yours.

 

 I currently use the method here to remove my vehicles weapons and ammo but it can also be used to call for a  re-skinning of vehicles

 http://opendayz.net/threads/release-remove-weapons-ammunition-thermal-from-vehicle-epoch-version.18044/ .

 

What I did from that was use the same SQF to also retexture my SUV's

like this

if (_object isKindOf "SUV_TK_CIV_EP1") then {

_object setVehicleInit "this setObjectTexture [0, ""vehicleskins\suv_nebula.jpg""]";
};" 
 
That like will reskin my SUV's just fine
 
So I re-did my Mi24D and it works  with the one which I am currently using.
Example :
if (_object isKindOf "Mi24_D") then {
_object setVehicleInit "this setObjectTexture [0, ""vehicleskins\mi24D.jpg""]";
};   
So the reskin works but it some of the tail and wings the base color. Which mean I am not also calling for the hidden textures to be reskinned. 
 
With the link you provided to 6config browser I was able to find this
class Mi24_D: Mi24_Base_CDF {
	accuracy = 1000;
	crew = "CDF_Soldier_Pilot";
	displayname = "Mi-24D Hind-D";
	hiddenselectionstextures[] = {"\ca\air2\mi35\data\mi35_001_co.paa", "\ca\air2\mi35\data\mi35_002_co.paa"};
	magazines[] = {"128Rnd_57mm", "120Rnd_CMFlareMagazine"};
	model = "\x\ace\addons\m_vehicle\mi24\ace_mi24d";
	scope = 2;
	typicalcargo[] = {"CDF_Soldier_Pilot", "CDF_Soldier_Pilot", "CDF_Soldier_AR", "CDF_Soldier_RPG", "CDF_Soldier"};
	vehicleclass = "Air";
	weapons[] = {"57mmLauncher_128", "CMFlareLauncher"};
	class Turrets: Turrets {
		class MainTurret: MainTurret {
			ace_sys_missileguidance_limits[] = {15, 15, -4, 0};
			magazines[] = {"1470Rnd_127x108_YakB", "4Rnd_AT2_Mi24D"};
			weapons[] = {"YakB", "AT2Launcher"};
		};
I was wondering how could I incorporate  this : 
hiddenselectionstextures[] = {"\ca\air2\mi35\data\mi35_001_co.paa", "\ca\air2\mi35\data\mi35_002_co.paa"};
 
Into the method I'm using ,so do you think if I write it like below I will get a total reskin covering the tail section and wings?
 

 

 
Will the way I wrote that also now color the hiddenselectionstextures? Or is my logic flawed? Which it very well could be 8) 
 
Answered my own question 

Does not work...  

I also tried this :

if ((typeOf _target) == "Mi24_D") then { _testVehicleTexture = ["\ca\air2\mi35\data\mi35_001_vehicleskins\mi24D.jpg", "\ca\air2\mi35\data\mi35_002_vehicleskins\mi24D.jpg"]; };

 

I'm officially at a loss how to adjust the 2nd and 3rd textures 

 

The hiddenselection Array for the Mi24_D has 2 elements.

So this format

if ((typeOf _target) == "Mi24_D") then { _testVehicleTexture = ["\ca\air2\mi35\data\mi35_001_vehicleskins\mi24D.jpg", "\ca\air2\mi35\data\mi35_002_vehicleskins\mi24D.jpg"]; };

is correct, for my methode. But i think you mixed something up with the texture paths here.

 

If a vehicle has only one texture you use:

_object setVehicleInit "this setObjectTexture [0, ""vehicleskins\texture0.jpg""]";

Important here is the 0.

 

If a vehicle has more than one texture in the hiddenselection Array, the second texture to set needs an 1 at the position of the previous 0.

_object setVehicleInit "this setObjectTexture [0, ""vehicleskins\texture0.jpg""]; this setObjectTexture [1, ""vehicleskins\texture1.jpg""];";

The for-loop in my methode creates this string

"this setObjectTexture [0, ""vehicleskins\texture0.jpg""]; this setObjectTexture [1, ""vehicleskins\texture1.jpg""];"

out of the textures-Array _testVehicleTexture.

_testVehicleTexture = ["vehicleskins\texture0.jpg", "vehicleskins\texture1.jpg"];

Important the first position begins with an 0 and then upwards, the more textures in the hiddenselection array.

Link to comment
Share on other sites

I am not gone read the whole post but I guess this will only work on unmoded vehicles. If you modify the camo suv for example, it's gone change model. The base model is namned SUV_Camo, once you moded it will change name to SUV_Camo_DZE1, next time you modify it will change name to SUV_Camo_DZE2 and it will do that up to DZE4.

Any easy fix for this? So that you can assign the texture to the whole range of SUV_Camo.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...