Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: How do you delete WAVs after using WINMPQ?
How do you delete WAVs after using WINMPQ?
Aug 4 2017, 6:34 pm
By: Oh_Man  

Aug 4 2017, 6:34 pm Oh_Man Post #1

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).




Aug 4 2017, 6:47 pm poiuy_qwert Post #2

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




Aug 4 2017, 7:09 pm jjf28 Post #3

Cartography Artisan

Quote from Oh_Man
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 - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Aug 4 2017, 7:34 pm Suicidal Insanity Post #4

I see you !

Scmdraft should also compact any map it saved. (Otherwise lots of copies of the scenario.chk file would pile up)




Aug 4 2017, 9:34 pm DarkenedFantasies Post #5

Roy's Secret Service

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.




Aug 5 2017, 4:48 am Oh_Man Post #6

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.




Aug 5 2017, 7:31 am Oh_Man Post #7

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




Aug 5 2017, 11:33 am jjf28 Post #8

Cartography Artisan

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 - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Aug 5 2017, 12:13 pm Oh_Man Post #9

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.




Aug 5 2017, 1:08 pm poiuy_qwert Post #10

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.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: MetalGear, Roy, jjf28, lil-Inferno