How To Setup a Headless Client

  1. 7 years ago

    I am going to try setting up a headless client on my dedicated server but Ive read several different methods spanning over the last year or so which has confused me a bit. Right now in its current state, how do I setup a headless client on a dedicated server?

    Thanks!

  2. Edited 7 years ago by HeroesandvillainsOS

    http://alivemod.com/forum/1692-headless-client-setup/0

    Never tried it myself but first things first, place a Headless Client module in the mission on the map, title it HC and make it playable.

    Then follow the steps in the link above and let me know how it goes!

    In the link above there's another link to a post from Dixon13 which should have the steps to get you up and running.

  3. Edited 7 years ago by Opendome

    Great thanks! That was one the the threads I saw but then I saw another one where you right click on arma3.exe on the server open taks manager and assign it cores etc. Just asking because the other method is over a year old. So this is the current method?

  4. Hmmm...not sure on the HC location for 2D but I'd think it would be its own module just like it is in 3D. I'm not at home but it should be somewhere in the module options.

    For this being the best or most up-to-date method, I can't say. But I think my thread on HC is the newest as far as ALiVE threads go so it should be ok.

  5. Awesome thanks!

    I was wondering for the "-port=**** -client -nosound -password=****" is that they way the port and password are supposed to look or are the asterisks placeholders?

  6. 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!

  7. 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!

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

  9. 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 !

  10. Edited 7 years ago 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?

  11. 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.

  12. Edited 7 years ago 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.

  13. highhead

    19 Oct 2016 Administrator
    Edited 7 years ago 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.

  14. Edited 7 years ago 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.

  15. Edited 7 years ago 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>

  16. @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.

  17. @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..

  18. 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 ?

  19. @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?

  20. 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"));
  21. Newer ›
 

or Sign Up to reply!