• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

MPQ editors and the WTS file

Status
Not open for further replies.
Level 15
Joined
Jul 15, 2005
Messages
356
I'm currently looking into getting a translation done for one of my maps.

Now it's come to my attention that the .wts file in the map archive file contains ALL the strings used in a map. This could obviously be a huge help for translation purposes.

The problem though I'm running into is that when I edit the .wts file and put it back in the map, the edited text doesn't show up at all.

To elaborate:

1) I use MPQ Editor 64bit and open the map file
2) I extract war3map.wts, then close the MPQ Editor.
3) I open the extracted war3map.wts in WordPad.
4) I find the string I'm looking for, edit it, then press save.
5) I use MPQ Editor 64bit and open the map file.
6) I delete the war3map.wts in the map
7) I add the (newly edited) war3map.wts to replace it.
8) I try it out in-game.

The problem is, when I try it in-game, the string I edited doesn't appear at all - it's just blank. So obviously I must be doing SOMETHING wrong, but I'm not sure what. Can someone assist?
 
Level 15
Joined
Jul 15, 2005
Messages
356
The .wts has a start token that is no text/ignored by wordpad. Also it does not necessarily contain ALL strings. Anywhere a string is needed, the wts table may be referenced by TRIGSTR_xxx but you can also type in the string directly.

Is there another editor that can be used to edit a .wts file that won't get rid of that start token?

My map is written pretty much entirely in GUI - where else (other than the wts table) could strings be stored? Is there any way of knowing which strings get stored in the wts table and which don't?

Lastly: if I edit everything in the wts table, does that edit all the equivalent strings in the game?
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
My standard notepad does seem to keep it. I do not know if this is a constant though or contains a checksum or anything. If your map is entirely in GUI using only the WE, I guess everything except concatenated trigger strings will be in the wts. The parameter dialog will display a single edit line then instead of a multi-line area.

No, it does not. Also different TRIGSTRs can share the same value.
 
Level 15
Joined
Jul 15, 2005
Messages
356
No, it does not. Also different TRIGSTRs can share the same value.

Hm, I might have been asking that question the wrong way.

First, let's assume the .wts file from my map does contain all the map strings (as it's GUI only and made only in WE).

Let's say I want to translate all the strings in a map from one language to another. Can I do that by extracting the map's .wts file, translating all the strings in it, then putting it back in the map? Is anything else required?
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Unless there is a checksum elsewhere I do not believe - I have never tried to edit the wts myself before - yes ofc it's enough to modify it. It's not repeated at some other point. But if you insert somewhere "abc" directly instead of referencing the wts and in the wts, you have a TRIGSTR that contains "abc", altering latter won't affect the first.

If you are thinking of a multilanguage map, meaning players play in the same game with different data, that might be prevented depending on how Blizzard checks the maps for equality. The bigger reason why nobody does this would be because of distribution reasons though. Downloading it via BNet would give you a wildcard version.
 
Level 15
Joined
Jul 15, 2005
Messages
356
Unless there is a checksum elsewhere I do not believe - I have never tried to edit the wts myself before - yes ofc it's enough to modify it. It's not repeated at some other point. But if you insert somewhere "abc" directly instead of referencing the wts and in the wts, you have a TRIGSTR that contains "abc", altering latter won't affect the first.

If you are thinking of a multilanguage map, meaning players play in the same game with different data, that might be prevented depending on how Blizzard checks the maps for equality. The bigger reason why nobody does this would be because of distribution reasons though. Downloading it via BNet would give you a wildcard version.

Nah, I'm not planning on making a multiplayer map containing multiple languages - this is for my single-player only Campaign, and I plan to release a different, translated version with a different filename from the original (to make it clear it's a translation).

So far unfortunately I've had no luck with this though. Any change to the .wts file (even using the same language) and reimporting it into the map makes the changed string just come up as blank (other, unedited strings in the wts are unaffected though). This happens even when I only use Notepad. Not sure what's wrong... :(
 
Status
Not open for further replies.
Top