Repository navigation
SMX API
🇬🇧 English · 🇩🇪 Deutsche Version
Source:
SkyMap-X-DEV→Scripts/Game/Helper/SMX_API.c. Requires SkyMap-X as a dependency of your addon. For chat messages see the Chat API.
SMX_API is the public static query interface of SkyMap-X: who am I (tablet ID, chat address, name, group), what state is my tablet in, where am I, which devices and trackers does my client know. It is read-only except for one function: SetZeusShowAllBFT() (server). All calls are static, no instance needed.
| Where | What |
|---|---|
| Client | Everything under Local tablet, Position, Known devices, Trackers |
| Server |
GetChatAddressForPlayer(), GetTabletIdForPlayer(), SetZeusShowAllBFT()
|
| Both | Zeus / BFT queries |
SMX_TabletInfo info = SMX_API.GetLocalTabletInfo();
if (info && info.m_bPoweredOn)
Print("I am " + info.m_sChatAddress + " at " + info.m_sGrid);Snapshot of the local tablet and its carrier (returned by GetLocalTabletInfo()).
| Field | Content |
|---|---|
m_iTabletId |
Tablet ID assigned by the server from the Bohemia identity (stable across restarts), -1 = not assigned yet |
m_sChatAddress |
Chat address T<ID>, empty until an ID exists |
m_sDeviceName / m_sDeviceGroup
|
Device name and group from the tablet settings (e.g. SkyKing Cam / A3-2B) |
m_bPoweredOn |
Tablet is on (TabMode not OFF) |
m_sTabMode |
Display form: OFFtab, ONtab, HANDtab, BIGtab, MINITab, PAPERMap, GMmode
|
m_sMode |
Mode: Off, On, GPS, Chat, Settings, Feeds
|
m_sFactionKey |
Faction key of the player (e.g. US), empty if unknown |
m_vPosition / m_sGrid
|
World position of the carrier and grid square (6 digits, see FormatGrid) |
m_iPlayerId |
Reforger player ID of the carrier |
| Call | Returns |
|---|---|
bool HasLocalTablet() |
true if a SkyMap-X tablet exists on this client (also switched off) |
bool IsLocalTabletOn() |
true if the local tablet is switched on |
int GetLocalTabletId() |
Tablet ID of the local player, -1 until the server assigned one |
string GetLocalChatAddress() |
Chat address T<ID>, empty until an ID exists |
SMX_TabletInfo GetLocalTabletInfo() |
Everything above in one object, null if this client has no tablet |
| Call | Returns |
|---|---|
bool GetLocalPosition(out vector worldPos) |
World position of the local player (controlled entity), false if none exists |
string GetLocalGrid(int digits = 3) |
Grid square of the local player, e.g. 123 456; empty if no position. digits per axis: 3 = 100 m square, 4 = 10 m, 5 = 1 m |
string FormatGrid(vector worldPos, int digits = 3) |
World position → grid EEE NNN (east, north) from the meters of the world coordinate, without map offset. Matches the in-game grid only if the map has no grid offset. digits 1–5 |
Devices this client knows: switched-on tablets of teammates it may see, plus cameras and trackers.
| Call | Returns |
|---|---|
array<SMX_Device> GetKnownDevices() |
All known devices (copy of the list) |
SMX_Device FindDevice(int deviceId) |
Device with this ID (SMX_DeviceID.id), else null
|
array<SMX_Device> FindDevicesByType(ESMX_DeviceType type) |
All known devices of a type (TABLET, CAM, TRACKER) |
SMX_Device FindTabletOfPlayer(int playerId) |
Switched-on tablet of a player (Reforger player ID), else null
|
bool GetDevicePosition(SMX_Device device, out vector worldPos) |
Tablets = carrier, cameras / trackers = the device entity. false if unknown (e.g. entity not streamed) |
int GetDeviceListRevision() |
Counter that rises on every change of the device list — cheap change detection instead of comparing the list |
| Call | Returns |
|---|---|
array<SMX_BFT_MapMarkerTracker> GetVisibleTrackers() |
All BFT tracker markers this client sees (player tablets, vehicles, AI, SMT). The server filters by faction / sub-channel via stream rules, so this is only what the player may see on the map |
array<SMX_BFT_MapMarkerTracker> FindTrackersInRadius(vector worldPos, float radiusM) |
Visible trackers within a horizontal radius (meters) |
SMX_BFT_MapMarkerTracker FindTrackerOfPlayer(int playerId) |
Visible tracker of a player (carrier's player ID), else null. Player trackers only |
How a Zeus sees BFT markers is set by the server config (bftShowZeus: own faction, bftShowAllZeus: all factions, see Server & Admin Guide). On top of that, "sees all markers" can be switched per Zeus at runtime.
| Call | Where | Description |
|---|---|---|
void SetZeusShowAllBFT(int playerId, bool enabled) |
Server (no-op on clients) | Enables / disables the "all markers of all factions" override for one player. Applied immediately — the player's marker stream is recalculated, also while the editor is open. Replicated to all clients. |
bool IsZeusShowAllBFTOverride(int playerId) |
Server + client |
true if this player was enabled via SetZeusShowAllBFT. |
bool IsZeusShowAllBFT(int playerId) |
Server + client |
true if the player sees all markers as Zeus: config bftShowAllZeus or individual override. |
bool IsZeusBFTAllowed(int playerId) |
Server + client |
true if the player sees BFT markers as Zeus at all (own faction or all): bftShowZeus or IsZeusShowAllBFT. |
bool IsLocalZeusSeeingBFT() |
Client |
true if the local player has the full editor open and may see BFT markers. |
Rules:
- Only applies while the player has the full Zeus editor open (limited editors do not count).
- Independent of the config: with
bftShowZeus: falseandbftShowAllZeus: falsethe enabled Zeus still sees everything, nobody else gets more. -
Not persistent: removed when the player disconnects and after a server restart. Set it again after the player has joined (e.g. on
OnPlayerRegistered). - Resolution per Zeus: individual override or
bftShowAllZeus→ all markers; elsebftShowZeus→ own faction only; else normal rules.
// Server: give a specific Zeus the full picture
SMX_API.SetZeusShowAllBFT(playerId, true);
...
SMX_API.SetZeusShowAllBFT(playerId, false); // back to the server config| Call | Returns |
|---|---|
string GetChatAddressForPlayer(int playerId) |
Chat address T<ID> of a player; assigns the ID on first call. Empty if not possible or not on the server |
int GetTabletIdForPlayer(int playerId) |
Tablet ID of a player (assigned on first call), -1 if not possible or not on the server |
The tablet ID is derived from the player's Bohemia account and survives restarts, renames and group changes (see Screen Mirror & Tablet ID).
SkyKing Mod Docs · EN (Page) / DE (Page-DE) · Keep both languages in sync with the source repos (SkyMap-X-DEV, SpeedUI, SIDC-Framework, Throw Back Grenade) and the companion tools (ATAKmaps, SIDC---C2---Command-Control).
🇬🇧 English
General
SkyMap-X (SMX)
- Overview & Usage
- Workflows (step by step)
- Camera functions (Fnc1/Fnc2, NV)
- Drones (WIP)
- SecondMap Bridge (map provider)
- SMX API (for mods)
- Chat API (for mods)
- Screen Mirror & Tablet ID (WIP)
SpeedUI (SUI)
SIDC-Framework (SIDC)
Throw Back Grenade (TBG)
Companion tools
🇩🇪 Deutsch
Allgemein
SkyMap-X (SMX)
- Überblick & Bedienung
- Abläufe (Schritt für Schritt)
- Kamera-Funktionen (Fnc1/Fnc2, NV)
- Drohnen (in Arbeit)
- SecondMap-Bridge (Kartenanbieter)
- SMX-API (für Mods)
- Chat-API (für Mods)
- Bildschirm-Spiegelung & Tablet-ID (in Arbeit)
SpeedUI (SUI)
SIDC-Framework (SIDC)
Throw Back Grenade (TBG)
Begleit-Tools