Jump to content

Recommended Posts

Here is the seventh version of the Mod Mixer.

Download the zip file. You can extract it to anywhere. It will hopefully find the path to the game by itself, although I have only tested with the Steam edition.

It requires .NET 4 to work. (Get it from Microsoft, if you don't have it and the installer doesn't automatically install it for you)

How to use:

- Put your favorite mods under the Carrier Command: Gaea Mission game folder, like usual.

- Run the Mod Mixer.

- Put a checkmark on the mods you want to try to combine.

- Click on the Combine button. The program will create another mod folder called _MixerMod_ that will be the result of merging all selected mods together. If there are any error during the merge process, it will appear in the result list below. Have a look at it and check if everything is okay. If you find some "Incompatible" lines, note which mod is causing problems and either disable it or move it to lower priority.

- When the merging is completed, click on the Start Game button to launch the game with the combined mod.

Please report here any problems you encounter. Thanks!

Special thanks to:

Thygrrr - For finding out the PAK file format.

Newtie - For finding out the dbexport.bin file format.

Disorder, Species1571, Crotaro, Gnrl_Grad, atroublestarter - For having the patience of downloading, testing, bug reporting and making suggestions for this tool.

EDIT:

Version 1.08

- FIX: Regression bug making the program not escalate to admin.

Version 1.07:

- ADDED: The DbExport.bin database files can now be combined. If several mods modify the same values, the values from the mod with highest priority will prevail.

- ADDED: It now remembers the window size and whether it was maximized.

- FIX: You cannot launch the game game with the combined mod until some mod(s) have been successfully combined.

Version 1.06:

- The program now shows an UAC request to access the game folder.

Version 1.05:

- Fixed the wrong layout of the Advanced button.

Version 1.04:

- Problematic files are now highlighted.

- Added a window for advanced options.

Version 1.03:

- Fixed a problem not recognizing new added mods.

- No longer attempts to merge binary files. This functionality will be added to the database binary file in the future. For now it uses the version of the highest priority mod.

- Starts the game from the game folder. This was causing a problem with the non-Steam version.

- Fixed a problem regarding the program crashing when clicking a column header in the mod list.

Version 1.02:

- Remembers your mod selection and priority.

- Asks for the game folder if it cannot find it by itself, and remembers it.

Edited by azrapse
Update

Share this post


Link to post
Share on other sites

Uploaded a new version with some fixes. Links in the original post.

Share this post


Link to post
Share on other sites

A few things I'm noticing during testing:

1. It doesn't detect mods being added after the first run. When adding additional mods, I have to manually edit config.xml to add their names. Deleting a mod and then running the mixer does update the list correctly.

2. When clicking "Start Game", the game is looking in the wrong location for files. When I look in error.log, it shows this:

FileSystem: Path 'E:\Program Files (x86)\Bohemia Interactive\Carrier Command Gaea Mission\CarrierCommandModMixer.1.02\data00.cc' is not valid

FileSystem: Path 'E:\Program Files (x86)\Bohemia Interactive\Carrier Command Gaea Mission\CarrierCommandModMixer.1.02\data01.cc' is not valid

FileSystem: Path 'E:\Program Files (x86)\Bohemia Interactive\Carrier Command Gaea Mission\CarrierCommandModMixer.1.02\data02.cc' is not valid

I believe this is the same cause of what Crotaro is reporting in the slowships thread. I got around this by using my usual shortcut with the mod changed to -mod _MixerMod_

3. Clicking the column tabs is causing an unhandled exception which it seems you can click continue without problems.

4. I have two mods which are using dbexport.bin and it says they are both compatible. However, launching the game with my _MixerMod_ shortcut causes an immediate unhandled exception crash and after some investigating, I found dxexport.bin was the cause. The mixer is making a file which is 389K and cannot be read by newtie's editor, when both mods have the file as 323K. I know you have problems with this file, but since it doesn't contain anything that breaks the game, maybe you could make it so that only the file from the higher priority selected mod gets copied?

5. Uncertain about this one: It seems to be flagging lines as incompatible when the only change is the addition or deletion of an empty line, or when one mod has a line inserted on the line immediately before a line that is only altered by the other mod.

Share this post


Link to post
Share on other sites

Thanks for the detailed bug report, Species. :) I will try to fix them now.

---------- Post added at 16:57 ---------- Previous post was at 15:49 ----------

I have uploaded a new version with problems 1-4 fixed (I believe, as I cannot really test the stuff that happens with the non-Steam version of the game).

Problem 5 I need more information. Can you please tell me with which mods are you getting that behavior?

Thanks for all the help. :)

Share this post


Link to post
Share on other sites

Thanks, I can confirm those are now fixed for me.

