|
|
@@ -26,21 +26,22 @@ namespace GCMM |
|
|
|
private string defaultInfo = @" |
|
|
|
Gamecraft Mod Manager |
|
|
|
|
|
|
|
If you click on a mod it will show some info about it. The install instructions there are for manual installs. |
|
|
|
If you click on a mod it will show some info about it. The install instructions there are usually for manual installs. |
|
|
|
To get started, click on a mod and select Install mod. Most mods need GamecraftModdingAPI as well. |
|
|
|
Then, simply click Play. This will first download and run the patcher (GCIPA) if needed. |
|
|
|
If all goes well, after some time a modded Gamecraft should launch. |
|
|
|
|
|
|
|
After a Gamecraft update there's a good chance that mods will break. If this happens you may get errors when trying to start Gamecraft. |
|
|
|
Until updated versions are released, use the ""Run unpatched"" checkbox at the bottom to launch the game without mods. |
|
|
|
Until updated versions are released, use the ""Disable mods"" checkbox at the bottom to launch the game without mods. |
|
|
|
|
|
|
|
You don't have to use the mod manager to run the game each time, though it will tell you about mod updates when they come. |
|
|
|
However, make sure to click Play each time you want to switch between modded and unmodded. |
|
|
|
However, you need to run it and click ""Patch & Play"" each time there's a Gamecraft update. |
|
|
|
|
|
|
|
Disclaimer: |
|
|
|
This mod manager and the mods in the list are made by the ExMods developers. We are not associated with Freejam or Gamecraft. Modify Gamecraft at your own risk. |
|
|
|
|
|
|
|
If you encounter an issue while the game is patched, report it to us. If you think it's an issue with the game, test again with the unpatched option checked before reporting to Freejam. |
|
|
|
If you encounter an issue while any mods are installed, report it to us. If you think it's an issue with the game, test again with the ""Disable mods"" option checked before reporting to Freejam. |
|
|
|
You may also want to verify the game's files by right clicking the game in Steam and choosing Properties, going to Local files and clicking Verify integrity of game files. |
|
|
|
"; |
|
|
|
|
|
|
|
private void Form1_Load(object sender, EventArgs e) |
|
|
@@ -68,6 +69,9 @@ If you encounter an issue while the game is patched, report it to us. If you thi |
|
|
|
status.Text = "Status: Game not found"; |
|
|
|
return; |
|
|
|
} |
|
|
|
DeleteEmptyPluginsDir(out bool pexists, out bool dexists); |
|
|
|
if (!pexists && dexists) |
|
|
|
unpatched.Checked = true; //It will call the event but that won't do anything |
|
|
|
CheckIfPatched(); |
|
|
|
GetInstalledMods(); |
|
|
|
GetAvailableMods(); |
|
|
@@ -141,6 +145,14 @@ If you encounter an issue while the game is patched, report it to us. If you thi |
|
|
|
installbtn.Text = "Install mod"; |
|
|
|
break; |
|
|
|
} |
|
|
|
if (unpatched.Checked) |
|
|
|
{ //Don't allow (un)installing mods if mods are disabled |
|
|
|
UpdateButton(installbtn, false); |
|
|
|
UpdateButton(uninstallbtn, false); |
|
|
|
modlist.Enabled = false; |
|
|
|
} |
|
|
|
else |
|
|
|
modlist.Enabled = true; |
|
|
|
} |
|
|
|
|
|
|
|
private async void installbtn_Click(object sender, EventArgs e) |
|
|
@@ -176,8 +188,48 @@ If you encounter an issue while the game is patched, report it to us. If you thi |
|
|
|
} |
|
|
|
|
|
|
|
private void unpatched_CheckedChanged(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
{ //Not using the patcher's revert option because sometimes it restores the wrong files - the game can be patched without mods |
|
|
|
CheckIfPatched(); |
|
|
|
modlist_SelectedIndexChanged(modlist, null); |
|
|
|
string plugins = GamePath("\\Plugins"); |
|
|
|
string disabled = GamePath("\\Plugins_Disabled"); |
|
|
|
DeleteEmptyPluginsDir(out bool pexists, out bool dexists); |
|
|
|
if (unpatched.Checked) |
|
|
|
{ |
|
|
|
if (pexists) |
|
|
|
{ |
|
|
|
if (dexists) |
|
|
|
Directory.Delete(disabled, true); //Resolving conflicts would be complicated so delete the other mods - this shouldn't happen normally |
|
|
|
Directory.Move(plugins, disabled); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (dexists) |
|
|
|
{ |
|
|
|
if (pexists) |
|
|
|
Directory.Delete(plugins, true); |
|
|
|
Directory.Move(disabled, plugins); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void DeleteEmptyPluginsDir(out bool pexists, out bool dexists) |
|
|
|
{ |
|
|
|
string plugins = GamePath("\\Plugins"); |
|
|
|
string disabled = GamePath("\\Plugins_Disabled"); |
|
|
|
pexists = Directory.Exists(plugins); |
|
|
|
dexists = Directory.Exists(disabled); |
|
|
|
if (pexists && !Directory.EnumerateFiles(plugins).Any()) |
|
|
|
{ |
|
|
|
Directory.Delete(plugins); |
|
|
|
pexists = false; |
|
|
|
} |
|
|
|
if (dexists && !Directory.EnumerateFiles(disabled).Any()) |
|
|
|
{ |
|
|
|
Directory.Delete(disabled); |
|
|
|
dexists = false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |