在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:modio/modio-ue4-legacy开源软件地址:https://github.com/modio/modio-ue4-legacy开源编程语言:C++ 82.7%开源软件介绍:NOTE: This codebase is now deprecated.The latest version of the mod.io Unreal Plugin can be found at https://github.com/modio/modio-ue4. Unreal Engine 4 PluginWelcome to the legacy mod.io Unreal Engine 4 Plugin. It allows game developers to easily control the browsing and installation of mod files in their games. It provides a C/blueprint interface built on the Unreal Engine to connect to the mod.io API. We have a test environment available which offers developers a private sandbox to try the Unreal Engine 4 Plugin out. Features
DocumentationA quick start guide is provided below, in addition to the more detailed wiki. There is also an example project showing authentication and downloading mods. UsageBrowse modsFModioSortCreator SortCreator;
SortCreator.ModSortType = EModioModSortType::SORT_BY_DATE_UPDATED;
SortCreator.Ascending = false;
FModioFilterCreator FilterCreator;
FilterCreator.Sort = SortCreator;
Modio->GetAllMods(FilterCreator,
{ TEXT("Hat"), TEXT("HD") } /* Filter by tags */,
4 /* Limit the number of results for a request. */,
0 /* Use the offset to skip over results and paginate through them */,
FModioModArrayDelegate::CreateUObject(ModioManager, &UModioManager::OnGetAllMods));
// ...
void UModioManager::OnGetAllMods(FModioResponse Response, const TArray<FModioMod> &Mods)
{
for (FModioMod Mod : Mods)
{
UE_LOG(LogTemp, Warning, TEXT("Name: %s"), *Mod.Name);
UE_LOG(LogTemp, Warning, TEXT("Description: %s"), *Mod.Description);
UE_LOG(LogTemp, Warning, TEXT("Date updated: %d"), Mod.DateUpdated);
}
} Auth (via email)First step is to request a security code to your email. Modio->EmailRequest("[email protected]", FModioGenericDelegate::CreateUObject(ModioManager, &UModioManager::OnEmailRequest));
// ...
void UModioManager::OnEmailRequest(FModioResponse Response)
{
// Response.code should be 200 if an security code was sent to the provided email
} Finish authentication by submitting the 5-digit code. Modio->EmailExchange("VBY5A", FModioGenericDelegate::CreateUObject(ModioManager, &UModioManager::OnEmailExchange));
// ...
void UModioManager::OnEmailExchange(FModioResponse Response)
{
// Response.code should be 200 if you are now authenticated
} External AuthIf your game is running inside a popular distribution platform such as Steam or GOG Galaxy you can authenticate 100% seamlessly. Galaxy AuthModio->GalaxyAuth("csEYJ2MWR53QssNNqFgO87sRN", FModioGenericDelegate::CreateUObject(ModioManager, &UModioManager::OnGalaxyAuth));
// ...
void UModioManager::OnGalaxyAuth(FModioResponse Response)
{
// Response.code should be 200 if you are now authenticated via Galaxy
} Oculus AuthModio->OculusAuth("zBOBKszK..txDHJvjAC",// nonce proof
3485509464809317, // User id
"OCAf57IgZCf9JphLvM3dY...lVxWf5tenZBoOLAZDZD", // access token
"[email protected]", // Email, optional parameter, skip with ""
"rift", // rift and quest authentication supported
0, // Expiry date, skip with 0
FModioGenericDelegate::CreateUObject(ModioManager, &UModioManager::OnGalaxyAuth));
// ...
void UModioManager::OnGalaxyAuth(FModioResponse Response)
{
// Response.code should be 200 if you are now authenticated via Galaxy
} Steam AuthYou will need to setup the following:
Modio->SteamAuth("NDNuZmhnaWdyaGdqOWc0M2o5eTM0aGc", FModioGenericDelegate::CreateUObject(ModioManager, &UModioManager::OnSteamAuth));
// ...
void UModioManager::OnSteamAuth(FModioResponse Response)
{
// Response.code should be 200 if you are now authenticated via Steam
} SubscriptionsDownload and remove mods locally by subscribing and unsubscribing. SubscribeModio->SubscribeToMod(mod_id, FModioModDelegate::CreateUObject(ModioManager, &UModioManager::OnSubscribeToMod));
// ...
void UMyModioManager::OnSubscribeToMod(FModioResponse Response, FModioMod Mod)
{
// Response.code should be 200 if you subscribed to the mod successfully
} UnsubscribeModio->UnsubscribeFromMod(mod_id, FModioGenericDelegate::CreateUObject(ModioManager, &UModioManager::OnUnsubscribeFromMod));
// ...
void UMyModioManager::OnUnsubscribeFromMod(FModioResponse Response)
{
// Response.code should be 200 if you unsubscribed from the mod successfully
} Functions compatible with Polling DisabledDownloadModfilesById
DownloadSubscribedModfiles
Mod submissionShare mods by creating a mod profile and attaching modfiles to it. Create a mod profileFModioModCreator ModCreator;
ModCreator.Name = "My Mod";
ModCreator.LogoPath = "ModExample/logo.png";
ModCreator.HomepageUrl = "http://www.webpage.com";
ModCreator.Summary = "Mod added via the SDK examples. Mod added via the SDK examples. Mod added via the SDK examples. Mod added via the SDK examples. Mod added via the SDK examples. Mod added via the SDK examples.";
Modio->AddMod(ModCreator, FModioModDelegate::CreateUObject(ModioManager, &UModioManager::OnAddMod));
// ...
void AModioManager::OnAddMod(FModioResponse Response, FModioMod Mod)
{
// Response.code should be 200 if the mod profile was created
} Upload a modfileFModioModfileCreator ModfileCreator;
ModfileCreator.Path = "ModExample/modfile/";
ModfileCreator.Version = "v1.1.0";
ModfileCreator.Changelog = "This is a change log...";
Modio->AddModfile(mod_id, ModfileCreator); ListenersDownload listenerModio->SetModDownloadListener(FModioListenerDelegate::CreateUObject(ModioManager, &UMyModioManager::OnModDownload));
// ...
void UMyModioManager::OnModDownload(int32 ResponseCode, int32 ModId)
{
// ResponseCode should be 200 when a mod was just downloaded
Modio->InstallDownloadedMods();
} Upload listenerModio->SetModfileUploadListener(FModioListenerDelegate::CreateUObject(ModioManager, &UMyModioManager::OnModUpload));
// ...
void UMyModioManager::OnModUpload(int32 ResponseCode, int32 ModId)
{
// ResponseCode should be 200 when a mod was just uploaded
} Getting startedIf you are a game developer, first step is to add mod support to your Unreal Engine 4 game. Once mod support is up and running, create your games profile on mod.io, to get an API key and access to all functionality mod.io offers. Next, input your Once initialized, you are ready to start interacting with either the Blueprint layer or C++. Both have the same funcionality so it's up to you choosing what fits better to your game. Blueprint layerInteract with mod.io by using the intuitive mod.io functions, callback proxies and structures. Don't forget to connect the C++ layerImport the mod.io subsystem and get the Subsystem pointer to start interacting with mod.io. Remeber to call #include "ModioSubsystem.h"
// ...
FModioSubsystemPtr Modio;
Modio = FModioSubsystem::Get(GetWorld());
// ...
void UModioManager::Tick(float DeltaTime)
{
Modio->Process();
} Contributions WelcomeOur Unreal Engine 4 plugin is public and open source. Game developers are welcome to utilize it directly, to add support for mods in their games, or fork it for their games customized use. Want to make changes to our plugin? Submit a pull request with your recommended changes to be reviewed. BuildingYou can use the standalone
Where [UE4 VERSION] is the UE4 version that will be used for building, it has to be installed on your system beforehand. The following versions are supported:
Other RepositoriesOur aim with mod.io, is to provide an open modding API. You are welcome to view, fork and contribute to our other codebases in use. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论