If I may make two further suggestions, first, the results box is maybe too detailed, maybe lines that have status "OK" can disappear once they have been scanned, and just leave the compatible/incompatible verdicts? Second, a button to let users define additional launch parameters (for example, I use -nosplash -alwaysupdate in addition to the mod name).

#5, the two mods were deadly islands and nemesis. It was only one of several sections causing problems which I have now made workarounds for the next DI update, so it's no big thing, but there may be other or future mods that get flagged for the same thing. Maybe you can make the mixer ignore all blank lines from both input and output files?

PS you need to update your links in the 1st post.

Share this post


Link to post
Share on other sites
Thanks, I can confirm those are now fixed for me.

If I may make two further suggestions, first, the results box is maybe too detailed, maybe lines that have status "OK" can disappear once they have been scanned, and just leave the compatible/incompatible verdicts? Second, a button to let users define additional launch parameters (for example, I use -nosplash -alwaysupdate in addition to the mod name).

#5, the two mods were deadly islands and nemesis. It was only one of several sections causing problems which I have now made workarounds for the next DI update, so it's no big thing, but there may be other or future mods that get flagged for the same thing. Maybe you can make the mixer ignore all blank lines from both input and output files?

PS you need to update your links in the 1st post.

Thanks, updated again with your suggestion about the advanced options.

Once the mixer works flawlessly, it will be less verbose. But meanwhile we are polishing the bugs, I prefer it to say all it has to say. :)

I'm checking what happens when combining Nemesis and Deadly Islands. In all cases, they both modify a piece of code from the original in different ways, so the mixer doesn't know how to merge that together.

Share this post


Link to post
Share on other sites
I would really really love to tell you it finally worked, but...well...nope it didn't >,<

I have no idea what might cause the problem, but now the mod mixer won't even startup. When I try to launch him it takes about 15 seconds until windows tells me the mod mixer stopped working and gives out some error thingy which i could send to windows.

The information I get from the error is this:

C:\Users\Vampirkatz\AppData\Local\Temp\WER6625.tmp.WERInternalMetadata.xml

C:\Users\Vampirkatz\AppData\Local\Temp\WER873D.tmp.appcompat.txt

C:\Users\Vampirkatz\AppData\Local\Temp\WER875D.tmp.mdmp

I sincerely have no idea why the ModMixer would be using the Application Compatibility stuff. It's a simple .NET app, not a Windows 95 game...

If you have used the installer, uninstall it and use the zip version instead. I wonder if the installer I'm using is outdated or what.

As unprofessional as it is saying this... "But it works in my computer!" :D

Share this post


Link to post
Share on other sites
Thanks, updated again with your suggestion about the advanced options.

Once the mixer works flawlessly, it will be less verbose. But meanwhile we are polishing the bugs, I prefer it to say all it has to say. :)

I'm checking what happens when combining Nemesis and Deadly Islands. In all cases, they both modify a piece of code from the original in different ways, so the mixer doesn't know how to merge that together.

Yes, it didn't happen with the original files, only while I was editing in some changes that I saw it. It may have actually been notepad++ that was flagging the differences and not the mixer, but I did see that trying to comment out a block of code with /* and */ caused the first line to be flagged as a collision when the first line after the /* was modded by one of the mods, but moving the /* up to a higher point fixed it.

I get what you are saying about the file information being displayed until everything is final.

One small bug I noticed is that the advanced button is in the wrong position if the window is maximized.

Share this post


Link to post
Share on other sites
One small bug I noticed is that the advanced button is in the wrong position if the window is maximized.

Sigh. I cannot do anything right at the first try...

Nor at the second, third, forth...

I'll fix that later today.

The merging algorithm is not clever enough to understand that an extra space inside a comment in a .c or .h file shouldn't matter. It doesn't do a syntactic or semantic analysis because... well... let's say it's just over my pay grade right now. :D Now seriously, I would need to add special treatment for the different file types that the game uses. The C and .h files would be one kind, then the XML files would use different rules, and then the different binary types, including dbexport.bin, images, sounds, etc.

I have tested a couple of things or three with merging the dbexport.bin, and I think I will add it when the rest of the bugs are fixed, but it's going to happen.

However merging unsolvable collisions in script code... that requires human decisions. And it's not something you can ask the player to decide.

I could just skip the changes that the lower priority mod is attempting to add to the file in case of an unsolvable collision, but that would probably leave the mod in an inconsistent state. What if those changes are used from another file?

