Jump to content

Recommended Posts

Hey guys and gals

 

Recently I was trying to add ships to my custom (mod) faction. Implementing the ships I had no problem, but as soon as I tried to add my own skins to the ships, I encountered a problem.

I doesn't seem to be possible to add my skins to the ships, at least the way I was trying. Here's my code. Please help me 🙂

 

class CfgVehicles 
{
  	class ship;
	class B_G_Boat_Transport_02_F;
	class RHIB: B_G_Boat_Transport_02_F
	{
		side = 1;
        	scope = 2;
		scopeCurator = 2;
        	crew = "Custom_Uniform1";
        	faction = "Coast Guard";
        	displayName = "Festrumpfschlauchboot";
		model = "\A3\Boat_F_Exp\Boat_Transport_02\Boat_Transport_02_F.p3d";
		hiddenSelections[] = {"Camo1"};
		hiddenSelectionsTextures[] = {"\Coast-Guard\Data\Rhibboat_co.paa"};	
	};
	
	class B_Lifeboat;
	class SRHIB: B_Lifeboat
	{
		side = 1;
        	scope = 2;
		scopeCurator = 2;
        	crew = "Custom_Uniform1";
        	faction = "Coast Guard";
        	displayName = "Festrumpfschlauchboot(klein)";
		model = "\A3\Boat_F\Boat_Transport_01\Boat_Transport_01_F.p3d";
		hiddenSelections[] = {"Camo"};
		hiddenSelectionsTextures[] = {"\Coast-Guard\Data\Boat_Transport_01_rescue_CO_1.paa"};
	};
};

 

I tried to add the Skins in the editor via setObjectTextureGlobal and it worked with the ingame ships, however with the boats in my faction it didn't work.

 

https://imgur.com/zfC63YW

 

The inner ships textures have been replaced with setObjectTextureGlobal and the outer ones are the boats from my faction.

Share this post


Link to post
Share on other sites

If you inherit from B_G_Boat_Transport_02_F you don't need to point at the model again, neither do you need to specify the hiddenSelections, they are already on the base version. Are you sure you've got the correct hiddenSelections[] anyway? Just try commenting this line and the model line and see if it works.

Share this post


Link to post
Share on other sites

I commented the hidden selections and the model on both ships and on the Lifeboat it now showed the vanilla (orange) Lifeboat texture, instead of the black one. But my textures didn't show up. 

Share this post


Link to post
Share on other sites

but you didn't comment the hiddenSelectionsTextures[] = correct? Can you post your edited cfg ?

Share this post


Link to post
Share on other sites

Here it is

	class ship;
	class B_G_Boat_Transport_02_F;
	class RHIB: B_G_Boat_Transport_02_F
	{
		side = 1;
        	scope = 2;
		scopeCurator = 2;
        	crew = "Custom_Uniform1";
        	faction = "Coast Guard";
        	displayName = "Festrumpfschlauchboot";
		//model = "\A3\Boat_F_Exp\Boat_Transport_02\Boat_Transport_02_F.p3d";
		//hiddenSelections[] = {"Camo1"};
		hiddenSelectionsTextures[] = {"\Coast-Guard\Data\Rhibboat_co.paa"};	
	};
	
	class B_Lifeboat;
	class SRHIB: B_Lifeboat
	{
		side = 1;
        	scope = 2;
		scopeCurator = 2;
        	crew = "Custom_Uniform1";
        	faction = "Coast Guard";
        	displayName = "Festrumpfschlauchboot(klein)";
		//model = "\A3\Boat_F\Boat_Transport_01\Boat_Transport_01_F.p3d";
		//hiddenSelections[] = {"Camo"};
		hiddenSelectionsTextures[] = {"\Coast-Guard\Data\Boat_Transport_01_rescue_CO_1.paa"};
	};

 

Share this post


Link to post
Share on other sites

mmmm that seems correct. Maybe the path to your texture is wrong? maybe - is not a valid character for an addon you would have to call it CoastGuard instead of Coast-Guard. Does it work for other vehicles, uniforms in your addon?

Share this post


Link to post
Share on other sites

The base for your boat has 2 textures: one for the interior and one for the exterior
 

	hiddenSelections[]=
		{
			"Camo_1",
			"Camo_2"
		};
		hiddenSelectionsTextures[]=
		{
			"\A3\Boat_F_Exp\Boat_Transport_02\Data\Boat_Transport_02_exterior_CO.paa",
			"\A3\Boat_F_Exp\Boat_Transport_02\Data\Boat_Transport_02_interior_2_CO.paa"
		};

So you should have two also. 1 is exterior, 2 is interior

Share this post


Link to post
Share on other sites

In your original config you are using the wrong selection names. "camo1" doesn't exist in the RHIB, they are "camo_1" and "camo_2". I haven't checked what they are for the Assault Boat/Lifeboat but it's probably not "camo".

 

If you put the wrong selection names in it, it will break the ability to retexture that vehicle because the selections no longer correspond with what sections are available in the model.

You should not need to include the hiddenSelections[] = {...}; array at all in a vehicle retexture config, since it's already defined in the base class. It's only needed for people making new models.

Share this post


Link to post
Share on other sites

Got it working @HptFw. MoinxDGamer:
 

class cfgVehicles
{
//#include"\MRHTestObjects\Cube\cfgVehicle.hpp"
	class C_Boat_Transport_02_F;
	class TestBoat_R : C_Boat_Transport_02_F
	{
		displayName =  "testBoat";
		scope=2;
		side =1;
		scopeCurator=2;
		textureList[]= //must be added for the texture to show
		{
			"test",
			1
		};
		hiddenSelectionsTextures[]=
		{
			"\MRHTestObjects\red.paa",
			"\MRHTestObjects\green.paa"
		};
	};

};

https://imgur.com/a/CvMBnsj

  • Like 2

Share this post


Link to post
Share on other sites

textureList[]= must be present otherwise the textures won't show

 

  • Like 2

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

×