REPOPathfinder

版本 v0.7.2·更新於 2026-04-25

BepInEx plugin for R.E.P.O. Renders an in-world NavMesh dot trail to the current extraction or truck. Cached corners + player projection keep dots stable as you move. F4 toggle, F5 Auto/Truck, F6 IMGU

模組介紹 作者原文

REPOPathfinder

A BepInEx plugin for R.E.P.O. that renders an in-world dot trail along the NavMesh path to the current extraction point — or back to the truck once all extractions are complete. It mirrors the same target-selection logic the in-map "backtrack" dots use, projected into world space so you can follow it without opening the map.

Hotkeys (configurable, all default to F-keys):

  • F4 — toggle the trail on / off.
  • F5 — switch the destination between Auto (game-driven: current extraction, or truck when all are complete) and Truck (forces the truck regardless of extraction state, for going back to charge items mid-run). Choice persists.
  • F6 — open the customization panel: RGBA color sliders, hex input, color presets, and live sliders for dot size / flow speed / spacing. Edits write back to the BepInEx config so they persist across sessions.

What the DLL actually does

On plugin Awake(), it:

  • Reads its config. A standard BepInEx config file (BepInEx/config/isaia.repopathfinder.cfg) defines all hotkeys, dot visuals, animation tunables, and the path-recompute threshold. A [Internal] ConfigVersion key migrates stale defaults from prior versions in place — values that exactly match a previous default get overwritten with the current default; user-customized values are left alone.
  • Creates a DontDestroyOnLoad GameObject. Adds two MonoBehaviours to it: PathfinderManager (path / animation / rendering) and PathfinderCustomizeUI (the F6 IMGUI overlay).
  • Installs Harmony input-blocking patches. InputBlocker is gated on a single static BlockInput flag flipped by the customize UI; it is inert when the menu is closed. While the menu is open, the following are short-circuited so cursor movement doesn't drive the camera and clicks don't fire weapons:
  • Legacy: UnityEngine.Input.GetAxis, GetAxisRaw, GetMouseButton, GetMouseButtonDown, GetMouseButtonUp — return 0f / false.
  • New: UnityEngine.InputSystem.InputAction.ReadValue() for Vector2, float, and Vector3 — return default(T). Bound dynamically via reflection, so the plugin still loads if the new InputSystem assembly is absent.
  • Input.GetKey / GetKeyDown / GetKeyUp are deliberately not patched, so F4 / F5 / F6 keep working.

Path computation

The path is cached in world space, not recomputed every frame:

  • Target resolution. Auto mode: RoundDirector.allExtractionPointsCompleted (read by reflection) → LevelGenerator.LevelPathTruck.transform.position; otherwise RoundDirector.extractionPointCurrent.transform.position. Truck mode: always LevelPathTruck. Identity is the ExtractionPoint reference or the literal string "truck".
  • Recompute trigger. A new path is computed only when:
  • There is no cached path yet,
  • The target identity changed (different extraction, or Auto↔Truck flip),
  • The player has drifted further than OffPathRecomputeThresholdMeters (default 3.0) from the cached polyline (closest-point-on-line-segment over each cached segment), or
  • A scene change invalidated the cache.
  • Compute & cache. NavMesh.CalculatePath(playerNavmeshPos, targetPos, AllAreas, path) is called once. The corners and prefix arc-distances are stored; the displayed dots reference these stable world-space points for as long as the cache lives. playerNavmeshPos is PlayerAvatar.LastNavmeshPosition (read by reflection — internal field).
  • Each frame. The player is projected onto the cached polyline to produce a playerArc scalar; that's the trail's "back end". Walking forward changes only playerArc; the cached corners are untouched, so dot world positions stay stable regardless of how the player moves.

Animation & rendering

  • A pool of MaxDots (default 30) sphere primitives, colliders stripped, sharing one material with per-dot color set via MaterialPropertyBlock.
  • A single shared _animOffset ∈ [0, spacing) advances by FlowSpeed m/s. When it crosses spacing the circular pool pointer _frontPool decrements, which makes every sphere's slot index increment by 1 simultaneously. Spacing stays per

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack

檔案與校驗

檔案名稱
REPOPathfinder-0.7.2.zip
檔案大小
101.8 KiB