The file format of custom campaign MPQ archives (\.w3n) differs from those of individual map files (\.w3x). I am able to create and patch map files successfully using
Specifically, I could not override (replace) map files inside a campaign file. When I try to do it with any MPQ editor, the editor completes the task successfully, and then the game cannot load the patched map file warning that it's corrupted. Indeed, it does become corrupted, looking and comparing it with DemoCampaign.w3n in a hexeditor.
I went on a small journey to figure it out but failed. Share scripts among custom campaign maps
So, for 1.27 version of the game, how does one overwrite a map file inside a custom campaign using a third-party MPQ editor? Alternatively, how does one patch a map file by replacing it's scripts, localized strings, unit table, etc., given the map file is appended to a custom campaign file? The best solution will allow to create a custom campaign file completely from scratch using third party tools only. The process must be automatic since it's required for development and packaging.
smpq
(based on Ladik's libstorm
). However, I couldn't do the same for custom campaign files.Specifically, I could not override (replace) map files inside a campaign file. When I try to do it with any MPQ editor, the editor completes the task successfully, and then the game cannot load the patched map file warning that it's corrupted. Indeed, it does become corrupted, looking and comparing it with DemoCampaign.w3n in a hexeditor.
I went on a small journey to figure it out but failed. Share scripts among custom campaign maps
So, for 1.27 version of the game, how does one overwrite a map file inside a custom campaign using a third-party MPQ editor? Alternatively, how does one patch a map file by replacing it's scripts, localized strings, unit table, etc., given the map file is appended to a custom campaign file? The best solution will allow to create a custom campaign file completely from scratch using third party tools only. The process must be automatic since it's required for development and packaging.