[CTP] Call to Power 1 & 2 New Mod Manager

Blake00

CFC Mod Archivist & Social Media Helper
Super Moderator
Supporter
Joined
Sep 24, 2016
Messages
3,557
Location
Australia
While Call To Power 2 had an simple mod swapper back in the day the CTP fans Discord owner Ninjaboy has informed us that over the last year he's been working on a new mod swapper for both CTP games with a larger scope of improvements that will hopefully make installing, swapping & using mods with CTP games much easier as well as improving the overall gameplay experience! I'll keep an eye on his progress and post more here...

More details here...
https://github.com/justinfarrelldev/ctp-mod-manager
https://discord.gg/mVBDgyVRhT
https://discord.com/channels/924072012295585842/924076901557997598/1122049288181129267 (use join link above first for this link to work)

Basically, I'm making an all-in-one mod manager for CTP (focusing on CTP2 at first). Here are some of the standout features it WILL have:
  • it will be open sourced (it is currently closed-source because it isn't in a state to take contributions yet - still scaffolding the linter, setting up CI/CD, writing tests, etc.)
  • it will be able to tell exactly which files are modified for each mod installation (allowing us to know which mods are compatible with each other and pointing out incompatibilities with a diff-view)
  • it will store the initial state before mod installation, allowing you to revert back to the non-modded state easily
  • it will access known mods from an online bucket of some sort (something like S3) for easy, one-click installation
  • it will allow the specification of an install script similarly to Wrye Bash (though probably with a few specified commands such as "mv", not necessarily all of bash)
  • it MAY also play music from links you supply (no guarantee here, but it's an idea that would help us listen to the original soundtrack in-game again)
  • for the convenience of contributors, I set up Electron and React to use Vite for the bundler (super fast HMR!)
Currently, it is able to auto-detect installations of CTP2 on your system, show it within a pretty handy menu within a program window and it has permissions to modify the files. The next steps are adding the GUI for adding mods, allowing you to add install locations, tracking state with a file similar in functionality to package-lock.json for npm and ensuring that the files can be reverted (the most important part).

This is my first Electron project and I took the time to really learn about inter-process communication (plus, I've been scaffolding testing and stuff) so that's why it's been taking a while - I've been learning a ton along the way.
Oh - one last thing! I am focusing on Windows at first, but I plan to allow compatibility for Linux and Mac as soon as possible since I know we have a few players on those platforms
There's a pretty strong chance that I may make it open-source within the next month or two, but I am definitely going to prioritize a CI / CD system and general quality control systems before accepting PRs. It's also currently a bit of a mess, so I'ma make sure to clean it up a lil (for example, the Electron backend is currently plain JS, while the React parts are TS - if only Electron accepted TS for input... may just have to hit it with tsc)
I'm also aware that this whole thing is vaporware at this point (basically just being a glorified menu at this point), I just wanted to let you all know what I have been working on since I gave that very cliff-hangery message back in May and have NOT elaborated since
 
Last edited:
19/12/2024
Wanted to give a quick update about the Mod Manager. I have found that I have unfortunately not been working on it as much as I would like, and as a result of this I plan to open-source it soon. Right now, I'm also cleaning it up with some test coverage so that any possible contributors are aware of how much progress has been made (there is a surprising amount of progress that has been done, actually).

Anyway, keep an eye out for that! I'll probably make more channels for updates for that project once I do open-source it [...] so that I can keep myself working on it often and so that the whole community can see the progress.

This is how the mod manager looks right now, just for extra information. It looks very barebones, but the actual functionality is basically entirely there (minus applying the mods to the installation and then going backwards - it installs them fine, but I need to add the "reverting" functionality still)

I'll clean up the looks at a later point once it can actually manage mods :)

Once I have session management working properly, I'll make an example client in C++ and SDL2 to demonstrate how to interact with the server's API and create a login screen. I will post about that when I have created it. The example client will not ever become a real client though (with anything past a login screen), since I would be much better off creating that in Go (because my server and the client could share types). As a result, the example client will only show the auth flow to give an example of how to interact with the API.
1743311209527.png

21/12/2024
Lots of progress today on the Mod Manager - went from a whopping 0 tests to 56 (thanks to AI, of course). I'm adding tests to help stabilize the mod manager before making it open-source, as well as to maintain my own bearings while trying to finish off the implementation (so hopefully we can have mods that both apply and un-apply, as well as stack on top of each other properly). Fingers crossed that'll be soon 🤞

10/01/2025
I've been working quite frequently on the mod manager, and I believe it is getting quite close to working as originally planned. I have revamped the mod application system, so now mods that are applied are first diff'ed (the changes are made and stored) and then the diffs are resolved in a chain. This, when it is 100% completed, will mean that multiple mods can be checked for compatibility, as each difference is applied individually. This also means that the mods can be un-applied, something I am looking forward to implementing soon.

I have a few tasks still head of me:

1) Ensuring that changes that remove lines from files can be successfully applied (right now, I simply haven't implemented that logic)

2) Ensuring that each change is written to a file and stored before the application begins (so it can be done in reverse when un-applying each mod)

3) Implementing the un-applying logic (should be easy, given it would just be doing removals where additions were done previously, etc.)

4) testing all of the above

5) open-sourcing the repo

6) using a web worker to ensure that the main thread is not blocked when applying large mods

Once all of this is done, the mod manager should be ready for a proper release. I believe it's quite close - not close enough to give a proper timeframe, but really close. I'm hoping its release will allow us to craft some really awesome modpacks.

