Jump to content
shay_gman

MCC Sandbox 3 - Dynamic mission creating tool for ArmA 3

Recommended Posts

Free landing evac is controlled by ArmA AI so it is up to the AI to find a safe spot to land - so pick a decent place for this or use another insertion such as fast ropes.

The grenade changing is bind to the "hold breath/zoom" key binds - find out which key you have bind to it and use it to cycle between grenades.

No, no. It lands everytime, it works just fine. But helo often does not take off and fly back to base. I have to manually order it to return to base (via MCC or Console) but it takes time.

Share this post


Link to post
Share on other sites
So I was busy getting merried and such so it is time to go back for work :)

I'm still looking for a nice clan/squad that are European based and using MCC regularly to play with and to do some testing so if you know of any - please let me know.

Let's double that; we might even end up again on the same game again shay :) hahaha

Share this post


Link to post
Share on other sites
I'm still looking for a nice clan/squad that are European based and using MCC regularly to play with and to do some testing so if you know of any - please let me know.

Count me in!:-) Steam invitations sent.

Edited by sunrrrise

Share this post


Link to post
Share on other sites
It's Podagorsk from Arma 2

already tried to download but found I tried this FDF_Podagorsk_v11, but the ArmA 3 latch

Share this post


Link to post
Share on other sites
Originally Posted by EulerFoiler View Post

Is there a way to spawn AI directly onto a headless client from the Mission Generator and for the Occupy Zone functionality? I wrote a script that every minute will pass any AI units on the server to the HC while preserving waypoints but the units seem to just stop cold after the hand-off. Passing these "stopped" AI to GAIA results in GAIA assigning new waypoints but the AI will not move to perform them. They will however react to enemies so they do retain some functionality. Using the Spawn functionality in a zone while selecting Headless Client for location appears to work well. Overall, awesome work and thank you! Best of luck with Make Arma Not War!

No there isn't. But spirit is working on auto balance for HC and i'll add an option to the Mission Generator to spawn on HC.

