Firt of all a bit of background:
After years of been part of this comunity i have always noticed that there is a bit gap between some mission makers and scripters/addon makers. Obviously the perfect situation would be that someone that edits a mision knows about everything else in the game(scripting/config/addons) so they can do anything they want and do it the best way it can be done.
To fill this gap i already posted some suggestion that i would love to see implemented on arma3, that would allow script/addon makers make their work abvaliable to mission makers on a more user friendly way: http://forums.bistudio.com/showthrea...77#post2054977
But some weeks ago i just thought to myself: "why would i need to wait for arma3 if i can do it myself, it may be possible to do on arma2", so i started this just as a proof of concept and before i noticed it i had it working, so thats why i am creating this post . Maybe its not everything i wanted but its something
Info about the addon itself:
"Advanced modules" its just a small editor GUI modification that adds the ability to easy configure extra parameters on editor modules. As most of the modules that are out there weren't thought with this addon in mind, there isn't many configurable options on most of the released modules, still this addon its able to configure all the default BIS modules that are documenten con the wiki.
But the true potential of this addon would be modules created with this configuration method in mind.
Right now the features are:
-For mission makers:
Easy configure all the parameters of BIS modules without needing to constantly search on the wiki.
Also added options to 2 ACE modules( air refueling and EASA)
In the future i will add any other addon/module that its documented, or addon makers could do themselves (UNS 2.5 will include at least one of those )
-For addon makers:
You can easy create mision editor modules with configurable parameters.
Also for advanced addon makers, you can create your own custom configuration dialog(i have planned to add some API funtions to make it easier on the future)
Small video from the mission editor point of view:
For addon makers here a small example of the config of a configurable parameteres for and addon(spoiler fucks up indentation :P but its to long): Spoiler:
class CfgPatches
{
class colum_advanced_modules
{
units[] = {};
weapons[] = {};
requiredVersion = 1.59;
requiredAddons[] = {"colum_advanced_modules"}; //require advanced modules so you keep the class inheritance intact
};
};
class Colum_AdvancedModule // Main class for modules config
{
class Test_advanced_Logic // this must be the same classname as your logic
{
dialogName="default"; // Use default dialog(auto generates on execution depending on the parameters), change to your custom dialog name to use your custom dialog
diagParamsNum=7; // Total number of parameters
DialogInitScript=""; // Path to the script that would be executed after advanced dialog options creation, only apicable if you are using a custom dialog
class Params
{
class Param_1 // Important first parameter its 1 not 0
{
ParamVarName="Name_text"; // Variable name that would be set on your logic on init field: this setvariable ["VARIABLENAME",value]
ParamTextName="Write your Name"; // Name shown on the config dialog
ParamType="Text"; //param type, avaliable types are: TEXT,NUMBER,ARRAY,OBJVAR,SLIDER,COMBOBOX . Most selfexplanatory, keep reading for furder explanations
DefaultValue=""; //Default value for the parameter, must be the same type of the parameter( for example this one that its a text, must be a string)
ParamInfo="Extra parameter info"; //Extra info that would be displayed can be an extructured text
};
class Param_2 // second param
{
ParamVarName="Last_Name_text"; // Should be unique and a valid variable name, if not variables would override
ParamTextName="Last Name";
ParamType="Text";
DefaultValue="";
ParamInfo="Extra parameter info";
DoNotSetDefault=1; // If set to 1 the value would be only writen on the init if its not the default value. If not, the value its always added to the init line even if its the default one.
};
class Param_3
{
ParamVarName="number_test";
ParamTextName="Write a number";
ParamType="Number"; // As it name implies, the parameter must be a number, if the user tries to imput anything else the imput resets to 0
DefaultValue="0"; //Must be a number
ParamInfo="Extra parameter info";
DoNotSetDefault=0;
};
class Param_4
{
ParamVarName="Slider_text";
ParamTextName="test Slider";
ParamType="Slider"; // The user can see an slider that allows to chose a value between configured max and min values
MinValue=1; // minimum slider value
MaxValue=50; // Maximum slider value
RoundValue=1; // If set to 1 it forces to integer values. If set to 0 the slider would return float values.
DefaultValue=5;
ParamInfo="Extra parameter info";
DoNotSetDefault=1; //can be used on any kid of parameter if not set, default value its 0
};
class Param_5
{
ParamVarName="Prueba array";
ParamTextName="Prueba array";
ParamInfo="otro mas a lo mejor es sin las putas barras hehehe asi si q va, mejor pongo un texto largo del <br>copon a ver que cojones pasa con esto y si sale el puto salnto de linea";
ParamType="array"; //Array type. The value that the user input would be check for array type, if isn't an array default value would be set
DefaultValue[]={1,2}; //must be an array, note that in config the config entry name has a [] at the end and {} are used instead of [] for the values
};
class Param_6
{
ParamVarName="Name_text2";
ParamTextName="prueba mierda";
ParamType="OBjvAR"; //Object /variable, this type its thoug for variablenames or any other type of value, tecnically it could be used to imput any of the previous param types, but without the spefici checks that they have
DefaultValue="fracaso";
};
class Param_7
{
ParamVarName="combo_Test1";
ParamTextName="test combo";
ParamType="comboBox"; //Allows the user to select a value from a list
ParamInfo="Extra parameter info";
NumOptions=4; // total number of avaliable options
DefaultIndex=0; //default option, note that its the number on the list, not te value itself
class Option_1
{
Text="texto 1"; // text displayed must be a string
Value="value 1"; // string as its a Text value type
ValueType="Text"; // Text type. Posible values are all the previous ones escept slider.
};
class Option_2
{
Text="texto 2";
Value=2;
ValueType="NUMBER"; //Number type
};
class Option_3
{
Text="texto 3";
Value[]={3,3,3}; //Note again that it must be an array
ValueType="ARRAY"; //array type
};
class Option_4
{
Text="opcion fail";
Value="trikitri";
ValueType="objvar"; // object/variable type
};
};
};
};
};
To access to the values, on your init script just use :
Code:
_this getvariable "variablename"; //Note _this must be the logic object, and variablename its the configured "ParamVarName" of each parameter
I will expand the documentation a bit when i have some free time