Overview
The Mods Sample from the Epic Online Services (EOS) SDK demonstrates interactions for the Mod Marketplace, including:
- Enumerating all available mods for an application.
- Enumerating mods that the user has installed.
- Installing or uninstalling mods.
- Updating a mod.
This document will walk you through how to set up and run the mods sample and provide an overview of how to use these features.
Before You Begin
Before using the mods sample, you will need the following prerequisites:
- EOS-SDK.zip
- The Epic Games Store Launcher client must be installed
- An Epic Games Store test app with the following information configured on the Developer Portal:
productid
sandboxid
deploymentid
clientid
clientsecret
Setup for Win64 / Win32
This section covers building and running the mods sample app for both 32-bit and 64-bit Windows operating systems.
Building the Mods Sample App for Win64 / Win32
-
Unzip EOS-SDK.zip into your location of choice.
-
Navigate to
\EOS-SDK\Samples\
. -
Double-click
Samples.sln
. Visual Studio will open with it in the Solution Explorer. -
Set the StartUp Project to the Mods project.
-
Open
SampleConstants.h
and updateProductId
,SandboxId
,DeploymentId
,ClientCredentialsId
andClientCredentialsSecret
based on the values for your Test App. -
Select the solution configuration. Use either
Release_DX
orDebug_DX
-
Select the solution platform:
x64
(Win64) orx86
(Win32) -
In the Solution Explorer, right-click the Mods project and select Build.
-
After a successful build, you should have the following files available under
\EOS-SDK\Samples\Mods\Bin\Win64\Release_DX\
You can now run the sample application.
Running the Mods Sample App for Win64 / Win32
To run the Mods sample app, you will need to have the prerequisites from Before You Begin, plus the test application must be built per the previous section. You must also have the Launcher installed and pointing to the test build. Follow these steps to prepare and launch the application:
-
Open the Launcher pointing to the test build and install the test app.
-
Navigate to your local EOS SDK:
\EOS-SDK\
. This should include the sample you built in the previous section. -
In a separate File Explorer, navigate to the install location of the test app.
-
Copy the following files from your local
EOS-SDK
to your app's install location:\Mods\Bin\Win64\Release_DX\EOSSDK-Win64-Shipping.dll
\Mods\Bin\Win64\Release_DX\Mods.exe
\Shared\Assets\*.*
-
In Command Prompt,
cd
to the Mods.exe location. For Example:C:\Program Files\Epic Games\TestApp\Samples\Mods\Bin\Win64\Release_DX\
-
To open the sample app, run the following command:
start ./Mods.exe
The mods sample app running after completing the above setup. Click image to enlarge.
The sample application will open, and you can proceed to testing. Refer to Running the Mods Sample App for more information.
Setup for MacOS
This section covers installing and running the mods sample application in MacOS.
Setup Prerequisites
To build the mods sample app on MacOS, you will need to install the following dependencies:
- SDL2
- SDL2_ttf
- GLEW
- cmake
- gcc (through Command Line Tools for Xcode)
These are required in addition to the other prerequisites from Before You Begin
Building the Mods Sample App for MacOS
-
Unzip EOS-SDK.zip into your location of choice.
-
In Terminal, navigate to
\EOS-SDK\Samples\Mods\
. -
Open SampleConstants.h and update
ProductId
,SandboxId
,DeploymentId
,ClientCredentialsId
andClientCredentialsSecret
based on the values for your Test App. -
Run
./Build.sh
. -
Once the build successfully completes, you will have newly created files under:
\EOS-SDK\Samples\Mods\Build\
.
You can now run the sample app!
Running the Mods Sample App
-
Open the launcher pointing to the test build.
-
Install the test app.
-
Navigate to your local EOS-SDK:
\EOS-SDK\
. This directory should include the previously built sample. -
In a separate Finder window, navigate to the install location for your newly installed test app.
-
Copy the following files from your local EOS-SDK to your apps install location:
/Build/Mods
/Build/Assets/*.*
-
In Terminal,
cd
to theBuild
folder under the app installation location. For example:~/Users/Shared/Epic Games/TestApp/Build/
-
To open the sample app, run the following command:
./Mods
The mods sample app running after completing the above setup. Click image to enlarge.
The sample application will open, and you can proceed to testing. Refer to Running the Mods Sample App for more information.
Using the Mods Sample App
To log in with the Developer Authentication Tool, select the Dev Auth option and choose Log In. Once you have logged in, the mods sample app includes the following options:
Enumerate All Mods
Selecting the Enumerate All Mods option pulls all available mods for the application and displays them in a list. The list will also contain the installation status of each mod, regardless of whether a user is entitled to the mod or not. Users can install, update, and uninstall mods from this view.
The Enumerate All Mods functionality shows all available mods for an app, including ones the user is not entitled to. Click image to enlarge.
Enumerate Installed Mods
Selecting Enumerate Installed Mods displays all of the mods that the user currently has installed and displays them in a list. The list will also contain the installation status of each mod, including whether the user is entitled to the mod or not. Users can update and uninstall mods from this view.
The Enumerate installed mods functionality shows all mods that a user has installed for an app, and lets them manage those mods. Click image to enlarge.