Jump to content
Dwarden

Dedicated Client / Headless Client feedback (dev branch)

Recommended Posts

In other news I attempted to auto-detect the headless client and have had very little luck =/

I created a custom function and set postInit=1 via:

class HeadlessClient
{
tag = "HeadlessClient";
class HeadlessClient_functions
{
	file = "HC";
	class headlessCheck { postInit = 1; };
};
};

and the file "HC\fn_headlessCheck.sqf" looks like so:

if (!hasInterface && !isServer) then{
HeadlessClientPresent = True;
publicVariable "HeadlessClientPresent";
};

now inside of init.sqf I have:

waitUntil{!(isNil "BIS_fnc_init")};

if(!(isNil "HeadlessClientPresent")) then{
if(!hasInterface && !isServer) then{
	[] spawn _spawnUnits;
};
}
else{
if(isServer) then{
	[] spawn _spawnUnits;
};
};

However, the units always spawn on the server which results in double spawning (1xServer + 1xHC). When you are dropped into the game HeadlessClientPresent is indeed set to True, but when init.sqf is executed it has yet to be defined on all clients/servers except for the HC. According to the wiki's article on initialization order all functions with postInit=1 should be executed before BIS_fnc_init is defined - this may indeed be happening, but why is publicVariable not broadcasting HeadlessClientPresent until after init.sqf is executed?

Or, is this a case of the HC loading the mission after the other clients?

The order of initialisation is not precise. In my experience init.sqf runs before postInit = 1;

Share this post


Link to post
Share on other sites

Does anyone have problems with AI not recognizing player after respawn? I was testing HC with VTS 4.0 and everything was ok, but when I respawned they did not shoot at me anymore.

Share this post


Link to post
Share on other sites
Same thing with allGroups. allGroups on server != allGroups on HC

Only groups local to machine are detected.

This doesn't mean you can create more than 144 per side though. Game still detects and vetoes that.

This presents issues then, for removal of bodies. After a global exec of {deleteVehicle _x;} count allDeadMen, there were still three bodies left over which have escaped all locality and not accessible.

Also remote bodies underwater (say, a helicopter goes down with players on board, and their bodies sink, then the vehicle gets deleted) are not accessible by the server most of the time.

A re-think on body removal then has to be done, on how to do it most efficiently and most thoroughly.

It works great when everything created on server, I can delete allDeadMen select 0 to remove bodies on an oldest-first basis. However this is not so robust if some elements in the allDeadMen array are local AI. It would seem that for HC and indeed clients we should run another scrubber for allDeadMen? Seems most inefficient to have multiple localities all accessing and deleting from one global array.

In my opinion I think a server script should be able to see and delete these remote bodies.

Share this post


Link to post
Share on other sites

Because the AI on the headless do not hear shots fired at them or see impacts that land near them the AI on HC are just about useless, we have stopped using HC because of this.

For now :)

Edited by BL1P

Share this post


Link to post
Share on other sites

-pid param doesnt work with HC. I have no idea how to safely taskkill it

Edited by Killzone_Kid

Share this post


Link to post
Share on other sites

So nobody else has noticed the AI do not hear shots fired when on headless ?

Share this post


Link to post
Share on other sites

Anyone else getting these errors in the headlessclient rpt log?

