is it possible to read from and write to the map MPQ archive with a script (e.g. python) in an easy way? I've looked around and found some Python libraries on this, but as far as I can see none of them implements writing to the archive. Can I use the ComponentList feature of the editor somehow (e.g., can I tell the editor to convert my map into a ComponentList and vice-versa via some command line?)
I would be very grateful for any suggestions on this.
Unless you are willing to hack in some Python wrappers for the C/C++ MPQ libraries such as "StormLib", using a MPQ editor with appropriate command line support would probably be the way to go.
@ImperialGod: Could you tell me one command line MPQ program? This would be great!
@Mille25: Yes, I am currently using the map as a sc2components file. I didn't know that the editor is supporting them so well (e.g., from inside the editor there is no way to distinguish between the two formats). Although it would be cool to work with the MPQ archive directly, using the sc2components is certainly an acceptable way to do it :)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi SC2Mapster,
is it possible to read from and write to the map MPQ archive with a script (e.g. python) in an easy way? I've looked around and found some Python libraries on this, but as far as I can see none of them implements writing to the archive. Can I use the ComponentList feature of the editor somehow (e.g., can I tell the editor to convert my map into a ComponentList and vice-versa via some command line?)
I would be very grateful for any suggestions on this.
There are command line MPQ programs.
Unless you are willing to hack in some Python wrappers for the C/C
++
MPQ libraries such as "StormLib", using a MPQ editor with appropriate command line support would probably be the way to go.Not sure what you are trying to do, but can't you just save the file as sc2components and work directly with the contents?
Thanks for the answers.
@ImperialGod: Could you tell me one command line MPQ program? This would be great!
@Mille25: Yes, I am currently using the map as a sc2components file. I didn't know that the editor is supporting them so well (e.g., from inside the editor there is no way to distinguish between the two formats). Although it would be cool to work with the MPQ archive directly, using the sc2components is certainly an acceptable way to do it :)