Repository navigation
SIDC SecondMap
🇬🇧 English · 🇩🇪 Deutsche Version
Source:
C:\Users\Sky\Documents\GitHub\SIDC-SecondMap· prefixSIDC_SecondMap_· Enfusion / Enforce Script. Verified againstScripts/Game/SIDC_SecondMap/*.c,Configs/System/chimeraInputCommon.conf,Configs/Map/SIDC_SecondMap_Test.conf,UI/Layouts/SecondMap/*.layout. Status: work in progress / prototype, not yet released. No dedicated repo yet — lives as its own addon (addon.gproj, IDSIDCSecondMap) alongside the SIDC-Framework family.
SIDC-SecondMap adds one or more extra, persistent map views that can stay on screen at the same time as the normal (vanilla) map — e.g. a small overview map that never closes, next to the full-screen map opened with M. It ships two different implementations of such a view:
-
SIDC_SecondMapNativeView— reuses the engine's own native map renderer (full vanilla look: real building footprints, forest, contour lines from the.topo). Looks identical to the vanilla map, at the cost of a hard limitation (see §7). -
SIDC_SecondMapView— an independent view built purely from UI widgets (ImageWidget+CanvasWidget), with its own from-scratch renderer for roads, contour lines, buildings, trees, power lines and place-name/landmark labels. Fully independent of the vanilla map's internal state, and any number of instances can be placed and shown at once.
Both are GenericEntity prefabs placed directly in the world (category SIDC/SecondMap in the entity browser) and both plug into a shared focus/input hub, SIDC_SecondMap_ViewManager, so keybinds work the same regardless of which implementation is used.
- The normal map still opens/closes with
Mas always. -
,/.— cycle focus between the vanilla map slot ("BASE") and each placed extra view, in registration order. -
Ctrl+N— toggle the currently focused extra view open/closed with vanilla map input (MapContext). Has no effect while BASE is focused (useMfor that). -
Ctrl+B— same, but passive: the view opens without activatingMapContext(no player input), e.g. as a pure display. -
Vanilla map controls (focused view with input): right mouse hold = pan, WASD = pan, mouse wheel /
MapZoomIn/Out= zoom, right click = radial menu, left click/drag = markers (see §8). The old arrow/PageUp/PageDown actions are legacy only.
"Focus" only controls which view receives these keys — it has nothing to do with which views are currently open. Any number of extra views may be open on screen simultaneously; only one of them (or BASE) is focused at a time.
Category SIDC_SecondMap_Global (Configs/System/chimeraInputCommon.conf, priority 62).
| Action | Default | Note |
|---|---|---|
SIDC_SecondMap_ToggleView |
Ctrl + N |
Open/close the focused extra view |
SIDC_SecondMap_CycleNext |
. |
Focus next view (BASE → view 1 → view 2 → … → BASE) |
SIDC_SecondMap_CyclePrevious |
, |
Focus previous view |
SIDC_SecondMap_ToggleViewPassive |
Ctrl + B |
Open/close the focused view without MapContext (passive) |
SIDC_SecondMap_DebugSwitchView |
Ctrl + J |
Open the session debug menu (see §9) |
SIDC_SecondMap_ToggleCoControl |
Ctrl + F5 |
Release/lock the focused session for additional controllers (see §9). Not a dev keybind - always active (own context SIDC_SecondMap_Core) |
SIDC_SecondMap_PanUp/Down/Left/Right, ZoomIn/Out
|
Arrows / PgUp / PgDn | Legacy, no longer needed (vanilla MapContext actions are used) |
Dev keybinds: all keys above except Ctrl + F5 are development helpers (later everything is meant to be driven by script). They are switched off as a whole by the checkbox ActivateDevKeybinds (m_bActivateDevKeybinds, category "SIDC - Keybinds") in Configs/System/SIDC_SecondMap_DebugMode.conf - default off, and a missing .conf also means off. Changes take effect after a restart / Workbench play, not live. The map's own mouse interaction (pan, zoom, context menu, markers) is not affected.
The input context is only activated while at least one extra view is registered in the world, and is kept alive by a repeating timer (ActivateContext self-expires after ~5 s, refreshed every 500 ms).
| Entity | Attributes | Purpose |
|---|---|---|
SIDC_SecondMapNativeViewClass |
m_sLayout (layout with a MapWidget), m_sMapConfig (SCR_MapConfig, used only if the vanilla map was never opened yet), m_fInitialZoomPPU
|
Vanilla-look view, one native renderer for the whole engine |
SIDC_SecondMapViewClass |
m_sImageOverride (fallback satellite image), m_sLayout (layout with MapImage/Overlay widgets), m_fInitialZoom, m_sMapConfig (SCR_MapConfig, e.g. MapFullscreen.conf), m_iForceTreeIndividualVisibility (default 100; forces individual tree dots on regardless of what the map config says, -1 = use the config value unchanged) |
Independent custom-rendered view, any number placeable |
m_sDisplayName (on the shared base SIDC_SecondMap_ViewBase) is the name shown in focus-change log lines. Further base attributes: m_bShowMarkers, m_bShowChannelInfo, m_sPhysicalChannel (see §8).
SIDC_SecondMap_ViewManager (singleton)
├── tracks focus index (0 = BASE/vanilla, 1..N = registered views, in registration order)
├── registers/removes the 6 input actions above (Ctrl+N, ,/. , arrows, PgUp/PgDn)
└── routes keys to GetFocusedView() only
SIDC_SecondMap_ViewBase (GenericEntity) — shared registration + display name
├── SIDC_SecondMapNativeView — drives the native SCR_MapEntity renderer directly
└── SIDC_SecondMapView — independent widget-based renderer
├── SIDC_SecondMap_TopoData (static, per-world) — parses the map's .topo file (roads w/ type, building footprints, tree point cloud)
├── SIDC_SecondMap_WorldScan (static, per-world) — fallback source: scans Building/PowerlineEntity from the live world (used when .topo data is missing). For power lines it only gets each PowerlineEntity's own position (no real pole-connection data exists), then reconstructs the line network by greedily matching the globally shortest pole-to-pole pairs first, capped at 2 connections per pole (junction poles with 3 real connections lose one edge - visually cheaper than a wrong "return" line)
├── SIDC_SecondMap_Contours (static, per-world) — computes contour lines from terrain height via marching squares, tiled + spread over frames
└── SIDC_SecondMap_MapStyle (per-view instance) — reads a vanilla SCR_MapConfig (layer zoom bounds, road/building/tree/grid styling, descriptor visibility) so the custom renderer matches the normal map's look
SIDC_SecondMap_TopoData, _WorldScan and _Contours are all static and shared across every open SIDC_SecondMapView — parsed/scanned once per world, not once per view.
| File | Purpose |
|---|---|
SIDC_SecondMap_ViewManager.c |
Focus tracking + the 6 input actions, shared by all view types |
SIDC_SecondMap_ViewBase.c |
Common base entity: display name, register/unregister with the manager |
SIDC_SecondMapNativeView.c |
Vanilla-renderer view: pan/zoom against SCR_MapEntity, hides itself while the real map is open and restores its own state afterward |
SIDC_SecondMapView.c |
Custom widget-based view: image + overlay drawing, road/building/tree/landmark/label rendering (~1300 lines) |
SIDC_SecondMap_TopoData.c |
Binary .topo chunk parser (ROAD, AREA, BULD chunks) |
SIDC_SecondMap_WorldScan.c |
Live-world fallback scan for buildings/power lines, tiled across frames |
SIDC_SecondMap_Contours.c |
Marching-squares contour line generator from BaseWorld.GetSurfaceY, tiled across frames |
SIDC_SecondMap_MapStyle.c |
Reads a vanilla SCR_MapConfig (layers, road/prop styling, descriptor visibility) for the custom renderer |
SIDC_SecondMap_ classes/files (entities drop the trailing underscore: SIDC_SecondMapView, SIDC_SecondMapNativeView) · members: m_a array, m_s string, m_f float, m_i int, m_b bool · protected for internal state and helpers, only the base-class contract (IsOpen/ToggleOpen/ZoomStep/GetDisplayName) and the manager's public API are exposed.
-
SIDC_SecondMapNativeViewcannot be shown at the same time as the vanilla map. The engine's native map renderer (SCR_MapEntity/MapWidget) is global — a second view sharing it would fight the vanilla map over pan/zoom/visible layer. Verified by test (2026-09-26): a secondSCR_MapEntityinstance moves/empties the normal map. The workaround implemented here: the native view remembers its own pan/zoom, hides the moment the vanilla map opens (SCR_MapEntity.GetOnMapInit), hands its pan/zoom back to the vanilla map on open (GetOnMapOpen), and resumes with its own state after the vanilla map closes (GetOnMapClose). -
SIDC_SecondMapViewexists specifically to work around that limitation — it never touches the native renderer, so any number of instances can be open simultaneously, together with the vanilla map. The cost is a from-scratch renderer that has to re-implement road/building/tree/label drawing and styling from the map config itself. - The
.topofile has no readable contour-line data — contour lines are always computed at runtime from terrain height (SIDC_SecondMap_Contours), not read from the file. - Landmark icons only cover a curated allow-list of descriptor types (
IsLandmarkType) — trees, bushes, individual rocks, fences etc. are intentionally excluded (they would blanket forested terrain). - If a map's satellite background image can't be read automatically from the map entity's prefab data,
m_sImageOverridemust be set manually (a warning is logged when this happens). - Only one
SIDC_SecondMapNativeViewmakes sense per level (it drives the one global native renderer); any number ofSIDC_SecondMapViewinstances can coexist. - Power lines are drawn as an approximation, not real topology: the engine only exposes each
PowerlineEntity's own placement, not which poles it actually connects. A pole with 3 real connections (a junction) will visibly lose one line, since every pole is capped at 2. - Individual tree dots are forced on via
m_iForceTreeIndividualVisibility(default100) because the vanillaMapFullscreen.confhas that particular sub-layer set to 0 (off) - vanilla only shows forest as a filled area, never as individual points. -
SIDC_SecondMapViewnow also shows: a grid on/off + a scale-bar legend (both read fromSCR_MapConfig.m_bEnableGrid/m_bEnableLegendScale), and every map marker read-only fromSCR_MapMarkerManagerComponent. Static markers reuse the real marker layout +SCR_MapMarkerWidgetComponent.InitClientSettings(same code the vanilla map uses), so they look identical and work with any mod's custom marker types; only the on-screen position is computed by this view itself. Marker placing/editing and drawing were added later — see §8. Ruler, watch and the tools menu are still not implemented.
World/2 MapEntitys Test.ent + Configs/Map/SIDC_SecondMap_Test.conf — a test level with two map entities, used to verify the "native renderer is global" limitation above. UI/Layouts/SecondMap/SIDC_SecondMap_TestLayout.layout and the two production layouts (SIDC_SecondMapView.layout for the native view's MapWidget, SIDC_SecondMapImageView.layout for the custom view's MapImage/Overlay) are the layout contracts each view type expects (see §4).
Both views depend on SIDC-Framework and render its markers with their own layer (SIDC_SecondMap_MarkerLayer, reads SCR_MapMarkerManagerComponent, incl. disabled markers, edge culling, sync ≤ 0.1 s while drawing / 0.5 s otherwise).
- Markers: SIDC markers (layouts, phase lines, drawings), vanilla static markers (custom/military: show, move, delete, edit, hover shows type icons) and dynamic markers (squad leader/member; any other type from the marker config gets its layout, position updates every frame, text/icon updates only for squad leader/member).
-
Interaction (view with input): right click = radial menu with all framework entries + category "Marker" (custom/military dialogs, own
MenuBasemenus inSIDC_SecondMap_VanillaMarkerMenus, presets inConfigs/System/chimeraMenus.conf) + "delete marker"; left click on marker = edit, left drag = move,MapMarkerDelete= delete,I= inspect, hover = marker info, Shift+click chain = drawing, all framework keybinds work in the focused view. -
Physical channel per view: script (
SetPhysicalChannel/OpenWithChannel) > attributem_sPhysicalChannel> default entry ofSIDC_PhysicalChannelConfig. Only markers of that channel are visible and new markers/drawings preselect it. Framework side:SIDC_MapHost(Map/SIDC_MapHost.c, external cursor/channel source set viaSIDC_MapHost.SetExternal) and theviewerPhysicalChannelOverrideparameter ofSIDC_ChannelVisibilityResolver.ResolvePercent. -
Script API (only the two extra views, not the vanilla map; no auto-focus on open):
Open/OpenWithInput(bool)/OpenWithChannel(bool, string)/Close,IsReady/IsInteractive/IsMapInputEnabled,CenterOnWorld/GetCenterWorld/PanByPixels/ZoomTo/ZoomBy/GetZoom/ZoomStep,StartDrag/UpdateDrag/EndDrag,WorldToViewPixels/ViewPixelsToWorld/GetCursorViewPixels/GetCursorWorldPosition/GetViewSizePixels,GetHoveredMarkerObject/DeleteMarkerObject,GetPhysicalChannel/SetPhysicalChannel/IsChannelInfoEnabled. - Not supported: vanilla radial entries bound to the open vanilla map (commands, transport, recon), hover/click popups for dynamic markers, zoom-layer text hiding.
-
Status: vanilla marker creation, dynamic markers and the new menus are not yet tested in-game (
chimeraMenus.confmay need a Workbench restart). - Repo README:
SIDC-SecondMap/README.md(German).
Status: implemented, not yet released. The component
SIDC_SecondMap_ReplicationManagermust be added to the GameMode (prefab/entity) in the Workbench - without it everything runs locally and without sync.
Several players can look at the same view: some control it (pan/zoom), others watch passively or co-control.
Terms
| Term | Meaning |
|---|---|
| Session | Every time a player opens a view with map input (Ctrl+N), a new session with its own ID is created (server counter 1, 2, 3 …), independent of other players. A session ends when its last controller leaves. |
| Controller | Controls the session. Any number per session. The creator is the owner and first controller. |
| Viewer | Watches passively (no map input), follows the controllers' pan/zoom. |
| Co-control ("frei") | Controllers released the session for additional controllers (Ctrl+F5). The first controller is always free; further ones may only join while released. |
isLiveView |
true while more than one participant (controllers + viewers) is present. Pan/zoom is only sent then. |
Overlay: SIDC_FullscreenInfoChannels.layout shows ViewID (session ID of this view, ? until the server has replicated it) and ViewControler (name(s) of the controller(s), comma-separated).
Debug menu (Ctrl+J, SIDC_SecondMap_DebugSwitchView.layout): list of all running sessions as Name | ID n | Controller(s) | Owner [| frei].
| Button | Action |
|---|---|
btn_checkView |
Watch the selected session passively (opens the local view with the same key, follows the controllers) |
btn_checkViewAsController |
Join as an additional controller - only if the session is released (Ctrl+F5), otherwise the menu stays open and the reason is logged |
btn_back, btn_close, Esc
|
Close the menu |
Sync rules
- Transferred: view centre (world x/z) + visible width in metres (not pixels per metre), so different resolutions show the same section, plus the host device's brightness (see §10).
- Only while
isLiveView, only on change, about 10 times per second. Controller → server → all other participants. - Simultaneous panning: the server locks a session for 400 ms for the controller who is currently changing it and drops other controllers' states meanwhile (the blocked controller is overwritten by the lock holder's state).
- A receiving client never sends the received state back (no echo). A new co-controller receives the others' current state instead of sending its own.
- Disconnect: the player leaves all sessions; a session without a controller is removed.
Manual steps in the Workbench: add the component to the GameMode; create the button btn_checkViewAsController in SIDC_SecondMap_DebugSwitchView.layout; add the strings SIDC-UI-btn_back, SIDC-UI-btn_close, SIDC-UI-btn_checkViewAsController to the string table.
Files: SIDC_SecondMap_ReplicationManager.c (GameMode component + modded SCR_PlayerController for all client→server RPCs), SIDC_SecondMap_ViewManager.c (local sync tick, join/watch API), SIDC_SecondMap_ViewBase.c (session ID, role, sync state), SIDC_SecondMap_DebugSwitchViewMenu.c (debug menu).
Status: implemented, tested in multiplayer with two clients. Component
SIDC_SecondMap_MonitorComponent(SIDC_SecondMap_Monitor.c) shows the SecondMap on any entity whose material uses$rendertarget.
Two modes (attribute m_bFollowHolder):
| Mode | Where | Behaviour |
|---|---|---|
Tablet watching (m_bFollowHolder = 1) |
On the SkyMap-X tablet prefab (SMX_Tablet_Base.et) |
The screen of a tablet carried by another player shows that player's map, as long as you are in range, in the same faction and the carrier has an active map. The carrier's own tablet is untouched. Purely local, nothing is replicated by the component. |
Monitor (m_bFollowHolder = 0) |
World prop, e.g. OBS_TV_01.et
|
A player with a tablet couples/uncouples the monitor with the interaction SIDC_SecondMap_MonitorCoupleAction. The server stores the session ID (replicated), every client in range renders it locally. No faction limit. |
Further attributes: m_iPriority (1-5; if more displays than allowed are in range, the highest priority wins, ties go to the nearer one - e.g. big presentation monitor 5, tablet 1), m_iRenderWidth/m_iRenderHeight (render target size at 100 % quality, match the aspect ratio of the screen), m_sLayout, m_sViewPrefab.
Client settings (framework settings menu, stored locally in $profile:SIDC_Framework/Player/Settings/secondmap.json, never replicated):
| Setting | Default | Meaning |
|---|---|---|
| Auto mode | on | Only displays with priority 1-3 follow the auto mode; higher priorities (presentation monitors) always run |
| Max displays | 5 (1-25) | Highest number of displays rendered at once |
| Range | 10 m (5/10/15/20/25) | Displays further away are not rendered |
| Render quality | 75 % (5-100) | Scales the render target size |
| Update rate | 15 Hz (5-60) | Below 60 Hz the render target is only made visible for one frame per update |
| Only in view | on | Displays behind you are not rendered |
| Show markers | on | Draw map markers on the displays |
The brightness you set on the SkyMap-X tablet (keybinds, settings slider) is synced to every display that shows your map, so the screen does not glow at night.
Data path:
-
SMX_MainComponentX.SetBrightnessAndOpacityconverts the overlay opacity of the tablet into a brightness (1 - opacity, 1 = full) and callsSMX_MapProvider.SetBrightness(also after every successfulOpen()). - The bridge (
SMX_SecondMapProvider.SetBrightness) hands it to all its views viaSIDC_SecondMap_ViewBase.SetSyncBrightness. - It travels with the existing view state sync as a fourth value next to centre x/z and visible width (
GetSyncState/ApplySyncState,RpcAsk_SIDC_ViewState/RpcDo_ViewState). It is only resent when it changes by more than 0.005. -
SIDC_SecondMap_MonitorComponent.ApplyBrightnesssets the opacity on the render target layout:Content.SetOpacity(brightness)andDim0.SetOpacity(1 - brightness).
Layout requirements (SIDC_SecondMap_MonitorRT.layout, inside RTTexture0): a frame Content (the map is created inside it) and above it (higher Z order) a black full-size image Dim0 with start opacity 0. Both names are looked up by the script. A layout without them still works, only without dimming. The leftover widget Dim in the layout is not used by the script.
Notes from testing:
- A semi-transparent black overlay alone did not darken the render target; the combination "map fades, black fades in" does.
- Roads, water, buildings and trees are draw commands of the
Overlaycanvas insideContentand are dimmed by theContentopacity as well. - The brightness is only sent while the session is live (someone is watching). New watchers receive the last state from the server.
-
Markers on the displays: only SIDC markers are shown on tablet-watching displays and monitors. BFT markers (SMX trackers: device, SMT, UTD) are not shown there. The server only streams BFT trackers to players with a registered active SMX tablet (
BFT_ShouldShow, "observer-has-no-registered-tablet"), so a viewer without a tablet never receives them and the SecondMap cannot draw them. Known limitation; a possible solution (viewer is treated like the carrier for BFT visibility) is not implemented yet. The attributem_sPhysicalChannelof the component sets the physical channel used to filter SIDC markers (empty = the viewer's own channel).
Debug: the brightness path logs [BRIGHT] ... lines (tablet, bridge, send, server, receive, monitor) via Print.
Files: SIDC_SecondMap_Monitor.c, SIDC_SecondMap_Settings.c, SIDC_SecondMap_SettingsMenu.c, UI/Layouts/SecondMap/SIDC_SecondMap_MonitorRT.layout, Prefabs/Props/Military/Camps/OBS_TV_01.et, Prefabs/SMX/Tablet/Base/SMX_Tablet_Base.et.
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)
- 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)
- Chat-API (für Mods)
- Bildschirm-Spiegelung & Tablet-ID (in Arbeit)
SpeedUI (SUI)
SIDC-Framework (SIDC)
Throw Back Grenade (TBG)
Begleit-Tools