HarbourMasters / Shipwright

3.3k stars 495 forks source link

Ability to use zip or 7z archives instead of MPQs #32

Closed Torphedo closed 2 years ago

Torphedo commented 2 years ago

I'll probably take a crack at this myself later, but I figured I'd open a formal issue in the meantime. It would be really useful to be able to package mods as 7z or zip files, and would probably reduce confusion. I know there's tooling for MPQs, but it's just an extra unecessary step. From what I've read, the main reason it's using MPQs is because using a Blizzard archive format is funny, which is...kind of a terrible reason.

Torphedo commented 2 years ago

Updating this with info from Kenix: "If someone wants to PR it, go for it, but your zip implementation must support patch archives. It won't be accepted otherwise. This is why we use MPQs and not zips. Patch archives will serve up the data from the most recently loaded archive based on the name."

"[raw] File system is not currently supported because we made one reference implement, and raw file system was not ideal because it's harder for mod authors to distribute. The requirements we gave ourselves are compresses to one file for easy mod distribution and patchable so that the engine can figure out the newest asset."

Essentially, it needs to be able to load multiple mods over each other based on some sort of priority system. My inclination is to have an install mod button, which would put the mod file in a mods folder and rename it to start with a number (eg. 100_MyMod.zip being priority 100).

MegaMech commented 2 years ago

I don't think this is worth your time to implement. We have a solid working implementation and supporting.zip is just reimplementing the same thing again with a different name.

The mpq syatem has a lot of features

Torphedo commented 2 years ago

That's fair, now that the dust has settled a bit I have less of a desire to implement it. Might try in the future, we'll see.

MegaMech commented 2 years ago

If you're considering contributing there are lots of areas we could use help with. The one click mod install idea you mentioned sounds cool (I don't know how the patching system works)

Torphedo commented 2 years ago

Yeah, a mod install button seems like the best place to start. Zip support is a lower priority for me at this point