Jump to content

Working Dayz Epoch Headless Client for Zed Spawn and FSM


Goober

Recommended Posts

  • 4 weeks later...

When I found this post I read for the first time about this headless client.

I'm excited and want to install it on our server so.

I searched via google for a comprehensible instructions, but without success.

So we tried to install itself.

The HC files from Goober we put the folders in our mission and the mission.sqm was adjusted.

Here our Start Parameters from the batch files:

Server:

start "arma2" /min /wait /realtime /affinity 03 "Expansion\beta\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-nosplash" "-world=empty" "-skipIntro" "-noPause" "-cpuCount=4" "-exThreads=7" "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;"

HC:

start "" /min /wait /realtime /affinity 0C  "E:\Headless Client\ArmA 2\Expansion\beta\arma2oa.exe" "\Expansion\beta\ARMA2OA.exe" -skipIntro -nosplash -showScriptErrors -noPause -client -localhost=127.0.0.1 -connect=localhost -port=2302 -nosound "-mod=EXPANSION;ca" "-mod=Expansion\beta;Expansion\beta\Expansion" "-mod=@DayZ_Epoch;" -cpuCount=2 -name=HeadlessClient -profiles=HeadlessClient

what to do with this red ones?

When starting the Server, i join the lobby after that i saw the HC is in the civilian slot, but without that we have started the client?

N16xh.jpg

If we start the HC, shows up an error Message, opens the console but only the Time without text.

wnsNb.jpg

Lor3d.jpg

We know that we missing something in a config, but where and what i have to put in and wich name use this config? 

?-name=HeadlessClient -profiles=HeadlessClient?

I have done everything as I could get out here and read it from the installation instructions of the DZAI-HC folder.

We need here a Helping Hand, of course we have more questions about putting other stuff on the HC.

And thanks alot to Goober for this Posting, but I miss to read how to install it exactly.

Thanks in Advance!

Ace

 

House moving is done. Now i´m back here :P

 

We tried it ourselves again but we still have not solved the old problem -.-

Is perhaps someone there who can help us?

We want to understand and not only getting an answer ;)

 
Thanks in Advance!
Link to comment
Share on other sites

It's a very interesting thing, and if my server have more players, i will try it.

 

You believe this technology is good even on a scene where the game, Arma in this case, make good use of multiple cores?

 

Thankyou for the awesome explanation.

Link to comment
Share on other sites

I've had some great success on my lan test server using your HC files goober, 

I also added the elec_HC_detect i found on armaholic for some of the sarge AI functions

 

never had any issues with battleye kicks or anything like that.

 

works bloody brilliantly on my lan server, but on my actual server box. 

 

i just get horrible desync with the zombies and some of the ai. i've disabled it all for now

 

I'm thinking it's probably because I added some of the AI functions to the HC, maybe it was a bit too much for the hc to handle?

 

either way, loving you work. :)

Link to comment
Share on other sites

We got it to work, but we have this problem:

1bTlf.jpg

The Red Part is our Server and the Yellow is our Headless Client.
I also tryed to set on 4 Cores but seems to jump from core to core.
With original mission, configs and without the HC the problem with the core is still there.
We have installed extra this HeadlessClinet so that the server performance is better, but seems the whole work was in vain.
When the Server is full 30/30 and the HC is running then i have a Server FPS of 2-4.
Without The HC the Server FPS goes up to 11-14.

Server Hardware Specifications:
PROCESSOR: 2 x XEON E5450 4x3,0GHz 12MB Cache FSB 1333MHz
MAIN MEMORY: 16GB DDRII FB ECC 800MHz
GRAPHIC CARD: nVidia Geforce 120GT 1024MB
HARD DRIVE: [1]---> 60GB SSD Kingston V300 450MB´s || [2]---> WD Scorpio Blue 250GB 7200rpm
DSL CONNECTION: DOWN 100Mb/s UP 8Mb/s
OS: Windows Server 2008 R2 64Bit

I hope some have a solution and an explanation why this is so


Thanks in Advance!

Regards Ace

Link to comment
Share on other sites

We got it to work, but we have this problem:

1bTlf.jpg

The Red Part is our Server and the Yellow is our Headless Client.

I also tryed to set on 4 Cores but seems to jump from core to core.

With original mission, configs and without the HC the problem with the core is still there.

We have installed extra this HeadlessClinet so that the server performance is better, but seems the whole work was in vain.

When the Server is full 30/30 and the HC is running then i have a Server FPS of 2-4.

Without The HC the Server FPS goes up to 11-14.

 

DeliciousAce,

 

Sorry that you are struggling with this.  I have been a little busy, but I will try to help.

 

In an earlier post, you had this in your HC startup: " -localhost=127.0.0.1 -connect=localhost "

