Jump to content
Sign in to follow this  
On_Sabbatical

Post here all what you know about implementation of the headless client in missions

Recommended Posts

Due to the lack of documentation on this feature,i decided to create this thread so people ,who have played a bit with it ,can share their tips of implementation .

I have some questions first:

- Is there a way to start the HC without having another copy of the game ,and without playing with security params (Battleye/kickduplicate) ?

- Does the HC need to stay on the server to take benefit of it ? if not,how to implement this ?

Edited by On_Sabbatical

Share this post


Link to post
Share on other sites

- Is there a way to start the HC without having another copy of the game ,and without playing with security params (Battleye/kickduplicate) ?

No. At the moment the HC is a fully qualified client/player, just without graphics.

- Does the HC need to stay on the server to take benefit of it ? if not,how to implement this ?

Yes. When a client leaves a server, his local AI would become local to the server. If the HC leaves the server, the server will take over all AI and you will gain nothing out of the HC.

Share this post


Link to post
Share on other sites

Thanks guys,

- Elsewise,when the HC should join the server for better effect,is it dependent on the mission or it doesn't matter ? does the HC needs to be in a certain position on the map for better results ?

But why no one is talking about this awesome feature here on the forums ?

Edited by On_Sabbatical

Share this post


Link to post
Share on other sites

But why no one is talking about this awesome feature here on the forums ?

Probably because:

1. The implementation depends on many factors (mission, server, etc) and is therefore only relevant to coop communitys and clans.

2. It's not an awesome feature, it is a work around (server is not using as much CPUs as it could... I think max two cores).

I am still waiting for a more AI optimized arma server...

Share this post


Link to post
Share on other sites

We have this setup across 3 of our 4 Servers

It's a very quick and dirty run down, and assumptions are that you already know your away around a dedicated server setup :)

[beta server]

start /W arma2oaserver-beta.exe -cpuCount=4 -port=2302 -config=server\server.cfg -cfg=server\ArmA2OA.cfg -name=server -profiles=server -beta=Expansion\beta;Expansion\beta\Expansion -mod=Expansion\beta;Expansion\beta\expansion;@CBA;@CBA_A2;@CBA_OA;@ACE;@ACEX;@ACRE;@16AA;@Maps;@PARAMO;@Palliser;@sjb;@ASR_AI;@tpwcas_v4beta

