MAD (Mod Auto-Downloading)
The Northstar custom server framework allows hosting servers with custom content (gamemodes, maps)
through the use of mods. Some mods are marked as
RequiredOnClient, meaning players wanting to join the server must
have downloaded said mods before being able to do so.
Currently, when players join a server requiring client-side mods, they are displayed this message:
which kinda breaks the user experience since it forces players to leave the game and find the mod for themselves on the Internet.
The Counter-Strike and Team Fortress games are known to integrate this feature, allowing custom modes such as surfing to gain popularity among players.
We however cannot automatically download all mods that are marked as required by servers, as this would open the gates to malware and other malicious stuff, which we don’t want to download to the players’ computers.
To counter that, we set up a verification system, which relies on a JSON file listing all mods that can be automatically downloaded by clients. For a mod to be registered in this file (and thus marked as verified), mod author must submit some information about their mod, and respect some rules (mod repository must be open source, for instance). Detailed mod verification procedure is described here: https://github.com/R2Northstar/VerifiedMods
Implementation in Northstar
The implementation of this mod auto-downloading feature within Northstar was done in two separate Northstar subprojects:
- the NorthstarLauncher native code (C++) is responsible for low-level calls: think file system access, mod archive fetching etc.
- the NorthstarMods script part (Squirrel VM) invokes native methods and updates UI accordingly.
On this demonstration video, you can visualize all steps of mod auto-downloading:
- archive downloading from mod store;
- archive extraction to local computer;
- mod reloading to add downloaded mod to local mods collection;
- game server can be joined.
Complete feature was shipped December 16th 2023, in the v1.21.0 Northstar release.