Drake53/War3Net

Is it possible to build a Map as a folder instead of a .w3x file?

Closed this issue · 2 comments

As I understand it the only way I can create a file from a Map object is via the Build method, which produces a .w3x file. For my process I'd quite like to produce a .w3x folder instead. Is such a thing possible?

There's no built-in way to do this automatically at the moment, but you can do this manually by saving all the individual files with a BinaryWriter (or StreamWriter for the text-based formats). You can find examples of this in the test project, although it uses reflection to reduce the amount of copy-paste required. Basically you just need to use the methods in https://github.com/Drake53/War3Net/blob/master/src/War3Net.Build.Core/Extensions/BinaryWriterExtensions.cs

That will work brilliantly, thank you for your time!