← 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

For other modders

Make your mod compatible with the SOFLAM Core New

The Core is a laser-target registry plus a SOFLAM and a tripod. Your mod can use it in three ways: read the registry (a guided weapon), set a code and fire (an aircraft or turret), or put a laser point into it (your own designator). This section says what to do in each case, in the order you will meet the problems.

In plain wordsStart here if you build a missile, an aircraft, a turret or a designator and want it to work with the SOFLAM Core: what you build, what the Core already does, and which names you may rely on.
How to read the examplesGTG_SOFLAM_* are names from the Core. MyMod_* in a snippet stands for your prefix – give every class of your mod one. Snippets are shortened excerpts. Log lines are quoted exactly as the code prints them (German), with a translation.

What do you want to build?

I want to ...What you doPage
Make a missile, bomb or shell follow a SOFLAM laserGive it a four-digit code and read the registry from its seeker (or attach the Core's seeker component).2. Make a weapon follow the laser
Let the crew of an aircraft or vehicle set a code and fire guided weaponsA code holder on the turret, four dial actions in the cockpit, an injector that copies the code onto each missile, the right seat name.3. Aircraft, vehicles and turrets
Mark targets from something that is not a SOFLAM (drone, turret)Either put the Core's designator component on it, or report to the registry yourself through your own relay.4. Report your own designator
Make my mod work with or without the CoreA small bridge addon that depends on both (a pattern; the published mods depend on the Core directly).5. Optional integration
Find out why nothing happens on my serverChecklist, then symptom → cause → fix.6. Testing and common errors

Whatever you build, do step 1 first: the Core has to be a dependency of your addon.

What the Core does, and what you build yourself

The Core is the meeting point. It holds the laser points and brings them to every machine. It does not know your aircraft, your missile or your cockpit. Every aircraft mod that exists today built the parts around it itself:

The Core gives youYou build
The registry of laser points, filled on every machine (GTG_SOFLAM_LaserTargetManager).The seeker that reads it, in your missile (the AH-64 and AH-1Z mods each wrote their own).
A SOFLAM that publishes points: handheld, or assembled on a tripod and used as a gunner.The code holder and the four code dials on your aircraft; the Core's dial action only works on a device that carries a designator.
Input actions and default keys for designating, ranging, tracking, vision modes and laser power.The injector that copies the code onto a missile when it is fired.
The relay that gets messages to the server when the player does not own the device (inside the designator).The HUD marker for laser spots, the seat check, flight profiles and cockpit screens.
Night/thermal vision, the IR gate and the visible beam as components you can add to any device with an optic.For a designator that is not the Core's: your own relay (step 4 shows how).

The public surface

These are the names that foreign code in the existing mods really uses or that the Core documents as stable (the registry's methods are named a promise in the Core's design notes). Everything else in the Core is internal and may change.

Class or nameRoleWhat foreign code does with itSeen in
GTG_SOFLAM_LaserTargetManager (a GameSystem)The registryGetInstance() and check for null every time. Read: GetTargetsByCode, GetAllTargets, GetClosestTargetByCode, GetTarget, GetTargetCount. Publish: CreateTarget, UpdateTarget, RemoveTarget.AH-64, AH-1Z
GTG_SOFLAM_LaserTargetOne registry entryGetPosition(), GetCode(), GetCreatorId(), GetLetzteMeldung() (time of the last report).same
GTG_SOFLAM_LaserSeekerComponentSeeker you can attach to a missile or turretSetLaserCode, SetSearchActive, IsLaserTargetFound, GetLaserTargetPosition, GetDirectionToLaserTarget, GetSeekerAngles, static FindSeekerById; override the protected SelectTarget / AcceptTarget.no checked mod attaches it
GTG_SOFLAM_LaserDesignatorComponentThe designator on a deviceSetLaserActive, IsLaserActive, SetLaserCode, GetLaserCode, SetActionsEnabled, GetCreatorId, SetCameraEntity, GetLaserPower / SetLaserPower; static FindOn(entity). A subclass may override the protected ComputeTargetPosition.the Core's own prefabs; its test emitters in the AH-64 / AH-1Z mods only publish through the registry
GTG_SOFLAM_SoflamDesignatorComponentThe designator class that sits on the SOFLAM prefabs (five-ray beam bundle)Never search for it by its own class; use GTG_SOFLAM_LaserDesignatorComponent.FindOn(entity), which finds both.Core
GTG_SOFLAM_Relay and the GTG_SOFLAM_Sende* methods on SCR_CharacterControllerComponentThe route to the serverUsed by the designator. It resolves a RplId to a GTG_SOFLAM_LaserDesignatorComponent and nothing else, so a device without that component needs its own relay.Core
GTG_SOFLAM_LaserCodeDigitActionOne code wheel (user action)Put four on a device that carries a designator, with m_iDigitIndex 0..3. Digits run 1..8.Core prefabs
GTG_SOFLAM_NVState“Can this viewer see infrared?”CanLocalPlayerSeeIR(); set SetTemporaryNVState(true) while the player looks through your night-vision optic.Core
GTG_SOFLAM_VisionModeComponent, enum GTG_SOFLAM_EVisionModeNormal / night vision / thermal on any device with an opticAdd it to the device; call SetInputEnabled(true) when the player starts looking through, false when they stop.Core prefabs
GTG_SOFLAM_BeamComponent, GTG_SOFLAM_LightEntity, prefab GTG_SOFLAM_IRLaserLight.etThe visible IR beamAdd the beam component next to a designator and set m_sBeamLightPrefab.Core prefabs
GTG_SOFLAM_SoflamSightsComponentThe optic of the SOFLAM; knows when you look through it (IsAiming())Inherit the SOFLAM prefab rather than rebuilding it.Core
GTG_SOFLAM_IsAimingConditionCondition for the control-hint displayReference it from your own AvailableActions.conf.AH-64
Prefabs PEQ1_SOFLAM.et {F2A55A212EBAF03F}, PEQ1_SOFLAM_Mounted.et {6A48B5E000005012}The carried and the turret-mounted SOFLAMInherit them (test emitters in the AH-64 / AH-1Z mods) or list them in an arsenal catalogue.AH-64, AH-1Z
Input actions GTG_SOFLAM_DesignatorAction (T), _RangefindAction (Y), _TrackingAction (U), _VisionModeAction (J), _ToggleNvThermalAction (mouse:button2), _GainUpAction / _GainDownAction (LSHIFT + wheel), _LaserPowerUpAction / _LaserPowerDownAction (H + wheel)Keys of the SOFLAMKeep the attribute defaults of the designator and vision components and your device gets these keys. Do not define actions with these names yourself.Core
Be awareThe Core ships GTG_SOFLAM_LaserSeekerComponent, but none of the Core's prefabs and none of the mods checked for this page attaches it – they all read the registry directly. Both ways are described on the page about guided weapons; the registry route is the one that is proven in play.

Which existing mod to copy

ModPattern it showsDepends on the Core
Sage's AH-1Z – SOFLAM Integration (Workshop)Aircraft: code holder, four cockpit dials, injector, seeker, HUD markers. The cleanest aircraft template.Yes (direct, in addon.gproj)
AH-64 SOFLAME Integration (Workshop)The same, plus cockpit screens and flight profiles. More than you need for the Core part.Yes

Five rules for foreign code

  1. List the Core as a dependency, and only one copy of it (step 1).
  2. Ask for the registry every time and check for null: GTG_SOFLAM_LaserTargetManager.GetInstance() returns null when no world is loaded. Do not keep it in a field.
  3. Skip entries at the zero vector. CreateTarget stores no position, so a point that was created but never reported sits at 0 0 0.
  4. Prefix everything you add, including RPC methods and input actions. A name clash takes down the whole script module for every player.
  5. Test on a real dedicated server with a separate client. Most faults in this area are invisible in Workbench (checklist).
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