Jump to content

Problem re-zipping mission


corvinus

Recommended Posts

I have a mission that seems to have a corrupt mapResource file:

mapResource =

{

[""] = "example.ogg",

["ResKey_Action_454"] = "voice.ogg",

}

 

 

The empty key in table seems odd, and my problem is that I can't add new radio transmissions as trigger actions. So I thought I would just unzip the mission file, remove the empty key, re-zip, and I'm done!

 

... no such luck. I'm using 7zip to unzip and it already gives a header error. No worries, because the files seems to be ok. However when I re-zip (as a regular zip file), then DCS can't read the mission file anylonger. It just hangs when reading the modified miz file.

 

 

So basically my question is: What tool (and with what settings) should I use to manually edit mission internal files?

Link to comment
Share on other sites

I have a mission that seems to have a corrupt mapResource file:

mapResource =

{

[""] = "example.ogg",

["ResKey_Action_454"] = "voice.ogg",

}

 

The empty key in table seems odd, and my problem is that I can't add new radio transmissions as trigger actions. So I thought I would just unzip the mission file, remove the empty key, re-zip, and I'm done!

 

 

... no such luck. I'm using 7zip to unzip and it already gives a header error. No worries, because the files seems to be ok.

 

However when I re-zip (as a regular zip file), then DCS can't read the mission file anylonger. It just hangs when reading the modified miz file.

 

So basically my question is: What tool (and with what settings) should I use to manually edit mission internal files?

 

Copy the mapResource file out of the .miz file and edit with "NOTEPad ++" (Free programmers editor), don't use wordpad or notepad.

 

Once edited copy back the mapResource file into the .miz file.

 

If you have header problems, there is some more serious issue in the .miz file, can't give a solution but one of the files is going to be corrupted, its stored crc code doesn't match the re-calculated one, but would be happy to have a look at faulty mission .miz file for you if you can't sort it out.

 

I use "total commander" for all file, zip and .miz manual file copying, with Notepad ++ as editor.

 

Regards, Ian.

Asus p877v-pro, Intel I7 3770k 4.2ghz, 32gb Ripjaw X ram, Nvidia RTX-2070 Super, Samsung 32" TV, Saitek x52 pro Joystick and Combat rudder pedals, TrackIR 5, Win8.1 x64 with SSD and SSHD protected by (Avast AV).

 

DCS Tech Support.

Link to comment
Share on other sites

Thanks for the tips! I'm already using Notepad++ so that wasn't the problem. But I gave totalcommander a try. Sadly I had the same result. If I take the original mission file (that still loads perfectly fine), unzip it in totalcommander and then zip it again, the file won't load. I'm just staring at the load screen with a progress bar sitting idle at 0%. Perhaps totalcommander and 7z use a Windows system library for zipping? This is on Windows 10 btw.

Link to comment
Share on other sites

dont "touch" the miz-file when DCS is handling it (like having the ZIP file open or something). that can lead to unexpected results

Advice noted! In this case I only started opening the zip file after the problem appeared. I think it all started with cloning a trigger which contained a radio transmission. I changed the audio file for the cloned one and after that both audio files were linked. After changing the audio file in one, then other was changed as well. After pulling my hair out about this, I decided to remove one of the triggers, which lead to my problem of the empty table key (well, that's my hypothesis).

 

The good news is that I have found a way to update the zip file without breaking it. By using the command line it is possible to update files. In this way the resulting zip file can be read by DCS.

 

So I extract the mission file using:

cd src

7z.exe x -tzip ..\mission.miz

and update files using

cd src

7z.exe u -r -tzip ..\mission.miz *

 

The bad news: Removing the empty key leads to a radio transmission without an audio file (no surprise here), but after adding an audio file, the empty key is back again. I've tried adding a key manually, but that didn't work either. :confused:

Link to comment
Share on other sites

I use Winrar and do not even bother extracting the files, I just edit them while they are still zipped . Once the edit is made and I save, it prompts me if I want to update the file, which I confirm and all is good. All without the hassle of extracting the files just to zip them up again.

 

EDIT: Have set Winrar to open *.miz and *.trk files

Link to comment
Share on other sites

I've tried adding a key manually, but that didn't work either. :confused:

It turns out that you have to add the key in three places:

1. mission - trig - actions

2. mission - trigrules - actions (way down in the file)

3. mapResources

 

 

Now it works again (but boy that wasn't easy to fix!)! :)

Link to comment
Share on other sites

I use Winrar and do not even bother extracting the files, I just edit them while they are still zipped . Once the edit is made and I save, it prompts me if I want to update the file, which I confirm and all is good. All without the hassle of extracting the files just to zip them up again.

 

EDIT: Have set Winrar to open *.miz and *.trk files

Thanks for that tip! I had just set up VS Code to run some batch script to do the extraction and updating. But the winrar method sounds much easier.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...