Jump to content

[Beta] New Kind of Headless Client

Recommended Posts

So, recently I was just browsing trough forums and I read about Headless Clients and I was like phew that would be a nice thing to have man. So I went straight to the Downloads, gave them a few Tests and decided screw this. I've seen "ARMA 2" Headless Clients using event handlers, that are for arma3 - not even sure, if they actually work in arma2 and then it's a mess (no offence thou, but it was very hard to read trough all that). Well, what Solutions did I have? Making my own one and share it with the Community to improve it to an acceptable Standard.


The following Video (Sound might be loud) shows an Example of the Headless Client





So, what's so Special about this...

Well first of all this works on any Map. Also it works with any Loot Table. Also it works without the need of a player. It has it's own "independent Area" where it interacts in. What I mean with that is, that you won't need to rely on any Functions, as everything that is needed is included. All Variables and Functions work outside of the normal "dayz stuff", as only the Headless Client loads it and it won't overwrite anything. Also it comes with a few features available.


  • You can fully customize the spawn Ratio between Zombies spawned on Buildings and in Wilderness, for Example you could have 3x as many Zombies in cities
  • You can fully customize the Loot Tables or integrate your existing ones just by changing a variable
  • You can fully customize which modules to use, like animal spawn, wild zombie spawn, building zombie spawn, loot spawn and custom spawn.
  • You can customize which Animals to Spawn
  • You can make AI Shoot at the Zombies
  • You can shuffle the Loot by setting permaLoot to false, as the server clean up will then clean it up and the hc will just re-spawn it.
  • You can ofc set how many zombies / animals / loot piles should max be spawned


For a full List, of available Options see the variablesHC.sqf.


The Performance

While you have the ability to use all those variables, you can tweak the performance of this. However, the script will only be as good as the code and I'm not perfect. I tried my best to check every tiny bit to make sure nothing ever goes wrong, but there's always that slight possibility. Also I'm not perfect and this is my very first attempt, so if I did something wrong or could've done it better just let me know. Also be carefully, when changing the Script Timers, as a to low value might impact dramatically on your FPS.


The Design

This Client is not meant to Tackle the common Problem of a Headless Client joining to early, etc. It is meant to be persistent, reliable and functional. It more a "spawning handler" for various things like the loot. If you want a "perfect" Headless Client this is not the thing you're searching for. This is the Basement of a Script that is living from user Input, user Feedback and user advices. It wants further improving (if possible) and optimizing (if possible). Regardless of the fact, that it is fully Stable you can however do things wrong - I personally have only limited methods to test this Client, while you or other maybe have a large player base that is willing to tackle a new world of Zombies - so.. If you find any Bug or have any more wishes just let me know.


The Installation

