Jump to content

[WIP] DZHC - Extendable DayZ Headless Client Framework


(GSG) Az

Recommended Posts

 

class Item2

{
side="CIV";
class Vehicles
{
items=1;
class Item0
{
position[]={7839.6055,381.33774,8414.7324};
id=0;
side="CIV";
vehicle="Survivor1_DZ";
player="PLAYER COMMANDER";
skill=0.60000002;
text="Mr.Rappelkiste";
init="this allowDamage false; this enableSimulation false;";
description="Mr.Rappelkiste";
name="Mr.Rappelkiste";
forceHeadlessClient=1;
};
};
};

@Mission.sqm

 

 

+Starting HeadlessClient with the same name (Mr.Rappelkiste). - as far as i remember i couldnt join Civ Slot.

Link to comment
Share on other sites

I was unbanned immediately by Bastion, issue was unrelated to the HC.

 

I will update the git so its actually clean and not a mess of code as it is now :P

 

 

What's your git name, very interested in taking a look at your fork. Have done a fair bit with HCs.

 

Starting the next round of live testing now!

 

Currently server side scripts are working excellently, but client side specific scripts are having strange issues. I plan to release the alpha after this round of live testing (and subsequently the git) and then work on implementing client side (Zeds, etc) back into the HC after the fact. I think I need to rethink my strategy with regards to communication frameworks. 

 

You found a solution how to stop other players joining to HC slot in the lobby?

 

That was the easy part! Two chunks of code, one running on clients with an interface, one without. Simply checks whether a real client (Not the HC) is not CIV and if so, kicks using a PV. DSCHA's solution also works - but it was only a few minutes of testing that an actual player clued on and changed his name to "HeadlessClient" and slotted in. The framework works on a "strict" code ethos. This means that no code can execute outside of its frame of reference (players loading as HC, HC loading as player etc). 

And the best part of all....

 

I will be releasing BE filters to accompany my release. 

Link to comment
Share on other sites

Ok so an update!

 

Live tests were semi successful.

 

A few notes

 

  • No more than 1 headless client can run on the server. After a clarification from Bastion over at Battleye (Thanks for the quick reply!), only one instance of the BEClient.dll can run on the machine at a time, resulting in "Corrupt Data #5" kicks when you try and run more than one HC on the server. This can be resolved by using VM's or external clients, but is still a setback indeed.
  • BE filters are not as standard as I was hoping to make them. You will have issues with these, especially if you have customizations. I will put up FULL instructions on how to correctly do your filters and the common issues encountered but overall it does detract from the simplicity of the framework I was hoping for.

After all was said and done, there were some random crashes (caused by a script error I promptly fixed), and some massive network congestion (Might be related to the script error). Either way, it will be a few more days of live testing before I will be willing to release anything - I don't like releasing broken software.

 

The JIP functionality is also not functioning. After some more tests I will fix that.

 

Signing off! 

 

Az

Link to comment
Share on other sites

Another quick update...

 

Most server side AI solutions use server specific functions to publish vehicles, do certain tasks etc. This means I have had to make a modular plug-and-play framework for each AI solution. It will be released as a single compile, and will overwrite default functions used by the AI systems to make them PVC/PVS compatible. Simple change, little set back.

 

Otherwise, the HC has been running excellent on my dev environment (Until it tries to publish vehicles to the database and wigs the F out) so all in all this round of testing has been a massive success. My friends over at ARC have been testing the framework and have had really strange and mixed results. A bit more live testing on their side is needed. 

 

I would like to extend an invitation to those interested for the next round of live testing.

 

