Mods Sample

Sample demonstrating Mod Marketplace interactions

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

  1. Unzip EOS-SDK.zip into your location of choice.

  2. Navigate to \EOS-SDK\Samples\.

  3. Double-click Samples.sln. Visual Studio will open with it in the Solution Explorer.

  4. Set the StartUp Project to the Mods project.

  5. Open SampleConstants.h and update`ProductId, SandboxId, DeploymentId, ClientCredentialsId and ClientCredentialsSecret` based on the values for your Test App.

  6. Select the solution configuration. Use either Release_DX or Debug_DX

    Select Release_DX from the solution configurations.

  7. Select the solution platform: x64 (Win64) or x86 (Win32)

    Select x64 for win64 or x86 for win32

  8. In the Solution Explorer, right-click the Mods project and select Build.

    Build the solution in Visual Studio

  9. After a successful build, you should have the following files available under \EOS-SDK\Samples\Mods\Bin\Win64\Release_DX\

    EOS mods sample in the Win64/Release_DX folder

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:

  1. Open the Launcher pointing to the test build and install the test app.

  2. Navigate to your local EOS SDK: \EOS-SDK\. This should include the sample you built in the previous section.

  3. In a separate File Explorer, navigate to the install location of the test app.

  4. 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*.*

    Test app folder

  5. In Command Prompt, cd to the Mods.exe location. For Example: C:\Program Files\Epic Games\TestApp\Samples\Mods\Bin\Win64\Release_DX\

  6. 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

  1. Unzip EOS-SDK.zip into your location of choice.

  2. In Terminal, navigate to \EOS-SDK\Samples\Mods\.

  3. Open SampleConstants.h and update ProductId, SandboxId, DeploymentId, ClientCredentialsId and ClientCredentialsSecret based on the values for your Test App.

  4. Run ./Build.sh.

  5. Once the build successfully completes, you will have newly created files under: \EOS-SDK\Samples\Mods\Build\.

    The build files in EOS-SDK\Samples\Mods\Build\

You can now run the sample app!

Running the Mods Sample App

  1. Open the launcher pointing to the test build.

  2. Install the test app.

  3. Navigate to your local EOS-SDK: \EOS-SDK\. This directory should include the previously built sample.

  4. In a separate Finder window, navigate to the install location for your newly installed test app.

  5. Copy the following files from your local EOS-SDK to your apps install location:

    • /Build/Mods

    • /Build/Assets/.

    Location of the Build/Assets and Build/Mods folders

  6. In Terminal, cd to the Build folder under the app installation location. For example: ~/Users/Shared/Epic Games/TestApp/Build/

  7. 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 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.