Unofficial community mod API for Vanguard Galaxy, using BepInEx 5 and HarmonyX.
Experimental. See compatibility for the supported game build, available services, and current limitations.
VGModAPI provides lifecycle events, mod save data, and optional mission, travel, boarding, story, bar, recipe, gameplay UI and mod-information services. It is an integration layer, not a mod loader or a complete gameplay SDK.
- Install BepInEx 5, close the game, and back up saves before changing plugins.
- Verify the release ZIP against its accompanying SHA-256 file and extract its
VGModAPI/folder into<game>/BepInEx/plugins/. - Keep the API DLLs together in that folder, without duplicate copies elsewhere. Never replace the game's or BepInEx's assemblies.
Start with disposable saves. An unsupported game hash disables game integration; do not override the compatibility gate. To uninstall, remove the API folder and mods that require it, leaving saves and save-data sidecars intact.
Reference VGModAPI.Abstractions.dll as compile-only and declare a BepInEx dependency
on the minimum API version your mod uses:
[BepInDependency(ModApi.PluginId, "0.2.0")]Retain the typed lifecycle service and subscribe in Awake:
private ILifecycleService? _lifecycle;
private void Awake()
{
_lifecycle = ModApi.Services.Lifecycle;
_lifecycle.Changed += OnLifecycle;
}
private void OnLifecycle(LifecycleEvent message) =>
Logger.LogInfo($"{message.Kind}: session={message.Session?.Id}");
private void OnDestroy()
{
if (_lifecycle != null) _lifecycle.Changed -= OnLifecycle;
}Inspect SessionTracking.Availability and SaveOutcomes.Availability before relying on these integrations. API access is main-thread-only; consumers
must handle unavailable optional services. Do not bundle the API assemblies with
your mod. API-covered features need no direct Harmony or vanilla assembly reference;
your BepInEx plugin entry point still needs BepInEx/Unity compile references.
For consumer-owned windows, also reference VGModAPI.Unity.dll and use the
gameplay UI host; non-UI consumers need no bridge reference.
The API reference describes each service's contract and
configuration. A compiled example is available in the source repository at
examples/Observation.
For world creation — pocket systems, wormhole pairs, placement, quiet traffic, static names,
resource and combat sites and full cleanup — see
examples/PocketWorlds.
Every example package is listed in the
examples index.
See Contributing and the developer documentation.
Owned source and documentation are MIT licensed. Game, Unity, BepInEx, and Harmony reference assemblies are not included in releases.
