Skip to content

Commit

Permalink
2.15.1792
Browse files Browse the repository at this point in the history
* Minimum UE version is now 4.26
* Linux and OSX support
** Linux support currently requires cross-compilation from Windows at
the present time
* A log for the most recent Plugin session will be saved to
  Saved/Logs/Modio.log regardless of game configuration, to assist in
diagnosing issues in shipping configurations that disable the normal
logging path
* New ArchiveModAsync subsystem methods for archiving mods if the user
  has appropriate permissions
** Permanent deletion of a mod is only possible through the mod.io web
interface
* New ModioEx extension module with helper methods for uploading/loading
  single-file modfiles from/to memory
* Documentation improvements, including:
** C++ samples now provided alongside Blueprint examples
** Steam authentication C++ sample
** Mod submission sample
* Removed stale example content which was causing packaging issues
* NativeSDK version updated
  • Loading branch information
stephenwhittle committed Apr 5, 2022
1 parent e6ef053 commit 09417ab
Show file tree
Hide file tree
Showing 167 changed files with 2,067 additions and 8,015 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
*.app
*.ipa

# Whitelist convert.exe as its documentation tooling we want to include
!convert.exe

# These project files can be generated by the engine
*.xcodeproj
*.xcworkspace
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@
path = Source/ThirdParty/NativeSDK
url = ../modio-sdk.git
branch = main
[submodule "Source/ThirdParty/liburing"]
path = Source/ThirdParty/liburing
url = https://github.com/axboe/liburing.git
[submodule "Source/ThirdParty/mbedtls"]
path = Source/ThirdParty/mbedtls
url = https://github.com/Mbed-TLS/mbedtls.git
Binary file not shown.
Binary file not shown.
Binary file removed Content/OldExampleContent/IModProvider.uasset
Binary file not shown.
Binary file removed Content/OldExampleContent/IModReceiver.uasset
Binary file not shown.
Binary file not shown.
Binary file removed Content/OldExampleContent/Maps/02_ListAllMods.umap
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Content/OldExampleContent/Maps/ModBrowser.umap
Binary file not shown.
Binary file removed Content/OldExampleContent/UI/CommonWords.uasset
Binary file not shown.
Binary file removed Content/OldExampleContent/UI/EClickAction.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Content/OldExampleContent/UI/Icons/T_Check.uasset
Binary file not shown.
Binary file removed Content/OldExampleContent/UI/Icons/T_Download.uasset
Binary file not shown.
Binary file not shown.
Binary file removed Content/OldExampleContent/UI/Icons/T_Refresh.uasset
Binary file not shown.
Binary file not shown.
Binary file removed Content/OldExampleContent/UI/Icons/T_Warning.uasset
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.
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.
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.
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 added Content/TestInitialization.umap
Binary file not shown.
463 changes: 329 additions & 134 deletions Doc/documentation.html

Large diffs are not rendered by default.

130 changes: 130 additions & 0 deletions Doc/getting-started.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,50 @@ Here's what steps 1 and 2 might look like in Blueprint:

image::img/authenticate_user_external.png[]

Note that the SDK will automatically URL encode parameters (such as the auth token) when making the request.

===== Steam Authentication Example

In order to use the Steam authentication functionality, you must add your games https://partner.steamgames.com/apps/sdkauth[Encrypted App Ticket Key] from Steamworks. On your games profile on mod.io, go to Edit > Options and add the key. You can then call <<K2_AuthenticateUserExternalAsync>> and provide the users Encrypted App Ticket as the Auth Token. Note that the Auth Token must be Base64 encoded when passed

Below is a sample Blueprint method that will get the users current Encrypted App Ticket that you can use in your Authentication request. Add this to a BlueprintLibrary in your games codebase.

