Jump to content
Sign in to follow this  
Briggybros

Nested inheritance for plane pylons breaks the original config

Recommended Posts

Hello, new to this, but I've been attempting to create a new plane class that is a modification of an existing aircraft config - following https://community.bistudio.com/wiki/Arma_3:_Vehicle_Loadouts#vehicle_config_-_CfgVehicles and https://community.bistudio.com/wiki/Class_Inheritance#External_Base_Child_Classes 

 

Spoiler



// Create subclasses for F-35F Peregrine pylon settings
class Plane;
class Plane_Base_F : Plane {
    class Components;
};
class Plane_Fighter_05_Base_F : Plane_Base_F {
    class Components : Components {
        class TransportPylonsComponent;
    };
};
class B_Plane_Fighter_05_F : Plane_Fighter_05_Base_F {
    class Components : Components {
        class TransportPylonsComponent : TransportPylonsComponent {
            class pylons;
        };
    };
};
class B_A_Plane_Fighter_05_F : B_Plane_Fighter_05_F {
    class Components : Components {
        class TransportPylonsComponent : TransportPylonsComponent {
            class pylons : pylons {
                class pylons1;
                class pylons2;
                class pylons3;
                class pylons4;
                class pylons5;
                class pylons6;
                class pylonBayRight1;
                class pylonBayLeft1;
                class pylonBayRight2;
                class pylonBayLeft2;
                class pylonCenter1;
            };
        };
    };
};

// F-35F Peregrine CAS Loadout
class B_A_Plane_Fighter_05_CAS_F : B_A_Plane_Fighter_05_F {
    displayName = "F-35F Peregrine (CAS)";

    class Components : Components {
        class TransportPylonsComponent : TransportPylonsComponent {
            class pylons : pylons {
                class pylons1 : pylons1 {
                    attachment = "PylonRack_Missile_BIM9X_x1";
                };
                class pylons2 : pylons2 {
                    attachment = "PylonRack_Missile_BIM9X_x1";
                };
                class pylons3 : pylons3 {
                    attachment = "PylonRack_Missile_AGM_02_x1";
                };
                class pylons4 : pylons4 {
                    attachment = "PylonRack_Missile_AGM_02_x1";
                };
                class pylons5 : pylons5 {
                    attachment = "PylonMissile_Bomb_AGM_154_x1";
                };
                class pylons6 : pylons6 {
                    attachment = "PylonMissile_Bomb_AGM_154_x1";
                };
                class pylonBayRight1 : pylonBayRight1 {
                    attachment = "PylonMissile_Missile_AMRAAM_D_INT_x1";
                };
                class pylonBayLeft1 : pylonBayLeft1 {
                    attachment = "PylonMissile_Missile_AMRAAM_D_INT_x1";
                };
                class pylonBayRight2 : pylonBayRight2 {
                    attachment = "PylonRack_Bomb_SDB_x4";
                };
                class pylonBayLeft2 : pylonBayLeft2 {
                    attachment = "PylonRack_Bomb_SDB_x4";
                };
                class pylonCenter1 : pylonCenter1 {
                    attachment = "PylonWeapon_220Rnd_25mm_shells";
                };
            };
        };
    };
};


 

The new B_A_Plane_Fighter_05_CAS_F works as I would expect, but the original B_A_Plane_Fighter_05_F spawns empty, and pylons are no longer configurable in attributes. Looking at the pylon classes in the config viewer there appears to be no difference in config when the above is included and when it isn't. Am I missing something obvious here, or do pylons just not play well with inheritance and need to be completely redeclared as in the CfgVehicles wiki page?

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  

×