Skip to content

Mod auto-sync sender (BETA): push scanned mod list to the bot - #39

Open
Guardian023 wants to merge 1 commit into
mainfrom
feat/mod-sync-sender
Open

Mod auto-sync sender (BETA): push scanned mod list to the bot#39
Guardian023 wants to merge 1 commit into
mainfrom
feat/mod-sync-sender

Conversation

@Guardian023

Copy link
Copy Markdown
Contributor

Connect half of the mod auto-sync (issue #12). Pairs with grdn-bot#45 (the /mod-sync endpoint).

What it does

On demand, the host scans its installed UMM mods, classifies each via DVMP's ModCompatibilityManager, and POSTs the list to the bot's /mod-sync.

  • Reflection, not a hard reference. Mirrors GRDNConnectBehaviour's pattern (scan AppDomain for the Multiplayer* assembly, resolve ModCompatibilityManager + TryGetCompatibility), so there's still zero compile-time dependency on dv-multiplayer.
  • Category mapping: All/Undefined/no-info → required, Client → optional, Host → host, Incompatible → skipped.
  • URL: the mod's UMM HomePage, passed through only for github.com/nexusmods.com; the bot keeps its curated link for anything else.
  • POST: same UnityWebRequest + x-secret + ActiveBotUrl/ActiveBotSecret path as StatsTracker/DefectMonitor.

Trigger

A "Sync mods to bot (beta)" button in the mod's UMM settings. Host-only, explicit, never automatic. Nothing fires on its own.

Safety / rollback

  • The bot ignores the push unless MOD_SYNC_BETA is on (grdn-bot#45), so this is inert until the beta is deliberately enabled bot-side.
  • New component + one button; no existing flow changed. Rollback = revert this PR.

⚠️ Untested locally

This is reflection against DVMP that I can't compile-check outside the game. The reflection targets are taken from DVMP's own ModCompatibilityManager.cs and ModInfo.cs, but it may need a compile/runtime pass on the VPS. Feed me any build or log errors and I'll iterate.

Test flow

  1. Enable MOD_SYNC_BETA on the bot, deploy, restart.
  2. In-game (as host), open the GRDNConnect UMM settings and click Sync mods to bot (beta).
  3. Check the bot's Auto Sync preset with /viewmods preset:Auto Sync and the game log for [ModSync] lines.

Scans the host's installed UMM mods, classifies each via DVMP's
ModCompatibilityManager by reflection (no compile-time dependency on
dv-multiplayer, matching GRDNConnectBehaviour), and POSTs the list to the bot's
/mod-sync endpoint.

- Category mapping: All/Undefined/no-info -> required, Client -> optional,
  Host -> host, Incompatible -> skipped.
- URL is the mod's UMM HomePage, passed through only for github/nexus; the bot
  keeps its curated link otherwise.
- Host-only, triggered explicitly from a 'Sync mods to bot (beta)' button in the
  UMM settings, never automatic. The bot ignores it unless MOD_SYNC_BETA is on,
  so this is inert until the beta is enabled bot-side.

Pairs with grdn-bot #45 (the /mod-sync endpoint) and issue #12.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant