Jump to content
Sign in to follow this  
BoltboxerPro

Need Help changing the Faction of a retextured addon

Recommended Posts

For my new campaign, I got to work changing the textures and armor of the default SUV. So the easy work is done- now comes the fun part.

I want to change the side from all the default ones the SUV comes with (civ, uno, taki army, pmc) to just one that has its own custom name. The only problem is that i need some insight on how to change the faction to my own unique one. The code under me was pulled from the end of "CfgVehicles.hpp". WHat do I have to change here to make it my own?

class SUV_TK_CIV_EP1 : SUV_Base_EP1 {
	scope = public;
	crew = "TK_CIV_Takistani01_EP1";
	typicalCargo[] = {"TK_CIV_Takistani01_EP1", "TK_CIV_Takistani01_EP1", "TK_CIV_Takistani01_EP1", "TK_CIV_Takistani01_EP1", "TK_CIV_Takistani01_EP1"};
	rarityUrban = 0.8;
	faction = BIS_TK_CIV;
	side = TCivilian;
};

class SUV_TK_EP1 : SUV_Base_EP1 {
	scope = public;
	rarityUrban = 0.8;
	side = TEast;
	faction = BIS_TK;
	crew = "TK_Soldier_EP1";
	typicalCargo[] = {"TK_Soldier_EP1", "TK_Soldier_EP1", "TK_Soldier_EP1", "TK_Soldier_EP1", "TK_Soldier_EP1"};
};

class SUV_UN_EP1 : SUV_Base_EP1 {
	scope = public;
	rarityUrban = 0.8;
	side = TGuerrila;
	faction = BIS_UN;
	crew = "UN_CDF_Soldier_EP1";
	typicalCargo[] = {"UN_CDF_Soldier_EP1", "UN_CDF_Soldier_EP1", "UN_CDF_Soldier_EP1", "UN_CDF_Soldier_EP1", "UN_CDF_Soldier_EP1"};
};
};

If it helps, here is the config.hpp

#define private		0
#define protected		1
#define public		2

#define true	1
#define false	0

#define TEast		0
#define TWest		1
#define TGuerrila		2
#define TCivilian		3
#define TSideUnknown		4
#define TEnemy		5
#define TFriendly		6
#define TLogic		7

enum {
STABILIZEDINAXISX = 1,
STABILIZEDINAXISY = 2,
STABILIZEDINAXESBOTH = 3,
STABILIZEDINAXESNONE = 0,
};

#include "CfgPatches.hpp"
#include "CfgVehicles.hpp"

Thanks!

Share this post


Link to post
Share on other sites

You need a code like this

class CfgFactionClasses
{
	access = 1;
	class myfac
 {
	displayName= "My own lovley faction";
	priority = 100;
	side = 3;
};
};

In your car class you need this line:

class My_car : SUV_UN_EP1
{
....
faction = "myfac";
....
};

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
Sign in to follow this  

×