nvs / map

Warcraft 3 map management tools
MIT License
18 stars 6 forks source link

Allow targeting different patches? #65

Closed nvs closed 4 years ago

nvs commented 4 years ago

Not really a fan of such a feature, as the primary goal is to always target the latest release. However, it could prove useful in situations where there is an extended beta (e.g. Reforged) or PTR. And it could allow building maps that target older patches for testing purposes (although, I don't find myself testing on older patches much anyone). All in all it is not a bad idea.

This could be exposed via a configuration file setting. In turn, it would make necessary adjustments to the emitted output files (e.g. file formats). Then again, everything that matters for Map except for the import file byte can be edited in build files. Perhaps imports can simply become aware of the W3I?

war3map.w3i

war3map.imp

nvs commented 4 years ago

Looking into this further reminded me that the user has no control over the imports file at all. They simply pass a table of imports that Map specifies to add to the map. If successful, it makes a note to add that file to an imports file that is created upon finishing of the map.

The solution is to add an options table upon opening/creating a W3X that indicates the import byte. This can be automatically determined based on the W3I format used. As such, there is no need to actually target specific patches. An astute user can simply provide a build file that adjusts the W3I as necessary, and other files should follow suite.