Skip to content

SIDC API

Hey Sky edited this page Nov 29, 2026 · 1 revision

SIDC API (for other mods)

🇬🇧 English · 🇩🇪 Deutsche Version

Source: SIDC-Framework → Scripts/Game/SIDC/API/SIDC_API.c and SIDC_MarkerSpec.c. Requires SIDC-Framework as a dependency of your addon.

1. What it is

SIDC_API is the public static script interface of the SIDC-Framework for other mods (Zeus modules, game modes, radar, mission scripts, bridges). It replaces direct access to SIDC_MarkerFactory / SIDC_MarkerStore / SIDC_MarkerSync with their positional parameters and static intermediate state. The signatures are meant to stay stable; internal classes may change.

All calls are static. Markers are described with an SIDC_MarkerSpec (section 2) and read back as SIDC_MapMarker.

Group Where it runs Behaviour
Server (…Server) Server only Immediate and authoritative, returns IDs, ignores locks (locked), owner freely selectable (-1 = system marker without player, up to 2000). On a client the call does nothing and returns -1 / false / 0 (and logs a warning).
Client (Request…) Client (also host) Request through the PlayerController like the UI: the server checks limits, rate limit and locks, the owner is the local player, no ID is returned (the marker arrives via sync, see GetOnMarkerAdded()).
Queries Server + client Read from the local SIDC_MarkerStore (server: all markers, client: all synchronised markers).
// Server: place an enemy marker
SIDC_MarkerSpec spec = new SIDC_MarkerSpec();
spec.m_sSidc = SIDC_API.SetAffiliation("10031000141211000000", EMilitarySymbolIdentity.OPFOR);
spec.SetWorldPos(pos);
spec.m_sUnitText = "Fire position";
int markerId = SIDC_API.CreateMarkerServer(spec);

2. SIDC_MarkerSpec

Describes a marker (replaces the 16 positional parameters of SIDC_MarkerFactory.PlaceMarker()): set the fields you need, leave the rest at their defaults. The server clamps all values on creation (text lengths, scale, rotation, line width), so nothing needs pre-checking.

Field Default Meaning
m_sSidc – SIDC string (padded / cut to 30 characters). Required.
m_iWorldX / m_iWorldY 0 World position (X and Z of the map, whole meters). Helper: SetWorldPos(vector)
m_iRotationDegrees -1 Direction arrow in degrees (0–360), -1 = stationary (no arrow)
m_fIconRotation 0 Rotation of the main symbol alone (−360..360)
m_fScalePercent 100 Scale in percent (10..500)
m_sUnitText empty Unique designation (field T)
m_sAdditionalInfo empty Additional information (field H)
m_sChannel empty Channel key (SIDC_ChannelConfig), empty = visible to all. Channels with scope SIDE / GROUP check the owner — markers without player (m_iOwnerPlayerId < 0) should use empty or an ALL channel
m_sPhysicalChannel empty Physical channel key (SIDC_PhysicalChannelConfig)
m_bLocked false Only the owner can change / delete (the server API ignores the lock)
m_bTimestampVisible true Show timestamp on the marker
m_sTimeOfDay empty Time HH:MM, empty = current in-game time (server)
m_bReinforced / m_bReduced false Reinforced (+) / reduced (−)
m_sQuantity, m_sEquipmentType, m_sSpeed, m_sAltitude, m_sCountry, m_sStaffComments, m_sCombatEffectiveness empty Extra fields (Carmenta letters): quantity C, type V, speed Z, altitude X, country AS, staff comments G, combat effectiveness K
m_iLinkedGroupId / m_iLinkedPointIndex -1 Lines / phase lines: points with the same group ID form a chain (order = point index). -1 = not a line point
m_iLineColor -1 Packed ARGB colour (SIDC_API.MakeColor()), -1 = none. Only at the anchor (point index 0)
m_fLineWidth -1 Line width, -1 = default. Only at the anchor
m_iOwnerPlayerId -1 Owner. Server API: -1 = system marker (no player, no player limit, only changeable through the server API when locked); player ID = counts towards that player's limit. Ignored by client requests — the local player is always the owner
Method Description
void SetWorldPos(vector worldPos) Takes X and Z of a world position (rounded to whole meters)
SIDC_MarkerSpec Duplicate() Independent copy, e.g. a template for several markers
static SIDC_MarkerSpec FromMarker(SIDC_MapMarker marker) Takes over all fields of an existing marker (read marker, change spec, update)
string BuildExtras() / int BuildStrengthFlags() Internal transport format (extra fields as one string / reinforced+reduced as bits 1/2)

