Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Process and initialization

Ahmed Castro edited this page Jan 22, 2019 · 7 revisions

Initialization

Initializes mod.io SDK on your project to access API functionality. This will setup a .modio/ directory as mod.io working directory in your project's path.

Name Type Description
Is live environment bool Server Environment.
Game id int32 Your game unique identifier.
Api key FString Your game unique API key, grab this from the mod.io website.
Root directory Fstring Optional parameter: You can set the root path where the .modio directory will reside relatively to your game folder. The ./modio directory contains the installed mods as well as all the files the mod.io handles behind the scene. The root path will be the working directory if not explicitly defined.

Process

This function handles transfers and callbacks in an non-blocking way. We recommend calling it regularly when performance is not critical, for example in menus or modding tools. Be mindful this function may impact the frame rate and online latency, we recommend not calling it in-game or better yet you could let your players decide. Additionally does the following work behinds the scenes:

  • Installs mods when the logged user subscribed.
  • Uninstalls mods when the logged user unsubscribed.
  • Reinstalls modfiles when a new version is available regardless if the user is logged in.
  • Redownloads installed mods cache regardless if the user is logged in. Mod cache information is accessible through the getIntalledMods function.

This functionality is achieved by polling the API events endpoints. Polling occur every 15s by default so it should take about that amount of time to reflect the changes.