Jump to content

Headless Client AI w/Epoch [WIP]


Shizweak

Recommended Posts

Have just started looking into this. Am going to a LAN later this month and have a DM epoch event ready to go.

I want to use the HC for AI and a horde of zeds, was thinking hundreds if possible.. Was going to get the HC moving through the 'arena' with the zeds surrounding him.

Link to comment
Share on other sites

Only cavet i have had (if someone know a way around please let me know) 1 HC per server

 

How about an approach similar to multi-CD-Keys on a single machine (steam-profiles etc)...

Just throw your valid Key in the resigstry before firing up your HC and do that step with each added HC.. no clue but I think the Key gets only loaded at boot and not checked over and over after everything's up&running.

 

Can't test it, but just crossed my mind :)

Link to comment
Share on other sites

i want this too, Random horde event roaming the map kinda thing.

 

Also, some worth noting. My antihacks kept kicking the HC so had to tweak that too lol.

 

Axeman, if you wanna have a chat later, i will be on ts.customcombatgaming.com. More than happy to help!

 

How about an approach similar to multi-CD-Keys on a single machine (steam-profiles etc)...

Just throw your valid Key in the resigstry before firing up your HC and do that step with each added HC.. no clue but I think the Key gets only loaded at boot and not checked over and over after everything's up&running.

 

Can't test it, but just crossed my mind :)

 

Well if that works, that will be great. I will check it out later, I have got a HC setup on one of my live epoch servers so should be hard to test it.

Link to comment
Share on other sites

Well if that works, that will be great. I will check it out later, I have got a HC setup on one of my live epoch servers so should be hard to test it.

 

Other option would be to continue to beg bohemia for adding support of arma free as HC, so no key needed at all.

btw: you got my PM maca?

Link to comment
Share on other sites

First attempt at a zombie horde:

 

zed_horde_3.jpg

 

Off they go:

 

zed_horde_2.jpg

 

zed_horde_1.jpg

 

FPS hit is still there but I think is because zombie_agent.fsm is kicked off in the class eventhandlers from the zombie base class. It isn't long before Second Hand Zombie Initialized appears in the debug log... 

 

200 zeds spawned..

Link to comment
Share on other sites

Odd....the zombies definitely have a pathing location....easily spotted with so many walking in a straight line.....

 

2 Questions:  

 

1) Why do the zombies die all of the sudden when you ran past them?

2) Why did they not aggro on you like crazy?  They just kept moving along the pathing course

Link to comment
Share on other sites

Had spawned them in without adding zombie_agent.fsm. Then sent them to a point further up the map with moveTo. Essentially they are just AI with most of the AI removed and sent on a path. They are in a column like that because they are all funneling through the gap in the corner of the wall, they spread out nicely later on..

 

Have updated it since so that 1 in every 6 has a customised zombie_agent.fsm that doesn't dispose of the zombie and sends him back on his path after doing zombie 'stuff' such as attacking the player.

 

They die because I have written a 'zed shield' for use during testing, is a pain when you just want to wander around or leave the player standing somewhere and zombies constantly attack :) Is usually set at 10m, I reduced it to 2m for this..

Link to comment
Share on other sites

So I finally got a Second license and started tinkering around with a HeadlessClient.

So far, so good...

What really bugs me right now, is freakin' Battleye.

I've got other things runnig before (like Adminsscripts & such) but I just can't find where the following kick comes from OR how to add the proper exception.

 

14.11.2013 03:23:49: HeadlessClient (127.0.0.1:2314) XXXXXXXXXXXXX - RemoteExec Restriction #0 "Killed" 4:8 Haris_Press_EP1_DZ - "Null = _this execVM "\ctc_hc\addons\SARGE\SAR_aikilled.sqf";"

 

What I've tried so far:

- 5 "" !="SARGE" in MPEventhandler.txt

- 5 "" !="Null = _this execVM ""\ctc_hc\addons\SARGE\SAR_aikilled.sqf"";" in MPEventhandler.txt

- Deleting MPEventhandler.txt

- 5 !="ctc_hc" in remoteexec.txt

- 5 !="Killed" in remoteexec.txt

a couple of others...

 

What's strange: It kicks for MPeventhandler RemoteExec Restriction, so BOTH files are somewhat used?!?

 

BE-Filters are kinda strange to me anyway. Why are some thing excluded with !="bla" where others are just !"bla" ? (w/o the =)

 

Maybe we should all just write to BE to allow an IP-Whitelist (ex. 127.0.0.1 for a HeadlessClient) to get HCs working w/o such a hassle.