Thanks for considering the option in the Mission Generator! If it helps at all, I would be happy to donate the script that I wrote to round-robin load balance AI across up to three headless clients (in my testing, it also handles one or more HCs disconnecting and reconnecting). Please note that this currently only works on the Dev branch! It uses a function that is not yet available on the stable branch (setGroupOwner) but should be introduced in the next official Arma 3 version (1.4 -- we're currently on 1.38). It does make the assumption that headless clients placed in the mission editor are named "HC", "HC2", and "HC3". There should be no harm in using the script when no HCs are present either and only needs to be run on the server itself (no need to bog down players and HCs :)). Additionally, I found with large amounts of AI the number of dead bodies really starts to hurt a server's CPS/FPS so it will also automatically clean up dead bodies and destroyed vehicles when the sum of the two is greater than 50 (configurable). Please feel free to take any or all of it for your purposes. I would ask that if any improvements are made to it, maybe send it my way too please :cool:

/*
* passToHCs.sqf
*
* In the mission editor, name the Headless Clients "HC", "HC2", "HC3" without the quotes
*
* In the mission init.sqf, call passToHCs.sqf with:
* execVM "passToHCs.sqf";
*
* It seems that the dedicated server and headless client processes never use more than 20-22% CPU each.
* With a dedicated server and 3 headless clients, that's about 88% CPU with 10-12% left over.  Far more efficient use of your processing power.
*
*/

if (!isServer) exitWith {};

diag_log "passToHCs: Started";

waitUntil {!isNil "HC"};
waitUntil {!isNull HC};

_HC_ID = -1; // Will become the Client ID of HC
_HC2_ID = -1; // Will become the Client ID of HC2
_HC3_ID = -1; // Will become the Client ID of HC3
sleepTimer = 60;  // Rebalance sleep timer in seconds
cleanUpThreshold = 50; // Threshold of number of dead bodies + destroyed vehicles before forcing a clean up

diag_log format["passToHCs: First pass will begin in %1 seconds", sleepTimer];

while {true} do {
 // Rebalance every sleepTimer seconds to avoid hammering the server
 sleep sleepTimer;

 // Do not enable load balancing unless more than one HC is present
 _loadBalance = false;

  // Get HC Client ID else set variables to null
  try {
   _HC_ID = owner HC;

   if (_HC_ID > 2) then {
     diag_log format ["passToHCs: Found HC with Client ID %1", _HC_ID];
   } else { 
     diag_log "passToHCs: [WARN] HC disconnected";

     HC = objNull;
     _HC_ID = -1;
   };
 } catch { diag_log format ["passToHCs: [ERROR] [HC] %1", _exception]; HC = objNull; _HC_ID = -1; };

 // Get HC2 Client ID else set variables to null
 if (!isNil "HC2") then {
   try {
     _HC2_ID = owner HC2;

     if (_HC2_ID > 2) then {
       diag_log format ["passToHCs: Found HC2 with Client ID %1", _HC2_ID];
     } else { 
       diag_log "passToHCs: [WARN] HC2 disconnected";

       HC2 = objNull;
       _HC2_ID = -1;
     };
   } catch { diag_log format ["passToHCs: [ERROR] [HC2] %1", _exception]; HC2 = objNull; _HC2_ID = -1; };
 };

 // Get HC3 Client ID else set variables to null
 if (!isNil "HC3") then {
   try {
     _HC3_ID = owner HC3;

     if (_HC3_ID > 2) then {
       diag_log format ["passToHCs: Found HC2 with Client ID %1", _HC3_ID];
     } else { 
       diag_log "passToHCs: [WARN] HC3 disconnected";

       HC3 = objNull;
       _HC3_ID = -1;
     };
   } catch { diag_log format ["passToHCs: [ERROR] [HC3] %1", _exception]; HC3 = objNull; _HC3_ID = -1; };
 };

 // If no HCs present, wait for HC to rejoin
 if ( (isNull HC) && (isNull HC2) && (isNull HC3) ) then { waitUntil {!isNull HC}; };  

 // Check to enable Round-Robin load balancing strategy
 if ( (!isNull HC && !isNull HC2) || (!isNull HC && !isNull HC3) || (!isNull HC2 && !isNull HC3) ) then { _loadBalance = true; };

 if ( _loadBalance ) then {
   diag_log "passToHCs: Starting load-balanced transfer of AI groups to HCs";
 } else {
   // No load balancing
   diag_log "passToHCs: Starting transfer of AI groups to HC";
 };

 // Determine first HC to start with
 _currentHC = 0;

 if (!isNull HC) then { _currentHC = 1; } else { 
   if (!isNull HC2) then { _currentHC = 2; } else { _currentHC = 3; };
 };

 // Pass the AI
 _numTransfered = 0;
 {
   _swap = true;

   { if (isPlayer _x) then { _swap = false; }; } forEach (units _x);

   // If load balance enabled, round robin between the HCs - else pass all to HC
   if ( _swap ) then {
     _rc = false;

     if ( _loadBalance ) then {
       switch (_currentHC) do {
         case 1: { _rc = _x setGroupOwner _HC_ID; if (!isNull HC2) then { _currentHC = 2; } else { _currentHC = 3; }; };
         case 2: { _rc = _x setGroupOwner _HC2_ID; if (!isNull HC3) then { _currentHC = 3; } else { _currentHC = 1; }; };
         case 3: { _rc = _x setGroupOwner _HC3_ID; if (!isNull HC) then { _currentHC = 1; } else { _currentHC = 2; }; };
         default { diag_log format["passToHCs: [ERROR] No Valid HC to pass to.  _currentHC = %1", _currentHC]; };
       };
     } else {
       switch (_currentHC) do {
         case 1: { _rc = _x setGroupOwner _HC_ID; };
         case 2: { _rc = _x setGroupOwner _HC2_ID; };
         case 3: { _rc = _x setGroupOwner _HC3_ID; };
         default { diag_log format["passToHCs: [ERROR] No Valid HC to pass to.  _currentHC = %1", _currentHC]; };
       };
     };

     // If the transfer was successful, count it for accounting and diagnostic information
     if ( _rc ) then { _numTransfered = _numTransfered + 1; };
   };
 } forEach (allGroups);

 if (_numTransfered > 0) then {
   // More accounting and diagnostic information
   _numHC = 0;
   _numHC2 = 0;
   _numHC3 = 0;

   {
     if ( _HC_ID != -1 ) then { if ( (owner ((units _x) select 0)) == _HC_ID ) then { _numHC = _numHC + 1; }; };
     if ( _HC2_ID != -1 ) then { if ( (owner ((units _x) select 0)) == _HC2_ID ) then { _numHC2 = _numHC2 + 1; }; };
     if ( _HC3_ID != -1 ) then { if ( (owner ((units _x) select 0)) == _HC3_ID ) then { _numHC3 = _numHC3 + 1; }; };
   } forEach (allGroups);

   diag_log format ["passToHCs: Transfered %1 AI groups to HC(s)", _numTransfered];

   if (_numHC > 0) then { diag_log format ["passToHCs: %1 AI groups currently on HC", _numHC]; };
   if (_numHC2 > 0) then { diag_log format ["passToHCs: %1 AI groups currently on HC2", _numHC2]; };
   if (_numHC3 > 0) then { diag_log format ["passToHCs: %1 AI groups currently on HC3", _numHC3]; };

   diag_log format ["passToHCs: %1 AI groups total across all HC(s)", (_numHC + _numHC2 + _numHC3)];
 } else {
   diag_log "passToHCs: No rebalance or transfers required this round";
 };

 // Force clean up dead bodies and destroyed vehicles
 if (count allDead > cleanUpThreshold) then {
   _numDeleted = 0;
   {
     deleteVehicle _x;

     _numDeleted = _numDeleted + 1;
   } forEach allDead;

   diag_log format ["passToHCs: Cleaned up %1 dead bodies/destroyed vehicles", _numDeleted];
 };
};

Edited by EulerFoiler

Share this post


Link to post
Share on other sites

As a futur feature, do you think i would be possible to have an auto "ambiant citizen life" ?

Share this post


Link to post
Share on other sites

@eulerfoiler

Thank you for your work! But your script is too early for its time. Right now we have still no greater ai script like ALiVE, GAIA or Upsmon supporting ai groups on different HC. And even MCC is not working correctly with HC.

So I want to see in MCC in the future a better GAIA system and supporting all kinds of headless clients. Bevor that is not happening you need a small army of Zeus player to organise the enemy

Share this post


Link to post
Share on other sites

Hi

i found littele problem mcc with place the ambush

the direction when you place ambush (arrow) is turn 90° degree more at right

example when you make line to 180° the arrow position of you unit take 270°

and if you could add in delete brush unlock doors

thank you for this Great Mod

@+

best regards

Share this post


Link to post
Share on other sites

Hi,

Is it possible to call MCC_fnc_MWSpawnInZone and MCC_fnc_buildRoadblock on the server directly (as opposed to using the console)?

When the mission starts, I have markers converts to zones using MCC_fnc_MWUpdateZone. Ideally, I would like to spawn random infantry, etc. in these zones without any player interaction.

Is this possible?

Thanks

Share this post


Link to post
Share on other sites

@shay_gman

my problem is addon units not showing up in the mcc zeus editor.

the first picture shows me in the editor with all the addon units showing up, and the second pictures shows me in a mission with the addon units missing.

Stuff like RHS escalation do not show up

http://steamcommunity.com/sharedfiles/filedetails/?id=396380694

custom units showing up in mcc zeus

http://steamcommunity.com/sharedfiles/filedetails/?id=396380713

custom units missing from mcc zeus

Share this post


Link to post
Share on other sites

I use AGM and MCC as well, and there is no light injury neither at the start nor after proper treatment.

Share this post


Link to post
Share on other sites
I apologize that I didn't read 345 forum pages. Nevertheless I noticed that the features can be turned off. However by default they are enabled. Wouldn't it be better to disable some of them by default? People who know about and want to use said features could simply enable them. Everyone else wouldn't be bothered.

NP, I understand you are using the mission version which is kind of show case - in the mod version every thing is off by default unless you used the modules. You can find info in the MCC Wiki and maybe even help us expend it: http://mccsandbox.wikia.com/wiki/MCCSandbox_Wiki

One thing I've been wondering, though I'm sure its a longshot just for complexity alone; have you looked into improving the weather system to have the sandstorms and blizzards have a scaling feature that would allow the mission maker to have a light snow increase to a full blizzard over an hour or something? I know the default 2D editor has ability to set something similar with rain. Would love to hear if it's even possible with the weather from MCC or if the way its implemented makes it impossible.

I'll take a look on it.

Hello Shay, I was wondering if you could help me out. Is there a way I can make the EVAC chopper or even the evac vehicles immune to damage? I don't know where the script is or how I would go about editing it. I can spawn vehicles through the 3d editor and have them immune. Thanks in advance.

I'll try to remeber to add an option to make the vehicle immune in the next update.

No, no. It lands everytime, it works just fine. But helo often does not take off and fly back to base. I have to manually order it to return to base (via MCC or Console) but it takes time.

Evac helicopter will automaticlly RTB when it has a cargo when he took off and there is zero cargo 30 seconds or so after reaching the LZ.

Count me in!:-) Steam invitations sent.

