Skip to main content

Enable player interaction with UGC

Last updated on May 13, 2024

Overview

AccelByte Gaming Services (AGS) allows for user-generated content (UGC). UGC is a powerful way to enrich your game with fresh and diverse content created by your players. UGC can range from simple cosmetic items to complex levels and scenarios. UGC is not only beneficial for the game developers, it can also enhance the player experience and engagement.

One of the key factors that makes UGC engaging is the social aspect of it. Players can interact with each other through UGC in various ways, such as liking, downloading, and following. These interactions can foster a sense of community, recognition, and feedback among the players, and motivate them to create and share more UGC.

Goals

The goals of this section are to explain some of the features that enable player interaction with in-game UGC, such as:

  • Like content
  • List content likers
  • Add download count to content
  • List content downloaders
  • Follow UGC creator
  • Get UGC creator stats
  • List UGC from followed creators
  • List follower
  • List followed Creator

Prerequisites

You will need access to:

Likes

Like content

This is a simple but effective way to let players express their appreciation for a piece of UGC. By liking content, players can show their support and gratitude to the creator, as well as help other players discover popular and high-quality UGC. Liking content can also increase the visibility and ranking of the content in the game's UGC browser or marketplace.

You can use this function to like content:

FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();

FString ContentId = "YourUGCContentId";
bool bLikeStatus = true; // True = like and False = Dislike

ApiClient->UGC.UpdateV2LikeStatusToContent(ContentId, bLikeStatus, THandler<FAccelByteModelsUGCUpdateLikeStatusToContentResponse>::CreateLambda([](const FAccelByteModelsUGCUpdateLikeStatusToContentResponse& Result)
{
// Do something if UpdateV2LikeStatusToContent is successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if UpdateV2LikeStatusToContent has an error
}));

List content likers

This feature can help players find other players who share their interests and preferences, and potentially form social connections with them. It can also help players discover new UGC that is liked by other players. Listing content likers can also increase the visibility and popularity of a piece of UGC, as it shows how many people have enjoyed it.

You can use this function to list content likers:

FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();

FString ContentId = "YourUGCContentId";

ApiClient->UGC.GetV2ListContentLiker(ContentId,
THandler<FAccelByteModelsUGCGetPaginatedContentLikerResponse>::CreateLambda([](const FAccelByteModelsUGCGetPaginatedContentLikerResponse& Result)
{
// Do something if GetV2ListContentLiker is successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if GetV2ListContentLiker has an error
}));

Downloads

Add download count to content

This feature shows how many times a piece of UGC has been downloaded by other players. Download counts can serve as a measure of popularity and quality of content, as well as feedback for the creator. Download counts can also encourage players to download and try more UGC, especially if they see that many players have enjoyed it.

You can use this function to add a download count to content:

FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();

FString ContentId = "YourUGCContentId";

ApiClient->UGC.AddV2DownloadContentCount(ContentId,
THandler<FAccelByteModelsUGCAddDownloadContentCountResponse>::CreateLambda([](const FAccelByteModelsUGCAddDownloadContentCountResponse& Result)
{
// Do something if AddV2DownloadContentCount is successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if AddV2DownloadContentCount has an error
}));

List content downloaders

This feature allows creators to see who has downloaded their content in the game. Creators can use this information to gauge their audience and reach, as well as to connect with their fans and potential collaborators.

You can use this function to list content downloaders:

FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();

FString ContentId = "YourUGCContentId";

ApiClient->UGC.GetV2ListContentDownloader(ContentId,
THandler<FAccelByteModelsUGCGetPaginatedContentDownloaderResponse>::CreateLambda([](const FAccelByteModelsUGCGetPaginatedContentDownloaderResponse& Result)
{
// Do something if GetV2ListContentDownloader is successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if GetV2ListContentDownloader has an error
}));

Follows

Follow UGC creators

This feature allows players to follow their favorite UGC creators in the game. By following a creator, players can stay updated on their latest creations and access their previous work. Following a creator can also show respect and admiration for their skills and style and foster a sense of loyalty and connection.

You can use this function to follow a UGC creator:

FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();

FString UserId = "UserId";
bool bFollowStatus = true;

ApiClient->UGC.UpdateFollowStatusToUser(UserId, bFollowStatus,
THandler<FAccelByteModelsUGCUpdateFollowStatusToUserResponse>::CreateLambda([](const FAccelByteModelsUGCUpdateFollowStatusToUserResponse& Result)
{
// Do something if UpdateFollowStatusToUser is successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if UpdateFollowStatusToUser has an error
}));

Get UGC creator stats

This feature allows players to view various statistics about a UGC creator in the game such as follow count, following count, total liked content, etc. These statistics can provide insight into the creator's popularity, influence, and reputation in the game's UGC community, as well as their personal preferences and interests. Getting UGC creator stat can also help players compare and contrast different creators and find new ones to follow or collaborate with.

You can use this function to get UGC creator stats:

FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();

FString UserId = "UserId";

ApiClient->UGC.GetCreator(UserId,
THandler<FAccelByteModelsUGCGetListFollowersResponse>::CreateLambda([](const FAccelByteModelsUGCGetListFollowersResponse& Result)
{
// Do something if GetCreator is successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if GetCreator has an error
}));

List UGC from followed creators

This feature allows players to browse and play the UGC from the creators they follow in the game. Players can easily find new and relevant content that matches their taste and preferences and discover new genres and challenges. Listing UGC from followed creators can also help players diversify and expand their gaming experience and learn from the best.

You can use this function to list UGC from followed creators:

FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();

ApiClient->UGC.GetFollowedContent(
THandler<FAccelByteModelsUGCContentPageResponse>::CreateLambda([](const FAccelByteModelsUGCContentPageResponse& Result)
{
// Do something if GetFollowedContent is successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if GetFollowedContent has an error
}));

List followers

This feature allows creators to see who is following them in the game. Creators can use this information to appreciate and acknowledge their fans and interact with them through messages or comments. Listing followers from a creator can also help creators build and grow their fan base and attract new followers by showcasing their work.

You can use this function to list follower:

FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();

FString UserId = "UserId";

ApiClient->UGC.GetListFollowers(UserId,
THandler<FAccelByteModelsUGCGetListFollowersPagingResponse>::CreateLambda([](const FAccelByteModelsUGCGetListFollowersPagingResponse& Result)
{
// Do something if GetListFollowers is successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if GetListFollowers has an error
}));

List followed creators

This feature can help players keep track of their favorite creators and easily access their content. For the content creators, creators can use this information to keep up with their peers and idols and learn from their techniques and ideas.

You can use this function to list followed creators:

FApiClientPtr ApiClient = FMultiRegistry::GetApiClient();

ApiClient->UGC.GetFollowedUsers(THandler<FAccelByteModelsUGCFollowedUsersResponse>::CreateLambda([](const FAccelByteModelsUGCFollowedUsersResponse& Result)
{
// Do something if GetFollowedUsers is successful
}), FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
// Do something if GetFollowedUsers has an error
}));