If some guidelines are followed when writing a mod (for example, don't interweave little changes all over the place, but add clearly independent blocks of changes that twist the original the minimum possible), the merging would fail much less.

But I cannot believe that anyone is going to change their coding habits just to please the algorithm in a tool written by Mr Nobody. So in the mean time, I will try to make the tool as easy to use and fail proof as I can with what there is in my reach.

In a future, I might convince some modders to upload their mods to some repository I assemble, from where the ModMixer could show a list and download the ones selected by the player, much like the steam Workshop. The mods would be bound to a specific game version (with some kind of metadata file to indicate this plus mod description, picture and instructions), and maybe even store only the changes made to the originals, making them incredibly smaller and faster to apply.

Well, one can dream, right? :)

Share this post


Link to post
Share on other sites

1. I still think it would work better if you created your own parser, but then I'm hardcore like that.

2. You should stop getting used to modifying files in your programs folder and instead call a Windows API that gets either the users My Documents or AppData folders. The reason why is not everyone has full access rights to all folders but most under a restricted account will have access to those two folders at least.

3. Try to optimise the layout slightly by moving the priority up and down buttons off to a popup menu, and have them work on the SelectedItem property of the list. . That way you can multi select and then move multiple mods up and down by checking IsSelected and moving them all at once.

4. You might need to make sure that all the functional buttons are together and that space is not wasted on text (you can also do tooltips or popup boxes to show messages instead of placing it on the form)

I would have advanced in the bottom left and combine and start game on the bottom right. Sort of like a wizard/installer gui. Then you can have a show log button which expands the form to show the log pane and also maybe a save log to text option would be nice.

Here you go, I did a quick mock up of a more efficient design. Hover over stuff to see tooltips and right click for menus. http://www13.zippyshare.com/v/81747748/file.html

Edited by disorder

Share this post


Link to post
Share on other sites

Thanks for the many insightful suggestions, Disorder. :)

The layout is totally temporary. The program is a proof of concept. We we find that it is useless and that it doesn't really bring anything of interest to the community, I will forget about it, so that's why I have just put something together and released it without caring much about usability or UI guidelines.

You are totally right about modifying the config.xml file. It should have gone to %AppData%. In fact, I believe I will get rid of the installer at all. It is more a burden than anything. I will leave the zip alone, and you can run if from wherever you want. That should help stopping the UAC warnings from appearing.

I will parse the dbexport.bin for merging, and I "might" parse the XML files for merging if the normal text merger proves troublesome.

There is almost zero chance that I will craft a C parser. Mainly because a lexical analysis would be not much better than what we have now, and a syntactical analysis is something too complex to build for the use that we would make of it (merging mods for a half-dead game). Rather than that, I go back to Unity3D and program a new Carrier Command with mod support integrated, using the graphical assets of this game, just like OpenTTD used to do with Transport Tycoon. :D

Share this post


Link to post
Share on other sites

Yeah just go and remake the whole game, it will be easier lol.. well good work anyway

Share this post


Link to post
Share on other sites
Sigh. I cannot do anything right at the first try...
Don't worry about it, I know from modding that things rarely go right at first. Sometimes fixing one thing or adding something new, breaks something else. Often just discovering that something is wrong is the hardest part.
However merging unsolvable collisions in script code... that requires human decisions. And it's not something you can ask the player to decide.

I could just skip the changes that the lower priority mod is attempting to add to the file in case of an unsolvable collision, but that would probably leave the mod in an inconsistent state. What if those changes are used from another file?