Thanks i'll try to arrange some game night.

Hi

i found littele problem mcc with place the ambush

the direction when you place ambush (arrow) is turn 90° degree more at right

example when you make line to 180° the arrow position of you unit take 270°

and if you could add in delete brush unlock doors

thank you for this Great Mod

@+

best regards

Thanks i'll look into it.

Hi,

Is it possible to call MCC_fnc_MWSpawnInZone and MCC_fnc_buildRoadblock on the server directly (as opposed to using the console)?

When the mission starts, I have markers converts to zones using MCC_fnc_MWUpdateZone. Ideally, I would like to spawn random infantry, etc. in these zones without any player interaction.

Is this possible?

Thanks

Yes you can call MCC functions from a script just read the function description and learn how to use it.

@shay_gman

my problem is addon units not showing up in the mcc zeus editor.

the first picture shows me in the editor with all the addon units showing up, and the second pictures shows me in a mission with the addon units missing.

Stuff like RHS escalation do not show up

http://steamcommunity.com/sharedfiles/filedetails/?id=396380694

custom units showing up in mcc zeus

http://steamcommunity.com/sharedfiles/filedetails/?id=396380713

custom units missing from mcc zeus

Oh I see you are talking about Zeus in MCC - i'll check how to add addons to Zeus but I can't promise.