3. Create / change / delete — server

Call Description
int CreateMarkerServer(SIDC_MarkerSpec spec) Creates a marker on the server and distributes it to all clients. Returns the marker ID, -1 on error (no server, no authority component on the GameMode, empty SIDC, limit reached).
int CreateChainServer(SIDC_MarkerSpec anchorSpec, array<vector> worldPoints, out int outGroupId) Creates a line / phase line: one point per entry in worldPoints (X and Z are used, Y ignored), order = point index (at least 2 points, max 500). SIDC, channel, owner, lock, colour and width come from anchorSpec (position / group / point index are overwritten); colour / width and the label (m_sUnitText) sit on the first point only. outGroupId = group ID of the chain (for DeleteGroupServer() / GetChain()), -1 on error. Returns the number of points created (smaller than the input if the limit is hit).
int AllocateGroupId() New free group ID for chains without a player (starts at 1 500 000 000).
SIDC_MapMarker BeginEdit(int markerId) Edit, step 1: returns a copy to change, null if the marker does not exist or this is not a server. Change it with the SIDC_MapMarker setters (SetTextUnit, SetSidc, SetScale, …).
bool CommitEdit(SIDC_MapMarker edited) Edit, step 2: applies the changed copy. ID / owner / group stay, values are clamped, the time is reset, all clients get the change. false if the marker was deleted in between or this is not a server.
bool MoveMarkerServer(int markerId, int worldX, int worldY) Moves a marker (ignores the lock). false if it does not exist.
bool DeleteMarkerServer(int markerId) Deletes a marker (ignores the lock). If it is an end point of a chain, the whole chain is removed (same as in-game); likewise the label of an area.
int DeleteGroupServer(int groupId) Deletes all markers of a chain / area. Returns the number deleted.
int DeleteMarkersByOwnerServer(int ownerId) Deletes all markers of one owner, e.g. the system markers of a mission (SIDC_API.SYSTEM_OWNER) or those of a player who left. Returns the number deleted.

SIDC_API.SYSTEM_OWNER = -1 (owner ID for markers without a player).

4. Create / change / delete — client (requests)

Call Description
bool RequestCreateMarker(SIDC_MarkerSpec spec) Asks the server for a marker for the local player. The server checks limits, rate limit and value ranges; m_iOwnerPlayerId is ignored. Also works on the host. false if there is no local PlayerController or the SIDC is empty.
bool RequestUpdateMarker(int markerId, SIDC_MarkerSpec spec) Replaces an existing marker with the values of the spec (like "Edit" in the UI): the new marker gets a new ID, the old one is removed if the local player may change it. For changes with the same ID use CommitEdit() on the server.
void RequestDeleteMarker(int markerId) Requests deletion.
void RequestMoveMarker(int markerId, int worldX, int worldY) Requests a move.
int AllocateLocalGroupId() Group ID for a chain the local player places point by point via RequestCreateMarker() (same scheme as in-game: player ID × 1 000 000 + random).

5. Queries — server + client

Call Returns
SIDC_MapMarker FindMarker(int markerId) Marker or null
int GetMarkerCount() Number of markers in the store
bool IsSynced() Client: true once the full marker set was received from the server (server: always true)
array<SIDC_MapMarker> GetAllMarkers() All markers (copy of the list; do not modify the markers themselves — use BeginEdit())
array<SIDC_MapMarker> FindByOwner(int ownerPlayerId) Markers of one owner
array<SIDC_MapMarker> FindBySidcPrefix(string sidcPrefix) Markers whose (padded) SIDC starts with the prefix, e.g. "10063" = all hostile units; a full SIDC gives an exact match. Drawing points (freehand) are skipped
array<SIDC_MapMarker> FindByChannel(string channelLanguageKey) Markers with this channel key (SIDC_ChannelConfig)
array<SIDC_MapMarker> FindInRadius(vector worldPos, float radiusM) Markers within a horizontal radius (meters). Drawing points are skipped
SIDC_MapMarker FindNearest(vector worldPos, float maxDistanceM) Nearest marker (horizontal) within maxDistanceM, else null. Drawing points are skipped
array<SIDC_MapMarker> GetChain(int groupId) All points of a chain / area, ascending by point index

6. Events — server + client

ScriptInvokers of the store. The argument of the handler is the SIDC_MapMarker.

