Start here

↑ ↓ to move, Enter to openKeyword search
Multiplayer

Update checks, the launch check and unsupported mods

Rendered from the repository, where it is written as the work happens: it keeps its history, and a status line above says when it describes a design rather than something shipped.

Three pieces keep a player's game in step with what the hub ships, so a fireteam is never split by versions or by somebody else's mods:

  1. The launch check. Launch in the launcher checks for updates, checks the installed files, looks for mods MJOLNIR did not install, and only then starts the game.
  2. The in-game prompt. At the main menu, the game asks the launcher what is out of date. If anything is, it offers UPDATE AND RESTART.
  3. Unsupported mods. Pak and UE4SS mods from elsewhere are found and, on the player's say-so, moved aside for the session and moved back after.

What counts as out of date

preflight::check (apps/launcher/src-tauri/src/preflight.rs) asks four sources side by side and reports each one it could not reach:

SourceComparedOut of date when
The launcher (check_launcher)this launcher's own version/api/releases/latest (what the Tauri updater reads) names a newer one. A newer build on disk is not out of date. MJOLNIR_LAUNCHER_LATEST_URL points it elsewhere, for testing.
Code mods (hub::code_mods_outdated)each MJOLNIR mod in ue4ss/Mods that is in the signed set: its own mod.json versionthe signed set's version is newer. A newer version on disk (a development build) is not out of date.
Runtime bundle (modpack_update)the cached runtime manifestthe bucket publishes another version
Hub mods (hub::check_updates)each installed hub mod: the CE runtime pack and every mapthe hub has a newer release, or a map's install is missing files (the same release again)

The Updates screen asks the same sources. It judges code mods by this launcher's install record, not by mod.json, so it can offer a few more.

The launcher updates first

Any run that includes the launcher installs the launcher alone, first. The updater plugin's NSIS installer (update mode) closes the launcher and starts the new one, which checks again and installs the rest with its own code. So a fix to how updates are installed reaches players before it is needed.

The run is handed over through resume_after_update.json in the launcher's config folder, written just before the launcher installs and read (and deleted) by the next launcher at startup (App.tsx):

  • { "launch": true } from a launch or the game's update link: the launch check runs again in update mode (as for mjolnir://update): it installs what is still out of date and starts the game.
  • { "launch": false, "keys": [...] } from the Updates screen: it opens Updates and applies the rest of what was selected, if still offered.

It is never a replay: what is out of date is checked afresh. A failed launcher install deletes the note, and a note older than an hour is ignored.

A mods release waits for the launcher

Because the launcher updates first, a mods release only has to suit the launcher players are offered, but it does have to suit that one. A launcher compiles in its variant validator: check_mglo (apps/launcher/src-tauri/src/hub.rs) runs Variant::validate from the crates/blam-megalo it was built with, and refuses a mod holding a .mglo that validator cannot read. A mods tag built from newer Megalo code can therefore ship game types that launcher refuses, and the launch check has no way to launch out of date.

mods-v0.44.0 did this on 2026-11-05. Launcher 0.21.0 refused 8 of its 13 game types (not modelled: number operand kind 1/6), so players could start the game from Steam but not through the launcher.

