wurstscript / WurstScript

Programming language and toolkit to create Warcraft III Maps
https://wurstlang.org
Apache License 2.0
224 stars 30 forks source link

How to multilanguage generated objects in a pre-Reforged map? #1005

Open GetLocalPlayer opened 3 years ago

GetLocalPlayer commented 3 years ago

Since all the strings are injected into the corresponding war3map... binary files.

Frotty commented 3 years ago

What do you mean? There is no way for multiple languages except generating every object it multiple variations or so. Doesn't seem very feasible.

GetLocalPlayer commented 3 years ago

The classic way is to translate war3map.wts file that contained all the strings made in the object editor or in GUI triggers. You could have several versions of the same map that had different war3map.wts file. Or you could have several war3map.wts files in one single map-archive with different locales. Meanwhile, Wurst puts all the strings directly into the binary files that contain object definitions. Can it have compiletime-functions to generate .wts files for different locales in the same map-archive or to build several maps with different .wts files at once?

Frotty commented 3 years ago

there currently is nothing like that, but it could be done, perhaps a PR? Also still needed for long entries over 512 characters iirc.