Version check
The framework checks that everyone in a lobby runs the same versions, so a player on an old mod can’t break the session. Each side sets the framework version, game version and Steam build id as information on the lobby (the host) and on itself (every member).
Things to know
- A connection request from a lobby member whose information has not arrived yet is held, and accepted as soon as that member is checked. A request from anyone who is not in the lobby is ignored.
Limits
- When you join, the join fails and
Erroris set if your versions do not match the host’s. That is when the lobby’s game tag is not yours, when its mod version or framework version differs from yours, when its game version differs from the game you run, or when both sides know their Steam build and the two builds differ. (The game version isApplication.version, stored undergv. The Steam build id comes from the appmanifest, is stored undergb, and is empty when it can’t be read.) The messages are:Not a <gameTag> lobby.Version mismatch: the lobby runs <hostVersion> (framework <hostCore>), you run <version> (framework <coreVersion>).The host runs game version <hostVersion>, you run <gameVersion>.The host runs game build <hostBuild>, you run <steamBuild>.
- A member whose versions do not match is refused, and
Lobby.IsRefusedreturnstruefor them. Their messages are thrown away, their connection requests are refused, and they are missing fromNet.Peers. They stay inMembers, because Steam has no kick. - The framework writes one line to the log when the number changes:
<n> member(s) refused: mod version is not <version>, Core is not <coreVersion>, game version is not <gameVersion> or game build differs. - This is a compatibility check, not protection against a cheating player. The version information is set by the other side, so a changed game can claim any version.