← Home SEEBIE90 DOCS
The SOFLAM Integration Core mod is published under the Arma Public License (APL)Example code is free to useSuggestions: Discord to the author

SOFLAM Integration Core

Building a laser designator other mods can home in on Changed

A designator you carry, assemble on a tripod and operate as a gunner – publishing laser targets by code, so that missiles, turrets and aircraft from other mods can find them. These pages explain how such a system is built in Arma Reforger, and above all where it breaks once it runs on a dedicated server. If you build a mod that should work with it, start with Make your mod compatible.

In plain wordsTechniques from a laser designator mod: a target registry that other mods read, a tripod you can assemble, a network path that survives a dedicated server, and night and thermal vision. Each page is one problem and how to solve it.

View in the Workshop →

How to read these pages

Every page is one problem that took a while to get right: what goes wrong with the obvious approach, the technique that works instead, and a short example. The examples are excerpts from the real code of the SOFLAM Integration Core, shortened and commented – class, method, attribute and action names are the real ones (GTG_SOFLAM_). They are not whole files. Where a snippet is a pattern for your mod, its classes start with MyMod_, which stands for your own prefix.

These pages describe the published (stable) version of the Core, the one on the Workshop. A few member names in the code are German (GetLetzteMeldung, GTG_SendeZielAnlegen); they are quoted as they are, because that is what you have to type.

NoteAlmost everything on these pages was found by running on a dedicated server. Single-player and Workbench play hide the largest class of bugs, because client and server are the same machine there and nobody has to own anything. That split is the recurring theme.

For other modders

Do you build a missile, an aircraft, a turret or a designator of your own? These pages tell you step by step what to do so that your mod works with the Core – with the real names, real prefab text from the mods that already do it, and the mistakes they made on the way.

How it is built

The shape of it

Three kinds of participant that only know each other through one registry. A designator measures and reports a point with a four-digit code. The registry stores the point. A seeker asks for the nearest point with its code. Nobody holds a reference to anybody else, which is why a designator from this mod can guide a missile from a different one.

Designator: measure + report→Network: owner and relay→Registry: points by code→Seeker: nearest match

In the code: GTG_SOFLAM_LaserDesignatorComponent measures and reports, GTG_SOFLAM_Relay carries the message to the server when the player does not own the device, GTG_SOFLAM_LaserTargetManager is the registry, and GTG_SOFLAM_LaserSeekerComponent (or your own seeker that reads the registry) is the other end.

Rules that held up

RuleWhy
Match by code, never by entityThe registry is the only coupling. Designator and seeker can come from different mods, different players, different vehicles.
Everything sent has an ownerA client that does not own the entity sends to the server and nothing arrives. No error, no log. See Who may send.
One writer per factPosition is measured by one machine and broadcast. Every other machine derives what it needs from that.
Prefix every classA name clash does not break one mod, it breaks the whole script module – for every player. The prefix is cheap insurance.
Measure, do not guessLaser power limits, leg extension, offsets – all of them were run through by hand and confirmed on a server before they became numbers.
Example code on this page is free to use in your own projects (credit appreciated). The SOFLAM Integration Core mod is published under the Arma Public License (APL). Suggestions: Discord. Arma Reforger / Enfusion are trademarks of Bohemia Interactive.
Impressum · Privacy Policy