Yes, it's fine the way it is. I would rather have something flagged as incompatible rather than have it make a guess which change should be used.
If some guidelines are followed when writing a mod (for example, don't interweave little changes all over the place, but add clearly independent blocks of changes that twist the original the minimum possible), the merging would fail much less.
That's fine for a mod that only adds new features, but Deadly Islands is a mixture of new functions, which are in their own blocks, and also mods to existing functions which required dozens of small changes scattered all over the place. Believe me it's a pain for me when a new patch comes out, and I would love to have everything in one single block, but there's just no way around it.

Share this post


Link to post
Share on other sites
Yeah just go and remake the whole game, it will be easier lol.. well good work anyway

I was obviously kidding. There is a lot of love, work and effort put into this game (That's why we are here spending our time making stuff for it, right?). You cannot remake this game without a budget as big as the one they had.

However, most wanted stuff like multiplayer aren't going to happen. If not a remake of CC:GM, because it's just not feasible, maybe at least a remake of the original, but with multiplayer and other stuff. It should be orders of magnitude simpler, but still Carrier Command...

That's fine for a mod that only adds new features, but Deadly Islands is a mixture of new functions, which are in their own blocks, and also mods to existing functions which required dozens of small changes scattered all over the place. Believe me it's a pain for me when a new patch comes out, and I would love to have everything in one single block, but there's just no way around it.

It's just impossible. That was only wishful thinking. The way the game is scripted, everything is interweaved together. The game is just not designed to run multiple mod concurrently, specially when those mods make extensive changes to everything, like yours. This tool is just an automatism to replace a human hand merging files with WinMerge to make combined mods, without the asset of having a human brain and knowledge of what the code really does.

Still, it's being fun to write it, if the only benefit I get from it ever is having these nice conversations with you people. :)

Share this post


Link to post
Share on other sites
I sincerely have no idea why the ModMixer would be using the Application Compatibility stuff. It's a simple .NET app, not a Windows 95 game...

If you have used the installer, uninstall it and use the zip version instead. I wonder if the installer I'm using is outdated or what.

As unprofessional as it is saying this... "But it works in my computer!" :D

Sooo i tested it right now with the zip version. It starts and let's me merge the mods together just fine(just saying something about a collision with the script ccgame.c for ModPack1 and slowships)BUT when I start the game everything seems fine, until I realise that none of the mods actually is activated. Ships aren't slower, the Film Grain still persists and the different deck views also won't work. This also happens when I just activate working mods like ModPack1

Share this post


Link to post
Share on other sites

Small issue but if you resize the window the advanced button hovers in it's original position.

Also when you click combine and it tells me there are collisions is it supposed to create the combined mod folder or is it aborted? I didn't see any folder created so I'm not sure if it's not working or saving it in a different location or it was just aborted.

Share this post


Link to post
Share on other sites

Well, it sucks I don't have the retail version, and I cannot test it. And most people here have the retail version. :P

I have just tried activating all these mods at the same time:

  • deckviews
  • nemesismod
  • slowships
  • DCMP

The combination is successful, the merged mod is created under the game folder as a new folder called _MixerMod_. The game launches, and the changes appear in-game.

If you say that the mod folder isn't even created, then I wonder what is happening. Have you tried running the tool as Administrator? (Right-click on the .exe/shortcut at the same time as you hold Shift, then select Run as Administrator from the context menu)

If it works with administrator rights, then it seems that the retail game folder is barred from being modified by third-parties without proper rights being given, something that doesn't seem to happen with the Steam version. If you can confirm that, then I need to make the program escalate privileges or something.

If it is not that, then I need to get a retail version of the game to be able to test further. Or bother you even more...

New version fixing the Advanced button placement is up. Installer is down. Other than that, no deeper changes.

---------- Post added at 20:05 ---------- Previous post was at 19:47 ----------

New version uploaded should now ask for permission, with an UAC request, to modify the game folder on start. Let's see if this helps anything at all.

Share this post


Link to post
Share on other sites

That was it, running as admin and the folder is now created. Sometimes it gives an error saying modmixer directory not empty, but it does then clear the directory and it worked when I clicked combine again. Maybe it needs to give more time to clear the directory before moving on, not sure, but it seems to work pretty good overall.

If escalating privileges is complicated to do just include a readme that recommends running as administrator. :)

Share this post


Link to post
Share on other sites

The latest version escalates automatically, I uploaded it few minutes after 1.05 (that escalated quickly!). Please try it and confirm that it works if you are so kind. :)

Thanks for all the help you are providing!

Share this post


Link to post
Share on other sites

WOHOOOO!!! Guys check that out! I'm a big bulky frickin steel bastard crawling over the seas the same speed relaxo moves about anywhere! And still I have my nice view positions on my ship completely without any of this unknown annoying space stuff flying around in my face! Plus my damn off-road Walruses can climb steep mountains as if they were built for this!!! Now I just need to check out if my APA rival carrier captain has these awesome features installed on his carrier too!

I dunno how you did this, and I would probably just understand 60-75% of it if you explained me, but it works perfectly so far and I wanna give out a huge thanksypants to you! (\(^-^)/)

Share this post


Link to post
Share on other sites

Yay! Thanks.

Then, next step is adding functionality to merge together the dbexport.bin files.

It shouldn't be too complicated once I find out a way to read and save the file. In fact, they are just rows and cells, quite structured data, so the collisions would be minimal, reduced to those cells that have been modified by two or more mods. In that situation, the highest priority mod's change will prevail.

Problem is... I go on vacation for one week on friday. :D Expect no updates in that time. Have a nice modding time!

Share this post


Link to post
Share on other sites

I think i'm experiencing a problem that no one else appears to be.

When I run the mod mixer, it just displays 'deadly islands' and 'gui'

I have deckviews and slowships in the game folder, but the mod mixer just isn't seeing them. I've tried manually editing the config.xml with no effect. Likewise, the GUI folder shouldn't be in the list as it's a game folder.

Is anyone else experiencing this?

Ignore me, i don't think my .net is updated to the proper version! lol

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×