MechCommander 1 (MC) & MechCommander Gold (MCG)
as many of you will know - MechCommander is one of the hardest games - not only playing this game successfully is difficult - but although modding ain't easy to come. How many people did i have seen in the past decade that wanted to introduce new mechs in MC1/MCG? - I can't imagine anymore. The people come with modding knowledge from other games or are clueless about modding at all. The main argument i saw all the time: It can not be that difficult to make new mechs.
And sure - technically it is easy done. But to introduce it you need to do allot more. Even IF you have created 2.000+ little *.tga & shapefiles for the game - introducing them as functioning units is way more work to do. The reason is that MechCommander was not built on an existing gaming creation platform like Unity - Unreal/Half-Life engine or others - but on a special library & compression system - in a language that is called Advanced Business Language. It has many elements from C++ in it. Further you can say that C++ code was used as backbone. But MechCommander not allow all C++ codes - only the codes that where designed or present as entry into mentioned function-libraries. The whole game works with that library system. There is no "engine" at all. MechCommander is the source itself compressed - functioning threw seperate moduls that work together/similar.
When i came to MechCommander modding in 2016 the game was almost completely vanished. You could find the open source code on GitHub by Alex Gopher. MechCommander was released as freeware 2006. Microsoft then although released the source code for MechCommander 2 - which was build on another "engine" than the original. Rumors where that they lost the original source. I don't know exactly how the extracted source got created - but i believe people like Alex Gopher, CMunsta and others extracted the files in a reverse engeneering process and the modding group uploaded the source on Github then. Correct me in the comments when i'm wrong. The problem with the extracted source on GitHub is that it doesn't contain my remastered file content and the mission files are completely messed up in the basic version. Even for modders - the code in the basic version is stored really confusing. And to work efficent with all modding tools the files need to saved in a certain way. They need to be saved with its subdirectories in order to make them work with the development tools. I did that work with ALL missions that i could find for MechCommander. And i restructured/ordered the source. Not only the remastered source but although the existing retro stuff got completely overhauled - including all basic missions of the original version. I have uploaded an older version of my personal extracted source here on modDB. I recommend you use those files to mod MechCommander. It spares you allot of time. Bringing the files into that order was almost one year of work. Repetitive things i already did - the most of it. So using my extracted source will be much more comfortable for modders than the original Github version. All to be used in the manner of cMunsta's Modding Guides - work folder strategy - that are although available as download on my profile.
Then there was a website called NoGutsNoGalaxy that gave modders a forum place for communication. There was allot MechCommander internal and technical knowledge and database shared by the community. This site went offline at the end of 2019. It's content of information can nowadays only be accessed via web.archive wayback machines. But it is only a rudimentary backup of NGNG. Most of the files for players - so that they can still play the game - i reuploaded here on modDB now.
At the moment i'm working on a brandnew "original built" for MechCommander. The pre-installed Original Desperate Measures Version on modDB is way outdatet right now. With that new fullversion i although will release a new "basic" source code - only containing the basic game functions. The game will be the same for players. No mentionable difference. But the file structure - and the physical backbone of MechCommander will be more stable then. All 42 missions got recompiled in a CLEAN naming procedure and compressed seperately as mission.fst files out of the main mission.fst. The size of the Main mission.fst will be reduced by up to 80% - this will make it run more smooth and stable. But this is not the only thing i will update. Some other minor or major issues will be solved with that new Original Version built.
You would like to give it a try? - Mod MechCommander!
To make a long story short: This place will be filled with modding information, articles and knowledge how to mod MechCommander by a long time run. When you have any interest in modding MechCommander - never mind to leave a comment - thank you for reading this.
Planned article's topics:
Well when i came back to MechCommander 2016 i found the game in very bad conditions. Good thing was, that a modding community on NoGutsNoGalaxy focused (around 2013/14) on MechCommander for some time. Although the MechCommander extracted source code was released (partitionally complete) on GitHub - mostly done alone by IronArthur and Scrivener07 in 2012.
2017 i started to mod MechCommander Gold myself. The backbone for my modded content was a clean Original MechCommander Gold Expansion Version v1.8. Most things i needed to start modding MechCommander wayback i found on NoGutsNoGalaxy.net webpage - which got purged during 2019. Not only my modded MechCommander content & information - but although any other helpful modding information and software got lost that day. But it doesn't matter. I have backups of most of the lost content. When we talk about MechCommander the game itself - it's several standalone version builts - this already happened yet. I have reuploaded all the player's content here on ModDB - including all MechCommander game knowledge articles and mirrored this information to MechCommander Gold - Darkest Hours - new hoster: EveryThingBattleTech.com ! In the EveryThingBT-forums you have access to all valuable MechCommander Ingame information you might search for. Although here on ModDB you can find this information - plus ALL available MechCommander downloads & content for the game.
2020 now we have the best modding conditions for MechCommander, that ever existed. On the base of the modding knowledge above i have created another standalone for MechCommander called Darkest Hours (v4.2). MCG Darkest Hours combines all previous common standalone versions into one built containing two Extra Large XXL campaigns overriding the Original and Expansion campaigns from the game. Instead of 42 missions total from the original game - you can play 131 campaign missions total! In addition there are several optional updates & patches available for Darkest Hours and the biggest solo-mission map pack - that ever existed. The Fullversion of Darkest Hours exists since 2018 on modDb and was downloaded about five thousand times yet. The Original version on modDB since about 2015 has not much more downloads anymore. So the game itself evolved in an awesome way! The modding knowledge is still a problem - cause at the moment i think i'm one of the last guys on earth knowing how to do this stuff - beside some rare other persons who know more about this old gem.
When you are just a player - interested in playing retro RTS isometric 2.5D games - you can stop reading this article at that point. See the links above and find your gaming content! You have the ability to choose from several standalone versions containing multiple solo player campaigns for MechCommander and different modded game content. All this stuff was released for you and for both - poor and rich!
Have fun, that's an order!
Oseparovic on GitHub: If you'd like to extract the files yourself, several utility scripts have been written by scrivener07 (which I shamelessly tweaked) for this purpose. The scripts are located in the extraction_tools directory. To extract a source file, simply place the source file in the extraction tools folder and run the corresponding script and enjoy! The necessary Cmunsta extraction tools are already in place so there's no need to do anything else.
You can do your own file type discovery. Many files still don't have an extension because their type cannot be determined. A lot of the research here was done with TrID Readable/Extractable formats marked in bold
Here's a list of the project structure and what you can find and where:
A Mission/Map on MCG has 2 parts:
Mission: Directory: DATA/Missions. it has 2 files, MCX0101.ABL & MCX0101.FIT, the first one it´s a macro script file that has all the "special" stuff that has to happen on that mission. The fit file it´s the text definition with all the variables of the Mission, and one of the variables it´s the name of the terrain file "st TerrainFileName = "MX0101"".
Map: Directory DATA/Terrain. The Map definition itself: Size, TerrainTiles, Building, enemies...... it has 10 files:
So wayback in 2016 this site left me back with mixed feelings. They released the extracted source but the files itself - i mean how they where left by it's creators - where a mess. While analyzing the source code you can obviously see how much pressure the development team might have had. On many places the code looks like typed in - in a rush. Many files have no clear naming conventions - or some files simply have any file names - they are just existing as the code that where typed in and compressed later. Refiguring out how this all works was a nightmare to do. But even here it was a big advantage using the knowledge and modding content i found above. Now i show you the tools which are used in my whole modding process - to make it easier or faster - or just doing things with automatic processes that would have last years when you would type in any code single handed on your own.
So here is a list showing...
FST and DPK file format:
- Data in the FST is in compressed form (typically), the compression used is a Lempel-Ziv variant
(looks to me like an LZW). I'm not sure if this is in fact the case. Sort of redundant now as
the compressor and decompressor code ripped out of the game executable is working fine.
(see lzcompress_asm.c and lzdecomp_asm.c respectively).
- DPK files use the exact same format as FST file. In short, a DPK *is* an FST file.
- In a DPK file, I have yet to see any compressed data, while in the FST, it most definately is compressed, but it doesn't have to be.
- To store uncompressed data in a FST (or DPK), simply set the uncompressed and compressed size to the same values and copy the uncompressed data into the correct location in the FST/DPK.
- An FST (and hence also a DPK) file can be seen as a sort of virtual drive with a single directory in it.
- In both the FST and DPK files, the path to the file (relative to the game root directory) is stored with the filename in the TOC. This means that we could technically extract all files from the FST, delete the FST, and still run the missions as long as all the files extracted were in the correct locations. This seems to be born out from when we create DPK packages and extract the FST on another player's computer. I haven't tried this with the full mission campaign file though.
- The MCExtractor tool normally used to extract files from a DPK actually looks for a single *.FST file and a single .SOL file within the DPK. If this is not the case, MCExtractor will refuse to work with the DPK. Further, MCExtractor does not appear to be able to handle compression, this would then seem to be the reason why DPKs are never compressed. These factors should be kept in mind if attempting to create your own DPK creator using the information in this document.
Offset Size Description
------ ---- -------------------------------------
000000 DWORD Number of entries in the TOC
000004 262 * n TOC Entries start here (262 bytes per entry)
xxxx xxxx Data for the FST/DPK (Starts immediately after TOC)
TOC Entries (262 bytes):
000000 DWORD Offset into file where data is
000004 DWORD Size in bytes of the stored data
000008 DWORD Size in bytes of uncompressed data
00000C 250 bytes String (zero filled). File and path this entry represents.
Files in an FST and DPK file
For solo mission DPK files, there are only two files. First is the .SOL file for the misson, and then the actual FST file.
For solo missions, the following files are put in the FST file:
The names listed below assume the mission is called "name". Likely we only need one campaign file, the others are individualized for each map. The campaign name (likely) needs to be the named after the FST & SOL files, but the rest can be anything at all as they are referenced from within the campaign file. (order of files within the FST/DPK doesn't appear to be important).
When using the editor to create a DPK file (which also creates the FST for inclusion in the DPK), it internally renames all the names except for the file "campaignXX.fit" whose name remains intact and takes on the same name as the FST file itself. e.g. if you made a mission map called TEST, then the FST file the editor creates will be called TEST.FST, the SOL file will be called TEST.SOL and the campaignXX.fit file will be called campaignTEST.FIT. All the other files are referenced from within the campaignTEST.FIT file or one of the other files and so these files are automatically changed to some UUID number instead of TEST. This is why we get strange long filenames in the FSTs. But a simple test I made shows that the UUID names are not required whatsoever. if we simply packed all the needed loose files the editor creates for the mission (as noted above) into an FST file, and used the appropriate SOL file, the mission will run just fine.
This ive got from cMunstas notices of a simple txt file between all of his MCG Tools and Tutorials.
He also mentions the importance / role of dpk files in his campaign building guides.
CMunsta's MechCommander Gold File Format Notes (revision 2) [Make sure word wrap is on. You may need to also widen the window]
The following is just a bunch of notes I kept (and fixed up a bit) while working out how to get access to the MechCommander files. I was doing this mostly so I could try to figure out how to get a user made campaign going (the little info available that I could find is both woefully old and sketchy at best). While making these notes, I created a few simple tools so that I could gain access to these files. Therefore, the notes presented here should at least give enough information to recreate the tools (or preferably better ones) except in the case of the compressor and decompressor. For these routines, I went and found the appropriate code in the game executable itself and hacked-out versions of these routines so that I could use them in the creation of my tools (or any other tool for that matter). Anyway, for those that could use this type of information, I hope this is usefull for you. -CMunsta
Format of PKK, SAV, MPK and SOL files:
Offset Size Description ------ ---- -----------------------------------------
Format of PAK files:
------ Offset Size Description ------ ------ --------------------------------
Each entry in the TOC is a single DWORD in size, which contains the offset where the data for this entry starts. A value of 0xE0 in the high byte of an entry indicates that the entry does not exist or has been deleted.
.TGA and .LOG.TGA files:
I hope this way more people are enlighted & may get attracted to give it a try. MechCommander is worth keeping it alive and caring for. And the result of your work may do more fun than the original - when you did right!
Have fun Modding MechCommander, that's an order - regards RizZen!
Cause the question for MechCommander Map Editor functions repeats itself again and again by the community - i wrote this article in order to inform you...
This is an overview for all existing MechCommander versions. Actually there are existing 6 different standalones that can be played. Read article for...
This is an article explaining in detail how you can choose from different difficulty start setup files for both major XXL campaign merges. Have fun playing...
No articles were found matching the criteria specified. We suggest you try the article list with no filter applied, to browse all available. Post article and help us achieve our mission of showcasing the best content from all developers. Join now to share your own content, we welcome creators and consumers alike and look forward to your comments.
This download contains a package with JUST the abl libraries. Advanced Business Language was used in order to create MechCommander. It is most common...
This extracted source file package for modders contains all files that are no specific mission files for MechCommander. Those files have a high level...
This source pack contains all the source files for missions used in my free fullversion standalone MechCommander Gold Darkest Hours Version 3.0. The advantage...
No files were found matching the criteria specified. We suggest you try the file list with no filter applied, to browse all available. Add file and help us achieve our mission of showcasing the best content from all developers. Join now to share your own content, we welcome creators and consumers alike and look forward to your comments.