@shay_gman

I've asked this into AGM thread and someone replied me in this way.

Is it true? Is it a bug or is it correct due to some MCC configuration?

I find it hard to believe that it has to do with MCC and if so it can only come from the medical system which you shouldn't run with AGM or another medical system together.

Share this post


Link to post
Share on other sites

@shay_gman

Don't worry. In the AGM thread someone confirm that it happens also without MCC. Probably it's a problem related with an AGM medical option.

Share this post


Link to post
Share on other sites

Yes you can call MCC functions from a script just read the function description and learn how to use it.

Hi shay,

I did look up the functions and was able to spawn roadblocks and units in zones when executing on the local machine, but executing in a dedicated server causes errors:

Spawning infantry in zones...

[1,"GROUP","LAND",true,"BUS_InfSquad",'configFile >> "CfgGroups" >>"West">>"BLU_F">>"Infantry">>"BUS_InfSquad"',"NOFOLLOW","Security Patrol"] call MCC_fnc_MWSpawnInZone;

... Error...

"MCC: attemping to spawn"

Error in expression <e select (mcc_zone_number)) select 1)

, mcc_sidename

, player

, mcc_request

, mc>

Error position: <mcc_sidename

, player

, mcc_request

, mc>

Error Undefined variable in expression: mcc_sidename

File mcc_sandbox_mod\mcc\general_scripts\mcc_SpawnStuff.sqf, line 328

Error in expression <mcc_iszone_update) then

{

if (TypeName _p_mcc_grouptype != "STRING") then {_p_m>

Error position: <_p_mcc_grouptype != "STRING") then {_p_m>

Error Undefined variable in expression: _p_mcc_grouptype

File mcc_sandbox_mod\mcc\pv_handling\mcc_pv_handler.sqf, line 155

Spawning roadblocks creates the structure, but not the units:

[(getMarkerPos "roadBlock1"), 90, 'configFile >> "CfgGroups" >>"West">>"BLU_F">>"Infantry">>"BUS_InfSquad"', West] call MCC_fnc_buildRoadblock;

...error...

Error in expression <oup _side};

_unit = _group createUnit [_type select 0,_spawnPos,[],0.5,"NONE"];>

Error position: <_type select 0,_spawnPos,[],0.5,"NONE"];>

Error Undefined variable in expression: _type

File mcc_sandbox_mod\mcc\fnc\general\fn_garrison.sqf, line 79

Are there variables I need to set first which define the faction (perhaps these functions are looking for the values set by the drop down box in the console?)? Or, maybe I'm doing something else wrong..

Thanks in advance!

Share this post


Link to post
Share on other sites
So I was busy getting merried and such so it is time to go back for work :)

The good news is that we are working on the same goals.

You'll need to have inidbi mod running on the server for the survival and then by using the interaction key (holding it) over map objects such as wrecks, trash cans exc on the map the unit will start looking for something to scavenge - the items/weapons drops are randomly from the addons that the server is running.