So release-mods.yml tries it first. Once build-game-types has written the game types, it checks out the released launcher's tag and runs that tag's own validator over every variants/*.mglo, through the validate_mglo example in crates/blam-megalo. A refusal fails the job, naming each file and the error, and the release job that signs and publishes never starts.

  • Released means offered to players. The check asks /api/releases/latest, the endpoint the updater and check_launcher read, rather than taking the newest launcher-v* tag. A tag exists from the moment it is pushed, and its GitHub release goes public before the R2 upload that reaches players, so if that upload failed GitHub would show a fix players cannot get. A stale answer names the older launcher, so it can only hold a release back, and no answer stops the release as well.

  • When it fails, the launcher goes first. Nothing was signed or published, so the mods tag can stay. Tag the launcher, wait for /api/releases/latest to name it (a minute or two after its release workflow finishes), then re-run the mods workflow, which checks against whatever is released by then:

    gh run rerun <run id> --failed
    

The launch check

Every Launch goes through launch/PreflightProvider.tsx. So does a mjolnir://join link that has to start the game. A join the running game picks up skips it, since nothing can change under a running game.

  1. If the game is already running, it launches at once. Steam only brings the game forward.

  2. It runs preflight_check (above) and preflight_verify together. preflight_verify needs no network:

    • runtime bundle: each file against the cached manifest (verify_install). The player's own config files are skipped.

    • hub mods (maps, the CE runtime pack): a quick pass, hub::verify_quick. Hashing every map's containers on every launch read gigabytes, and it took minutes on a slow disk. The launcher keeps each cache file's size and modification time from when its hash was last known good (verify_stamps.json, written by every install and by the Library's full Re-check). A launch only looks those up, and reads a file only when either changed: it is re-hashed against container_hashes, and a mismatch is reported.

      • A file never stamped (installed before launcher 0.17.0) is stamped as it stands on first sight. Its download was hash-checked; from then on it is watched.
      • Missing files are always caught.
      • On this PC (25 hub mods, 248 cache files): 0.4 s, against 29 s for the full hash.

      The Library's Re-check still reads every byte (hub::verify_installed).

    • code mods: each file the release shipped against the hash recorded when this launcher installed it (hub::code_mods_verify, the record's shipped list). Files a mod writes into its own folder while the game runs (MJOLNIRBlamConsole's native\status.txt) are not looked at, so a mod that has been used does not read as damaged. Mods installed by a launcher before 0.17.0 have no list and are skipped, as is a mod whose mod.json names another version than the record.

  3. When nothing is found, it launches. Otherwise a dialog lists:

    • the updates;
    • the damaged installs (a repair reinstalls the same release);
    • the unsupported mods, with Move them aside while the game runs ticked;
    • any source it could not check.

    The buttons are Update and launch (Update the launcher when the launcher is behind: see above) and Cancel. There is no launching out of date: one player on old versions splits the fireteam. When only unsupported mods or unreachable sources were found, the button is Launch.

  4. The steps run one at a time, since they write to the same game folder, each with its download's bytes as they arrive. A failure stops the launch and offers Try again, which runs the whole check again.

  5. When anything was installed, the installed files are checked again, item by item, before the game starts. A file that still differs offers Try again too.

The gate covers launches through the launcher. A game started from Steam directly gets the in-game prompt below, which can be put off, but cannot play multiplayer with unsupported mods (see "Multiplayer needs an unmodified game").

While it checks, the dialog shows every item it looks at as a live checklist under one progress bar (launch/Checklist.tsx): the core, each code mod, each hub mod's update, each hub mod's files, and the unsupported mods scan. The backend reports each item as it is queued, started and finished (preflight-progress events, preflight::Step). Hub mods are asked about four at a time, and the active row stays scrolled into view. With the quick file pass, the slowest part is waiting on the hub's answers.

Being offline never blocks a launch. A source that can't be reached is listed, and Launch still works.

Paks gaps (a hub container deleted by hand) are not reported. launch_game puts them back from the cache anyway (hub::prepare_launch).

The in-game prompt

mods/MJOLNIRLobby/Scripts/outdated.lua runs from the main menu's poll in main.lua. That poll runs every 1.5 s in the frontend and not at all in a match.

  • When it checks. A poll after a gap of more than 10 s starts a new visit: the first main menu after start, or the return from a match. A visit asks for a check unless the last answer is under 10 minutes old.
  • How it asks. It writes check to native\launcher_request.txt and calls the native export mjolnir_launcher. The native half starts the launcher with no window: --check-updates --out native\update_check.json. The launcher writes the preflight::check answer there, whole (a temporary file renamed over it). The game polls for it and gives up after 180 s.
  • What it shows. When there are updates or unsupported mods, it pushes a screen with the campaign-menu kit (UI.push, no cooked widget needed), at most once a visit, and only while the main menu is the top screen. The screen lists up to six items and counts the rest. Its buttons are UPDATE AND RESTART (OPEN LAUNCHER AND RESTART when only unsupported mods were found) and NOT NOW.
  • UPDATE AND RESTART. It writes update and calls mjolnir_launcher, which starts the launcher with the link mjolnir://update. That reaches a launcher that is already open too (the single-instance hand-over). The game quits 2.5 s later, from the frontend only: quitting from a match hangs.
  • In the launcher, the link goes to Updates and runs the launch check in update mode:
    1. It waits for the game to close.
    2. It applies every update and repair without asking. It asks only when there are unsupported mods to move.
    3. It starts the game again.

The game reaches the network only through the launcher, which already holds the signed sets' keys. The game process gains no network client.

Launcher features

An older launcher would ignore both requests and open its window. So hub::record_exe_path now also writes launcher_features.txt beside launcher_exe.txt, one word a line: check-updates, update-link. The native half starts the launcher for a request only when its word is listed; otherwise the request fails with "the MJOLNIR launcher is too old". It is a separate file because an older MJOLNIR Lobby reads launcher_exe.txt whole as the path.

The check's file

{
  "checked_at": 1792825712,
  "items": [
    { "kind": "code", "id": "MJOLNIRLobby", "name": "MJOLNIRLobby",
      "installed": "0.14.0", "latest": "0.15.0", "release_id": null, "repair": false }
  ],
  "unreachable": ["the hub: ..."],
  "unsupported": [
    { "kind": "pak", "name": "z_Mod_P", "files": ["Meteorite/Content/Paks/z_Mod_P.pak"], "bytes": 123 }
  ]
}

kind is launcher, core, code or content. release_id is the hub release to install, for content. MJOLNIR Lobby shows a kind it does not know by its name alone.

Unsupported mods

apps/launcher/src-tauri/src/unsupported.rs.

In Meteorite/Content/Paks, every .pak, .utoc, .ucas and .sig is looked at, subfolders included: the engine mounts ~mods and LogicMods too. Names are compared case-insensitively. These are known:

  • the game's own: pakchunk<N>[optional]-Windows or -WinGDK, and global.utoc/global.ucas, in Paks itself only. No store puts a file list in the install, so this is a name rule, and both stores' paks follow it.
  • MJOLNIR's: pakchunk<N>-MJOLNIR…, in Paks itself only (MJOLNIR installs and mounts nothing in a subfolder; a pakchunk1-MJOLNIRx in ~mods used to pass). That covers the hub's containers (pakchunk9NN-MJOLNIRHUB-<slug>-<j>_P, and their _<n>_P patch names) and those MJOLNIR's tools place (MJOLNIRREG, MJOLNIRMENU, MJOLNIRLAND, …).

Everything else is unsupported. A container's files are grouped by name.

In ue4ss/Mods, a folder UE4SS would start (mods.txt says 1, or it has enabled.txt) is unsupported unless it is one of these:

  • named MJOLNIR…;
  • a code mod this launcher installed;
  • a folder of the runtime bundle (from the cached manifest);
  • one of the mods UE4SS itself ships (BPModLoaderMod, Keybinds, shared, …).

Moving aside is a rename into <install>/MJOLNIR-set-aside/<unix time>/<same relative path>:

  • It stays on the game's own volume, so it is instant and cannot half-copy a large container. Nothing in the game reads that folder.
  • Each move is written to set_aside.json in the launcher's config folder (%APPDATA%\com.devnull9090.mjolnir-launcher) before the next one, and logged to set_aside.log there.
  • A file the game holds open is left in place and reported.
  • Nothing is ever deleted.

Moving back happens three ways:

  • When the game exits. launch_game starts a watcher whenever the ledger has entries. It waits up to 5 minutes for the game to appear, then for it to go.
  • On the next launcher start, if the game is not running. This covers a launcher that was closed or crashed while the game ran.
  • Before every launch check, with the unsupported_restore command, so the check sees the mods and no late watcher moves them back under the next game. Moves aside and back hold one lock, so two never overlap.

A move back that would land on a file of the same name (the player put the mod back by hand) keeps the set-aside copy and its ledger entry, and says so. Folders the moves emptied are removed with remove_dir, which only ever removes an empty folder.

Multiplayer needs an unmodified game

A mod works in a match: in the 2026-11-21 playtest players with a faster-firing weapon mod fired faster in matches. So in game the unsupported-mods finding is a gate (mods/MJOLNIRLobby/Scripts/outdated.lua, Outdated.mpBlock):

  • No joining and no public listing (Games.join, Games.setPublic) while the last check found unsupported mods, or before a check has answered. The check is asked for if none is running; one that cannot run (no launcher) keeps the player out with a line saying to start from the launcher.
  • The host sends back (its 5 s watch, Live.modsToRemove) a member whose game reports mods, one that sends no report for 90 s, and one still "unchecked" after 240 s. Every client sends its verdict (modcheck|clean, modcheck|unchecked, modcheck|mods:<n>) each 20 s and whenever it changes. This is what covers joins that skip FIND GAMES (Steam invites).
  • A client leaves a host with mods. The host tells each member its own verdict (hostcheck|…) when it changes.

Limits: the kick is the lobby's own (the kicked game's MJOLNIR Lobby leaves), and the verdict is what the player's game says about itself. This stops paks and UE4SS mods dropped into the game folder, which is what the launcher sets aside. It does not stop someone who edits MJOLNIR Lobby's scripts or its answer file, or changes the game's memory.

Testing

  • cargo test in apps/launcher/src-tauri. The unsupported tests cover the name rules against this PC's real Paks listing, a scan, and a move aside and back that will not overwrite (with a scratch ledger). links covers mjolnir://update.
  • lua5.4 tools/tests/test_outdated.lua. It checks when the prompt asks, what it shows, that it shows once a visit and not over another screen, and the update request.
  • By hand: run mjolnir-launcher.exe --check-updates --out check.json and read the file.