Jump to content
hnchmc

Custom faction vehicle classes being overwritten?

Recommended Posts

Hey all, sorry if this is has already been answered, I've searched the internet and can't find an exact remedy. If there is already a post answering this, please just point me to it. Sorry then.

 

Anyways, so my problem is with the custom vehicle classes being overwritten. What I mean by this is that after I make a custom faction, and custom vehicle Classes, the faction appears in game yet the vehicle Class names do not. Instead, they are replaced by the vanilla "planes", "cars", "men", etc for the type of unit respectively. 

 

For example: 

 

class CfgFactionClasses {
	
	
	class test_fac {
		displayName = "My Test Fac";
		author = "hnchmc";
		flag = "\a3\Data_f\Flags\flag_quontrol_co.paa";
		icon = "\a3\Data_f\Flags\flag_quontrol_co.paa";
		side = 2;
	};
	
};

class CfgVehicleClasses {
	
	class test_fac_vehicleclass_testplanes {
		displayName = "Test planes";
	};
	
	class test_fac_vehicleclass_testcars {
		displayName = "Test cars";
	};
	
	
};

 

Then, when applied to vehicles using 

side = 2;
faction = test_fac;				
vehicleClass = "test_fac_vehicleclass_testplanes";		

in game it reverts back to the vanilla vehicle classes, where they're found under "planes" or "cars"

 

Maybe I'm missing something? Anything helps :smile_o:

Share this post


Link to post
Share on other sites

It doesn't look like you have any classes for the custom classes to inherit from, so they are reverting back to default.

Share this post


Link to post
Share on other sites
16 hours ago, road runner said:

It doesn't look like you have any classes for the custom classes to inherit from, so they are reverting back to default.

 

Ahh, that would make sense. Thanks, I'll have a look into it

 

Edit: I've looked through the game's cfg for factions, and I don't see anything that I'm missing. I'm just stuck it seems.

Share this post


Link to post
Share on other sites
On 2/21/2017 at 6:08 AM, hnchmc said:

 

Ahh, that would make sense. Thanks, I'll have a look into it

 

Edit: I've looked through the game's cfg for factions, and I don't see anything that I'm missing. I'm just stuck it seems.

It's the configvehicle classnames that are not inheriting from any default classname

"class test_fac_vehicleclass_testplanes"

what class is this inheriting from?

Share this post


Link to post
Share on other sites
On 2/22/2017 at 4:49 AM, road runner said:

It's the configvehicle classnames that are not inheriting from any default classname

"class test_fac_vehicleclass_testplanes"

what class is this inheriting from?

 

Nothing, and I'm curious as to what it should inherit from.

Share this post


Link to post
Share on other sites
5 hours ago, hnchmc said:

 

Nothing, and I'm curious as to what it should inherit from.

It should inherit from a class that's already in the game, is this a prop driven plane by any chance?

You could, once it's been unencrypted use the APEX light aircraft class to inherit from.
Or take a look at how Sabre_Dust writes his configs for his addons?

  • Like 1

Share this post


Link to post
Share on other sites
16 hours ago, road runner said:

It should inherit from a class that's already in the game, is this a prop driven plane by any chance?

You could, once it's been unencrypted use the APEX light aircraft class to inherit from.
Or take a look at how Sabre_Dust writes his configs for his addons?

 

Sabre is running into the same problem I am. It's not the plane that's the issue,  but rather the faction and it's vehicle class that does not appear to work. The custom faction appears in the game, but the custom vehicle classes do not. It's odd. 

 

Thank you for all your help so far.

 

Hang on, I just thought of something incredibly stupid. I think I understand what you're saying. Let me check something now....

Edited by hnchmc

Share this post


Link to post
Share on other sites

class CfgVehicles
{
    class Air;
    class Plane: Air
    {
        class Turrets;
        class HitPoints
        {
            class HitHull;
        };
    };
    class Plane_Base_F: Plane
    {
        class AnimationSources;
        class HitPoints: HitPoints
        {
            class HitHull: HitHull{};
        };
        class Turrets: Turrets
        {
            class CopilotTurret;
        };
        class MarkerLights;
    };

    class MY_AIRCRAFT_BASE: Plane_Base_F

{ all the shit you need goes in here

};

 

    class MY _AIRCRAFT_NAME_1: MY_AIRCRAFT_BASE
    {
        scope = 2;
        author = "I";
        displayName = "My aircraft name";
        side = 2;
        faction = "IND_F"; // has to be from a Faction already created for characters eg BLU_F, IND_F etc
        crew = "I_pilot_F";// same deal the pilots should come from a faction already created
        vehicleClass = "air";
        hiddenSelections[] = {""};
    };

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

×