Jump to content
[evo] dan

Custom vehicleClass not working

Recommended Posts

I'm attempting to create a new vehicleClass so that my objects are kept in their own category within the editor instead of just putting them into the Objects (Small) category. I want them to remain in the "Things" category but I want them under their own Category within.

 

So far I've managed to get them to go within just the "Things" category, but the category they are in now doesn't have a title. I have tried defining a new class but it says it cannot find it when I open the editor.

 

I've tried to use the search function on the forums but couldn't find anything useful other than saying define the class (which I think I've done correctly). Can anybody help me out on this as the BIKI doesn't tell me much about what to do to get around it.

 

Heres my config.cpp for reference:

class CfgPatches {
	class Dan_Oil_Barrel {
		units[] = {"dan_oil_barrels", "dan_black_barrel", "dan_black_schnell_barrel", "dan_red_schnell_barrel", "dan_red_barrel"};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {};
	};
};

class CfgDestructPos{

};

class CfgVehicles {
	class ThingX;
	class dan_oil_barrels : ThingX
	{
		scope = 1;
		displayName = "Oil Barrels";
	}; 
	class dan_black_barrel : ThingX
	{
		scope = 2;
		model = "\Dan_Oil_Barrel\Dan_Oil_Barrel.p3d";
		displayName = "Black Barrel w/White Stripe";
		vehicleClass = "dan_oil_barrels";
		destrType = "DestructBuilding";
		armor = 30;
		fireResistance = 0.1;
		explosionShielding = 0.1;
		damageResistance = 0.004;
		slingLoadCargoMemoryPoints[] =
		{
			"Slingload1",
			"Slingload2",
			"Slingload3",
			"Slingload4"
		};
		class Damage
		{
			tex[] = {};
			mat[] = {};
		};
		damageHalf[] = {};
		damageFull[] = {};
		supplyRadius = 20;
		transportFuel = 800;
		class DestructionEffects
		{
			class Smoke1
			{
				intensity = 1;
				interval = 1;
				lifeTime = 1;
				position = "";
				simulation = "particles";
				type = "ObjectDestructionSmokeSmall";
			};
			class Smoke2
			{
				intensity = 1;
				interval = 1;
				lifeTime = 1;
				position = "";
				simulation = "particles";
				type = "ObjectDestructionSmoke2";
			};
			class Fire1
			{
				intensity = 1;
				interval = 1;
				lifeTime = 25;
				position = "";
				simulation = "particles";
				type = "ObjectDestructionFire1Small";
			};
			class HouseDestr
			{
				intensity = 1;
				interval = 1;
				lifeTime = 5;
				position = "";
				simulation = "destroy";
				type = "DelayedDestructionAmmoBox";
			};
		};
	};
	class dan_black_schnell_barrel : dan_black_barrel {
		scope = 2;
		displayName = "Black Barrel w/Schnell Fuels Logo";
		hiddenSelections[] = {"Logo"};
		hiddenSelectionsTextures[] = {"\Dan_Oil_Barrel\SchnellLogoWhite.paa"};
		transportFuel = 800;
		supplyRadius = 20;
	};
	class dan_red_schnell_barrel : dan_black_barrel {
		scope = 2;
		displayName = "Red Barrel w/Schnell Fuels Logo";
		hiddenSelections[] = {"Bottom", "Side", "Top", "Logo"};
		hiddenSelectionsTextures[] = {"\Dan_Oil_Barrel\RedSchnellLogo\RedBottom.paa", "\Dan_Oil_Barrel\RedSchnellLogo\RedSides.paa", "\Dan_Oil_Barrel\RedSchnellLogo\RedTop.paa", "\Dan_Oil_Barrel\SchnellLogoWhite.paa"}; //logo must go last otherwise it doesnt load for some reason
		transportFuel = 800;
		supplyRadius = 20;
	};
	class dan_red_barrel : dan_black_barrel {
		scope = 2;
		displayName = "Red Barrel w/White Stripe";
		hiddenSelections[] = {"Bottom", "Side", "Top", "Logo"};
		hiddenSelectionsTextures[] = {"\Dan_Oil_Barrel\RedSchnellLogo\RedBottom.paa", "\Dan_Oil_Barrel\RedSchnellLogo\RedSides.paa", "\Dan_Oil_Barrel\RedSchnellLogo\RedTop.paa", "\Dan_Oil_Barrel\Logo.paa"};
		transportFuel = 800;
		supplyRadius = 20;
	};

};

Thanks in advance for any help.

Share this post


Link to post
Share on other sites

The vehicleClass system is sort of unused now; instead you need to use Editor Categories and Editor Sub Categories.

 

For example:

class CfgEditorSubcategories {
    class dan_oil_barrels {
        displayName = "Oil Barrels";
    };
};
class dan_black_barrel: ThingX {
	editorSubcategory = "dan_oil_barrels";
};

This will put it the objects under the Oil Barrels sub category under the main category Things.

 

Read more here: https://community.bistudio.com/wiki/Eden_Editor:_Object_Categorization

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
9 minutes ago, soldierman said:

The vehicleClass system is sort of unused now; instead you need to use Editor Categories and Editor Sub Categories.

 

For example:


class CfgEditorSubcategories {
    class dan_oil_barrels {
        displayName = "Oil Barrels";
    };
};

class dan_black_barrel: ThingX {
	editorSubcategory = "dan_oil_barrels";
};

This will put it the objects under the Oil Barrels sub category under the main category Things.

 

Read more here: https://community.bistudio.com/wiki/Eden_Editor:_Object_Categorization

 

That worked, thanks for a quick response on this. Back to creating extra textures now :D

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

×