Zaliteam-GuidedCompanyRadar icon

GuidedCompanyRadar

Outdoor scan radar showing NavMesh ground trails, floating beacons, visor tag, and distance HUD to the Main Entrance and up to 4 Fire Exits.

Last updated a day ago
Total downloads 22
Total rating 0 
Categories Mods Client-side Tweaks & Quality Of Life AI Generated
Dependency string Zaliteam-GuidedCompanyRadar-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

Guided Company Radar (Facility Entrance & Fire Exit Finder)

Never get lost outdoors in fog, storms, or giant custom moons. Scanning (RMB) outside the facility projects NavMesh-guided ground trails, floating doorway beacons, a visor scan marker, and a distance HUD pointing to the Main Entrance and Fire Exits.


Player Guide (Simple Overview)

How It Works

  • Right-Click (RMB) Outdoors: Whenever you ping your scanner outside the facility, the radar automatically activates for 2.5 seconds (configurable):
    • Orange Ground Trail & Beacon: Traces a walkable path along the terrain straight to the Main Entrance, topped with a glowing camera-facing doorway icon.
    • Dark Red Fire Exit Branches: Traces branching dark-red trails and icons to up to 4 reachable Fire Exits.
    • Visor Scan Tag: Highlights FACILITY MAIN ENTRANCE through terrain and fog while the pulse is active.
    • Bottom-Right Visor HUD: Briefly pops up a small distance readout showing meters to Main and the nearest Fire Exit.
  • Auto-Stops Indoors: As soon as you step inside the facility or the pulse fades out, the trails and beacons disappear cleanly.
  • Client-Side: Works on any server/lobby—other players do not need the mod installed.

Configuration (BepInEx/config/com.khameli0n.guidedcompanyradar.cfg)

Section Key Default Description
EntranceRadar EnableEntranceRadar true Master toggle for trails, beacons, visor scan node, and distance toast HUD.
EntranceRadar TrailColorHex #FF6A00 Hex color for the main entrance trail and beacon (falls back to orange if invalid).
EntranceRadar PulseDuration 2.5 Total duration of each radar pulse in seconds.
EntranceRadar TrailWidth 0.24 Base width multiplier of the LineRenderer trails in meters.
EntranceRadar HeightOffset 0.25 Vertical offset above NavMesh terrain in meters.

Technical Details (For Developers)

  • Plugin GUID: com.khameli0n.guidedcompanyradar
  • Target Framework: netstandard2.1 (BepInEx 5 / HarmonyX)
  • Side: Client-side only (gates on PlayerControllerB.IsOwner and GameNetworkManager.localPlayerController).

Architecture & Harmony Patches

Component Patch / Role Behavior
HUDScanPatch PlayerControllerB.Update (Postfix) Calls PulseTrailRenderer.Tick for the local player owner to update trail start anchor, billboard rotation/bobbing, alpha fade, and toast fade.
HUDScanPatch HUDManager.Update (Postfix) Reads private field playerPingingScan via Traverse; if > 0.05f outdoors (with 0.45s scan debounce), triggers PulseTrailRenderer.TriggerPulse().
HUDScanPatch HUDManager.NodeIsNotVisible (Prefix) Forces __result = false (return false) for EntranceManager.ActiveScanNode while outdoors and pulsing, bypassing line-of-sight/frustum culling.
HUDScanPatch HUDManager.AssignNewNodes (Postfix) Appends EntranceManager.ActiveScanNode to private nodesOnScreen list while outdoors and pulsing.
RoundLifecyclePatch StartOfRound.openingDoorsSequence (Postfix) Calls EntranceManager.RefreshEntrances() when landing.
RoundLifecyclePatch StartOfRound.StartGame / ShipLeave (Postfix) Calls EntranceManager.Clear() and PulseTrailRenderer.StopPulse().

Pathfinding & Rendering (EntranceManager & PulseTrailRenderer)

  • Door Discovery (EntranceManager.GetDoors):
    • Collects all EntranceTeleport components where isEntranceToBuilding == true. entranceId == 0 becomes mainDoor; others become fireExits.
    • Fallback chain if no entranceId == 0 teleport is found: RoundManager.FindMainEntrancePosition(true, true) -> GameObject.Find("EntranceTeleportA" / "EntranceTeleportB" / "MainEntrance") -> first discovered fire exit.
    • Projects each door position onto the NavMesh via NavMesh.SamplePosition(..., 15f, -1).
  • Scan Node & Procedural Sprites:
    • Spawns GuidedCompany_EntranceScanNode on layer "ScanNode" (BoxCollider trigger (8, 8, 8), ScanNodeProperties with maxRange = 250, requiresLineOfSight = false).
    • Generates 64x64 TextureFormat.RGBA32 Sprite assets in code for the main door (orange) and fire exit (crimson with diagonal slash).
  • NavMesh Path Subdivision & Branch Slicing (PulseTrailRenderer):
    • Samples player position (5f radius) and computes NavMesh.CalculatePath requiring NavMeshPathStatus.PathComplete.
    • Subdivides each path segment every 1.5fm, snapping points to NavMesh (1.2f radius) and clamping vertical jumps > 2fm to prevent terrain spikes.
    • Renders up to 4 fire exits, calling SliceBranchPath to trim shared trunk waypoints where the fire-exit path diverges by > 2fm from the main path.
    • Visual fade curve: fades in over 0.25s, holds, then fades out between 2.0s and PulseDuration (with 0.35s re-trigger cooldown).
  • Toast HUD (GuidedCompany_BottomRightToast):
    • Anchored at bottom-right (-14, 14), size (185, 38), using TextMeshProUGUI + CanvasGroup for a 3.2s fade-in/out readout.