06/03/2025
I've been working a lot on the mod manager. I'm now at over 110 tests, been trying to QA the backend as much as possible.

Just today, I've added a backup restore button and got the mods to apply without throwing errors (though CTP2 did not run after the application). The new backup restoration button will make development way easier from now on (no more deleting and un-zipping the files over and over every time that I brick the CTP installation with a botched mod application).

As a reminder, I had the mods applying successfully before, but I am currently in the process of making each individual change applied by the mod be written to the files.

That process will allow us to apply multiple mods on top of each other (if they are compatible) and have them work together, which will be super cool.

Though I'm running into lots of issues right now, I'm still very confident in how this is working out and believe that (some day) we will be able to have a great alternative to modswap on our hands.

24/03/2025
Coming very soon as an alpha to Windows, Linux and MacOS (with quite a few themes to choose from)...
1743311718403.png 1743311738078.png
 
The Call to Power 1 & 2 New Mod Manager has been released! Over the last few months it went from alpha to beta state and now has support for CTP1 to go with it's existing CTP2 support.

02/04/2025
This is NOT an April Fools post, but it IS an awesome news announcement you won’t want to miss!I have officially released the first Alpha release of the Call to Power Mod Manager! You can give it a try by downloading the related file here: https://github.com/justinfarrelldev/ctp-mod-manager/releases/tag/v0.5.1Please note that this is still very, very alpha - that is, expect a LOT of bugs, and do not use it on any installation you really care about without backing it up first. Speaking of backups, here are some of the features that are available in the CTP Mod Manager:
  • Attempts to find your existing CTP2 installations,
  • Create, restore and delete backups via a nice UI,
  • Set a theme so that you can apply the mods in style (with light mode, dark mode and pretty much everything in-between, thanks to DaisyUI’s awesome theme support),
  • Apply multiple mods at once,
  • Run (and stop) the game from the mod manager’s interface,
  • Support for both full mods and scenario mods,
  • Windows (32-bit and 64-bit), Linux (Debian and Arch) and MacOS support,
With all of that said, here are some features that are still not available:
  • CTP1 support (this WILL be coming in the future, but needs some work behind the scenes to make it happen),
  • RAR / 7ZIP file support (mods need to be ZIP files specifically),
  • Some mods are still incompatible; see the release notes,
  • Windows will try to warn you that they “Protected your PC” - this is because I have not digitally signed the app yet. It is safe to just click “More info” and then “Run anyway” (or, if you are worried about it, you can build it from source as it is open-source software),
Please report any issues to ⁠ctp-mod-manager-issues or to the Issues page on GitHub (make sure it is not in “Known Issues” in the release first, and make sure the mod you are applying is not in the “Incompatible Mods” list within the release). Please do report any mods you try that are incompatible and are not listed in the "Incompatible Mods" list in the release notes, as that's the only way I can attempt to make them compatible!Thank you, and I’m looking forward to hearing about your experiences with the mod manager!
1757304040451.png

11/04/2025
Version 0.6.0 of the mod manager just released and you can get it here (keep in mind, it is still an alpha and will have bugs as well as breaking changes on the next release): https://github.com/justinfarrelldev/ctp-mod-manager/releases/tag/v0.6.0This version brings a few key changes, notably:
  • Support for mods that require modswap for installation,
  • Fixed a bug where the "Delete Selected" and "Apply Selected" buttons would stay clickable even after deleting the mods that were selected,
  • Automatic update support for Windows and Linux (this is untested, but I'm very confident it will work next patch),
The first bullet point above is an absolute gamechanger. The following mods (that were previously broken) will now apply successfully:
  • LOTR ("Lord of the Rings", "Lord of the Rings - Epic" and "Lord of the Rings - Hordes of Mordor" now all apply successfully),
  • Super Apolyton Pack,
  • Good Mod for the Super Apolyton Pack (other versions, such as the City Mod 2 version, are unconfirmed),
  • World at War,
  • ... and a ton more!,
If you have version 0.5.1 (the first release) and want to upgrade to version 0.6.0, follow these steps:
  • Back up any saves you care about with the backup system,
  • Delete mods that you previously added that were not working,
  • Re-add the mods that you previously added,
After this change, you should never have to manually grab new releases anymore on Windows and Linux. Of course, there's no way to test that without actually pushing up another release, so I suppose we will put that to the test next time...

03/08/2025
I have just released a new version of the Call to Power Mod Manager, 0.7.1 Beta.

This is the first full Beta release of the mod manager, as I feel it has significantly stabilized - it also now features Civilization: Call to Power (CTP1) support!

Please note that the CTP1 support is still unstable, and you are likely to run into permission issues (especially on Windows) due to the way CTP1 is typically installed. If you do run into permission issues, you can always copy your Call to Power installation to your Documents folder and then add that installation and that should fix the permissions issues.

I do not recommend launching the application in Administrator mode, as it is still in beta and there will be bugs.

So far, I have only really tested one CTP1 mod - Forever Future - to any great extent with the mod manager. It currently works great (so long as you unzip the RAR file and then re-zip it as a .zip file - I will be uploading the repack shortly for your convenience).

I will be working on improving stability and the user experience across both CTP1 and CTP2 before the inevitable 1.0 release. Who knows when that will be?

Here is the link to the release if you want to try it out: https://github.com/justinfarrelldev/ctp-mod-manager/releases/tag/v0.7.1

Note: the previous version of the mod manager was supposed to automatically update, however that feature is currently bugged and so you will need to re-download the mod manager to update if you already have it (but don't worry, your settings, installations and mods should remain intact).
.
 
Last edited:
Back
Top Bottom