Jump to content

The Official Map Conversion Thread


Recommended Posts

On 5/10/2021 at 3:23 PM, Scipio said:

Since I did the conversion: I had no problem with this scenario back then. Maybe it's just a very compatible scenario, or it had something to do with the engine version back then.

P.S.: Just found an Engine v3 executable for CMBN and tried to load a CMSF 2 quick battle map in the editor. The map wasn't loaded, but the game didn't crashed. When I try to load the same map with Enhine v4, the game crashed.

This follows my own suspicions, I believe CMSF/CMA/CMSF2 conversions will be easier using the older Engine 1 (and perhaps Engine 2) CMx2 games.

 

Link to comment
Share on other sites

My two cents on CMA+CMSF1/2 versus the other CM-game's map formats. First of: there is always header of the file, which is not all that hard to map out, then after that is large compressed block. The difference between the above game-series is seemingly in the compressed block. When you don't know the compression method there is nothing one can do. I am not saying it is now game-on to find the compression method, but rather to suggest more realistic expectations: Seems to me like a fruitless exercise unless the compression is mapped out.

Link to comment
Share on other sites

Basically right BUT CMSF2 can load CMSF1 maps, so my idea ist to use CMBN v1.0 to load a CMA/CMSF1, then save this in CMBN v1.0, then try to load it to CMBN v4.0, then see what will happen when I try to port it to other v4 games.

Unfortunatly, I can't get BN V1.0 running due to licensing problems, even if I have all the games & modules purchased. But it requests a license file, not the key!? Funny. Was there a trick for this, or do I have to contact the support?

Of course it would be much better if the guys from BFC or the brain in the jar show mercy, so that all maps can at least be loaded in the editor, no matter from which game in which game....

Edited by Scipio
Link to comment
Share on other sites

4 minutes ago, Scipio said:

Unfortunatly, I can't get BN V1.0 running due to licensing problems, even if I have all the games & modules purchased. But it requests a license file, not the key!? Funny. Was there a trick for this, or do I have to contact the support?

That's very odd. My key archives shows a CMBN 1.x key, not a file.

Link to comment
Share on other sites

34 minutes ago, Scipio said:

Basically right BUT CMSF2 can load CMSF1 maps, so my idea ist to use CMBN v1.0 to load a CMA/CMSF1, then save this in CMBN v1.0, then try to load it to CMBN v4.0, then see what will happen when I try to port it to other v4 games.

 

I just did quick test, and indeed CMSF1 is much easier then CMSF2. In fact, it is as easy as it can possibly be. With the usual minor edit a CMSF1 map will load in current CMBN/CMRT/CMFB. CMFI/CMBS/CMCW can be assumed to work with them as well.

Link to comment
Share on other sites

Yooo this thread is getting interesting AF. 

6 hours ago, Aragorn2002 said:

Can maps from CMFB be transferred to CMRT? I remember some great maps of the Blue Hills, made by a forum member who didn't own CMRT.

I had trouble porting the master maps to every game EXCEPT... CMCW. 

I had to search for and remove specific buildings for transfer to CMRT. But the files work great in CMCW. 

The stubborn file trick can't be used on those maps since they don't have the 01 and the 02 in the hexes. 

Link to comment
Share on other sites

1 hour ago, Kevin2k said:

I just did quick test, and indeed CMSF1 is much easier then CMSF2. In fact, it is as easy as it can possibly be. With the usual minor edit a CMSF1 map will load in current CMBN/CMRT/CMFB. CMFI/CMBS/CMCW can be assumed to work with them as well.

Wow this is a surprise. 

Link to comment
Share on other sites

Here is another factoid, the other way around, example procedure: Open older CMBN QB map "Asslt Med Village QB-006" with CMBN v1.11, remove all the houses, save it, do the usual header modification, open in CMSF2: success!

If you save with later CMBN it won't work (not even a blank map), if you leave or add a single modular building it won't work. I suppose independent buildings also mean trouble.

Link to comment
Share on other sites

On 5/13/2021 at 4:18 PM, Kevin2k said:

My two cents on CMA+CMSF1/2 versus the other CM-game's map formats. First of: there is always header of the file, which is not all that hard to map out, then after that is large compressed block. The difference between the above game-series is seemingly in the compressed block. When you don't know the compression method there is nothing one can do. I am not saying it is now game-on to find the compression method, but rather to suggest more realistic expectations: Seems to me like a fruitless exercise unless the compression is mapped out.

Yes, there is always a header, and the guy who programmed ScAn_CaDe obviously mapped it more or less completely. I have already tried to contact him, but unfortunately without success.
What I would like to know is, has anyone ever tried to convert this however compressed and/or encrypted part of a scenario file into a readable form?
My thought is that somehow the map data can be converted into raw data that can be read and processed.
Something like hexcode 01 is an open, hexcode 02 is a beet field, etc. That would bring us - I think - quite a bit further.

Edited by Scipio
Link to comment
Share on other sites

1 hour ago, Scipio said:

