Skip to content

Commit

Permalink
2024.5
Browse files Browse the repository at this point in the history
Updates

* Tag Localization support - new fields have been added that will be populated by the REST API based on a previous call to SetLocale
* Temporary Mod Set - Install mods on a temporary basis, eg when needed for multiplayer scenarios, without adding to the user's subscription list, with automatic cleanup. See UModioSubsystem::InitTempModSet, UModioSubsystem::AddToTempModSet for more details.
* FModioFilterParams now has MatchingAuthor/MatchingAuthors methods
* Initial Monetization support - wallet balance checking, mod purchasing, and filtering mods on monetization status is included in this release.
* NativeSDK updated to 2024.5.1
  • Loading branch information
stephenwhittle committed May 31, 2024
1 parent 5bb2597 commit 7415f3f
Show file tree
Hide file tree
Showing 68 changed files with 2,371 additions and 381 deletions.
5 changes: 1 addition & 4 deletions Config/FilterPlugin.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
; /README.txt
; /Extras/...
; /Binaries/ThirdParty/*.dll
/Doc/getting-started.adoc
/Doc/ui-documentation.adoc
/Doc/ui4-documentation.adoc
/Doc/ui5-documentation.adoc
/Doc/*.adoc
/Doc/img/...
/Doc/documentation.html
/Doc/EULA_20220712_FONT-modio.pdf
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
73 changes: 73 additions & 0 deletions Doc/android.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
== Android Guide

=== Single Sign-On

For Unreal Engine versions before 5.4, you need to make some engine-level modifications in order for Android SSO to work. You must be using a source build rather than an engine build.

Open `Engine\Plugins\Online\OnlineSubsystemGoogle\Source\ThirdParty\Android\Java\GoogleLogin.java` and change the `init` method to uncomment `.requestServerAuthCode(serverClientId)`.

Change the `getAuthTokenJsonStr` method to the following:

[source,c++]
----
private String getAuthTokenJsonStr(GoogleSignInAccount acct)
{
if (acct != null)
{
return "{\"access_token\":\""+ acct.getServerAuthCode() + "\"," +
"\"refresh_token\":\"androidInternal\"," +
"\"id_token\":\""+ acct.getIdToken() + "\"}";
}
return "";
}
----

Finally, Open OnlineSubsystemGoogle.uplugin and add Android to the `PlatformAllowList`` array.

=== Configuration

Once you have made the above changes, update your AndroidEngine.ini to contain the following:

[source]
----
[OnlineSubsystem]
DefaultPlatformService=GooglePlay
NativePlatformService=Google
[OnlineSubsystemGoogle]
bEnabled=True
ClientId=your-client-id-here
ServerClientId=your-server-client-id-here
[OnlineSubsystemGoogle.OnlineIdentityGoogle]
+ScopeFields="email"
+ScopeFields="profile"
+ScopeFields="https://www.googleapis.com/auth/userinfo.email"
+ScopeFields="https://www.googleapis.com/auth/userinfo.profile"
----

This will ensure that you are using OnlineSubsystemGoogle as the native platform OSS in order to perform SSO.

Ensure that you replace the ClientId and ServerClientId with your client IDs from Google Cloud Console. The ClientId should be the Android OAuth Credential that you have linked to your title in Google Play Console. ServerClientId should be the Web Application OAuth Credential that you configured.

=== Getting the Token

Once you have configured the above options, you should be able to obtain a server side token that you can use for auth with mod.io.

[source,c++]
----
const IOnlineSubsystem* OnlineSubsystem = IOnlineSubsystem::GetByPlatform();
const IOnlineIdentityPtr OnlineIdentity = OnlineSubsystem->GetIdentityInterface();
OnlineIdentity->AddOnLoginCompleteDelegate_Handle(0, NativeLoginComplete);
OnlineIdentity->Login(0, FOnlineAccountCredentials());
// In the NativeLoginComplete delegate, however you set it up, if it was a successful login, you can then obtain the Server Auth Token as follows:
const FString PlatformToken = OnlineIdentity->GetAuthToken(0);
// Now perform Auth to the mod.io service
AuthParams.AuthToken = PlatformToken;
AuthParams.bUserHasAcceptedTerms = true;
ModioSubsystem->AuthenticateUserExternalAsync(AuthParams, EModioAuthenticationProvider::GoogleServerSideToken, FOnErrorOnlyDelegateFast::CreateUObject(this, OnAuthenticationComplete));
----
1,551 changes: 1,209 additions & 342 deletions Doc/documentation.html

Large diffs are not rendered by default.

61 changes: 58 additions & 3 deletions Doc/getting-started.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ However, this value can be overridden in one of two ways:
+
On first run of a game using the plugin, `${FOLDERID_LocalAppData}/mod.io/globalsettings.json` will be created.
+
This JSON object contains a `RootLocalDataPath` element - changing the string here to a valid path on disk will globally redirect the mod installation directory for *ALL* games using the mod.io Unreal Engine Plugin or Native SDK for the current system account.
This JSON object contains a `RootLocalStoragePath` element - changing the string here to a valid path on disk will globally redirect the mod installation directory for *ALL* games using the mod.io Unreal Engine Plugin or Native SDK for the current system account.
+
NOTE: Changing this value while the SDK is initialized is not supported and behaviour is undefined.

* Per-game for a system account
+
Per-game settings are stored in `${FOLDERID_LocalAppData}/mod.io/${GameId}/${mod.io user string}/user.json`.
+
*Adding* a `RootLocalDataPath` element to this file will redirect the mod installation directory for this specific game only, for the current system account. Removing this value will cause the game to revert back to the global value in `globalsettings.json`.
*Adding* a `RootLocalStoragePath` element to this file will redirect the mod installation directory for this specific game only, for the current system account. Removing this value will cause the game to revert back to the global value in `globalsettings.json`.

NOTE: In Linux, macOS & iOS, mods and data binds to a single user. Every other client would have their own instance in their home directory.

Expand Down Expand Up @@ -375,7 +375,7 @@ mod.io features single sign on authentication from a number of external provider
* Google
* itch.io
* Nintendo Switch
* PlayStation Network (PSN)
* PlayStation(TM) Network
* Steam
* Xbox Live
* OpenID
Expand Down Expand Up @@ -1091,3 +1091,58 @@ void UModioManager::OnListMutedUsersCallback(FModioErrorCode ErrorCode, FModioOp
----
====


=== SDK quick-start: Temporary Mod Sets

In some situations, you may want mods to only exist on a temporary basis - for instance, in Multiplayer environments where you don't want to subscribe a user to a piece of content. Temporary Mod Sets allow management of these more transient pieces of content separately from subscriptions. Temp Mod Sets do not require authentication to be used, however Mod Management must still be enabled to use Temp Mods.

Temp Mods are downloaded in a folder separately from subscriptions, and are not updated or handled when you call `FetchExternalUpdatesAsync`. That means you can prioritize download and installation of Temp Mods outside of the regular subscription flow.

To use Temp Mods, you can start a TempModSet by calling `InitTempModSet` and passing a list of Mod IDs to be downloaded and extracted. At anytime while a TempModSet is open, you can call <<AddToTempModSet>> to add mods to the set (which will be instantly downloaded and extracted). If you no longer need a mod, you can call <<RemoveFromTempModSet>> which will remove the file. Once you have finished with a TempModSet, you can call <<CloseTempModSet>> which will delete all temporary mods. Temporary mods are also deleted the next time you re-initialize the SDK.

Like regular mods, Temp Mods can be queried using <<QueryTempModSet>> to get a ModCollectionEntry with an installation path.

==== Installing Temporary Mods

.Blueprint Example
[%collapsible]
====
image::img/temp_mod_init.png[]
====

.C++ Example
[%collapsible]
====
[source,cpp]
----
Modio::EnableModManagement([](Modio::ModManagementEvent ModEvent)
{
if (ModEvent.Status && ModEvent.Event == Modio::ModManagementEvent::EventType::Installed)
{
std::cout << "Mod with ID: " << ModEvent.ID << " is installed" << std::endl;
}
else
{
std::cout << "Mod with ID: " << ModEvent.ID << " failed to install: " << ModEvent.Status.message() << std::endl;
}
});
std::vector<Modio::ModID> ModIds = {8, 4, 5};
Modio::InitTempModSet(ModIds);
while(Modio::IsModManagementBusy())
{
Modio::RunPendingHandlers();
}
----
====


This call will start a TempModSet and install Mods with IDs 8, 4 and 5.

Note | If you add an already subscribed mod to TempModSet, it will not download be downloaded as the player will already have that content. If you try to unsubscribe from it while it's in TempModSet, the SDK it will wait for it to be removed from TempModSet before processing the unsubscribe.


Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_K2_AddToTempModSet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_K2_CloseTempModSet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_K2_FetchUserPurchasesAsync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_K2_GetUserDerivedTokenAsync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_K2_GetUserWalletBalanceAsync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_K2_InitTempModSet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_K2_PurchaseModAsync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_K2_QueryTempModSet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_K2_RemoveFromTempModSet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Doc/img/nd_img_PrioritizeTransferForMod.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/nd_img_QueryUserPurchasedMods.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/img/temp_mod_init.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
209 changes: 209 additions & 0 deletions Doc/mod-creation-tool-documentation.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
== mod.io - CONTENT CREATION & UPLOAD TOOL
The mod.io Unreal Engine's plugin includes an editor module which provides an embedded mod.io - Content Creation and Upload Tool.

=== *EDITOR-SPECIFIC PLUGIN MODULE*
[.stretch,stripes=odd,frame=none, cols="25%,~,"]
|===
|*Module Name*|*Description*|*Module Type*
|ModioEditor|Editor details customization and asset factories for UE content creation and upload tool classes|Editor
|===
This modules is mandatory for studios to know how contents are created and uploaded right from the editor without the need to go to the official website.


=== *STEP 1: HOW TO OPEN THE TOOL*
Click the mod.io icon in Unreal Engine to show a drop down menu, click the *Create & Upload* menu. Once opened, it may require mod.io authentication as below.

image::img/Tool/how_to_open_tool.jpg[]

=== *STEP 2: AUTHENTICATION IS REQUIRED*

Authentication may be required either being a first time user of the module or not logged in previously. If you are already logged in, you will automatically be redirected to *STEP 3*.

=== *Authentication*

The user will be authenticated if not already logged in to mod.io account.

*Email:*
Enter your email in the text box shown below and click *Login*, a verification code will be sent to the submitted email address.

image::img/Tool/auth_enter_email.jpg[]

=== *Verification Code*

*Verification Code:* Enter the code received in your email and click *Authenticate*.

image::img/Tool/auth_enter_code.jpg[]

If everything goes correctly, you will be authenticated successfully.

=== *STEP 3: CREATE OR UPLOAD MOD*
After successfull authentication, you can either *Create Mod* or *Edit Mods*.

image::img/Tool/create_or_upload_mod.jpg[]

=== *Create Mod*

*Create Mod* lets you create a new mod.

image::img/Tool/create_mod.jpg[]

=== *Edit Mods*

*Edit Mods* lets you edit existing mods and change any specific values or mod files on them.

image::img/Tool/edit_mods.jpg[]


=== *STEP 4: CREATE A MOD*
Creating a mod is made easy directly from within Unreal Engine described in the
process below.

=== *Create Mod*

Click *Create Mod* and fill the following required fields:
|===
|*Create Mod Properties*
|===
|===
|Fields |Description

|Path to Logo File
|Browse to select your *.png* file for logo

|Name
|Name of the mod

|Summary
|A brief summary of the mod
|===

image::img/Tool/create_mod_properties.jpg[]

Once filled all the required fields, click *Submit* to create the mod.

image::img/Tool/create_mod_properties_submit.jpg[]

TIP: You may get an error dialog if the game doesn't support your platform or the game is locked.

image::img/Tool/error_platform_not_supported.jpg[]
image::img/Tool/error_game_locked.jpg[]

Once everything goes successful you will be asked if you also want to upload a mod file right away.

image::img/Tool/mod_created_modfile_prompt.jpg[]

If *Yes* is selected you will be redirected to *STEP 6*.

=== *STEP 5: EDIT EXISTING MODS*
Editing existing mods is made easy in the same way as creating a mod directly from within Unreal Engine described in the process below.

=== *Edit Mods*

By clicking *Edit Mods*, a list of mods will be shown to edit. You can select a mod by clicking on it.
|===
|*Browse Mods*
|===

|===
|Name |Description

|Your mod name
|Your mod description
|===

image::img/Tool/browse_mods.jpg[]

Once a mod is selected, click *Edit Mod* to edit the mod.

image::img/Tool/browse_mods_edit_mods.jpg[]

|===
|*Edit Mod Properties*
|===

|===
|Field |Description

|Name
|Your mod name

|Summary
|Your mod summary

|Homepage URL
|Your mod homepage url
|===

image::img/Tool/edit_mod_properties.jpg[]

If you want to change the mod properties, make desirable changes to above fields and click *Submit*.

image::img/Tool/edit_mod_properties_submit.jpg[]

Then click *Edit Files* to see list of existing mod files.

image::img/Tool/edit_mod_properties_edit_files.jpg[]

|===
|*Modfile*
|===

|===
|Name |Platform|Version|Status

|Your mod file name
|Your mod platform
|Your mod file version
|Your mod file status
|===

image::img/Tool/browse_modfile.jpg[]

=== *STEP 6: UPLOADING A NEW MOD FILE*
To upload a mod file, a workspace directory path is mandatory which is described in the process below.

Click *New Modfile*

image::img/Tool/browse_modfile_new_modfile.jpg[]

You may need to select *Create mod for PC*

image::img/Tool/create_mod_for_pc.jpg[]

Fill the required fields:

TIP: You may get an error dialog if the game doesn't support your platform or the game is locked.

|===
|*Upload Mod File*
|===
|===
|Field |Description

|Version
|Your mod file version

|Changelog
|Your mod file changelog

|Set as Active Release
|Whether to set as Active Release

|Path to Mod Root Directory
|Path to the workspace directory
|===

image::img/Tool/upload_modfile.jpg[]

Once all fields are filled out, click *Submit*

image::img/Tool/upload_modfile_submit.jpg[]

Once submitted, the progress bar will be displayed about the workspace directory being zipped and uploaded with all other information provided for the new mod file.

image::img/Tool/upload_modfile_submit_status.jpg[]

=== *MOD FILE UPLOADED SUCCESSFULLY*
TIP: You may get an error dialog if the game doesn't support your platform or the game is locked or any error that occurs due to internet or any other circumstances.

image::img/Tool/modfile_successfully_uploaded.jpg[]
9 changes: 9 additions & 0 deletions Doc/profiling.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
== Profiling

The mod.io UE plugin includes some basic profiling and metrics that can be viewed and exposed via Unreal's `stat` commands and via Unreal Insights. Profiling via the MODIO_ENABLE_PROFILING and MODIO_UNREAL_PROFILING_SUPPORT macros are enabled by default in the mod.io plugin for non-Shipping builds.

== Showing Captured Data

The plugin includes two stat groups that can be shown: Modio (accessed via `stat modio`) and ModioScoped (async operations profiled for access via Unreal Insights).
* Modio includes some basic counters, such as the length of various background queues that process API Requests and Downloads
* ModioScoped captures performance insights for a majority of the async operations that the SDK performs. This data is not suitable for showing in realtime via a `stat` command, however it is captured when creating stat profiles for use in Unreal Insights.
Loading

0 comments on commit 7415f3f

Please sign in to comment.