I will need RDP access and a unique account so I can grab some logs from time to time (and I might even be able to optimise your scripts while I am there, I'm a perfection whore). If you would like to take part, please post below with a teamspeak address I can contact you at. Please bear in mind that I will have to modify your current files. Please ensure you have a backup of ALL files before accepting the invitation for alpha testing. I cannot be responsible for breaking your server (I wont, I promise).

Link to comment
Share on other sites

I would like to participate in the testing!

 

Teamspeak: 37.187.134.77

Community: The Last Crusader

We have a dedicated server Xeon E5-1620v2 with OVH.

 

 

I'll be on teamspeak in 3-4 hours from now, usually under the name Ruben

Link to comment
Share on other sites

Happy to help test mate.  I already run some headless AI, but nothing as fancy as what you describe!

 

I won't grant RDP access, but could roll logs to a FTP/Dropbox/other location.

 

TS3: 85.236.100.27:17647  poke a purple badge person if I am not on TS at the time or message me here.

 

If it passes some basic tests happy to roll this with live players (most evenings 50 players), and have 2 dedicated non-hyperthreaded cores for exclusive HC use.

Link to comment
Share on other sites

Happy to help test mate. I already run some headless AI, but nothing as fancy as what you describe!

I won't grant RDP access, but could roll logs to a FTP/Dropbox/other location.

TS3: 85.236.100.27:17647 poke a purple badge person if I am not on TS at the time or message me here.

If it passes some basic tests happy to roll this with live players (most evenings 50 players), and have 2 dedicated non-hyperthreaded cores for exclusive HC use.

Unfortunately I require some form of access so I can modify the HC on the fly if bugs are experienced and update it. I also need to ensure that it is I that sets it up to avoid error on anyone else's behalf as an issue. Bug testing and finding out someone else didn't follow instructions is frustrating.

I'll hit Cen and Ruben up over the weekend.

And... Another update!

So an unusual bug appeared. The headless was getting kicked to lobby silently and reloading, causing it to wig out like crazy and lag the entire server to a halt. Turns out if the headless compiles the regular functions but doesn't load the player monitor, it gets stuck at the loadscreen and times out. It still executes all of its duties though. But when you have it load buildings, this becomes a real issue. Some of the WAI scripts I have been using for testing require some of the basic compiles, so it became necessary to define these manually.

After solving that, it runs like a dream. 40AI on the headless, 49FPS on the headless. The server still has comparatively low FPS when it reaches max players (3FPS) but it is better than where it was (well below 1FPS, probably closer to 0.1FPS). We have lots of cores but only 2.8GHz per core so that's why the values are so low. We are upgrading to better hardware soon (3.5GHz here I come!).

And Apache over at ARC has created a nice launcher for the server that waits until the hive log streams data before connecting the headless. This means it will not join until a player does and loads the mission. This was the one caveat of this system, and he deserves a massive shout out for his work :)

Now that these strange glitches are resolved, I can move onto JIP compatibility and then fine control. After that I will integrate the client side functions and the FPS manager. After that, it's the final stretch!

Link to comment
Share on other sites

Unfortunately I require some form of access so I can modify the HC on the fly....

And Apache over at ARC has created a nice launcher for the server that waits until the hive log streams data before connecting the headless. This means it will not join until a player does and loads the mission.

Understood mate.

Nice idea on the launcher. Today I just use a delay which works on pure luck really. My plan was to create a script using rcon command line to check for players but I think I prefer Apache's method.

Link to comment
Share on other sites

Why dont u just make a Missionstarter? It joins about 1-2s after the Server is online, starts the mission, disconnects, joining again in Civ Slot after 2min.

@echo ontaskkill /IM arma2oa.exe


@echo on
CD D:\DZE-HC\Arma 2 Operation Arrowhead


@echo on
start "arma2HC" /High /affinity F0 "Expansion\beta\arma2oa.exe" "-mod=EXPANSION;ca" "-mod=Expansion\beta;Expansion\beta\Expansion" -profiles=HeadlessClient -name=MissionStarter -skipIntro -nosplash -showScriptErrors -noPause -nosound -client -connect=127.0.0.1 -port=2302 -exThreads=1 -cpuCount=2 -mod=@DayZ_Epoch; -noCB


@echo on
timeout 90
taskkill /IM arma2oa.exe


timeout 2
@echo on
start "arma2HC" /High /affinity F0 "Expansion\beta\arma2oa.exe" "-mod=EXPANSION;ca" "-mod=Expansion\beta;Expansion\beta\Expansion" -profiles=HeadlessClient -name=Mr.Rappelkiste -skipIntro -nosplash -showScriptErrors -noPause -nosound -client -connect=127.0.0.1 -port=2302 -exThreads=1 -cpuCount=2 -mod=@DayZ_Epoch -noCB


cls


exit
Link to comment
Share on other sites

Well... A slight technical set back. 

 

I need a new server :(

 

The HC keeps getting strange parity errors in the RPT resulting in a crash, the files are all fine - I reinstalled them 2 times to make sure. It must be a RAM issue or perhaps some wierd consequence of using public variables for critical functions. Either way, I need to test it on a new (and higher power) server before I will let it land on anyone elses server (and potentially create a heap of drama).

 

Progress though, but a step backward this time it seems. 

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

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