- Joined
- Jan 3, 2022
- Messages
- 347
I'm going to write down stuff here, maybe I will turn it into a tutorial, maybe not.
Let's have Warcraft 3 ROC as an example here. The game released with "war3.mpq" and it was never changed, even with patches released. Instead, it's contents were overshadowed by "war3patch.mpq" - this file contained all the changed files. How does it work? The game loads files by looking in different folders/MPQs for them. The first correct file it finds is loaded.
PS: Don't quote me on the above order. Idk if Local files are checked before map files.
TODO: Scripts for conversion, translation system integration?
The _Locales folder was created for me when I saved a map as a folder in the Reforged editor.
The attached test map "Multilang map v1.0.w3x" shows that the custom peasant will have different names/tooltips in English/German/Russian localizations. However since I did not add a custom war3map.wts file for other languages, map's default war3map.wts will be loaded. To make it easy:
CONs: Not compatible with old clients
Information taken from here: [Solved] - How to make a multilanguage map, credited: Ayane (2008)
Claims to you need to delete "(attributes)" file
Reforged: Set game's text language in Battle.net
CONs: You must use old WorldEdit and you can't store war3map.wts in different folders as easy as with Reforged. You must merge translations manually/programmatically into map's MPQ and set their language code.
If you manage the map in another language: just continue! If you add a valid translation, it will automatically override your default language. But you will need to override all possible localizations with the English file, so for example Chinese players don't see your "default language", but the English translation.
Reforged loads the correct text file everywhere (I think this is why the map menu's freeze for so long)
First, it's important to understand how MPQs work
MPQs are like ZIP files. But the way the game accesses them makes it easy to create patches without actually changing the old file. It'll help if you look up what "patch" means in your language.Let's have Warcraft 3 ROC as an example here. The game released with "war3.mpq" and it was never changed, even with patches released. Instead, it's contents were overshadowed by "war3patch.mpq" - this file contained all the changed files. How does it work? The game loads files by looking in different folders/MPQs for them. The first correct file it finds is loaded.
- Priority HIGHEST: Local Files ("Allow Local Files") - if your game folder has any files, they'll be preferred for loading
- Priority HIGH: Map files - your map file always overrides the default game files
- Priority MEDIUM: war3patch.mpq - because this is loaded before war3.mpq, the patches override 1.0-release files
- Priority LOW: war3.mpq - contains base models etc.
PS: Don't quote me on the above order. Idk if Local files are checked before map files.
Second, war3map.wts
This file contains all strings that WorldEditor knows about: GUI triggers, object data, map name... Each string gets a unique numeric ID when you edit+save the map. Again, these IDs change. TRIGSTR_1234 is how they're referred to in war3map.j (converted within game API automatically). You can translate each text string in notepad by hand, but it will be too much work to keep the IDs updated between versions.TODO: Scripts for conversion, translation system integration?
Reforged multilingual maps:
Similar to game patches, Reforged checks different folders to load files from, before taking a map's default text string file (.wts). To make per-localization language files, for example: text translations, audio, textures (will war3map.j work?) you must place them in the correct folder within the map's MPQ archive. Here's the hierarchy:
Code:
.
├── _Locales
│ ├── deDE.w3mod
│ │ └── war3map.wts (LOADED FOR GERMAN PLAYERS)
│ ├── enUS.w3mod
│ │ └── war3map.wts (LOADED FOR ENGLISH PLAYERS)
│ ├── esES.w3mod (CHECKED FOR SPANISH/España players)
│ ├── esMX.w3mod (CHECKED FOR SPANISH/Latinamerica players)
│ ├── frFR.w3mod
│ ├── itIT.w3mod
│ ├── koKR.w3mod
│ ├── plPL.w3mod
│ ├── ptBR.w3mod
│ ├── ruRU.w3mod
│ │ └── war3map.wts (LOADED FOR RUSSIAN PLAYERS)
│ ├── zhCN.w3mod (Chinese, Mainland)
│ └── zhTW.w3mod (Chinese, Taiwan)
├── conversation.json
├── war3map.doo
├── war3map.imp
├── war3map.lua
├── ... etc etc.
├── war3map.wts (THIS IS THE MAP'S DEFAULT STRING FILE! LOADED IF THE ABOVE FAILS)
├── war3mapImported/ (this folder is empty)
├── war3mapMap.blp
└── war3mapUnits.doo
The attached test map "Multilang map v1.0.w3x" shows that the custom peasant will have different names/tooltips in English/German/Russian localizations. However since I did not add a custom war3map.wts file for other languages, map's default war3map.wts will be loaded. To make it easy:
- English: is called OVERRIDE EN
- German: is called OVERRIDE DE
- Russian: is called OVERRIDE RU
- Default WE: it's in Russian too, but called DEFAULT WE
Reforged Method of Multilang Maps:
PROs: Ease of useCONs: Not compatible with old clients
Pre-reforged multilingual maps:
Prototype map added, it uses Classic-only method though it works fine in Reforged.Information taken from here: [Solved] - How to make a multilanguage map, credited: Ayane (2008)
Claims to you need to delete "(attributes)" file
How to do:
- Open finished map in MPQEditor
- Extract war3map.wts (Language code: 0000 = "Neutral" aka default)
- Translate extracted war3map.wts
- In MPQEditor, temporarily set the default war3map.wts localization code to something else
- Import your translated war3map.wts and set its correct code
- Revert default war3map.wts'es language code to 0000 Neutral
- If your default war3map.wts is not in English, either:
- Make the English translation the default variant (0000)
- OR repeat the above steps to add the English war3map.wts to all localization codes. So if you haven't translated the map to Chinese, Chinese players will see English as their default
How to test:
Classic: "To test the translation you can change the LANGID field in the config.txt file inside your war3.mpq." (not tested).Reforged: Set game's text language in Battle.net
Classic Method of Multilang Maps:
PROs: Works with old maps, Classic client AND Reforged! If you have a 1.26/1.27 map, you can keep compatibility with old clients and Reforged will pick up the translations too.CONs: You must use old WorldEdit and you can't store war3map.wts in different folders as easy as with Reforged. You must merge translations manually/programmatically into map's MPQ and set their language code.
LANGID or Windows' Language Codes
The full list is at MSDN, here's shorter and more readable list. It's a hexadecimal number. MPQEditor uses upper-case letters (e.g. war3map#041E.wts). The French multilang tutorial listed some, but I don't know if all of them existed, please confirm (or look up config.txt in war3.mpq for different versions)MPQEditor documentation lists most, if not all, used languages: MPQ Archives - MPQ file format
Locale / Language | Hexadecimal code (base 16) | Decimal code (base 10) |
Chinese (Simplified) zh-CN | 0804 | 2052 |
Chinese (Traditional) zh-TW | 0404 | 1028 |
Czech Classic only | 0405 | 1029 |
English (US) en-US | 0409 | 1033 |
English (UK) Not localized for Reforged. Did it exist? | 0809 | 2057 |
French fr-FR | 040c | 1036 |
German de-DE | 0407 | 1031 |
Hungarian Fan-made patch, what LANGID code? | 040e | 1038 |
Italian it-IT | 0410 | 1040 |
Japanese Classic only | 0411 | 1041 |
Korean ko-KR | 0412 | 1042 |
Polish pl-PL | 0415 | 1045 |
Russian ru-RU | 0419 | 1046 |
Spanish es-ES Classic+Reforged | 040a | 1034 |
Spanish es-MX Reforged only | 080a | 2058 |
Portuguese (Brazilian) There's only pt-BR in Reforged | 0416 | 1046 |
Portuguese (Portugal) Did it exist? | 0816 | 2070 |
Thai Classic only | 041e | 1054 |
Turkish Did it exist? Fan-made 3rd party patch. What LANGID? | 041f | 1055 |
What should you do?
Ideally the map's default should be in English, because it's the language everyone understands, and even better if you developed the map in English too, so it always works. All other languages should be .wts translations that use the _Locales folder/classic method to override the text strings.If you manage the map in another language: just continue! If you add a valid translation, it will automatically override your default language. But you will need to override all possible localizations with the English file, so for example Chinese players don't see your "default language", but the English translation.
Quirks: Custom Jass code (TODO)
Probably the only way to export messages to .wts is to define a GUI variable per text string used.Quirk: 1.26 client only loads default war3map.wts in menu
When you scroll down the list of maps, it'll only display the 0000 Neutral language, the default one. If you click on the map, the preview will load your correct language file.Reforged loads the correct text file everywhere (I think this is why the map menu's freeze for so long)
Extra: other overridable paths in Reforged
I extracted these folders from the Reforged's CASC. I don't know if these paths are loaded for maps/in what order:
Code:
war3.w3mod/ (this folder is in the root of CASC)
_balance/
custom_v0.w3mod
custom_v1.w3mod
melee_v0.w3mod
_deprecated.w3mod/
_hd.w3mod/
_locales/ (_locales/ in CASC, _Locales for WorldEditor)
dede.w3mod
enus.w3mod
eses.w3mod
esmx.w3mod
frfr.w3mod
itit.w3mod
kokr.w3mod
plpl.w3mod
ptbr.w3mod
ruru.w3mod
zhcn.w3mod
zhtw.w3mod
Attachments
Last edited: