Arma 3
38 ratings
Werthles Headless Kit Guide
By Wert
Complete, concise, headless client kit to set up up any mission and server for use with headless clients. Build HC missions entirely from the editor, once WHK script files are copied to your mission folder. HCs control AI units instead of the server.
   
Award
Favorite
Favorited
Unfavorite
New version available:
A module version of this script is available here!

HCs, players and server will need to run this.
Introduction
Headless client: Arma game copy that just plays AI units. HCs can process AIs on separate machines, so servers can handle 100s more AIs with human players. This guide works for Arma 3 and Arma 3 Server.

Arma 3 Server can by downloaded via Steam Library tools.

I wanted to create a kit with everything needed to get HCs to work without having recreate units in scripts and work through several long guides. If this kit helps you, please like it so I know it has worked!

Features:
  • Editor/Script/Zeus AIs auto-transferred to HC control
  • AI waypoints/scripts/trigger sync preserved
  • Splits AIs evenly among multiple HC
  • Debug mode
  • HC test mission
  • Server/HC configurations and shortcut examples

Subscribing puts "@Werthles Headless Kit" in the Arma 3 game folder, or download here.[www.armaholic.com]

Video Guide

Any Arma 3 Mission on Headless Clients in 5 Minutes

- Alternative video link -

1. How to add scripts to your multiplayer mission

a)
Create HC(s) in your mission.
-Insert Unit->Game Logic->Virtual Entities->Headless Client
-Give it a unique name
-Set it as playable

b)
Add "init.sqf" and "WerthlesHeadless.sqf" from:
@Werthles Headless Kit\Mission Scripts
to the mission folder, usually:
Documents\Arma 3 - Other Profiles\<profile name here>\MPMissions\<mission name.map>

The parameters in "init.sqf" configure:
-Repeat on/off
-Repeat delay
-Debug on/off
-Balancing mode
-Start delay
-Sync delay

Use simple balancing with 1 HC or to ignore balancing.

c)
If WH may transfer AIs while they are waiting at trigger-synced waypoints, add a non-overlapping waypoint before it, and sync this to the same trigger. HC transfer causes a temporary desync.

d)
Re-save your mission as a multiplayer mission.
2. How to use the test mission
Move
@Werthles Headless Kit\Addons\HeadlessTest.Altis.pbo
into
Arma 3( Server)\MPMissions
or
subscribe here.
3. How to start a server and connect HCs

Copy:
Arma 3\@Werthles Headless Kit\My Headless Kit
Arma 3\@Werthles Headless Kit\steam_appid
and paste as:
Arma 3( Server)\My Headless Kit
Arma 3( Server)\steam_appid
on the machines you will use as HCs or servers.

Then choose your next step:
a) Set up LAN game
b) Set up dedicated server game


Headless clients cannot connect to game clients hosting internet games.

a) Set up LAN game

i)
Start Arma 3 and host a LAN multiplayer game, with the password:
arma
If you will run the HC on the same machine, go to iii), then enter:
connect="-connect=localhost";

ii)
Open:
Arma 3\@Werthles Headless Kit\Get LAN IP
then note the machine's IPv4 address.

iii)
On your HC machine, open this with a text editor:
Arma 3( server)\My Headless Kit\Headless Client\ArmA2OA.par

iv)
Put the IP from ii) after connect="-connect=
E.g.
connect="-connect=192.168.0.10";

v)
If you have Arma 3( Server) installed on C:\ in the default location, start the HC using the appropriate shortcut from:
Arma 3( Server)\My Headless Kit\Example Shortcuts

vi)
If not, create a shortcut to:
Arma 3( Server)\arma3server.exe

vii)
Right click it and select properties.

viii)
At the end of "Target", add a space, then paste:
"-par=@My Headless Kit\Headless Client\ArmA2OA.par"

ix)
Double click on the shortcut to run the HC.

x)
You can start more than one HC per machine, or repeat this process on multiple machines Your HCs should join HC slots on your server.

b) Set up dedicated server game

You will need various internal and external IP addresses for this. To get them, open the folder:
Arma 3( Server)\My Headless Kit\
on the appropriate machine and run either
Get My Internal IP
(IPv4) or
Get My External IP
to get its IPs.

i)
On the server machine, in notepad, open:
Arma 3( Server)\My Headless Kit\Server\WerthlesHeadless_config.cfg

ii)
Add the external IPs of all external HCs and the internal IPs for all internal HCs to the headlessClients line, e.g.:
headlessClients[]={"81.46.54.91","192.168.0.55","56.45.87.19"...};

iii)
On the HC machine, in notepad, open:
Arma 3( Server)\My Headless Kit\Headless Client\ArmA2OA.par

iv)
Put the server's IP in this file after connect="-connect=
E.g. if connecting the HC to the server via LAN:
connect="-connect=192.168.0.10";
E.g. if connecting the HC to the server via the internet:
connect="-connect=81.46.54.91";

