How To Setup a Headless Client

  1. ‹ Older
  2. last year

    I'd have to assume placeholders but again, I've never bothered with HC after getting a new and decent rig. Let me know how it goes though! I'm still curious to try it!

  3. hello !

    maybe for once i can be useful !
    i succesfully set up an headless client for ALiVE for my dedicated server, i will report here what i did :

    • place in your edited mission map a virtual entity named "headless client" (F5-logicEntities-VirtualEntity-Headless client). you MUST give it a name (variable name) and make it PLAYABLE.
    • go to "ALiVE module (required) " and set it "AI distribution" to "Headless" .
    • use TADST tool to set up the dedicated server, and check the box "headless client", and set up your IP 127.0.0.1 for "Local client", and the same IP in "HC IPs" if you run the headless from the same machine.

    if you run headless from a different machine, use its IP.
    -create a link to the arma3.exe or arma3server.exe, like this (its an example, modify to match your mods and root folder) , and run it :

    "C:\GAMES\Steam\steamapps\common\Arma 3\arma3server.exe" -client -connect=2.225.62.176 -mod=Curator;Heli;Kart;@ace;@ALiVE;@CBA_A3

    where the IP 2.225.62.176 is the IP of the machine running the server.
    to see the headless connected you must be admin (write " #login password " in game chat to get admin right, where "password" is what you set in TASDT).

    hope i explained it right!

  4. Thanks for the info guys really appreciate it! However the server provider Im with doesn't allow headless clients or running .bat's :(

  5. is not a problem ! you can run headless client from other machines, like your own PC or your friends one!
    on a quad core its suggested to use 2 cores for headless and 2 cores for your arma3.exe gaming !

  6. Edited last year by JayS_NL

    @DLEGION

    I've followed your steps to the letter, but the HC's arent taking over on my end.

    Long story short: it's in the CFG's, i see the HC's connect in game and slot themselves, but i dont see the load being taken off. Server is dedicated, HC's connect externally.
    Three HC modules (HC1,HC2,HC3), Alive Required ai distri set to HC, yet in the init i get:
    14:39:05 ALIVE AI Distributor exiting, no headless clients [] or not server false

    when the HC connects succesfully, i see this pop up in the log:
    14:40:49 Unaccessible
    14:40:49 Setting invalid pitch 0.0000 for HC

    No offloading. but HC is connected.

    Any clues?

    Edit:

    Found it. The hosted server had AutoInit enabled. Turn this off if you have it, then connect the HC's, then the (first) player(s). And go!

    Edit2:
    ALIVE AI Distributor switching group B Delta 2-3 to HC HC <-- it's working, but it's not dividing them between HC HC2 and HC3, just all to the first HC. What's going on there?

  7. Not sure might have to look at logs. If possible can you post the RPT files from the dedicated server as well as your HCs? If it makes it easier just try 2 HCs instead of 3.

  8. Edited last year by Whigital

    Had the same problem, 2 HCs connected on mission load, but only 1 used when AI got distributed. Took a look at the variable "headlessClients", and it only contained 1 HC.

    Executed the following from the debug console to get both HCs in the array:

    headlessClients = [];
    
    {
    	if ((typeOf _x) == "HeadlessClient_F") then
    	{
    		headlessClients pushBack _x;
    	};
    } forEach allPlayers;

    With both HCs in the array, it worked as expected, groups got distributed to both HCs, but could never figure out why only 1 HC got added to the array at start. Ended up modifing the ai distribution script and this was the result.

    http://pastebin.com/C3ATm7UB

    Works like a treat, you dont need to have HCs connected at start, and you can stop and start HCs mid mission. All credit to the ALiVE team for the base code, just modified it a bit to suite our needs.

  9. highhead

    19 Oct 2016 Administrator
    Edited last year by highhead

    props @whigital, exactly that. somehow the second HC isn't visible when the init executes that part of code, thats why only the first one is in that headlessClients array. The cause of that could/should be investigated (suspecting a race condition as always with the RV engine esp. as we use the module_f framework in scheduled for init; bad choice at the start) but unfortunatly I am inactive at the moment, so OP please stick to whigital's workaround. That function is perfect, still I would only call it every few minutes or so.

  10. Edited last year by JayS_NL

    @SavageCDN yeah, i got it fixed by waiting for all HC's to connect and load prior to launching the actual mission, but with @Whigital 's solution that would be way nicer so they can actually just connect whenever, will try it later when i get home.

  11. Edited last year by JayS_NL

    @Whigital

    running your script:

    21:46:46 Error Undefined variable in expression: ff7_fnc_debuglog 21:46:46 File mpmissions\__cur_mp.Kunduz\scripts\HC_distributor.sqf, line 69 21:46:49 Error in expression <unt (units _x)), (name _currHC)])] call FF7_fnc_debugLog; }; }; sleep 1; } for> 21:46:49 Error position: <FF7_fnc_debugLog; }; }; sleep 1; } for>

  12. @JayS_NL Those are calls to a log function (FF7_fnc_debugLog) in our function library. Just comment out those lines (17, 28 and 69) and you should be good.

  13. @Whigital commented those lines out:

    19:52:05 ["SYS_STATS: PLAYER UNIT NOT FOUND IN PLAYABLEUNITS"]
    19:52:05 Wrong player index passed to NetworkObjectInfo::GetPlayerObjectInfo - max=3, received=4

    the last line keeps spamming..

  14. Don't think that is coming from the script. The first line looks like something from ALiVE_Sys_Stats module, and the second one from Arma itself.

    If you start the mission without running the script, do these two dissapear from the logs ?

  15. @Whigital, correct. As soon as i remove it, i'm not seeing any of that anymore.
    The sys_stats does pop up when first connecting the HC's, but w/o the script, it's all fine. I can run it once and post you an RPT if you like?

  16. Hmm, are are starting it in initServer.sqf with execVM or spawn ?

    We haven't seen anything like this in the server rpt/log. Complete line we use in initServer.sqf:

    _null = [] spawn (compile (preprocessFileLineNumbers "func\ff7_aiDistributor.sqf"));
  17. Yeah, that fixes the errors, but;

    3:06:54 Error in expression <Distributor = [_check_interval] spawn
    {
    params ["_interval", 30];
     
    private ["_cu>
     3:06:54   Error position: <params ["_interval", 30];
     
    private ["_cu>
     3:06:54   Error Type Number, expected Array,String
     3:06:54 File mpmissions\__cur_mp.Kunduz\scripts\HC_distributor.sqf, line 32
     3:07:02 Error in expression <Distributor = [_check_interval] spawn
    {
    params ["_interval", 30];
     
    private ["_cu>
  18. My bad, made some last minute changes and didnt try it.

    Change line 32 params ["_interval", 30]; to params [["_interval", 30]]; and it should be fine.

  19. @Whigital My bad, made some last minute changes and didnt try it.

    Change line 32 params ["_interval", 30]; to params [["_interval", 30]]; and it should be fine.

    Works like a treat, you da man!

  20. 5 months ago

    Does anyone know how to install a HC with linux/ubuntu?

  21. 4 months ago

    So Im using the command with the correct ip and password

    ./arma3server -client -connect=xxx.xxx.xx.xxx -password=xxxxxx -mod=mods/@cba\;mods/@modpack\;mods/@rhsusaf\;mods/@rhsafrf\;mods/@ace\;mods/@alive\;mods/@jbad\;mods/@lythium\;mods/@projectopfor\;mods/@spyderaddons\;mods/@taskforceradio\;mods/@tfwradios\;mods/@bloodlust\;mods/@isc\;mods/@iscivs\;mods/@rhsgref\;mods/@rhssaf

    and the HC connects and then after a few minutes it gets

    Segmentation fault (core dumped)

 

or Sign Up to reply!