.C++ Example
[%collapsible]
====
[source]
----
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnGetTicket, int32, LocalUserNum, FString, TokenData);
UFUNCTION(BlueprintCallable)
static void GetSteamAuthTicket(int32 LocalUserNum, FOnGetTicket Callback)
{
//Get the steam subsystem
FOnlineSubsystemSteam* SteamSubsystem = static_cast<FOnlineSubsystemSteam*>(IOnlineSubsystem::Get());
//Add a handler to the subsystem for when the ticket has been retrieved
SteamSubsystem->GetEncryptedAppTicketInterface()->OnEncryptedAppTicketResultDelegate.AddLambda(
[LocalUserNum, OnComplete = Callback](bool bEncryptedDataAvailable, int32 ResultCode) {
TArray<uint8> TokenData;
if (bEncryptedDataAvailable)
{
//If the ticket was retrieved successfully, get its data
SteamSubsystem->GetEncryptedAppTicketInterface()->GetEncryptedAppTicket(TokenData);
}
//Call the user callback with the base64-encoded ticket, ready for submission via AuthenticateUserExternalAsync
OnComplete.ExecuteIfBound(LocalUserNum, FBase64::Encode(TokenData));
});
//Begin the actual async request for the ticket, which will invoke the above lambda when it completes
SteamSubsystem->GetEncryptedAppTicketInterface()->RequestEncryptedAppTicket(nullptr, 0);
}
----
Note that if you are on 4.27 or above, Epic provides a helper method in OnlineIdentityInterface::GetLinkedAccountAuthToken that will get the current account's auth token without having to take a direct dependency on FOnlineSubsystemSteam. Ensure that the token is Base64 encoded when being passed to <<K2_AuthenticateUserExternalAsync>>.
====


'''

=== Plugin quick-start: Browsing available mods
Expand Down Expand Up @@ -342,3 +386,89 @@ image::img/get_last_validation_error.png[]

'''

=== Submitting new mods and uploading files

The plugin includes a way for you to support uploading mods from inside your game or editor. In order to upload a mod, the process is to submit a new mod, which will create the mod for your game; and then submit a file for the mod.

==== Submitting a new mod

In order to submit a mod, you have to first create a mod handle using <<K2_GetModCreationHandle>> and use that handle when calling <<K2_SubmitNewModAsync>>

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

.C++ Example
[%collapsible]
====
[source]
----
void UModioManager::SubmitNewMod()
{
if (GEngine->GetEngineSubsystem<UModioSubsystem>())
{
FModioModCreationHandle Handle = GEngine->GetEngineSubsystem<UModioSubsystem>()->GetModCreationHandle();
FModioCreateModParams Params;
Params.Name = TEXT("My Awesome Mod");
Params.Description = TEXT("This is an amazing mod");
Params.PathToLogoFile = TEXT("C:\\temp\\image.png");
GEngine->GetEngineSubsystem<UModioSubsystem>()->SubmitNewModAsync(Handle, Params, FOnSubmitNewModDelegateFast::CreateUObject(this, &UModioManager::OnSubmitNewModCallback));
}
}
void UModioManager::OnSubmitNewModCallback(FModioErrorCode ErrorCode, TOptional<FModioModID> ModId)
{
if (ErrorCode == false)
{
// Mod was submitted successfully. Use ModId to submit some files to it.
}
}
----
====


==== Submitting a file for a mod

Once you have successfully submitted a mod, you can then submit a file for that mod using <<K2_SubmitNewModFileForMod>>. When you submit a file, you pass a <<ModioCreateModFileParams>> containing the directory of the files that you want to submit. The plugin will then compress this folder into a zip file and upload it as the active version of the mod. Note that there is no callback for this method; you'll get notified of the completed upload by the Mod Management callbacks.

.Blueprint Example
[%collapsible]
====
As an example, after the callback for submitting a mod has completed, you can get the Mod Id to use for file submission.
image::img/submit_new_mod_file.png[]
====

