Overview
The Mods Interface is an Epic Online Services (EOS) component that provides game developers with an interface to interact with the Mod Marketplace for advanced use cases. This document outlines the Mod Interface's capabilities and potential use cases.
At this time, this feature is only available for desktop platforms.
Mod Interface Capabilities
Installing Mods
A game can request the Mods Interface to install a specific mod from the Mod Marketplace. This action is performed by the Epic Games Launcher. If a player does not have the mod in their Library, the mod will be added automatically. This is an asynchronous operation, and the game will be notified with a callback function when the mod is installed and ready.
Uninstalling Mods
Mod uninstallation removes an installed mod from the user's local hard drive, but it does not remove the mod from the player's Library. This is an asynchronous operation, and the game will be notified with a callback function when mod files are removed.
Updating Mods
The update function requests that the Mod SDK update a mod to the latest version. This is an asynchronous operation, and the game will be notified via a callback function when the update is completed.
Enumerating Mods
The Mods Interface can provide a list of mods available for the game on the Mod Marketplace, as well as a list of the user's currently installed mods. A single Mods Interface API function returns both lists. The game specifies the requested list with a function argument. This is an asynchronous operation, and the game will be notified via callback when the data is available for retrieval.
Potential Use Cases
The following are examples of features that can make use of the Mods Interface:
Multiplayer Game Mod Reconciliation
When a client game instance connects to a server running mods, both the client and server use the Mods Interface to reconcile mods installed on both client and server machines and determine the list of missing mods.
The server calls the mod enumeration function to get a list of installed mods, then serializes the IDs of the installed mods and sends them to the client.
The client compares the server's list of mods with locally installed mods. If any required mods are missing, the client calls the mod install function to install the missing mods.
Ingame Mod Manager
The mod enumeration, installation, uninstallation, and update functions enable game developers to have an in-game mod manager.
Use the enumeration function to get lists of available and installed mods with titles and versions, then use install and uninstall functions to add or remove mods from a game, and use the update function to keep mods up-to-date with their latest versions.
Mod SDK API
To learn more about the Mod SDK API, review the following Epic Online Services (EOS) resources:
- EOS API Functions - Mods
- EOS API Data Structures - Mods
- EOS API Enumerated Types - Mods
- EOS API Callbacks - Mods