EulerFoiler
Member-
Content Count
9 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout EulerFoiler
-
Rank
Private
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
MCC Sandbox 3 - Dynamic mission creating tool for ArmA 3
EulerFoiler replied to shay_gman's topic in ARMA 3 - ADDONS & MODS: COMPLETE
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]; }; }; -
MCC Sandbox 3 - Dynamic mission creating tool for ArmA 3
EulerFoiler replied to shay_gman's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Looks like the AI "stopping" is a known issue that should be fixed in the next Arma 3 update. The other questions still stand regarding spawning directly onto the Headless Client with the Mission Generator and Occupy Zone functionality. Thanks again!! -
MCC Sandbox 3 - Dynamic mission creating tool for ArmA 3
EulerFoiler replied to shay_gman's topic in ARMA 3 - ADDONS & MODS: COMPLETE
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! -
large [SP/MP][COOP] Patrol Operations - Official Thread
EulerFoiler replied to roy86's topic in ARMA 3 - USER MISSIONS
Ah, oops. First question: That path is correct for the .pbo Second question: The name of the mission as you see it in the in-game menus is actually set inside the mission either in the Editor or in the code, despite the different name for the actual modified pbo file. With the modified pbo in the common\arma3\mpmission\ directory, I would remove the original pbo to avoid confusion in-game. Assuming you still have the original archive, you can always restore the original if you need to. I've been also running the @nato_russian_sf_weapons mod (among others) but I don't want to derail off this excellent mission's thread. Hope that helps! -
large [SP/MP][COOP] Patrol Operations - Official Thread
EulerFoiler replied to roy86's topic in ARMA 3 - USER MISSIONS
In the 7z archive that you download, there should be a folder called 'Unpacked'. Decompress and make a copy of the mission you want to edit (for example, cox_patrol-ops-3-01-nato.altis) and then open that copied folder. Inside that folder, there should be another folder named 'scripts'. Now download VAS from http://www.armaholic.com/page.php?id=19134. In the VAS zip archive, there should also be a folder, 'scripts'. Inside that 'scripts' folder, click and drag (decompress) the VAS folder on top of to replace the mission's VAS folder and contents in the first 'scripts' folder. Now you have to make two quick edits to the file 'scripts\VAS\functions\fn_mainInit.sqf'. Change both occurrences of 'VAS\config.sqf' to 'scripts\VAS\config.sqf' and save. Finally, PBO that whole mission directory was something like cpbo which you can find here: http://www.armaholic.com/page.php?id=411. Good luck! Edit: Btw, this is to enable all the weapons through the Virtual Ammobox System. -
I'm so glad this mission is still being actively developed. Props to all involved!! Thank you from myself and my players for the quality product! I did write a script last night that would convert all Alpha names to Beta for all files (not just sqm)....but I relearned a valuable lesson with rm after deleting the script by accident after I converted my Occupation files. I am disappointed because I intended to share the script with others (it was a bash script under Linux).
-
Correct me if I'm wrong, but are you saying that you copied and pasted each line into Notepad++ and replaced in all files? For example: [copy]arifle_Khaybar_C_ACOg_point_F [paste into find] [copy]arifle_Katiba_C_ACO_pointer_F [paste into replace] For every single line item in Weapon Replacement Names, Vehicle Replacement Names, Class Mission replacement names, Weapon Ammo Class changes, and Scripting Command Changes? Surely there is a better way, seems incredibly time consuming!
-
The tool worked great for me! Since it wasn't exactly clear to me at first, just want to say for others that only the mission.sqm file needs to be converted it seems not every .sqf file. Thanks!!
-
Did this mission stop working for anyone else as soon as they updated to the Beta? Dedicated server console spews "Mission Occupation_V4_2.Stratis read from bank." non stop and players can't connect. I am running the vanilla beta build now with no mods (server or client side). This mission is amazing and I would love to get it back up ASAP! Also worth mentioning, some of my players mentioned that they received a side mission to recover a vehicle but it was underwater...I was unable to confirm myself though. Additionally some grids can't seem to be cleared...not sure if AI spawn inside a rock or something but my players have reported thoroughly searching areas but they wouldn't turn green (most do...only a few are "perma-red"). Thanks for a great mission and hope to get it back up!