.C++ Example
[%collapsible]
====
[source]
----
void UModioManager::SubmitNewModFile(FModioModID ModId)
{
if (GEngine->GetEngineSubsystem<UModioSubsystem>())
{
FModioCreateModFileParams Params;
Params.PathToModRootDirectory = TEXT("C:\\temp\\mod_folder");
GEngine->GetEngineSubsystem<UModioSubsystem>()->SubmitNewModFileForMod(ModId, Params);
}
}
----
====
Binary file modified Doc/img/nd_img_DisableModManagement.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 removed Doc/img/nd_img_ErrorCodeMatches.png
Binary file not shown.
Binary file modified Doc/img/nd_img_Filesize_ToString.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_GetLogoFullSize.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_GetLogoThumbnailSize.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_GetProjectEnvironment.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_IsModManagementBusy.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_K2_GetModDependenciesAsync.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_K2_GetModTagOptionsAsync.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_LoadModFileToMemory.png
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 modified Doc/img/nd_img_K2_UnsubscribeFromModAsync.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_ListUserSubscriptionAsync.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_MakeApiKey.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_MakeAuthParams.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_Pct_Int64Int64.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_QueryUserInstallations.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/submit_new_mod.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/submit_new_mod_file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 39 additions & 3 deletions Modio.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,56 @@
"DocsURL": "",
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/1ab22ed2961a4cc19b9151bd072df998",
"SupportURL": "http://discord.mod.io",
"EngineVersion": "4.25.0",
"EngineVersion": "4.26.0",
"CanContainContent": true,
"IsBetaVersion": true,
"Installed": true,
"Modules": [
{
"Name": "Modio",
"Type": "Runtime",
"LoadingPhase": "Default"
"LoadingPhase": "Default",
"WhitelistPlatforms": [
"Win64",
"Mac",
"Linux"
]
},
{
"Name": "ModioEx",
"Type": "Runtime",
"LoadingPhase": "Default",
"WhitelistPlatforms": [
"Win64",
"Mac",
"Linux"
]
},
{
"Name": "ModioTests",
"Type": "Editor",
"LoadingPhase": "Default"
"LoadingPhase": "Default",
"WhitelistPlatforms": [
"Win64",
"Mac",
"Linux"
]
},
{
"Name": "uring",
"Type": "Runtime",
"LoadingPhase": "Default",
"WhitelistPlatforms": [
"Linux"
]
},
{
"Name": "mbedtls",
"Type": "Runtime",
"LoadingPhase": "Default",
"WhitelistPlatforms": [
"Linux"
]
}
]
}
8 changes: 4 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

image:https://img.shields.io/badge/license-MIT-brightgreen.svg[alt="License", link="https://github.com/modio/modio-sdk/blob/master/LICENSE"]
image:https://img.shields.io/discord/389039439487434752.svg?label=Discord&logo=discord&color=7289DA&labelColor=2C2F33[alt="Discord", link="https://discord.mod.io"]
image:https://img.shields.io/badge/Unreal-4.25%2B-dea309[alt="Unreal", link="https://www.unrealengine.com"]
image:https://img.shields.io/badge/Unreal-4.26%2B-dea309[alt="Unreal", link="https://www.unrealengine.com"]

Welcome to the mod.io UE4 plugin public repository. It allows game developers to host and automatically install user-created mods in their games which use UE 4.25 or newer. It provides a C++ and Blueprint interface around the mod.io SDK, which connects to the https://docs.mod.io[mod.io REST API]. We have a https://test.mod.io[test environment] available, and developers can create a game profile there to evaluate the plugin with.
Welcome to the mod.io UE4 plugin public repository. It allows game developers to host and automatically install user-created mods in their games which use UE 4.26 or newer. It provides a C++ and Blueprint interface around the mod.io SDK, which connects to the https://docs.mod.io[mod.io REST API]. We have a https://test.mod.io[test environment] available, and developers can create a game profile there to evaluate the plugin with.

++++
<!--- <p align="center"><a href="https://www.unrealengine.com/marketplace/en-US/slug/mod-browser-manager"><img src="https://image.mod.io/members/c4ca/1/profileguides/unreal.png" alt="unreal" width="380" height="133"></a></p> --->
Expand All @@ -30,8 +30,8 @@ Welcome to the mod.io UE4 plugin public repository. It allows game developers to

. Add this repository as a submodule to your repository in your project's `Plugins/Modio` directory
+
In the directory with your .uproject file: `git add submodule https://github.com/modio/modio-ue4 Plugins/Modio`
. Initialize our submodules with `git submodule update --init --recursive`.
In the directory with your .uproject file: `git submodule add https://github.com/modio/modio-ue4 Plugins/Modio`
. Initialize our submodules with `git submodule update --init --recursive`

==== In a non-git project, or without submodules

Expand Down
Empty file.
27 changes: 0 additions & 27 deletions Source/Modio/GeneratedHeader/Public/ModioErrorCondition.h

This file was deleted.

48 changes: 0 additions & 48 deletions Source/Modio/GeneratedSource/ArchiveFileImplementation.cpp

This file was deleted.

Loading

0 comments on commit 09417ab

Please sign in to comment.