[Everything else looks good so far.. own&signed addon, key on the server, destinction between HC/SERVER/Client in init.sqf, 'login'-HC on the server and establish a connection to give him tasks, etc.. but as soon as I try to get Sarge / UPSMon up or even attach myself to DZAI handles, Battleye f*cks me up :/

 

Got Ideas?

 

PS:

Well one things that still annoys me: Anyone got a clever solution to get the HC in the correct slot even when it is the first player to join (so before the missions is loaded) ? Right now I'm auto-kicking him via BE when he started the mission and let him reconnect. Since they removed serverCommands it's a bit of a hassle to get it working :/

[i trigger an Event after login when he sees that it's side is WEST instead of civilian and fires a BE-Event to which I Listen with my monitoring app. This way I know that it's him & that the mission is properly started]

Link to comment
Share on other sites

Thanks for your reply, will try to play around a bit more then.

 

Hrm, wouldn't it be possible to just grab !"addons\SARGE" for example to filter out all calls/settings from that folder, oder do does kinda filters only work in scripts.txt?

 

€dit: Got it working as a WIP to spawn AI with and w/o HC.

 

HC present:

AI-HC.jpg

Aggro was out of this world :D / Responsetime aswell, when I ported myself in from ~10km away it took the whole group around 10secs to be fully aware of my position, the first couple shot me after just 2 secs :D

Had red chains when getting there, but that was expected with this amount of AI / synching and my lousy Internet :(

(It looks like less AI compared to the screenshot below, but I had the others to my left. It was the exact same code that was used with/without HC so...)

 

Server is all alone:

AI-no-HC.jpg

 

Aggro was 3-4 AI per 10 seconds / responsetime ~15-45secs / No red Chains but all in all a big lagfest

Link to comment
Share on other sites

Just a quick Update in case someone is as lazy as me:

Change your CPU-Affinity! :)

Didn't really care about it when the above screens were taken and thought: oh well, Windows will handle that stuff for me...

Boy I was wrong :D

HC-Affinity.jpg

 

So now I start all my Servers with an Affinity-Mask to set the correct CPU for them and it runs as smooth as it can get.

The above Screen was taken while I spawned ~1200 AI around Komarovo (Radius 1km).

When I ported myself away and roamed around the other parts of the map, I couldn't tell that there were that much AI on the map. Loot spawned as usual, zombies to. Traders worked w/o any lag... everything was running really nice.

 

In case you don't know how to do the Affinity thing:

START /MIN /ABOVENORMAL /affinity 30 %arma2path%\arma2oa-epoch-hc.exe -profiles=cfgClient -name=HeadlessClient -mod=EXPANSION\beta;EXPANSION\beta\Expansion;EXPANSION;ca;%expansions% -client -connect=127.0.0.1 -port=%port% -password=changeme

/affinity 30 -> HEX value for Core 5&6

Each core has a Bitvalue and you just choose which cores you want.

00000001 > Core 1

00000010 > Core 2

00000100 > Core 3

....

 

So if I want Core 6&7 instead of 5&6

01100000

Now convert that into HEX > 60

If I now want to Start my HC on Core 6&7 I just have to use /affinity 60

Done!

 

Cheers,

DNightmare

 

PS: I just post all the findings in here regarding HC, so we can get the max out of it alltogether ;)

 

Link to comment
Share on other sites

Definitely worth doing, I can't find the source of the guide that I used, it had a nice chart of all the hex values to use to set the affinity, these should be correct for a quad core:

 

01 - 1st CPU
02 - 2nd CPU
03 - 1st and 2nd CPU
04 - 3rd CPU
05 - 1st and 3rd CPU
06 - 2nd and 3rd CPU
07 - 1st 2nd and 3rd CPU
08 - 4th CPU
09 - 1nd and 4th CPU
0A - 2rd and 4th CPU
0B - 1st 2nd and 4th CPU
0C - 3rd and 4th CPU
0D - 1st 3rd and 4th CPU
0E - 2nd 3rd and 4th CPU
0F - 1st 2nd 3rd and 4th CPU

 

I start server with:

@echo off
start "arma2" /affinity 03 /min "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 "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;"

and HC with:

@ECHO OFF
start "Arma2HC" /affinity 0C /min "Expansion\beta\ARMA2OA.exe" -client -mod=@DayZ_Epoch;Expansion\beta;Expansion\beta\Expansion -skipIntro -nosplash -showScriptErrors -noPause -world=Chernarus -name=SgtHeadless -nosound -localhost=127.0.0.1 -connect=localhost -port=2302 -profiles=server -password=N0tMyP4ssw0rd:)

both from batch files..

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