Yes, there is always a header, and the guy who programmed ScAn_CaDe obviously mapped it more or less completely. I have already tried to contact him, but unfortunately without success.
What I would like to know is, has anyone ever tried to convert this however compressed and/or encrypted part of a scenario file into a readable form?
My thought is that somehow the map data can be converted into raw data that can be read and processed.
Something like hexcode 01 is an open, hexcode 02 is a beet field, etc. That would bring us - I think - quite a bit further.

Well, as the author of ScAnCaDe, I can at least answer the question from my perspective.

Of course when I started analysing the files, being able to read out everything was the ultimate objective.
But I realised quite soon that for me, doing the basic headers / building blocks will have to be enough.
As can be imagined, I tried with the most simple map to get any idea, but already encountered problems there when trying to understand the file.

First problem is for example:

1. Open the editor, you will have a basic, open, 320x320 meters map, without any units, plans etc.

2. Save the file, two times, three times, whatever, without changing anything.

3. The files should have exactly the same contents, but they all will have different sizes, so there is sometimes more or less raw data being written to a file, for exactly the same thing. The headers will be the same, for sure, but the map and unit data "payload" somehow varies in size. I'm not sure why that is, but I assume there is some kind of packing / encryption algorithm involved here.

Basically, for this reason, I gave up trying pretty quickly.

Anyway, if somebody wants to try further, the basics are already available with ScAnCaDe and I've always included the source code, which isn't really that difficult to understand. Most of the work was working out the file layouts and the changes introduced with new modules / games.

Link to comment
Share on other sites

6 hours ago, Mad Mike said:

Basically, for this reason, I gave up trying pretty quickly.

Yep, I noticed these things too. Though I had not mapped out the header like you did, so completely.

I've seen some other game's packing, which used random numbers woven into the data. The seed value for the random numbers was hidden with math in the header. It was nasty. But since this data block here is total gibberish, it is even worse.I have no plans to try anything.

Thanks for sharing the source of ScAcaDe with it. The EngineVersion listing in ParameterAnalyser.java was interesting. I suppose a scenario can never be opened in an "EngineVersion" (or is it map format version) older then the one listed in the scenario header.

 

Link to comment
Share on other sites

12 hours ago, Mad Mike said:

...
1. Open the editor, you will have a basic, open, 320x320 meters map, without any units, plans etc.
...
3. The files should have exactly the same contents, but they all will have different sizes, so there is sometimes more or less raw data being written to a file, for exactly the same thing.
...

Ja, das war auch mein Ansatz und meine Feststellung.

5 hours ago, Kevin2k said:

...
I've seen some other game's packing, which used random numbers woven into the data. The seed value for the random numbers was hidden with math in the header. It was nasty. But since this data block here is total gibberish, it is even worse.I have no plans to try anything.
...
I suppose a scenario can never be opened in an "EngineVersion" (or is it map format version) older then the one listed in the scenario header.

Many years ago I decoded the scenario files from the "Campaign Series". The data was finally in simple text files with a simple replacement code. How many places you had to move the characters simply depended on the length of the text line. I suspect that it is not quite so simple here...
What I suspect: the data are not just packed, because then they would always look the same, because a pack algorithm always works the same (as far as I know). If the data is encrypted, then the key is still in the file, because it is needed to decrypt. It's probably nothing stored in or calculated from the known header data, because they don't change. So probably something randomly generated.
Apart from that, has anyone ever tried what happens when you lower the engine version in the file?

Link to comment
Share on other sites

6 hours ago, Scipio said:

 If the data is encrypted, then the key is still in the file, because it is needed to decrypt.

I would think so. Or maybe it is some weird other method I have not considered.

6 hours ago, Scipio said:

Apart from that, has anyone ever tried what happens when you lower the engine version in the file?

Mostly it does not work. But I just tried one scenario where the file version is just one step difference: backdating an empty map in format 126 back to 125. It loaded up.

The last scenario file version is already at no. 155 for CMCW and CMRT.

Link to comment
Share on other sites

8 hours ago, Scipio said:

If the data is encrypted, then the key is still in the file, because it is needed to decrypt. 

Might be, but it also could be that there is a hard coded key + a random seed that is in the header.

Link to comment
Share on other sites

REMOVE THESE BUILDINGS AND USE MY "STUBBORN FILE" TRICK TO GET BERLIN MASTER MAPS TOTALLY AND COMPLETELY PORTED OVER TO YOUR OTHER GAMES!

The troublemaker was the new 3 story factory independent building. I found them all for you guys. :D

Berlin-Key.png

CM-Red-Thunder-2021-05-19-01-17-09-16.pn

Edited by Artkin
Link to comment
Share on other sites

On 5/3/2021 at 2:32 AM, Jace11 said:

Consider:

So its maps, scenarios...

Also campaigns....?

Master maps and Quick Battle maps can be considered. They contain no specific unit information.

But when there is specific unit information stored in the file, I expect it to fail badly. Since the unit information must match the units available in the game. This goes for campaigns and scenarios.

Link to comment
Share on other sites

6 minutes ago, Kevin2k said:

Master maps and Quick Battle maps can be considered. They contain no specific unit information.

But when there is specific unit information stored in the file, I expect it to fail badly. Since the unit information must match the units available in the game. This goes for campaigns and scenarios.

I've never had an issue with units in files. Scenarios and campaigns (When broken down) seem to port over very nicely. Certainly more successfully than master maps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...