Call Fires Handler
GetOnMarkerAdded() Marker is new (on the client also during the first sync) void Fn(SIDC_MapMarker marker)
GetOnMarkerChanged() Marker changed, also moved void Fn(SIDC_MapMarker marker)
GetOnMarkerRemoved() Marker removed (the object is read-only from here on) void Fn(SIDC_MapMarker marker)
GetOnSynced() Client: full marker set received void Fn()
SIDC_API.GetOnMarkerAdded().Insert(OnMarker);

void OnMarker(SIDC_MapMarker marker)
{
	Print("New marker " + marker.GetMarkerID() + " " + marker.GetTextUnit());
}

7. SIDC helpers

Call Description
string SetAffiliation(string sidc, EMilitarySymbolIdentity identity) Sets the affiliation (digit 4). Unknown identity: SIDC returned unchanged (padded).
EMilitarySymbolIdentity GetAffiliation(string sidc) Reads the affiliation of a SIDC.
string SetEchelon(string sidc, EMilitarySymbolAmplifier amplifier) Sets the echelon (digits 9–10). Not mappable: SIDC unchanged (padded).
EMilitarySymbolAmplifier GetEchelon(string sidc) Reads the echelon of a SIDC.
int MakeColor(int red, int green, int blue) Packed ARGB colour for m_iLineColor (0–255 per channel, alpha 255).
SIDC_MarkerListEntry FindCatalogEntry(string sidc) Marker from the catalogue (SIDC_AllMarkersConfig) for a SIDC, null if unknown.
string MarkerToJson(SIDC_MapMarker marker) One marker as a JSON object (same format as SIDC_PlacedMarkers.json, see ATAKmaps).

8. Channels of the local player (client)

Call Description
bool IsChannelKnown(string channelLanguageKey) true if the channel key exists in SIDC_ChannelConfig.
string GetLocalChannel() Current channel of the local player.
bool SetLocalChannel(string channelLanguageKey) Sets the channel of the local player and refreshes the map display. false for an unknown key.
string GetLocalPhysicalChannel() Current physical channel of the local player.
bool SetLocalPhysicalChannel(string physicalChannelLanguageKey) Sets the physical channel and refreshes the map display. false for an unknown key.

See Channel System for the channel model.

9. Zeus map view

On the Zeus map (editor open, full Game Master powers) a Zeus can see more than normal players – markers and drawings / phase lines. Two server settings control it for everyone (zeusSeeFactionMarkers = own faction, zeusSeeAllMarkers = all factions, see Server & Admin Guide). The API below gives single Zeus the "see everything" view without changing those settings.

Call Where Description
bool SetZeusSeeAllMarkersServer(int playerId, bool enabled) server Allows / forbids one player to see all markers and drawings of all factions on the Zeus map – regardless of the two server settings, channel, physical channel and group. Takes effect only while that player has the editor open with full powers. Applied to the player immediately; not persisted (gone after a server restart or when the player leaves). false on a client or without the authority component.
bool IsZeusSeeAllMarkersServer(int playerId) server true if the player was set via SetZeusSeeAllMarkersServer() or the setting zeusSeeAllMarkers is on. Always false on a client.
ESIDC_ZeusMarkerMode GetLocalZeusMarkerMode() client What the local player currently sees extra: NONE (editor closed / limited, or no Zeus view active), FACTION (own faction) or ALL.
// A mission script gives the current Zeus the full picture
SIDC_API.SetZeusSeeAllMarkersServer(zeusPlayerId, true);

// ...and takes it away again
SIDC_API.SetZeusSeeAllMarkersServer(zeusPlayerId, false);

10. Examples

// Server: phase line with colour and width
SIDC_MarkerSpec anchor = new SIDC_MarkerSpec();
anchor.m_sSidc = lineSidc;
anchor.m_sUnitText = "PL BRAVO";
anchor.m_iLineColor = SIDC_API.MakeColor(255, 0, 0);
anchor.m_fLineWidth = 4;

array<vector> points = { pointA, pointB, pointC };
int groupId;
int created = SIDC_API.CreateChainServer(anchor, points, groupId);
...
SIDC_API.DeleteGroupServer(groupId);

// Server: move a marker's text without changing its ID
SIDC_MapMarker copy = SIDC_API.BeginEdit(markerId);
if (copy)
{
	copy.SetTextUnit("New designation");
	SIDC_API.CommitEdit(copy);
}

// Server: remove all system markers of the mission
SIDC_API.DeleteMarkersByOwnerServer(SIDC_API.SYSTEM_OWNER);

Clone this wiki locally