Jump to content
priglmeier

Need definitive answer on what sets Lobby Parameters - enabled and Mission settings (aka not working)

Recommended Posts

I've noticed that when setting the mission parameters for a custom mission in the EDEN Editor the values are not being used as defined.

Example Mission is set to:

CP 1000

CP multiplier 2x
Fatigue - Disabled

Music - Disabled

These are never set when starting the mission from the server in MP.

Also, what enables the Parameters button is the FN Lobby so it is always visible?
It does not appear to be consistent.
 

Share this post


Link to post
Share on other sites
7 hours ago, priglmeier said:

I've noticed that when setting the mission parameters for a custom mission the values are not being used as set.
Example Mission is set to:

CP 1000

CP multiplier 2x
Fatigue - Disabled

Music - Disabled

These are never set when starting the mission from the server in MP.

Also, what enables the Parameters button is the FN Lobby so it is always visible?
It does not appear to be consistent.
 

Post your code.

Share this post


Link to post
Share on other sites

There is no code. This is set in the basic missions settings as described. These values are set in the Warlords Init which should work.


I'll keep looking...

Share this post


Link to post
Share on other sites
13 hours ago, priglmeier said:

There is no code. This is set in the basic missions settings as described.
I'll keep looking...

You haven't really described anything in detail. You have in essence said "I have a car, it's red and it doesn't start, why?"

 

But I digress, read this if you want to know how mission params work:

https://community.bistudio.com/wiki/Mission_Parameters

 

 

Share this post


Link to post
Share on other sites
Quote

There is no code. This is set in the basic missions settings as described.


Welp, then that's why it doesn't work.
 

Quote

 

CP 1000

CP multiplier 2x
Fatigue - Disabled

 


How/Where is CP defined in your mission? I am assuming you have a param for it in description.ext. Whatever that param is, it's value has to be retrieved in the script that handles that param. One super duper easy way to see if/where/how this param value is applied elsewhere is to first located is to use notepad++, open description.ext, find the parameter you want to look into, select and copy it, hit ctrl+f, click the 'Find in Files' tab, paste it. Change the 'Directory' to your mission folder root and click the 'Find All' button. That will show you any references to that variable in any script present in your mission folder. If you don't see it, there's your issue.

Below is example of a parameter being defined in description.ext and retrieved elsewhere.

Description.ext:

class Params
{
	//Changes speed of holdaction that captures the flag
	class NUP_flagCapSpeed // THIS IS THE VARIABLE WE WILL RETRIEVE ELSEWHERE
    {
        title = "Flag Capture Speed";
        values[] = {1, 10, 15, 30};
        texts[] = {"1 second (Testing)", "10 seconds", "15 seconds", "30 seconds"};
        default = 1;
    };
};


Then, in my holdAction script, I have this line:

_duration = ["NUP_flagCapSpeed", 5] call BIS_fnc_getParamValue;


And a bit further down in that same script:


...

//Interrupt
    {
        params[ "_flag", "_caller" ];

        _baseMarker = _flag getVariable "NUP_baseMarker";
        [ _flag, 1 ] remoteExec [ "setFlagAnimationPhase", 0, format[ "capFlagPhase_%1", _baseMarker ] ];
        _sideID = _flag getVariable "TER_flagSide";
        _fileFlag = ["flag_csat_co", "flag_nato_co", "flag_aaf_co", "flag_fd_purple_co", "flag_white_co"] select (_sideID call BIS_fnc_sideID);
        _flag setFlagTexture format ["\a3\data_f\flags\%1.paa", _fileFlag];
    },
    [],
    _duration, // HERE IS THE PARAMVALUE FROM MISSION PARAMETERS, PASSED AS A LOCAL VARIABLE
    1.5,
    false
] call BIS_fnc_holdActionAdd;

Point is, something being present in the mission parameters doesn't matter much if there isn't another script retrieving the variable and doing something with it. Same thing applies to the 2x param.

I am assuming that CP is your mission's currency. Any currency system is going to be mission specific, created for that mission. As far as Arma is concerned, currency doesn't exist and there is no built in currency system in Arma 3.

Disabling player fatigue is easy enough, though from what I found with a quick Google search, fatigue is antiquated and it'd probably be better to disable player stamina.

In description.ext, I'd add another param to the params section:

class Params
{
    //Changes speed of holdaction that captures the flag
    class NUP_flagCapSpeed 
    {
        title = "Flag Capture Speed";
        values[] = {1, 10, 15, 30};
        texts[] = {"1 second (Testing)", "10 seconds", "15 seconds", "30 seconds"};
        default = 1;
    };

class TAG_myNewPlayerStaminaParam // THIS IS THE NEW STAMINA VARIABLE WE WILL RETRIEVE IN ONPLAYERRESPAWN.SQF
    {
        title = "Player Stamina";
        values[] = {true, false};
        texts[] = {"enabled", "disabled"};
        default = false;
    };

};


Then, in onPlayerRespawn.sqf:

params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"];
_staminaSetting = ["TAG_myNewPlayerStaminaParam", false] call BIS_fnc_getParamValue;
_newUnit enableStamina _staminaSetting;

So as you can see, it's a bit more involved than just selecting a value. Please post your code so that someone can help point you in the right direction.

  • Like 1

Share this post


Link to post
Share on other sites

Interesting, but not what I was asking about. The Init module of Warlords scenarios doesn't really do much.

Mostly it is answered here: https://community.bistudio.com/wiki/Arma_3:_MP_Warlords
 

1. Parameters
If you enable these Parameters in your scenario, players will be able to tweak and override the scenario rules set up in the Init module.
Save your scenario via Scenario > Save As... from the toolbar at the top of the screen.
Name the scenario, select the MPMissions folder and hit Save.
Switch to your desktop and open your scenario folder. You can find it in Documents\Arma 3\MPMissions\ (you should see a file called mission.sqm here).
Inside this folder, create a file called description.ext.
Copy/paste this text into the file and save it:


class Params
{

    class BIS_WLFatigueEnabled
    {
        title = "$STR_A3_fatigue1";
        values[] = { 1, 0 };
        texts[] = { "$STR_DISP_OPT_ENABLED", "$STR_DISP_OPT_DISABLED" };
        default = 1;
    };

 

... 
 

    };
};

 

  • Confused 1

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

×