I am not familiar with the "-localhost" startup parameter for Arma2oa.exe.  I just use "-connect=127.0.0.1".  Maybe that is not causing a problem, but you can try anyway.

 

Make sure your server config.cfg has this line in it: localclient[]={"127.0.0.1"};

If that line is NOT in the config.cfg, then the HC will have a less accurate idea of where everything is located.

 

About FPS problems:

FPS problems with Arma scripting is a well known problem.  More zeds and more players = slower server.

The way the HC tracks the number of zeds allowed is different than server-only scripts.

 

From init.sqf:

if (!isServer && !hasInterface) then { // headless client processing this
	dayz_maxLocalZombies = 80; // Default = 40
	dayz_maxGlobalZombiesInit = 80;
	dayz_maxGloabZombiesIncrease = 20;
	dayz_maxZeds = 1000;
}; // normal player clients will get a different set of variables with same name

When the HC is operating, it is generating a TON more traffic to the server because it may be generating and tracking a ridiculous number of zeds.  This may be bogging down your server too much.

Try changing the numbers in init.sqf and see what happens. (But first make sure that " localclient[]={"127.0.0.1"}; " is in your config.cfg.  That alone may explain your problem.)

 

When the HC is off, each player client is handling a much smaller amount of zeds, so the traffic to the server is less and it gets higher FPS.

 

This "addon" was never released as a supported install with instructions for server operators.  The headless client is a kludgy hack that BI created and it affects gameplay and FPS in unexpected ways.  For this reason, it is a feature that can be added to a mod, but requires good BI scripting skills to make it work in each circumstance.  The Dayz mod team doesn't write code specifically with HC in mind and neither does the Epoch team (even if they do think it might be a neat idea) because writing for HC requires experience and discipline in writing for parallel-process environments with load balancing features, which is a recipe for nightmares.

 

I don't mean to scare you, but there is probably no easy way to make this a simple addon to a mod.

 

p.s. Ich spreche Deutsch, aber nur ein bisschen.

Link to comment
Share on other sites

Actually this is not true, iam running HC to take over all of my scripts that are not meant to be in epoch server.

Examples: DebugMonitor, SafeZone, WAI, DZMS, also running Zeds, Spawn, Loot and some other scripts.

Now server is smooth and FPS for my regular players increased 15-25 more then before.

Link to comment
Share on other sites

DeliciousAce,

 

Sorry that you are struggling with this.  I have been a little busy, but I will try to help.

 

In an earlier post, you had this in your HC startup: " -localhost=127.0.0.1 -connect=localhost "

I am not familiar with the "-localhost" startup parameter for Arma2oa.exe.  I just use "-connect=127.0.0.1".  Maybe that is not causing a problem, but you can try anyway.

 

Make sure your server config.cfg has this line in it: localclient[]={"127.0.0.1"};

If that line is NOT in the config.cfg, then the HC will have a less accurate idea of where everything is located.

 

About FPS problems:

FPS problems with Arma scripting is a well known problem.  More zeds and more players = slower server.

The way the HC tracks the number of zeds allowed is different than server-only scripts.

 

From init.sqf:

if (!isServer && !hasInterface) then { // headless client processing this
	dayz_maxLocalZombies = 80; // Default = 40
	dayz_maxGlobalZombiesInit = 80;
	dayz_maxGloabZombiesIncrease = 20;
	dayz_maxZeds = 1000;
}; // normal player clients will get a different set of variables with same name

When the HC is operating, it is generating a TON more traffic to the server because it may be generating and tracking a ridiculous number of zeds.  This may be bogging down your server too much.

Try changing the numbers in init.sqf and see what happens. (But first make sure that " localclient[]={"127.0.0.1"}; " is in your config.cfg.  That alone may explain your problem.)

 

When the HC is off, each player client is handling a much smaller amount of zeds, so the traffic to the server is less and it gets higher FPS.

 

This "addon" was never released as a supported install with instructions for server operators.  The headless client is a kludgy hack that BI created and it affects gameplay and FPS in unexpected ways.  For this reason, it is a feature that can be added to a mod, but requires good BI scripting skills to make it work in each circumstance.  The Dayz mod team doesn't write code specifically with HC in mind and neither does the Epoch team (even if they do think it might be a neat idea) because writing for HC requires experience and discipline in writing for parallel-process environments with load balancing features, which is a recipe for nightmares.

 

I don't mean to scare you, but there is probably no easy way to make this a simple addon to a mod.

 

p.s. Ich spreche Deutsch, aber nur ein bisschen.

Thanks Goober for this explanations, we will sit again on it in the next days.

Ya we know its not all easy to get it to work, but we are here also to grab up something to learn.

We want stop it so quick ;)

Cool das Du etwas Deutsch kannst :P

Give FeedBack soon as possible.

 

 

