Jump to content
Sign in to follow this  
vitamin

Changing parent class

Recommended Posts

I'd appreciate it very much if someone could explain me whether changing parent classes in main config file is good or bad idea? Should I avoid doing so at all costs, or maybe it can be done in some rare cases? For instance, let's say that I would like to change 'T80Res' class (code below) to inherit after 'M1Abrams' class. Is such change acceptable? Won't it cause any problems while playing missions/campaigns?

class T80Res : T80
{
     access=2;
     displayName="$STR_DN_OUT_T80Res";
     side=2;
     hiddenSelections[]={};
};

Share this post


Link to post
Share on other sites
I'd appreciate it very much if someone could explain me whether changing parent classes in main config file is good or bad idea? Should I avoid doing so at all costs, or maybe it can be done in some rare cases? For instance, let's say that I would like to change 'T80Res' class (code below) to inherit after 'M1Abrams' class. Is such change acceptable? Won't it cause any problems while playing missions/campaigns?

class T80Res : T80
{
     access=2;
     displayName="$STR_DN_OUT_T80Res";
     side=2;
     hiddenSelections[]={};
};

Hi,

Both tanks originate from the "Class Tank". From there the "Class M1A1Abrams : Tank" is derived. The Russian tanks follow a different path.

Class RussianTank : Tank

Class T80 : RussianTank

Class T80Res : T80

As long as you stick with the upper parent class (tracked or wheeled) you can change pretty much anything.

With example you show the T80Res inherits properties from the T80 and only changes the access, side, displayname and adds the hiddenslections which I guess adds the green stripping. So what you suggest will do the same to the Abrams, if that is what you're after it will work technically. In missions and campaigns it could cause an imbalance in game play.

"class T80Res : M1A1Abrams"

Now on the other hand if you want to retain the T80 model and only replace the Abrams characteristics, that requires a little more work. I would have to play around with it to be able see what needs to be done. The inherit would be kept the same and you would need to copy a lot of the Abrams config section and add it to the T80Res config. This also might cause an imbalance.

Edited by Zulu1

Share this post


Link to post
Share on other sites
Now on the other hand if you want to retain the T80 model and only replace the Abrams characteristics, that requires a little more work.

Thanks Zulu for your detailed reply. As for my config changes, I want the opposite - keep the T80 characteristics, and only change the model of this tank. And the problem is that the tank I'd like to use (Leopard 1A5) uses 'M1A1Abrams' class as its base. So I'm not sure if this is going to work OK? But I will give it a try and see how it works.

p.s.

I know that such change is totally unrealistic (e.g. different main guns) but at least it shouldn't imbalance the gameplay.

Share this post


Link to post
Share on other sites
Thanks Zulu for your detailed reply. As for my config changes, I want the opposite - keep the T80 characteristics, and only change the model of this tank. And the problem is that the tank I'd like to use (Leopard 1A5) uses 'M1A1Abrams' class as its base. So I'm not sure if this is going to work OK? But I will give it a try and see how it works.

p.s.

I know that such change is totally unrealistic (e.g. different main guns) but at least it shouldn't imbalance the gameplay.

Just add a line to the T80Res config:

Model=Leopard1a5\xyz.p3d

That should work for the most part.

Share this post


Link to post
Share on other sites

To be on the safe side I copied some more stuff from the addon's config and everything seems to work fine:) Thank you once again Zulu for your help.

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  

×