Welcome to the mod.io SDK repository, built using C++. It allows game developers to host and automatically install user-created mods in their games. It connects to the mod.io REST API.
-
Permissive MIT/BSL-license
-
Async callback-based interface
-
Non-blocking IO with a 'bring your own thread' model
-
Automatic downloads and updates
-
Email / Steam / GoG authentication
-
Mod Browsing / Filtering
-
C++14 codebase (static library or direct compilation)
-
Header-only support (Requires C++17 compiler)
-
Native UE4 support available via our dedicated plugin
Platform | Supported? | Compiler |
---|---|---|
Windows |
✔ |
MSVC |
Windows (GDK) |
✔ (Contact us) |
Vendor-provided |
OSX |
2022 |
|
Linux |
Q4 2021 |
|
Nintendo Switch |
✔ (Contact us) |
Vendor-provided |
XBox (GDK) |
✔ (Contact us) |
Vendor-provided |
-
Clone the repository, or add as a submodule
-
Ensure your project is using CMake 3.15 or later
cmake_minimum_required(VERSION 3.15)
-
Specify the target platform
set (MODIO_PLATFORM WIN)
-
Add the SDK subdirectory to your project
add_subdirectory(<sdk folder> EXCLUDE_FROM_ALL)
-
Link the library to your project
-
To use the header-only configuration:
target_compile_features(your_project PUBLIC cxx_std_17) target_link_libraries(your_project PUBLIC modio)
-
To use the static library configuration:
target_compile_features(your_project PUBLIC cxx_std_14) target_link_libraries(your_project PUBLIC modioStatic)
-
To make building the SDK easier, we provide a CMakePresets.json
that will include the most common configurations as presets. By default these presets will use Ninja, so make sure it is available on your PATH unless you want to override the CMake generator in use (see below).
Platform | Preset Name |
---|---|
Windows |
win64 |
Debug presets have the -debug
suffix, and Release-with-debug-info is -dbginfo
, so if you want to build the SDK in debug configuration specify win64-debug
as the preset name.
To build the SDK using the default build and install directories:
-
cmake -S <path to sdk folder> --preset=win64
This will use the Ninja generator to create a Ninja build system in
<sdk folder>/out/build/win64
, which installs the compiled libraries etc to<sdk folder>/out/install/win64
. -
cmake --build <sdk folder>/out/build/win64
This step compiles the SDK as a static library.
-
cmake --install out/win64/build
This will produce a folder
<sdk folder>/out/install/win64
which contains the following:-
header_only
- directory with the header-only version of the SDK -
source
- directory containing the implementation files of the SDK for use in 'split compilation' mode -
static
- directory containing the static library binaries and minimal public includes
-
Simply add each of the subdirectories in header_only
to your include directories and then #include "modio/ModioSDK.h"
If you’d rather compile the implementation directly, simply add the cpp files in the source
directory, and add the includes as per header-only mode. Define MODIO_SEPARATE_COMPILATION
, and then #include "modio/ModioSDK.h"
If you’d like to use another build system, or generate project files you can add to a larger Visual Studio solution, simply override the default generator when performing the first command above. For instance, to use a MSBuild-based Visual Studio Solution:
cmake -S <path to sdk folder> --preset=Win64 -G"Visual Studio 16 2019"
Please see the Getting Started documentation for a breakdown of the SDK’s concepts and usage, including:
A private white label option is available to license, if you want a fully featured mod-platform that you can control and host in-house. Contact us to discuss.
Our SDK is public and open source. Game developers are welcome to utilize it directly, to add support for mods in their games, or fork it for their games customized use. Want to make changes to the SDK? Submit a pull request with your recommended changes to be reviewed.
Our aim with mod.io, is to provide an open modding API. You are welcome to view, fork and contribute to our other codebases in use.