-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates * New Session Playtime metrics functions are available. Please see `MetricsSessionStartAsync`, `MetricsSessionEndAsync` and related functions for details about this feature. ** Please note that Session Metrics are a premium feature. Please speak to your mod.io contact for more information. * Documentation Updates * NativeSDK updated to 2024.9.1 Bugfixes * Added new define to work around binary incompatibility issue caused by MSVC's STL implementation adding a new constexpr constructor for std::mutex
- Loading branch information
1 parent
ed8424b
commit d42cce9
Showing
101 changed files
with
2,006 additions
and
363 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
== Overview | ||
|
||
The main factor for supporting assets is dependency: only dependencies to the project's content are allowed, but not engine's dependency. When trying to package any asset that has engine dependency, it will fail. | ||
|
||
Some assets have internal dependencies which can't be bypassed without modifying the engine's source code. For example, when trying to create a directional light or point light in the level, you'll have an `EmptyActor` dependency to the engine - packaging of that asset and consequently the whole mod will fail. Therefore, you should generally avoid using any engine's assets dependency (except for very basic ones, such as dependency to `AActor` class), and instead create your own classes in your project and implement the necessary functionality there, and allow the mod to use those classes instead of the engine's ones. | ||
|
||
== Supported Asset Types | ||
|
||
=== Allowed Actors In Levels | ||
|
||
These actors, including custom actors derived from them and saved in the project or mod, can be placed in levels without causing packaging issues in the mod: | ||
|
||
1. `AStaticMeshActor` | ||
2. `APlayerStart` | ||
3. `APawn` | ||
* `ACharacter` | ||
* `ADefaultPawn` | ||
* All other derived actors | ||
4. `ABrush` & `AVolume` | ||
* `AKillZVolume` | ||
* `ABlockingVolume` | ||
* `AAudioVolume` | ||
* `ACullDistanceVolume` | ||
* `APostProcessVolume` | ||
* All other derived actors | ||
5. `ADecalActor` | ||
6. `AInfo` | ||
* `AVolumetricCloud` | ||
* `AExponentialHeightFog` | ||
* Other supported derived actors | ||
7. `ATriggerBase` | ||
* `ATriggerBox` | ||
* `ATriggerCapsule` | ||
* `ATriggerSphere` | ||
* All other derived actors | ||
|
||
=== Allowed Components in Actors | ||
|
||
These components, including custom components derived from them and saved in the project or mod, can be placed in actors without causing packaging issues in the mod: | ||
|
||
1. `USceneComponent` | ||
* `UPrimitiveComponent` | ||
* `UTextRenderComponent` | ||
* `UArrowComponent` | ||
* `UShapeComponent` (collisions) | ||
* `UBoxComponent` | ||
* `UCapsuleComponent` | ||
* `USphereComponent` | ||
* `UMeshComponent` | ||
* `UStaticMeshComponent` | ||
* `UWidgetComponent` | ||
* All other derived components | ||
* `UCameraComponent` | ||
* `UChildActorComponent` | ||
* `UText3DComponent` | ||
* Other supported derived components | ||
2. `UWidgetComponent` | ||
3. `UCameraComponent` | ||
4. `UDecalComponent` | ||
5. `UMovementComponent` | ||
* `UPawnMovementComponent` | ||
* `UCharacterMovementComponent` | ||
* All other derived components | ||
- All other derived components | ||
|
||
== Unsupported Asset Types | ||
|
||
=== Prohibited Actors in Levels | ||
|
||
These actors, including custom actors derived from them and saved in the project or mod, should not be placed in levels as they will likely cause packaging issues in the mod: | ||
|
||
1. `ALight` | ||
* `ADirectionalLight` | ||
* `APointLight` | ||
* `ARectLight` | ||
* `ASpotLight` | ||
2. `AInfo` | ||
* `ASkyLight` | ||
* `ASkyAtmosphere` | ||
* Other unsupported derived actors | ||
3. `ASkyAtmosphere` | ||
4. `ATextRenderActor` | ||
* Other unsupported derived actors | ||
|
||
=== Prohibited Components in Actors | ||
|
||
These components, including custom components derived from them and saved in the project or mod, should not be placed in actors as they will likely cause packaging issues in the mod: | ||
|
||
1. `USceneComponent` | ||
* `ULightComponentBase` | ||
* `UDirectionalLightComponent` | ||
* `ULightComponent` | ||
* `ULocalLightComponent` | ||
* `UPointLightComponent` | ||
* `URectLightComponent` | ||
* `USkyLightComponent` | ||
* `USpotLightComponent` | ||
* `USynthComponent` | ||
* `UAudioComponent` | ||
* Other unsupported derived components | ||
|
||
== Asset Support in Packages (UPackage) | ||
|
||
Generally, all possible asset types are supported to be included in the plugin after the packaging. The tested ones are listed below, but any other assets without dependency on the engine are supported as well, such as manually created ones in the mod itself: | ||
|
||
* Actor | ||
* Pawn | ||
* Character | ||
* Actor Component | ||
* Scene Component | ||
* Level | ||
* Material | ||
* Widget | ||
* Texture | ||
* Sound Wave | ||
* Static Mesh | ||
* Skeletal Mesh |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1324,3 +1324,147 @@ void UModioManager::OnGetUserDelegationTokenCallback(FModioErrorCode ErrorCode, | |
---- | ||
==== | ||
=== Metrics Play Sessions | ||
|
||
The mod.io SDK supports all of the mod.io metrics features, allowing you to start a metrics play sesion, keeping that session alive via a heartbeat (automatically called, or manually handled) and then ending that session. Metric sessions allow you to track which mods your players interact with most frequently. Visit https://docs.mod.io/metrics/ for an overview of the mod.io metrics system. | ||
|
||
NOTE: Running metrics play sessions is a premium feature. If you are interested in mod.io premium features, please contact [email protected]. | ||
|
||
The Metrics session functionality is all accessible through the `modiosdk.h`, as well as suplemented with a global Metrics Service to manage session data, accessed via `Modio::Detail::Services::GetGlobalService<Modio::Detail::MetricsService>()` | ||
|
||
Metrics based on the platform and portal, are transparently taken care of with no additional consideration needed when using the SDK. | ||
|
||
==== Initialization | ||
|
||
The mod.io metrics features are enabled as part of generating a Metrics Secret Key your API settings in your game dashboard, e.g. https://mod.io/g/<game-name>/admin/api-key. Once this key has been generated, you need to pass it in as an ExtendedInitializationParameters entry in your InitializeOptions when Initializing the mod.io SDK, e.g.: | ||
|
||
[source,cpp] | ||
---- | ||
FModioInitializeOptions initializeOptions; | ||
initializeOptions.ExtendedInitializationParameters.Add("MetricsSecretKey", "00000000-1111-2222-3333-444444444444"); | ||
---- | ||
|
||
Failing to set up the Metrics Secret Key will result in a `Modio::MetricsError::SessionNotInitialized`` error being returned when using the metrics functionality. | ||
|
||
Additionally, ensure that you have set the appropriate Portal when initializing the SDK to track metrics sessions fro the appropriate portal you are using - for instance, on Steam, you must initialize with Modio::Portal::Steam. | ||
|
||
==== Starting a Metrics Session | ||
|
||
You can call <<MetricsSessionStartAsync>> to start a new session tracking the usage of mods in the context of your game. You'll notice that `MetricsSessionStartAsync` takes a <<MetricsSessionParams>> object as its parameter. This contains an optional Session Id, as well as a required vector of mods to track. | ||
|
||
NOTE: If a Session Id is not provided, a random one will be created for you. | ||
|
||
.Blueprint Example | ||
[%collapsible] | ||
==== | ||
image::img/metrics_session_start_1.png[] | ||
NOTE: Use the `SetSessionId` node if you want to associate your own Id with this session. | ||
image::img/metrics_session_start_2.png[] | ||
==== | ||
|
||
.C++ Example | ||
[%collapsible] | ||
==== | ||
[source,cpp] | ||
---- | ||
FModioMetricsSessionParams Params = FModioMetricsSessionParams(ModIds); | ||
void UModioManager::MetricsSessionStart(const FModioMetricsSessionParams& Params) | ||
{ | ||
GEngine->GetEngineSubsystem<UModioSubsystem>()->MetricsSessionStartAsync( | ||
Params, FOnErrorOnlyDelegateFast::CreateUObject(this, &UModioManager::MetricsSessionStartCallback)); | ||
} | ||
---- | ||
==== | ||
|
||
The Metrics Session Params accepts an optional Session Id in the form of a `Modio::Guid` which you may want to use to associate the new session with any supplementary telemetry you are gathering in your game. | ||
|
||
==== Metrics heartbeat | ||
|
||
To ensure that the session is kept alive, a heartbeat is required to be submitted at most every 5 minutes. We recommend doing this a bit earlier than the threshold to ensure you do not miss the window. | ||
|
||
There are two methods provided to control the behaviour of the heart beat, <<MetricsSessionSendHeartbeatOnceAsync>> which you can call at your desired precision, as well as a single call and forget <<MetricsSessionSendHeartbeatAtIntervalAsync>> with a desired interval. | ||
|
||
Calling `MetricsSessionSendHeartbeatOnceAsync` will submit a single heartbeat, and return an error code if something went wrong. If no error has occured, the heartbeat has been successfully sent. | ||
|
||
.Blueprint Example | ||
[%collapsible] | ||
==== | ||
image::img/metrics_session_heartbeat.png[] | ||
==== | ||
|
||
.C++ Example | ||
[%collapsible] | ||
==== | ||
[source,cpp] | ||
---- | ||
void UModioManager::MetricsSessionHeartbeat() | ||
{ | ||
GEngine->GetEngineSubsystem<UModioSubsystem>()->MetricsSessionSendHeartbeatOnceAsync( | ||
FOnErrorOnlyDelegateFast::CreateUObject(this, &UModioManager::MetricsSessionHeartbeatCallback)); | ||
} | ||
---- | ||
==== | ||
|
||
Calling `MetricsSessionSendHeartbeatAtIntervalAsync` requires a parameter with the desired interval frequency in seconds. An error code will be returned if something went wrong, otherwise you will receive a false-y error if the interval loop has been shut down successfully (such as ending a session). | ||
|
||
.Blueprint Example | ||
[%collapsible] | ||
==== | ||
image::img/metrics_session_heartbeat_interval.png[] | ||
==== | ||
|
||
.C++ Example | ||
[%collapsible] | ||
==== | ||
[source,cpp] | ||
---- | ||
const FModioUnsigned64 IntervalSeconds(150); | ||
void UModioManager::MetricsSessionHeartbeat(const FModioUnsigned64& IntervalSeconds) | ||
{ | ||
GEngine->GetEngineSubsystem<UModioSubsystem>()->MetricsSessionSendHeartbeatAtIntervalAsync( | ||
IntervalSeconds, | ||
FOnErrorOnlyDelegateFast::CreateUObject(this, &UModioManager::MetricsSessionHeartbeatCallback)); | ||
} | ||
---- | ||
==== | ||
|
||
==== Ending a Metrics Session | ||
|
||
To complete a session, for example when finishing a match, or quitting out of your game, you can call <<MetricsSessionEndAsync>>. | ||
As with the other calls, you will receive an error if anything has gone wrong, otherwise the operation successfully completed. | ||
|
||
.Blueprint Example | ||
[%collapsible] | ||
==== | ||
image::img/metrics_session_end.png[] | ||
==== | ||
|
||
.C++ Example | ||
[%collapsible] | ||
==== | ||
[source,cpp] | ||
---- | ||
void UModioManager::MetricsSessionHeartbeat() | ||
{ | ||
GEngine->GetEngineSubsystem<UModioSubsystem>()->MetricsSessionEndAsync( | ||
FOnErrorOnlyDelegateFast::CreateUObject(this, &UModioManager::MetricsSessionHeartbeatCallback)); | ||
} | ||
---- | ||
==== |
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.
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
BIN
+260 Bytes
(100%)
Doc/img/nd_img_ModioCommonTypesLibrary_MakeInitializeOptions.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.
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
BIN
-480 Bytes
(96%)
Doc/img/nd_img_ModioCommonTypesLibrary_SetSessionIdentifier.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
BIN
+136 Bytes
(100%)
Doc/img/nd_img_ModioCreateModLibrary_SetInitialVisibility.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
BIN
+767 Bytes
(110%)
Doc/img/nd_img_ModioErrorConditionLibrary_ErrorCodeMatches.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
+934 Bytes
(110%)
Doc/img/nd_img_ModioModProgressInfoLibrary_GetTotalProgress.png
Oops, something went wrong.
Binary file modified
BIN
+1.28 KB
(120%)
Doc/img/nd_img_ModioPresetFilterParamsLibrary_ToFilterParams.png
Oops, something went wrong.
Binary file modified
BIN
+353 Bytes
(100%)
Doc/img/nd_img_ModioSubmissionExtensionLibrary_K2_LoadModFileToMemory.png
Oops, something went wrong.
Binary file modified
BIN
+1.04 KB
(100%)
...g/nd_img_ModioSubmissionExtensionLibrary_K2_SubmitModChangesFromMemoryAsync.png
Oops, something went wrong.
Binary file modified
BIN
+1.17 KB
(110%)
Doc/img/nd_img_ModioSubmissionExtensionLibrary_K2_SubmitNewModFromMemoryAsync.png
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
+448 Bytes
(100%)
Doc/img/nd_img_ModioSubsystem_K2_GetModMediaGalleryImageAsync.png
Oops, something went wrong.
Binary file modified
BIN
+431 Bytes
(100%)
Doc/img/nd_img_ModioSubsystem_K2_GetModMediaLogoAsync.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+22.3 KB
Doc/img/nd_img_ModioSubsystem_K2_MetricsSessionSendHeartbeatAtIntervalAsync.png
Oops, something went wrong.
Binary file added
BIN
+18.9 KB
Doc/img/nd_img_ModioSubsystem_K2_MetricsSessionSendHeartbeatOnceAsync.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
+1.99 KB
(110%)
Doc/img/nd_img_ModioSubsystem_K2_UnsubscribeFromModAsync.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.