This starts the beta server from the root arma 2 directory (I manually copy the beta server exe from the beta folder to the arma root folder and rename it to arma2oaserver-beta.exe.

This allows me to also have the original patched version too. I know I can run it from within the beta directory but alas this is how I've done it for now.

[headless client server]

CMD /C START arma2oa-beta.exe -client -beta=Expansion\beta;Expansion\beta\Expansion -mod=@CBA;@CBA_A2;@CBA_OA;@ACE;@ACEX;@ACRE;@16AA;@Maps;@PARAMO -name=LtCol.Chipperfield -nosound -localhost=127.0.0.1 -connect=localhost -port=2302 -profiles=server -password=<insert the password to connect to a passworded server>

This starts the beta arma2oa client from the root arma 2 directory (I manually copy the beta client exe from the beta folder to the arma root folder and rename it to arma2oa-beta.exe.

This allows me to also have the original patched version too. I know I can run it from within the beta directory but alas this is how I've done it for now.

The following then occurs

1) Start the Beta Server (arma2oasevrer-beta.exe in my case), using my windows batch file (which contains the information from the [beta server] section above

once the server has loaded, then

2) Start the headless client (arma2oa-beta.exe in my case), using my windows batch file (which contains the information from the [headless client server]section above

For those with ACE, you'll need to update the 'ace_clientside_config' within the '../userconfig/ace' folder (with the name of the headless client - in my example its named 'LtCol.Chipperfield') - If you don't then you'll get errors in the log file saying so

[Example]

"ACRE: @JayArmA2Lib addon not enabled! Check jayarma2lib installation!"

"CLIENT: C 1-1-A:1 (Capt.Obvious) | TIME: 10.129 | AVG FRAMES: 47.3373 | CURRENT FRAME: 31.25 | LOCAL AI: 1 | "

"ACRE: @JayArmA2Lib addon not enabled! Check jayarma2lib installation!"

For those with ACRE, you'll need jayarma2lib installed onto the server (otherwise you'll get errors in the log files saying its missing)

That's basically it (from memory)

My config files and log files are located in a folder named 'server' (see [beta server] for the example).

My arma2oa-beta.rpt file is then located in the 'server' folder where you can see stats, see example below (ignore the jayarma2lib -I hadn't installed it to the server, and updated the [headless client server] startup params/batch file to reflect this ;)

"ACRE: @JayArmA2Lib addon not enabled! Check jayarma2lib installation!"

"CLIENT: C 1-1-A:1 (Capt.Obvious) | TIME: 5.003 | AVG FRAMES: 47.0588 | CURRENT FRAME: 34.4828 | LOCAL AI: 1 | "

"ACRE: @JayArmA2Lib addon not enabled! Check jayarma2lib installation!"

Client: Object (id 2:498, type Type_82) is local - update is ignored.

"CLIENT: C 1-1-A:1 (Capt.Obvious) | TIME: 10.073 | AVG FRAMES: 48.1928 | CURRENT FRAME: 37.037 | LOCAL AI: 1 | "

"ACRE: @JayArmA2Lib addon not enabled! Check jayarma2lib installation!"

"CLIENT: C 1-1-A:1 (Capt.Obvious) | TIME: 15.129 | AVG FRAMES: 48.7805 | CURRENT FRAME: 40 | LOCAL AI: 1 | "

"ACRE: @JayArmA2Lib addon not enabled! Check jayarma2lib installation!"

"CLIENT: C 1-1-A:1 (Capt.Obvious) | TIME: 20.19 | AVG FRAMES: 47.3373 | CURRENT FRAME: 31.25 | LOCAL AI: 1 | "

"ACRE: @JayArmA2Lib addon not enabled! Check jayarma2lib installation!"

"CLIENT: C 1-1-A:1 (Capt.Obvious) | TIME: 25.256 | AVG FRAMES: 49.8442 | CURRENT FRAME: 35.7143 | LOCAL AI: 1 | "

"ACRE: @JayArmA2Lib addon not enabled! Check jayarma2lib installation!"

"CLIENT: C 1-1-A:1 (Capt.Obvious) | TIME: 30.303 | AVG FRAMES: 41.3437 | CURRENT FRAME: 28.5714 | LOCAL AI: 1 | "

"ACRE: @JayArmA2Lib addon not enabled! Check jayarma2lib installation!"

"CLIENT: C 1-1-A:1 (Capt.Obvious) | TIME: 35.456 | AVG FRAMES: 47.0588 | CURRENT FRAME: 31.25 | LOCAL AI: 1 | "

"ACRE: @JayArmA2Lib addon not enabled! Check jayarma2lib installation!"

"CLIENT: C 1-1-A:1 (Capt.Obvious) | TIME: 40.512 | AVG FRAMES: 43.3604 | CURRENT FRAME: 33.3333 | LOCAL AI: 1 | "

"ACRE: @JayArmA2Lib addon not enabled! Check jayarma2lib installation!"

Credit to 'Glowbal' below who I neglected to add has assisted with the headless client setup :)

Edited by LondonLad

Share this post


Link to post
Share on other sites
"CLIENT: C 1-1-A:1 (Capt.Obvious) | TIME: 40.512 | AVG FRAMES: 43.3604 | CURRENT FRAME: 33.3333 | LOCAL AI: 1 | "

This is btw from some tests I was running on the HC. Just so I could see what was going on with the HC.

I however wasn't able to connect the HC to any other server as local. Is it supposed to be that way?

Also, when switching over locality of the AI, all AI seem to be frozen in place. Though I assume I've done something wrong in the script?

Share this post


Link to post
Share on other sites

I find the whole thing a little confusing. Im not a server admin but im v keen to understand whats being done & where the benefit comes from.

So a second copy of arma 2 is installed on server pc. Server is launched and then this invisible client is launched from second copy of arma, is that right?

Invisible client then joins game that is hosted on the same pc and all ai work in multiplayer mission that was normally performed on the server is now performed by this invisible client, which is actually just the same pc, connecting to itself?

How then does a speed increase occur when dealing with AI if its still the same pc processing the AI?

Thanks, in advance.

Share this post


Link to post
Share on other sites
I find the whole thing a little confusing. Im not a server admin but im v keen to understand whats being done & where the benefit comes from.

So a second copy of arma 2 is installed on server pc. Server is launched and then this invisible client is launched from second copy of arma, is that right?

Invisible client then joins game that is hosted on the same pc and all ai work in multiplayer mission that was normally performed on the server is now performed by this invisible client, which is actually just the same pc, connecting to itself?

How then does a speed increase occur when dealing with AI if its still the same pc processing the AI?

Thanks, in advance.

From what I understand, the server only uses two cores. The HC will then use the other two (given a quad-core CPU), where the AI will then be processed.

Share this post


Link to post
Share on other sites

Does the mission being played need to have any Headless Client scripts running in order for the AI to be placed onto the HC ?

Share this post


Link to post
Share on other sites
Does the mission being played need to have any Headless Client scripts running in order for the AI to be placed onto the HC ?

See Xeno's post below.

Edited by Harzach
working with bad information

Share this post


Link to post
Share on other sites
Does the mission being played need to have any Headless Client scripts running in order for the AI to be placed onto the HC ?

You have to either spawn AI with scripts on a HC or move existing (for example editor placed) AI units from the server to the HC and start all waypoint related stuff on the HC again (with scripts).

Just adding a HC does nothing. It's just, as the name says, a client.

Xeno

Share this post


Link to post
Share on other sites
You have to either spawn AI with scripts on a HC or move existing (for example editor placed) AI units from the server to the HC and start all waypoint related stuff on the HC again (with scripts).

Just adding a HC does nothing. It's just, as the name says, a client.

Xeno

Yow, so this is actually a bit more complicated than I was lead to believe. Adapting some pre-existing missions will be tricky.

Share this post


Link to post
Share on other sites

The biggest barrier we've found is that AI that is too far away from the HC location on the game map won't identify player location correctly. That is to say, any AI that is a long distance from the HC that is running it will think the player is actually in a different location to where they are - presumably something to do with the way the engine reduces processor overhead for 'far distant' AI. You can work around this to some extent by 'clustering' groups of AI around a single HC at say for example, an enemy objective, which certainly takes the load of the main server, but until we can find a way to move the HC around it's pretty limited functionality.

HC's can be reasonably useful for running ambiance that doesn't really need player interaction - animals, civs, air etc - but we run most of those clientside anyway and HC's are generally more hassle than they're worth for our average ops. I'd be interested to know how others work around these issues and how you actually use them?

Share this post


Link to post
Share on other sites

For those interested:

isHC = false;
if !(Isdedicated) then {
 _hcCheck = ppEffectCreate ["filmGrain", 2005];
 if (_hcCheck == -1) then {
   isHC = true;
 } else {
   isHC = false;
 };
};

With thanks to Wolffy.au as well.

No need for any ties to names or slot anymore. Simply run this in the init and check if isHC is true in your script.

Only tested with side messages so far, haven't played an actual script it with.

Share this post


Link to post
Share on other sites

Glad to see the concept worked.

HC's and dedicated servers spew the same "Post process effect creation failed" error message in RPT when you drop the Weather module down in Editor - this function is going to make HC a lot easier to utilise in our MSO code.

Share this post


Link to post
Share on other sites
[headless client server]

CMD /C START arma2oa-beta.exe -client -beta=Expansion\beta;Expansion\beta\Expansion -mod=@CBA;@CBA_A2;@CBA_OA;@ACE;@ACEX;@ACRE;@16AA;@M aps;@PARAMO -name=LtCol.Chipperfield -nosound -localhost=127.0.0.1 -connect=localhost -port=2302 -profiles=server -password=<insert the password to connect to a passworded server>

What does the '-client' parameter do?

Does the HC open as a text console (cmd style) and display events like the linux arma server binary?

Share this post


Link to post
Share on other sites

Yesterday our group tested the HC in a mission with very high AI count. The Mission took place on Fallujah, more precisely the Area south west of the town, the two bridges and a few blocks into the city. Server FPS remained very stable at around 50. The players experienced MUCH better performance compared to playing the same mission without HC. AI reactions and performance were top notch. They were immediately rushing to nearby cover if beeing under fire and their overall reaction time was much improved. We had ASR_AI and TPWCAS running and it seems as if the AI finally had enough computing time to use those mods to their full ability.

One question. Does it matter how far away the HC is from the battle?

What if we take Chernarus as an example and the team has to fight something at the west end of the map and is then transfered to the east end? Does the mission maker need to move the HC?

And if yes, how? Simple teleport? Or might that break something?

Share this post


Link to post
Share on other sites
Does it matter how far away the HC is from the battle?

It does matter if you don't set localClient, for example if the HC is running on the same machine as the dedi server:

localClient[]={"127.0.0.1"};

^^ This is what gives the HC real-time knowledge of everything on the map. If you don't set this, the HC will be treated like a normal client, so objects that are far away from its avatar will recieve less updates, which can cause problems.

Edited by MadDogX

Share this post


Link to post
Share on other sites

Oops. That does make more sense. :)

To be honest, I copy+pasted that directly from the Reddit article linked a few pages back without even checking it. My bad.

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
Sign in to follow this  

×