Then you can turn in the items that you have scavenged to the HQ shared box (just a box next to the HQ - start location).

When a player turns in items he gets valor points that he can spend by taking items from the shared box - the catch is that it costs more valor points to get an item then you'll get from giving an item - so you'll need to contribute to the community more then you can take from it.

For example: You have found 4 sniper rounds mags you'll turn them in for 2 5.56mm rounds because you are using an assault rifle but the sniper in your group will need to give 6 5.56mm or equivalent items to get this 4 mags - hope it is clear.

By turning in items you'll also give resources to the group as turning in fuel cans will increase the fuel resources and turning in mags will increase the ammo resources then later the commander can use to build new structures or upgrading them - WIP the rts elements in the commander menu.

Thanks for the reply Shay, good to know we are working on the same thing. Definitely one of the features that me and my group look forward to the most.

May I suggest a feature to consider for your road map to survival is potentially a pool of items that survival will choose from? Especially if this pool could be created from an existing GUI such as aresenal/zeus and the probability of the items being spawned could also be controlled. Just a few thoughts.

Share this post


Link to post
Share on other sites

Does anyone else get the bug that when you set the mission settings to "Save Gear" players often respawn without a primary, launcher and even some times not even a secondary?

Everything else seems to save like clothes, vests, helmet and backpack but the weapons seems to disappear.

Share this post


Link to post
Share on other sites
Hi shay,

I did look up the functions and was able to spawn roadblocks and units in zones when executing on the local machine, but executing in a dedicated server causes errors:

Spawning infantry in zones...

[1,"GROUP","LAND",true,"BUS_InfSquad",'configFile >> "CfgGroups" >>"West">>"BLU_F">>"Infantry">>"BUS_InfSquad"',"NOFOLLOW","Security Patrol"] call MCC_fnc_MWSpawnInZone;

... Error...

"MCC: attemping to spawn"

Error in expression <e select (mcc_zone_number)) select 1)

, mcc_sidename

, player

, mcc_request

, mc>

Error position: <mcc_sidename

, player

, mcc_request

, mc>

Error Undefined variable in expression: mcc_sidename

File mcc_sandbox_mod\mcc\general_scripts\mcc_SpawnStuff.sqf, line 328

Error in expression <mcc_iszone_update) then

{

if (TypeName _p_mcc_grouptype != "STRING") then {_p_m>

Error position: <_p_mcc_grouptype != "STRING") then {_p_m>

Error Undefined variable in expression: _p_mcc_grouptype

File mcc_sandbox_mod\mcc\pv_handling\mcc_pv_handler.sqf, line 155

Spawning roadblocks creates the structure, but not the units:

[(getMarkerPos "roadBlock1"), 90, 'configFile >> "CfgGroups" >>"West">>"BLU_F">>"Infantry">>"BUS_InfSquad"', West] call MCC_fnc_buildRoadblock;

...error...

Error in expression <oup _side};

_unit = _group createUnit [_type select 0,_spawnPos,[],0.5,"NONE"];>

Error position: <_type select 0,_spawnPos,[],0.5,"NONE"];>

Error Undefined variable in expression: _type

File mcc_sandbox_mod\mcc\fnc\general\fn_garrison.sqf, line 79

Are there variables I need to set first which define the faction (perhaps these functions are looking for the values set by the drop down box in the console?)? Or, maybe I'm doing something else wrong..

Thanks in advance!

Actually, I believe I figured it out:

1) I need to set the mcc_sidename variable server-side prior to calling the spawninzone function (as this gets passed ultimately to the pv_handler and is mapped to _p_mcc_grouptype locally).

2) For roadblocks, one has to pass in a constant not a string for side: EAST as opposed to "EAST"

Is this correct?

Thanks

Share this post


Link to post
Share on other sites

Hello,

How can I get rid of the MCC EOD Menu popping up at the start of a mission, Sorry for asking a question that has probably been asked many of times!

Share this post


Link to post
Share on other sites

Thanks for the reply on no damage for the evac heli Shay. If you're not able to that's ok, I know you're a busy person!

Share this post


Link to post
Share on other sites

Hey Shay,

I'm having a issue with the mission settings.

It seems that any modification that I do on the settings are not saved.

I tested many times using only CBA and MCC R12 and I'm hitting on the save button of course.

Funny is that I was able to save before.

Where I can find the file that my settings are saved?

I hope you can help me on that!

Many thanks!

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

×