Need suggestions on compressing music for mod compatibility

JesusWarrior

Chieftain
Joined
Sep 26, 2018
Messages
3
Location
Deep in the heart of Texas
Hello there,

So I have been having this issue where I get this 7zip error upon building with ModBuddy. I am creating a new civ and have been constantly building and testing my mod and it has been working. I decided to add a custom soundtrack into my mod and it worked as well, it could play multiple songs during peace and wartime. I saved my successful build and went to bed. The next day, I came back and added .xml file for diplomacy stuff and that's where everything went wrong. I was given this error upon building:

Error MSB4018: The "PackageMod" task failed unexpectedly.
SevenZip.SevenZipException: The execution has failed due to the bug in the SevenZipSharp.
Please report about it to http://sevenzipsharp.codeplex.com/WorkItem/List.aspx, post the release number and attach the archive.
at SevenZip.SevenZipBase.ThrowException(SevenZipBase handler, Exception[] e)
at SevenZip.SevenZipBase.CheckedExecute(Int32 hresult, String message, SevenZipBase handler)
at SevenZip.SevenZipCompressor.CompressFilesEncrypted(Stream archiveStream, Int32 commonRootLength, String password, String[] fileFullNames)
at SevenZip.SevenZipCompressor.CompressFilesEncrypted(String archiveName, Int32 commonRootLength, String password, String[] fileFullNames)
at SevenZip.SevenZipCompressor.CompressFiles(String archiveName, String[] fileFullNames)
at Firaxis.ModBuddy.Civ5ModBuildTasks.PackageMod.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
(Sorry, I'm new to this forum and don't know how to put all this into a spoiler)

I checked it out and people believe that it happens when your file is really large. So I immediately suspected the music, except I have a successful build that proves it works. So I restarted the mod with a different file name and tested further, and all my tests were successful. However, as soon as I added my music (before adding my diplomacy files), I built to test if that was the problem. And it gave me the same error.

I don't know what's wrong, but I think that if I could somehow compress the music, maybe the sevenzip error won't be cast. If you have any suggestions about how to compress it or have another idea on how to fix this, please let me know! Thanks!
 
It's a common issue for even the most experienced modder, normally we use delete the music, build the mod, re-insert it, then re-build it again. What you could do is run ModBuddy inclusive of Steam.
 
It's a common issue for even the most experienced modder, normally we use delete the music, build the mod, re-insert it, then re-build it again. What you could do is run ModBuddy inclusive of Steam.

Ok, so I'm a little confused by what you mean by re-inserting the music, then re-building and running ModBuddy inclusively of Steam. I've tried running ModBuddy both from Steam and from the .exe in the file and neither worked. When you say re-inserting and re-building, are you talking about putting the music into the already built folder and building again in ModBuddy? Or are you saying to build the mod, then insert the music into ModBuddy and rebuild?

When I tried putting the music in after the first build, the music didn't play (I assume it's because since it wasn't in the ModBuddy, then wouldn't be in the VFS). When I tried re-inserting the music back into ModBuddy after the first build (after clearing the old folder and rebuilding) and rebuilding, it gave me the error again. Maybe I'm just misunderstanding what you're trying to say?



EDIT: Ok, so you won't believe this... call me crazy, but I decided to run the errored mod (bad programming protocol maybe, but not a bad debugging measure) and it works just fine... to be really honest, I'm a little taken aback that this has been bothering me for about 2 days and I've spent 2 days trying to fix this when there really wasn't that much of a problem anyway. Thanks for your suggestion though, I will definitely keep that in mind for any future mods I do. I appreciate it!
 
Last edited:
shorten the music's duration by 1 second or something and rebuild it.
 
Last edited:
Also when the compressed civ5mod file for a mod reaches close to or exceeds 100MB, Steam will refuse to upload it.

What people generally do is break a large mod into two or even three mods, place the music and other multimedia files into the second or third mod, and make the second or third mod require the 1st as a dependancy. Then they upload each of the "piece-part" mods to Steam Workshop. In the Workshop description of the 1st mod they mention that music or other elements are in another mod available on the Workshop, and they provide a link once everything is up on Steam Workshop. In the Steam description of the second mod with the music files (for example) you just tell people that it is the mod with the music stuff and that they need the 1st mod also.
 
Top Bottom