Multiple Parameters in MP Lobby

By hoz


With the most recent beta patch from Bohemia Interactive, BIS has added the functionality of multiple lobby parameters. This feature has been a long time coming and will allow mission editors who build multiple player missions the ability to add mMore descriptive entries, and as many multiplayer options as they wish! For instance alot of MP missions were limited to just 2 options and 9 times out of 10 one of those options were Norrins Revive scripts leaving only one more option for the author to become creative.


Note: This only works with the latest beta build! See this link for download.


The Old Method

The old method still works and you have to keep this in mind when you build your new paramsarray. Here is an example of the old method:


titleParam1 = "Grass Options";
valuesParam1[] = {0, 1, 2};
defValueParam1 = 0;
textsParam1[] = {"NoGrass", "Medium", "Normal"};
Then the file can be read in the init.sqf, kind of like this...

[param1, "false"] execvm "Grass_Changer\grass_changer.sqf";In the new method those param1 and param2 are still there to maintain compatibility for the missions already created and published. You have to keep this in mind because the new paramsArray uses spots 0 and 1 for the old entries weather they are defined or not. So if you wanted to add a third option using the paramsArray then it would theroetically look like this:  paramsArray[param1,param2, thirdparam]

The New Method

The new method uses a class in the description.ext called Params. It is defined as such:


class Params
        class DayTime
                title = "Time Of Day";
                values[] = {0,16,8};
                texts[] = {"Dusk","Midday","Dawn"};
                default = 16;
        class Revive
        // paramsArray[3]
                title = "Number of Revives:";
                values[] = {2000,1000,20,10,7,5};
                texts[] = {"No Revive","Infinite - Cadet","20 - Easy ","10 - Normal","7  - Hard","5  - Extreme"};
                default = 20;
        class Grass
        // paramsArray[4]
                title = "Grass Options";
                values[] = {0, 1, 2};
                texts[] = {"NoGrass", "Medium", "Normal"};
                default = 0;

Once defined you then could read it from the init.sqf file like this:

skiptime (paramsArray select 2);
[(paramsArray select 4), "false"] execvm "Grass_Changer\grass_changer.sqf";

See example mission here.