Skip to main content

Edit an Existing Mod

Mod details can be edited in-game using SubmitModChangesAsync. This function allows you to edit multiple parameters with a single call. It takes a ModioModID of the mod to edit, a ModioEditModParams containing one or more parameters to be altered, and a callback that will contain an optional updated ModioModInfo object on success.

note

To update the mod file itself, use SubmitNewModFileForMod. See Submitting a file for a mod for more information.

Note that it would be more appropriate to pass an FModioEditModParams with your desired parameters into UModioManagerSubsystem::EditMod(). This example shows their creation within the function to illustrate their use.

void UModioManagerSubsystem::EditMod(FModioModID ModID)
{
if (UModioSubsystem* Subsystem = GEngine->GetEngineSubsystem<UModioSubsystem>())
{
FModioEditModParams EditParams;

// Add one or more parameters to edit
EditParams.Name = TEXT("My Edited Mod Name");
EditParams.Summary = TEXT("My edited summary");

Subsystem->SubmitModChangesAsync(ModID, EditParams, FOnGetModInfoDelegateFast::CreateUObject(this, &UModioManagerSubsystem::OnSubmitModChangesComplete));
}
}

void UModioManagerSubsystem::OnSubmitModChangesComplete(FModioErrorCode ErrorCode, FModioOptionalModInfo UpdatedInfo)
{
if (!ErrorCode)
{
// Mod successfully updated. Can display new details from UpdatedInfo etc.
}
}