-
-
Notifications
You must be signed in to change notification settings - Fork 4
Detection and Compatibility
Tsu edited this page May 31, 2026
·
2 revisions
This page covers how other mods should detect Stratum and what Stratum is doing to stay compatible with other code.
- Identity keys set in
sources/VintagestoryLib/Vintagestory/Server/ServerSystemStratum.cs - Runtime/config entry points in
sources/VintagestoryLib/Vintagestory/Server/StratumRuntime.csandStratumConfig.cs - Compatibility-sensitive behavior in
patches/and runtime helpers undersources/VintagestoryLib/Vintagestory/Server/
Use World.Config keys:
api.World.Config.GetAsBool("stratum")api.World.Config.GetAsString("stratumVersion")api.World.Config.GetAsString("stratumBaseGameVersion")
These are available to both server and client mods because they are written during server startup.
ServerSystemStratum.OnBeginRunGame stamps those values into World.Config:
server.World.Config.SetBool(StratumInfo.Id, true);
server.World.Config.SetString(StratumInfo.Id + "Version", StratumInfo.Version);
server.World.Config.SetString(StratumInfo.Id + "BaseGameVersion", StratumInfo.BaseGameVersion);Stratum behavior is split across:
- config models in
StratumConfig - startup/runtime wiring in
StratumRuntimeandServerSystemStratum - source patches under
patches/ - focused helpers like
StratumPacketLimiter,StratumPacketBackPressure,StratumBlockBreakGuard,StratumPlayerPrivacy, andStratumNametags
Detection should use World.Config keys above, not internal type checks.
If behavior or types do not match expectations, verify client/server binary alignment first.
Example checks:
- base game version vs
stratumBaseGameVersion - deployed DLL versions/hashes on both sides
When integrating other mods with Stratum:
- gate optional behavior behind
api.World.Config.GetAsBool("stratum") - use
stratumVersionfor version-aware behavior toggles - avoid relying on internal Stratum classes unless you control both server and mod deployment