Find Me On Discord (Brood War UMS Community & Staredit Network)
So as some of you may know from back in the day I use winmpq to recycle all WAV strings. However, I now have some dud WAVS floating around that I cannot delete, because they're no longer in the sound editor list, of course. If I use winmpq and delete it there, it's deleted off winmpq - but the sound file itself is still in there somewhere inflating the size of the map.
I tried to use chkdraft's sound editor, and it has detected some WAVs, but also seems to not be able to detect a lot as well (including the ones I want to delete).
PyMS and ProTRG developer
When you do certain operations on an MPQ, it doesn't actually clean up the data in the MPQ, it just modifies references to the data. For example if you update a file and it is bigger then it used to be, the old one will still be in the MPQ, just unreferenced, because it needs to create a bigger slot to put the new file in (and inversely, if the new file is smaller, it updates data of the old file but doesn't get rid of the extra space that was taken up by the bigger file). If you delete something, it just removes the reference. To "clean" up the MPQ, you need to compact it. There is a button in WinMPQ somewhere to compact the archive. Some more technical details can be found
here
So as some of you may know from back in the day I use winmpq to recycle all WAV strings. However, I now have some dud WAVS floating around that I cannot delete, because they're no longer in the sound editor list, of course. If I use winmpq and delete it there, it's deleted off winmpq - but the sound file itself is still in there somewhere inflating the size of the map.
I tried to use chkdraft's sound editor, and it has detected some WAVs, but also seems to not be able to detect a lot as well (including the ones I want to delete).
I thought I got all the difference cases... please post or PM the map and the WAV name in question. I'll also do a double take on the save code to ensure it's compacting...Added a compact statement for next version, will also populate WAVs from the listfile as well as the Scenario in the future.
Post has been edited 2 time(s), last time on Aug 5 2017, 3:28 am by jjf28.
TheNitesWhoSay - Clan Aura -
githubReached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.
Scmdraft should also compact any map it saved. (Otherwise lots of copies of the scenario.chk file would pile up)
I recall in x-tra editor (I don't remember if it did so in the vanilla editor too), if I would add a wav to a map and then close the map without saving, the map size would have increased while the wav was not listed in the sound editor anymore. I found that adding the same wav again and then deleting it properly would fix that problem. I suppose you could try something like that, for a simple solution.
Find Me On Discord (Brood War UMS Community & Staredit Network)
Oh nice. Yep, that compact button did the trick. Shaved off 20MB.
Also JJ you should be proud of your sound editor it looked really promising. Gonna make life a lot easier for people wanting to recycle WAVs.
Find Me On Discord (Brood War UMS Community & Staredit Network)
Okay, correction, when I did that compact thing - it totally FUCKED the triggers (in a real weird way). It's hard to know what exactly it did, but basically when I tried to compile the triggers, it wouldn't compile. BUt the map itself actually ran when played, but things were weird with the triggers. Like, for instance, none of the dropship pickup scripts worked.
Anyone got any explanation for this behaviour? At the moment I can't actually use it
That's a very vague issue, do you have before and afters (location of Chkdraft \chkd\Backups or Advanced->Open Backup Database in SCMDraft)? what compiler was ran for triggers? Did you use this compiler regularly before recycling your WAV strings?
TheNitesWhoSay - Clan Aura -
githubReached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.
Find Me On Discord (Brood War UMS Community & Staredit Network)
It wasn't a compiler bro it was the COMPACT button in WINMPQ. It reduced file size from 95 to 75MB but it also did a lot of weird shit and basically broke the map, so I'm just releasing the 95MB file for now and I'll try and sort it out later.
PyMS and ProTRG developer
Compacting an MPQ shouldn't do anything to the files inside the mpq, it just gets rid of any unreferenced/unused space lingering
between the files. Not sure what could be going on there.
Edit: I downloaded the map and did just a compact (using SFmpq, but not through WinMPQ), and when I exported the .chk from both and compared them they were the same. But the .scx only went from 98MB to 94.7MB, so maybe WinMPQ is doing more then just a "MpqCompactArchive". WinMPQ might also be re-applying its compression rules or something when you click the "Compact" button, maybe try turning off all settings that might change files (compression, encryption, etc.)?
Post has been edited 2 time(s), last time on Aug 5 2017, 1:38 pm by poiuy_qwert.