Jump to content
Sign in to follow this  
CSP.Wizard

How to partially override config from another mod in my own?

Recommended Posts

Hello everyone, I hope I find correct place to ask my question.

Here it is:

1) We've got some mod/addon. Any mod, ACE for example as most popular I think.

2) We want to create a mod that will be based on the first one (ACE)

3) In our mod we would like to override some exact parameters of the vehicles or weapons, doesn't meter.

So the question is how it could be done in a way that all maps designed for that mod will work with our from scratch? This as I understand suppose that the name of classes shouldn't be changed. Is there any way except complete rewriting of all the futures that we would like to modify?

Here is sample of the code that could be used for explanation:

class CfgVehicles {

/*extern*/ class Tracked_APC;

class BMP2_Base: Tracked_APC {

/*extern*/ class Turrets;

/*extern*/ class MainTurret;

};

class ACE_BMP2_RU: BMP2_Base {

scope = 2;

side = 0;

faction = "RU";

accuracy = 0.500000;

crew = "RU_Soldier_Crew";

typicalCargo = {"RU_Soldier_Crew", "RU_Soldier_Crew", "RU_Soldier_Crew", "RU_Soldier", "RU_Soldier_MG", "RU_Soldier_AT"};

hiddenSelectionsTextures = {"\x\acex\addons\t_veh_bmp2\bmp2_01_ru_co.paa", "\x\acex\addons\t_veh_bmp2\bmp2_02_ru_co.paa"};

class Turrets: Turrets {

class MainTurret: MainTurret {

weapons = {"2A42", "PKT", "ACE_AT5B_Launcher"};

magazines = {"250Rnd_30mmAP_2A42", "250Rnd_30mmHE_2A42", "250Rnd_762x54_PKT_T90", "250Rnd_762x54_PKT_T90", "250Rnd_762x54_PKT_T90", "250Rnd_762x54_PKT_T90", "250Rnd_762x54_PKT_T90", "250Rnd_762x54_PKT_T90", "250Rnd_762x54_PKT_T90", "250Rnd_762x54_PKT_T90", "ACE_AT5B", "ACE_AT5B", "ACE_AT5B", "ACE_AT5B", "ACE_AT5B"};

};

};

};

};

in the class ACE_BMP2_RU for example we would like to change accuracy, as most simple value :) How this should be done in our mod?

Can I simply write smth like that below? Or this is wrong (as it should be for C++ for example) and I have to rewrite the full config so it will simply replace the original?

class ACE_BMP2_RU : ACE_BMP2_RU

{

accuracy = 1.500000;

};

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  

×