Please prepare for everything, that you'll need:

  • An Editor of your choice (OK, this was obvious)
  • Your mission.sqm (Located in your MPMissions\DayZ_Epoch_%INSTANCE%.%MAP%
  • Your init.sqf (Located in your MPMissions\DayZ_Epoch_%INSTANCE%.%MAP%
  • Your config.cfg (Usually Located in a Folder called "instance_number_mapName")
  • The Headless Client itself (See also: GitHub - Headless Client)


IF you do NOT have a Headless Client Installed or failed to install it before:


Open your mission.sqm and Press CTRL + F. That will bring up the Search. Type in the Search Box "side="LOGIC". It will jump to a Class, you will want to change that class Number and add one to it. So if you found SIDE=LOGIC in "class Item1" you will want to change it to "class Item2".

Next paste the following Code ABOVE your renamed class.


		class Item2
			class Vehicles
				class Item0
					player="PLAY CDG";
					init="this allowDamage false; this setVariable ['mmHC',true,true];";


Before you continue, check that the class name from the code that you just copied is correct. In most cases you will have to change it to "class Item1".

Once you checked everything (Did you check everything?) press CTRL + F again and search for "class Groups". It will take you to the class, where you then can locate a single Line saying "items = 2". Change this to "items = 3". NOTE: It doesn't necessary has to be items 2 for you, if you already added something else before! 

To fully isolate the HC from the rest of your files you will have to change quite a few bits and pieces in the init.sqf. Near the Middle you will see a few calls like:

call compile preprocessFileLineNumbers "init\variables.sqf";

These Lines we're going to wrap in an IF. For me the whole thing looks like:

//Load in compiled functions
if (isServer || hasInterface) then {
	call compile preprocessFileLineNumbers "init\variables.sqf";				//Initilize the Variables (IMPORTANT: Must happen very early)

//progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "init\publicEH.sqf";				//Initilize the publicVariable event handlers

if (isServer || hasInterface) then {
	//progressLoadingScreen 0.2;
	call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";	//Functions used by CLIENT for medical
	//progressLoadingScreen 0.4;
	call compile preprocessFileLineNumbers "init\compiles.sqf";				//Compile regular functions
	//progressLoadingScreen 0.5;
	call compile preprocessFileLineNumbers "custom\scripts\rightclick\init.sqf";

You can put the "publicEH" in there to, that's totally fine, I only have it outside because I was doing something else with that to.


Underneath those calls we start our Headless Client:

if (!hasInterface && !isDedicated) then {
	//run on headless clients only
	call compile preprocessFileLineNumbers "headlessclient\variablesHC.sqf";
	call compile preprocessFileLineNumbers "headlessclient\compilesHC.sqf";


The next Part is finding

if (!isDedicated) then {

And replacing it with

if (!isDedicated && hasInterface) then {



The Last Bit is Optional, if you have Scripts that run on both server and client. You decide whether or not to Load them on the Headless Client, but I recommend not to. So you will want to put the bottom parts inside an IF again, for Example:

if (isServer || hasInterface) then {

	execVM "custom\scripts\weather\DynamicWeatherEffects.sqf";

	[7,true,true,15] execFSM "custom\fsm\core_time.fsm";
	#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf"



IF you do have a Headless Client installed or managed to do so before:


Add This to your init.sqf

if (!hasInterface && !isDedicated) then {
	//run on headless clients only
	call compile preprocessFileLineNumbers "headlessclient\variablesHC.sqf";
	call compile preprocessFileLineNumbers "headlessclient\compilesHC.sqf";



The Last Step is simply to create a Folder inside your Mission named "headlessclient" (You can ofc define your own paths) and put all the HC Files into that Folder. Edit the Variables if you want to or just hop right into game and start the massacre!


PS: If I was unclear with the Instructions at any point let me know.




Just out of interest I forced the HC to join the wrong slot, to see what happens. Apparently it can be in any slot, it doesn't differ ^^







Apparently some files on Github got broken during the Upload, they have meanwhile been replaced.

Share this post

Link to post
Share on other sites
1 hour ago, J001 said:

noob question, how do you login as a client to the dedicated server.

Well a headless client is basically a "virtual player" who`s screen is black. In order to play the game you have to actually start it. You could do that with a batch file, so here is mine for example:

Save as "name.bat"

@echo off
start "HeadlessClient" /MIN /HIGH /B "E:\SteamGames\steamapps\common\Arma 2 Operation Arrowhead\ArmA2OA_BE.exe" 0 0 -skipIntro -nosplash -showScriptErrors -noPause -client -connect= -port=2302 -nosound "-mod=E:\SteamGames\steamapps\common\Arma 2 Operation Arrowhead\EXPANSION;E:\SteamGames\steamapps\common\Arma 2 Operation Arrowhead\@DayZ_Epoch1051" -cpuCount=2 -name=HeadlessClient -profiles=HeadlessClient


The main Important things are "-client" and "-connect"


You could also you a c++ Library to start the HC whenever somebody connects.

Share this post

Link to post
Share on other sites


Thank your for your reply, i just tested it. and i had this message "signature timeout" by battleye and You were kicked off the game., any info how to solve this


Share this post

Link to post
Share on other sites
3 minutes ago, J001 said:


Thank your for your reply, i just tested it. and i had this message "signature timeout" by battleye and You were kicked off the game., any info how to solve this


You might want to validate your client files trough steam and also make sure, that you've started the game at least once.

If you've done those steps and it didn't help you still have to option to turn signature checks out in your config.cfg by changing "verifySignatures" to 0.

Share this post

Link to post
Share on other sites

Ok, thanks ViseVersa, i changed verifysignatures to 0 and now its loading.

One more question, is it possible as you in the video, to login as a HC player to that CIV slot?



Share this post

Link to post
Share on other sites
15 hours ago, J001 said:

Ok, thanks ViseVersa, i changed verifysignatures to 0 and now its loading.

One more question, is it possible as you in the video, to login as a HC player to that CIV slot?


In the Video I've logged in as normal Player. It's the headless Client, that joined the Civil Slot. The HC was started from a c++ library in that Video, which is why it started automatically. Originally somebody wanted to give me Money for that Library, which is why it's not included, because it would've been unfair to let somebody pay for it while everybody else get's it for free.

Share this post

Link to post
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

  • Similar Content

    • By VATwitch
      If you are using SurvivalServers, or any other server host that allows HTTP server pbo upload, DON'T USE IT! It doesn't save your changes to your server PBO regardless if the server is offline!
      I simply uploaded my PBO's to the FTP and it fixed it.
      I've followed the directions to the T, and I added my filters to the BE script.txt as well. I can't figure this out, could someone help me?
      Server RPT:

    • By UGRexie
      Dayz epoch server 
      Name: Dayz Epoch Tavi -missions-Hardcore-unitedgamers   Connection Info: Map  - Taviana
      List of mods in sever , 
      -Single Coin Currency
      Plot For Life
      Plot Management
      Group Management
      Lift & Tow
      Service points
      Custom start gear
      No weight limit
      Slow zombies
      1 Step build
      Andre Convoys
      Para Spawn
      Wai Missions
      DZMS Missions
      -Our Server is Hardcore ,
      -if you has a idea for a mod ask a admin , 
      -Server Restart every 4 hours 
      -Admin Teamspeak support, 
        ts- ts3.unitedgamers.eu
      Server Admin - Ask in ts for them if needed,
    • By Dzhabrailov
      Hello! who can make Headless Client for epoch1062 to order? Or I'm not at the address :(
    • By Nytrex
      Hello there!
      Not my first work, but also not the best!
      I'm just starting a own server, and adding a bit of customstuff for the future players.
      I wanted to share that stuff with you, so you can use it aswell, if you going to like it.
      Screenshots at the end Quote
      Tested on a ARMA 2 DAYZ Epoch server -
      I also changed the important "Map_" classnames to "Land_" so there will be loot in all the barracks, and the Super market :)
      Download: http://www.mediafire.com/file/b2winspp45saavs/balota.sqf
      1. Create folder for all your buildings in your dayz_server.pbo // Skip this if you already got one!
      2. Put the downloaded balota.sqf in this folder" 
      3. Go to your dayz_server.pbo again, head to the "init" folder, and add at the bottom from server_functions.sqf this:
      4. Repack your dayz_server-pbo, upload it again - There you go! 
      If youre are interested in the server, take look here: Community Server by Impact eSport
      Thanks for tuning in! If you find any bugs, just let me know them!
    • By ahughes3
      Hi, I have just tried installing the tow and lift script from Nox for version and whilst the tow and lift seems to work, it's had an impact on a couple of other things. Now, when my game starts, rather than loading into the game, I start off looking at the map and I get a message about "couldn't find some script to do with animals", then when I am in game, the F1 key to quieten the vehicle noise doesn't work. Anyone had this before, got any thoughts or steps to take to identify what's causing the problem?
  • Advertisement
  • Donation Box

    Please donate to support the community.
    We appreciate all donations!
  • Advertisement
  • Supporters
  • Latest Donations

  • Advertisement
  • Discord