9:03:20 Error in expression BIS_TotDesatCC ppEffectAdjust [1,1,0,[0,>
9:03:20 Error position: 
9:03:20 Error Undefined variable in expression: bis_totdesatcc
9:03:20 File A3\functions_f\Feedback\fn_feedbackInit.sqf, line 56
9:03:20 Wrong init state
9:03:20 Error in expression BIS_SuffCC ppEffectAdjust [1,1,0,[0.0090>
9:03:20 Error position: 
9:03:20 Error Undefined variable in expression: bis_suffcc

---------- Post added at 10:38 ---------- Previous post was at 10:37 ----------

-pid param doesnt work with HC. I have no idea how to safely taskkill it

copy the arma3server.exe to arma3client.exe and use that as headlessclient executable. Works like a charm.

Share this post


Link to post
Share on other sites
Anyone else getting these errors in the headlessclient rpt log?

9:03:20 Error in expression BIS_TotDesatCC ppEffectAdjust [1,1,0,[0,>
9:03:20 Error position: 
9:03:20 Error Undefined variable in expression: bis_totdesatcc
9:03:20 File A3\functions_f\Feedback\fn_feedbackInit.sqf, line 56
9:03:20 Wrong init state
9:03:20 Error in expression BIS_SuffCC ppEffectAdjust [1,1,0,[0.0090>
9:03:20 Error position: 
9:03:20 Error Undefined variable in expression: bis_suffcc

Yes we do.

Share this post


Link to post
Share on other sites
Yes we do.

Allright, hope it gets fixed :) And no problem if it doesn't affect the HC.

Share this post


Link to post
Share on other sites

copy the arma3server.exe to arma3client.exe and use that as headlessclient executable. Works like a charm.

No it doesn't, but thank you anyway.

Share this post


Link to post
Share on other sites
No it doesn't, but thank you anyway.

What I meant was you can use taskkill to kill the executable this way.

taskkill /f /fi "status eq not responding" /im arma3client.exe

taskkill /f /im arma3client.exe

Share this post


Link to post
Share on other sites
What I meant was you can use taskkill to kill the executable this way.

taskkill /f /fi "status eq not responding" /im arma3client.exe

taskkill /f /im arma3client.exe

I'm aware of that, however in multiserver environment there could be another process with the same image name. pid on the other hand is unique. You can get pid for the server but not for local HC. It should be pretty easy to enable this for HC instead of creating copies which will make it easier to automate it.

Share this post


Link to post
Share on other sites
I'm aware of that, however in multiserver environment there could be another process with the same image name. pid on the other hand is unique. You can get pid for the server but not for local HC. It should be pretty easy to enable this for HC instead of creating copies which will make it easier to automate it.

So very true indeed... How do you let taskkill check the pid in the arma folder?

---------- Post added at 15:46 ---------- Previous post was at 15:45 ----------

The HC uses up a player slot. If you have 50 slots only 49 players can join. Is this fixable? :) I set my server on 51 as workaround.

Share this post


Link to post
Share on other sites
So very true indeed... How do you let taskkill check the pid in the arma folder?

---------- Post added at 15:46 ---------- Previous post was at 15:45 ----------

The HC uses up a player slot. If you have 50 slots only 49 players can join. Is this fixable? :) I set my server on 51 as workaround.

Did you set HC slot to playable in editor, I bet you didn't :)

For the -pid taskkill

@rem assuming -pid=ds.pid

@set /p pid=<ds.pid

@taskkill /f /pid %pid%

Share this post


Link to post
Share on other sites

AI on the HC still do not hear players gun shots nor do they see impact rounds hitting near them whereas on a server they do.

No matter how you end the task this still is true ;)

Share this post


Link to post
Share on other sites
Because the AI on the headless do not hear shots fired at them or see impacts that land near them the AI on HC are just about useless, we have stopped using HC because of this.

For now :)

AI on the HC still do not hear players gun shots nor do they see impact rounds hitting near them whereas on a server they do.

No matter how you end the task this still is true ;)

Give it a rest, BIS is on holiday until 15th, until then it is very unlikely that game will fix itself.

Share this post


Link to post
Share on other sites
Give it a rest, BIS is on holiday until 15th, until then it is very unlikely that game will fix itself.

Dude WTF. (give it a rest ?) WTF

Just trying to get confirmation.

As its seems maybe I am the only one getting this problem, I try to get confirmation. I know BIS is on hols.

Dont get upset if I try to get confirmation.

If I am the only one getting this prob then "Ill give it a rest".

Until then Ill use a forum as a forum and air my concerns.

A simpler Yes or No it happens to Me/Us As Well. would have been alot better than a "Give it a Rest reply".

Edited by BL1P

Share this post


Link to post
Share on other sites

A simpler Yes or No it happens to Me/Us As Well. would have been alot better than a "Give it a Rest reply".

Sorry, I did not realise there was a question there.

Share this post


Link to post
Share on other sites

No worries m8

Does this quote you missed of mine help ?

Has anyone else Noticed that when AI are on the Headless and you shoot next to them but don't hit them, they do not react to the shot/impact.

Once you put the same AI on the server they will react to the shot/impact.

It seems to us that the reaction parameters of impacts or sounds are not working on the headless.

Maybe some type of locality thing ?

Can anyone confirm this ?

Hope that clears it up for you m8

Share this post


Link to post
Share on other sites
Did you set HC slot to playable in editor, I bet you didn't :)

For the -pid taskkill

So if you set it to playable it won't take up a player slot? I'm confused..

ASM doesn't show the HC as player but BEC does. And no more as 49 players can join when I set the slot limit to 50.

It's set like this:

	class Item36
	{
		side="LOGIC";
		class Vehicles
		{
			items=1;
			class Item0
			{
				position[]={14497.367,10.181035,5849.4287};
				id=144;
				side="LOGIC";
				vehicle="HeadlessClient_F";
				player="PLAY CDG";
				leader=1;
				skill=0.60000002;
				text="HeadlessClient";
			};
		};
	};

Thanks, i'll try the taskkill thing.

Btw, can't you find the right headless client executable by renaming all headless clients to arma3client1.exe arma3client2.exe etc?

And then use this to find the PID?

@SET A3PidPath=c:\ServerHosting\A3Server

@DEL %A3PidPath%\a3client.pid
@tasklist /nh /fi "IMAGENAME eq arma3client.exe" > %A3PidPath%%\a3client.pid
@FOR /F "tokens=2" %%I in (%A3PidPath%\a3client.pid ) DO set ClientPID=%%I
@taskkill /F /IM arma3client.exe /FI "PID eq %ClientPID%"

Edited by LouD

Share this post


Link to post
Share on other sites

Anyone know how to make the HC not take up a player slot?

Share this post


Link to post
Share on other sites
Anyone know how to make the HC not take up a player slot?

Have you made headless client logic "playable" after you added it in editor?

class Item1
	{
		side="LOGIC";
		class Vehicles
		{
			items=1;
			class Item0
			{
				position[]={1655.0297,5.4902968,5661.5449};
				id=1;
				side="LOGIC";
				vehicle="HeadlessClient_F";
				player="PLAY CDG";
				leader=1;
				skill=0.60000002;
				text="HC1";
			};
		};
	};

I have it like this and item 0 for player, it doesnt need extra slot. (on DEV)

Edited by Killzone_Kid

Share this post


Link to post
Share on other sites

Thanks Killzone_Kid for your answer. But if you compare your entry with mine they are the same so I don't know where this goes wrong.

Share this post


Link to post
Share on other sites
Thanks Killzone_Kid for your answer. But if you compare your entry with mine they are the same so I don't know where this goes wrong.

I think I know what is happening here. When you said HC takes player slot I naturally assumed you are talking about role selection slot, which is what is going to happen if you dont set HC as playable. But now I realise you are talking about maxPlayers server param. Yes, you have to set it to number of players + number of HCs. HC is not registered in playableunits so ASM doesnt see it, BattlEye like admin can see it.

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

×