v)
If you have Arma 3( Server) installed on C:\ in the default location, start the server/HC using the appropriate shortcut from:
Arma 3( Server)\My Headless Kit\Example Shortcuts

vi)
If not, create shortcuts to:
Arma 3( Server)\arma3server.exe
for a HC and for the server.

vii)
Right click it and select properties.

viii)
At the end of "Target", add a space, then paste:
"-par=@My Headless Kit\Headless Client\ArmA2OA.par"
for the HC shortcut and:
"-par=@My Headless Kit\Server\ArmA2OA.par"
for the dedicated server shortcut.

ix)
Double click on the shortcuts to run the HCs and server.

x)
You can start more than one HC per machine, or repeat this process on multiple machines Your HCs should join HC slots on your server.

Type this into Arma 3 chat to check this:
#login three
4. Other information
a) Opening Ports
To host an Arma 3 dedicated server, forwarded these ports to your computer (UDP):
2302, 2303, 3478, 4379, 4380, 27000 - 27050

Here is a good video of this.

b) Mods and Customisation
The files to alter are in:
Arma 3( Server)\My Headless Kit\Server
or
Arma 3( Server)\My Headless Kit\Headless

To launch your server/HC with mods, open the related:
Arma2OA.par
file and replace:
@Example mod 1
etc. with your mods' folder names, separating with a ;

Full details of other parameters:
https://community.bistudio.com/wiki/Startup_Parameters_Config_File
https://community.bistudio.com/wiki/Arma_3_Startup_Parameters
https://community.bistudio.com/wiki/server.cfg
https://community.bistudio.com/wiki/basic.cfg

c) Arma 3 Launcher
You can start HCs and servers with Arma 3 Launcher, however Arma 3 Server currently doesn't have this, and for HCs connecting via the internet, you would still need to alter .cfg files (possibly for LAN HCs too).

d) Compatibility
i)
Works alongside DAC, if set up as described by Monsoon.[www.armaholic.com]
Set a long enough WH start delay so DAC set up finishes first.
Enter DAC zone group numbers as:
(max total groups)/(No. of HCs).
DAC and WH scripts shouldn't affect each other. WH script will control editor/Zeus/other script created AIs, DAC will control DAC units only.
ii)
WH script changes AI unit locality. This could break some scripts where local commands are issued for units that are no longer local.
iii)
Compatible with UPSMON. Add a long enough start delay for UPSMON to set up first.
iv)
Other scripts that change how units spawn or their behaviour are likely to interfere with this script, so may not be compatible.
42 Comments
Skinner1818 6 Jul, 2021 @ 11:16am 
Don't suppose you have any idea why the revive system is causing this issue? It does take away a bit from the experience not being able to revive teammates at all.
Wert  [author] 4 Jul, 2021 @ 11:13am 
Wow, well done for figuring it out. Arma has many of these kinds of bugs/issues.
Skinner1818 1 Jul, 2021 @ 3:55pm 
So, I have been doing a bit more testing on this. This seems to be a bug with the default Bohemia revive system, since turning this off fixes the issue of non targeting AI's. I am using the bohemia default revive on the S.O.G Prairie Fire map if that helps at all.
Skinner1818 28 Jun, 2021 @ 7:53am 
Oh, I am using Task Force Radio as well
Skinner1818 28 Jun, 2021 @ 7:52am 
I am running this with Achilles, 3DEN Enhanced, JSRS, Enhanced movement+visuals and CBA-A3.

In terms of scripts, I am running a map marker script and a repair, refuel and rearm script. I took both of these away during testing and the issue still happened so it doesn't appear to be script related.
Wert  [author] 26 Jun, 2021 @ 9:27am 
Are you running this alongside other scripts or mods?
Skinner1818 26 Jun, 2021 @ 8:32am 
So, to add to this I have been doing some testing.

As soon as a player dies from being shot by HC controlled AI, the AI no longer see them as a target. The player can walk up to them and shoot them with no reaction from anyone in a squad.

If the player dies again, through manually respawning or being killed by a Zeus, then the AI register them as an enemy and engage with them again.

It just seems to glitch when the player initially dies and needs another death to reset the instructions.
Skinner1818 25 Jun, 2021 @ 11:27am 
Hi, I am having a bit of an issue with this in that whenever the HC is active, any AI spawned by Zeus completely ignore players. They can't see them or interact with them in any way.

Turning the HC off instantly makes them shoot at nearby players.

Currently using a 5 second looping sync with 10 second start up time and 10 seconds between each group; no load sharing between the server and the HC.

Any help would be appreciated.
Wert  [author] 19 Apr, 2021 @ 12:20am 
Hi there. Increase the Sync delay to 3 to 5 seconds or higher if still an issue. Should work.
pvtHenk 18 Apr, 2021 @ 8:06am 
Hi Wert, awesome script, allows us to simply use Zeus and HC without requiring any other scripting. We do seem to run into an issue tho. When units change locality to the HC, about 10% of them are either completely naked or only have a uniform. This seems to happen to both modded and unmodded units. Anything we can do to prevent that?