Regards Ace

Link to comment
Share on other sites

  • 2 weeks later...

Actually this is not true, iam running HC to take over all of my scripts that are not meant to be in epoch server.

Examples: DebugMonitor, SafeZone, WAI, DZMS, also running Zeds, Spawn, Loot and some other scripts.

Now server is smooth and FPS for my regular players increased 15-25 more then before.

oh snap i was hoping that was possible as soon as i got this to work ! any help files instructions on how you did all that?

 

also am i supposed to see the hint dialogs on the top right side about the spawns ? can i turn them off comment them out? or should they only be running on the HC and i have something wrong going on ?

And also to the OP thanks for the great release and info i found it all easy to follow and got this working in no time wth this post!

Link to comment
Share on other sites

Actually this is not true, iam running HC to take over all of my scripts that are not meant to be in epoch server.

Examples: DebugMonitor, SafeZone, WAI, DZMS, also running Zeds, Spawn, Loot and some other scripts.

Now server is smooth and FPS for my regular players increased 15-25 more then before.

 

That sounds like what I'm planing to do. I guess you won't share your knowledge on this?

From what I understand, there is no way on a working HC under linux? Since I want to increase the performance of my linux server and not decrease it via some virtual windows box running on it XD

Link to comment
Share on other sites

Yes, FPS increased a lot due to HC.

Offloading AI's, Zeds, Loot, DebugMonitor, SafeZones, also handling for every item of players and some other scripts that running in server

 

sFPS 15-30 on 30+ online

sFPS 25-40 on 20+ online

sFPS 40-50 on 10+ online

 

Hardware: i7 3770k @ 4.9Ghz

                 16Gb Ram 3200Mhz

                 Nvidia 680GTX SLI 4Gb

                 256 Gb SSD Raid Mirror

 

 

Hosting of my main PC, Private Hive on 10mb upload speed

Link to comment
Share on other sites

Yes, FPS increased a lot due to HC.

Offloading AI's, Zeds, Loot, DebugMonitor, SafeZones, also handling for every item of players and some other scripts that running in server

 

sFPS 15-30 on 30+ online

sFPS 25-40 on 20+ online

sFPS 40-50 on 10+ online

 

Hardware: i7 3770k @ 4.9Ghz

                 16Gb Ram 3200Mhz

                 Nvidia 680GTX SLI 4Gb

                 256 Gb SSD Raid Mirror

 

 

Hosting of my main PC, Private Hive on 10mb upload speed

and again would be really great if you could share your changes to get that working a lot of us are interested im sure!

also i got that ai delete in safezones working if your still looking for that, let me know.

Link to comment
Share on other sites

and again would be really great if you could share your changes to get that working a lot of us are interested im sure!

also i got that ai delete in safezones working if your still looking for that, let me know.

 

I love to if you share how did you managed delete DZMS & WAI missions AI from safezones

Link to comment
Share on other sites

here is my copy of mission file http://www.kotas.tk/DayZ_Epoch_11.Chernarus.zip

 

You can see how things running there, for addons.sql this is script to make other scripts run on server side so no one take my code off

 

For AI to use HC change all them if(!isServer) exitWith {}; to if(!isServer && !hasInterface) exitWith {};

KoTaS,

Just came accross this Headless Client, trying to understand how it works. Your config is the only fully working (unzip & use) config I could find but the file link is dead. Is it possible to re-share so that I can study it?

Thanks

Link to comment
Share on other sites

Here is an example on how to start Headlessclient from .bat file

start "arma2HC-HeadlessClient" /min "Expansion\beta\ARMA2OA.exe" -skipIntro -nosplash -showScriptErrors -noPause -client -localhost=127.0.0.1 -connect=localhost -port=2302 -nosound "-mod=EXPANSION;ca" "-mod=Expansion\beta;Expansion\beta\Expansion" "-mod=@DayZ_Epoch;" -name=Mr.Larry -profiles=HeadlessClient
Link to comment
Share on other sites

There is error coming tho, from HC and have no clue how to fixit

 

"spawned building_spawnLoot"
Error in expression <ance"];
_obj = _this;




_type = toLower(typeOf _obj);


_config =  configFile >>>
  Error position: <typeOf _obj);


_config =  configFile >>>
  Error typeof: Type Array, expected Object
File z\addons\dayz_code\compile\building_spawnLoot.sqf, line 10
Link to comment
Share on other sites

KoTaS,

 

The code calling the function in building_spawnLoot.sqf is sending an array.  Therefore "_this" contains [x,y,z,...] instead of just an object.

 

It is probably code within the mission folder that is doing this.  Search for "building_spawnLoot" inside the sqf files in the mission folder.

 

Hopefully it is not within an FSM.  There is no simple way to explain how they work, how to use the FSM editor, etc....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...