更新日志中心V1.2.0·Mod Changelog Center

If you liked this item, please rate it up on Steam Workshop page.

Author: Xiao Fan

Last revision: 28 Nov, 2025 at 04:27 UTC

File size: 2.55 MB

On Steam Workshop

Description:
ModChangelogCenter Update Hub (Optional Standard)

Originally this mod was built for my own projects so I could read changelogs directly inside Duckov. Now the workflow has been standardized and published together with a sample repo (GitHub: https://github.com/xhyrzldf/ModChangelogCenterSample). Feel free to integrate if you like, but please do not make this mod a hard dependency—your mod’s main gameplay must still function even when the user does not subscribe to ModChangelogCenter; only the “update log” panel will be missing.

Always ensure load order: ModChangelogCenter must load before your mod/sample so registration can succeed.

Highlights
  • Unified in-game entry that adds a “Mod Update Log” button to the main menu.
  • Localization friendly (zh/en arrays with fallback).
  • Hotfix ready: calling RegisterModule repeatedly replaces the previous snapshot.
  • Open-source sample so you can fork and adapt quickly.

Integration Steps
  1. Reference ModChangelogCenter.dll (center first in load order)
    Add the snippet below to your csproj:
    <Reference Include="ModChangelogCenter"> <HintPath>$(DuckovPath)Duckov_DataModsModChangelogCenterModChangelogCenter.dll</HintPath> </Reference>

    Workshop subscriptions live under `steamapps/workshop/content/3167020/3605878802/ModChangelogCenter/`; you can point HintPath there or copy the DLL into the game directory.

  2. Prepare a changelog JSON
    Use the sample repo’s
    Changelog/SampleChangelog.json

    as template:

    • `version`: version label displayed in UI
    • `updatedAt` (optional): shown on the top-right
    • `zh` / `en`: string arrays; missing text falls back to the other language

  3. Register inside your ModBehaviour
    Call `ModChangelogCenter.ChangelogRegistry.RegisterModule(…)` directly, or use the Harmony reflection approach shown in the sample. Core snippet:
    if (!ChangelogRegistry.RegisterModule( "YourModuleId", "Module Name (ZH)", "Module Name (EN)", jsonPayload)) { Debug.LogWarning("Failed to register changelog"); }

    Remember to warn players if ModChangelogCenter is missing or loaded after your mod.

FAQ
  • Can I rely on this mod? Treat it as optional. Your gameplay must stay functional without it; only the changelog UI is extra.
  • Can I show notes only for new versions? Yes—compare versions or your local config before calling RegisterModule.
  • Do I need ModConfig? No, everything happens at runtime.
  • How to guarantee load order? Mention the dependency in your info/description, ask players to load ModChangelogCenter first, and log a warning if the type isn’t available.

Sample & References

More Mods

With the load order handled and this optional standard in place, players can read every mod’s changelog without leaving the game. Feel free to build on top of it and share your own integrations.