Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

ModIO.ModManager.TryInstallMod

Jackson Wood edited this page Mar 25, 2019 · 2 revisions

ModManager.TryInstallMod

public static bool TryInstallMod(int modId, int modfileId, bool removeArchiveOnSuccess);

Parameters

Name Description
modId Mod identifier of the mod binary to install
modfileId Modfile identifier of the mod binary to install
removeArchiveOnSuccess Remove the mod binary archive be removed if the installation succeeds

Returns

bool: TRUE indicates the entire installation completed successfully, (although the failure/success of the achive deletion is unchecked). FALSE indicates that either the mod binary archive does not exist, the uninstallation of previous versions failed, or that the extraction process failed.

Description

Extracts a mod archive to the installs folder and removes other installed versions.

This function does not manage the downloading of mod binaries, merely extracts the mod binary zip file stored at the location described by CacheClient.GenerateModBinaryZipFilePath. If this file does not exist, or is not an extractable archive, this this function will fail. Additionally, if any existing modfile installations fail to uninstall, this function will also fail.

Clone this wiki locally