Jump to content
Hydrol

ACE 3 dynamic mission parameters

Recommended Posts

Good evening all,

 

Like most people i have become tired of placing ACE3 modules in the editor when making my custom coop missions- Reading the framework documentation on the ACE3 website i am using ACE_SETTINGS in the description.ext but will be moving to using the ACE_SEVER.pbo with a ace\serverconfig.hpp - I will use this without forcing settings (so i can change specific ones dynamically through the lobby)

 

In order to modify the settings from one mission to another (without redoing the code) i want to make certain ace_settings dynamic and change them on my dedicated server through the mission parameters in the lobby

 

Reading the website gives the following example for code in the description.ext:

 

class Params {
    class ace_medical_level { //This needs to match an ace_setting, this one is a "SCALAR"(number)
        title = "Medical Level"; // Name that is shown
        ACE_setting = 1; //Marks param to be read as an ace setting, without this nothing will happen!
        values[] = {1, 2}; //Values that ace_medical_level can be set to
        texts[] =  {"Basic", "Advanced"}; //Text names to show for values (Basic will set level to 1, Advanced will set level to 2)
        default = 2; //Default value used - Value should be in the values[] list
    };
    class ace_repair_addSpareParts { //This ia a "BOOL"
        title = "$STR_ACE_Repair_addSpareParts_name"; //You can use ACE's stringtables
        ACE_setting = 1;
        values[] = {0, 1}; //setting is a BOOL, but values still need to be numbers, so 0 is false, 1 is true
        texts[] =  {"False", "True"};
        default = 1;
    };
};

 

My question is - DOES ANYONE HAVE A FULL LIST OF THE ACE3 CLASS PARAMS? this would save me a lot of time messing about in the editor export section writing down the class name and variable options.

 

Many thanks in advance

Share this post


Link to post
Share on other sites

You can export them yourself by placing all the modules you want/need in a sp editor mission plus the export settings module. Then you can simply use the ace settings menu to export them to clipboard.

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, belbo said:

You can export them yourself by placing all the modules you want/need in a sp editor mission plus the export settings module. Then you can simply use the ace settings menu to export them to clipboard.

Belbo,

 

Those settings are great for creating the serverconfig.hpp but they don't contain any of the code required for the mission parameters and specifically the class parameter arrays for VALUES [ ] and TEXTS [ ] like in the example below:

 

class ace_medical_level { //This needs to match an ace_setting, this one is a "SCALAR"(number)
        title = "Medical Level"; // Name that is shown
        ACE_setting = 1; //Marks param to be read as an ace setting, without this nothing will happen!
        values[] = {1, 2}; //Values that ace_medical_level can be set to
        texts[] =  {"Basic", "Advanced"}; //Text names to show for values (Basic will set level to 1, Advanced will set level to 2)
        default = 2; //

 

The exported settings only contain the following code:

 

class ace_medical_level {
    value = 1;
    typeName = "SCALAR";
    force = 1;

 

I am trying to see if anyone has already done the work of adding the extra code for title = , values and texts etc so they can be used for mission parameters selection.

 

Share this post


Link to post
Share on other sites

Belbo,

 

Many thanks. At least I can pick and choose from the ace_settings instead of writing it out from scratch. 

Edited by Hydrol

Share this post


Link to post
Share on other sites

Belbo,

 

Finally finished it - couldn't find the correct info in the ace_settings.hpp so finally manged to do it by looking through the export options menu in the editor and finding the classnames and available options through there - then used the exported data to check whether the option was BOOL or SCALAR, finished product below for the settings i wanted to be dynamic. Placed this into the description.ext - i need to test thoroughly though!!

 

class Params {
    class ace_medical_level { 
        title = "Medical Level"; 
        ACE_setting = 1;
        values[] = {1, 2}; 
        texts[] =  {"Basic", "Advanced"}; 
        default = 2; 
    };
    class ace_medical_medicSetting { 
        title = "Medical Setting";
        ACE_setting = 1;
        values[] = {1, 2, 3}; 
        texts[] =  {"Disabled", "normal", "Advanced"}; 
        default = 2; 
    };
    class ace_medical_medicSetting_basicEpi { 
        title = "Who can use Epinephrine for full heal (basic medical only)"; 
        ACE_setting = 1;
        values[] = {1, 2, 3}; 
        texts[] =  {"Anyone", "Medics only", "Doctors only"};
        default = 2;
    };
    class ace_medical_useLocation_basicEpi { 
        title = "Locations Epinephrine (basic medical only)"; 
        ACE_setting = 1;
        values[] = {1, 2, 3, 4, 5}; 
        texts[] =  {"Anywhere", "Medical vehicles", "medical facility", "Vehicles and facility", "Disabled"};
        default = 1;
    };
    class ace_medical_medicSetting_PAK { 
        title = "Who can use PAK for full heal"; 
        ACE_setting = 1;
        values[] = {1, 2, 3}; 
        texts[] =  {"Anyone", "Medics only", "Doctors only"};
        default = 2;
    };
    class ace_medical_useLocation_PAK { 
        title = "Locations PAK"; 
        ACE_setting = 1;
        values[] = {1, 2, 3, 4, 5}; 
        texts[] =  {"Anywhere", "Medical vehicles", "medical facility", "Vehicles and facility", "Disabled"};
        default = 1;
    };
    class ace_medical_useCondition_PAK { 
        title = "When can PAK be used";
        ACE_setting = 1;
        values[] = {1, 2}; 
        texts[] =  {"Anytime", "Stable"};
        default = 2;
    };
    class ace_medical_medicSetting_SurgicalKit { 
        title = "Who can use Surgical Kit (Advance medical only)"; 
        ACE_setting = 1;
        values[] = {1, 2, 3}; 
        texts[] =  {"Anyone", "Medics only", "Doctors only"};
        default = 3;
    };
    class ace_medical_useLocation_SurgicalKit { 
        title = "Where can Surgical kit be used"; 
        ACE_setting = 1;
        values[] = {1, 2, 3, 4, 5}; 
        texts[] =  {"Anywhere", "Medical vehicles", "medical facility", "Vehicles and facility", "Disabled"};
        default = 3;
    };
    class ace_medical_useCondition_SurgicalKit { 
        title = "When can Surgical kit be used";
        ACE_setting = 1;
        values[] = {1, 2}; 
        texts[] =  {"Anytime", "Stable"};
        default = 2;
    };
    class ace_medical_increaseTrainingInLocations { 
        title = "Locations boost training"; 
        ACE_setting = 1;
        values[] = {0, 1}; 
        texts[] =  {"No", "Yes"};
        default = 0;
    };
    class ace_medical_enableAirway { 
        title = "Enable Airway"; 
        ACE_setting = 1;
        values[] = {0, 1}; 
        texts[] =  {"No", "Yes"};
        default = 0;
    };
    class ace_medical_enableFractures { 
        title = "Enable Fractures"; 
        ACE_setting = 1;
        values[] = {0, 1}; 
        texts[] =  {"No", "Yes"};
        default = 0;
    };
    class ace_medical_enableAdvancedWounds { 
        title = "Enable Advanced wounds"; 
        ACE_setting = 1;
        values[] = {0, 1}; 
        texts[] =  {"No", "Yes"};
        default = 0;
    };
    class ace_advanced_fatigue_enabled { 
        title = "Show Stamina Bar";
        ACE_setting = 1;
        values[] = {0, 1}; 
        texts[] =  {"No", "Yes"};
        default = 0;
    };
    class ace_advanced_fatigue_enableStaminaBar { 
        title = "Show Stamina Bar"; 
        ACE_setting = 1;
        values[] = {0, 1}; 
        texts[] =  {"No", "Yes"};
        default = 1;
    };
    class ace_nametags_showPlayerNames { 
        title = "Show player names"; 
        ACE_setting = 1;
        values[] = {1, 2, 3, 4, 5, 6}; 
        texts[] =  {"Disabled", "Enabled", "Only on cursor", "Only on keypress", "Only on cursor and keypress", "Fade on screen border"};
        default = 1;
    };
    class ace_map_BFT_Enabled { 
        title = "Enable Blue Force Tracking"; 
        ACE_setting = 1;
        values[] = {0, 1}; 
        texts[] =  {"No", "Yes"};
        default = 0;
    };
    class ace_repair_engineerSetting_repair { 
        title = "Who can perform repair"; 
        ACE_setting = 1;
        values[] = {1, 2, 3}; 
        texts[] =  {"Anyone", "Engineer", "Advanced engineer"};
        default = 2;
    };
    class ace_repair_engineerSetting_wheel { 
        title = "Who can remove and replace wheels"; 
        ACE_setting = 1;
        values[] = {1, 2, 3}; 
        texts[] =  {"Anyone", "Engineer", "Advanced engineer"};
        default = 2;
    };
    class ace_repair_fullRepairLocation { 
        title = "Locations for full vehicle repair"; 
        ACE_setting = 1;
        values[] = {1, 2, 3, 4 , 5}; 
        texts[] =  {"Anywhere", "Repair vehicle only", "repair facility only", "Repair facility or vehicle", "Disabled"};
        default = 4;
    };
    class ace_repair_engineerSetting_fullRepair { 
        title = "Who can perform full vehicle repair"; 
        ACE_setting = 1;
        values[] = {1, 2, 3}; 
        texts[] =  {"Anyone", "Engineer", "Advanced engineer"};
        default = 2;
    };
    class ace_repair_addSpareParts { 
        title = "$STR_ACE_Repair_addSpareParts_name"; 
        ACE_setting = 1;
        values[] = {0, 1}; 
        texts[] =  {"False", "True"};
        default = 1;
    };
}; 

Share this post


Link to post
Share on other sites

Yeah, you probably won't answer, but.
How did you figured out that you need to add "ACE_setting = 1;"? Does this come from ace itself or CBA? 
I want to do what you did to other mods and scripts, like acex or diwako ragdoll. I tried simply changing "ACE" to "ACEX" but it doesn't work, i have seen other mod that also had this "name_setting = 1;" and allow to change it's cba setting through mission parameters. I can't find anything about it on CBA or ACE wiki either.

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

×