• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Get your art tools and paintbrushes ready and enter Hive's 34th Texturing Contest: Void! Click here to enter!

Does war3mapSkin.txt no longer work for custom localized strings?

Level 24
Joined
Jun 26, 2020
Messages
1,934
Hello, a year and a half ago I made this thread: Can war3mapSkin.txt be used to create custom localized strings?
Where I said how can I used the war3mapSkin.txt file to create custom localized strings, and recently I tried the same thing with this flie:
Code:
[FrameDef]

YOU_HAVE_YOUR_DIGIMON=You already got your digimon!
And then imported it to my map with the exact root "war3mapSkin.txt", but and tried to print it:
  • Game - Display to (All players) the text: (Localize(YOU_HAVE_YOUR_DIGIMON))
But it printed me "YOU_HAVE_YOUR_DIGIMON" instead of "You already got your digimon!", I don't know why, probably is my map because I tried the same thing in a blank map and it worked fine as it should.

Do you know what could be the reason?

Edit: I found the reason, if I modify the Game Interface it overwrites my imported war3mapSkin.txt file, so I need to be more tricky then.
 
Last edited:
Level 24
Joined
Jun 26, 2020
Messages
1,934
Out of curiosity, any reason you don't want to use war3map.wts for handling your localization? (e.g. you can open up the Blizzard campaign maps in an MPQ editor to see their _Locales folder structure)
I use both, because the war3map.wts file doesn't let me add more custom strings, I tried once and my map file got bugged, and the methods to trick the game to get more that I saw are more annoying than using the war3mapSkin.txt file.
 
hmm interesting. If the only problem is adding more strings, then why not create a GUI trigger (with no event) and add strings there? e.g.:
  • Strings
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: New String 1
      • Game - Display to (All players) the text: New String 2
Then when you save the map, those strings will get added to the war3map.wts:
Code:
STRING 7
{
New String 1
}

STRING 8
{
New String 2
}

Or do you mean that you eventually run into a limit?
 
Level 24
Joined
Jun 26, 2020
Messages
1,934
hmm interesting. If the only problem is adding more strings, then why not create a GUI trigger (with no event) and add strings there? e.g.:
  • Strings
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: New String 1
      • Game - Display to (All players) the text: New String 2
Then when you save the map, those strings will get added to the war3map.wts:
Code:
STRING 7
{
New String 1
}

STRING 8
{
New String 2
}

Or do you mean that you eventually run into a limit?
I think this is more that I wanna avoid using the war3map.wts as much as I can, because by itself is not very flexible and very volatile and also the strings are very all out of place.
 
good to know! I don't think a ton of people have actually localized their maps, so kudos to you for doing so and documenting your findings. :thumbs_up:

And yeah I don't think warcraft 3's processes around localization are very intuitive--and the editor's way of saving things is definitely volatile. Because of that, I'd personally treat it as a task to do whenever you're finalizing your map. Or if you plan on doing this process regularly and you're experienced with programming/scripting, I'd personally store the translations in a separate file completely as key/values:
Code:
--
-- Example 1: base language as key (English) - translated language as value (French)
--

"Twenty minutes later, at Uther's encampment near the Blackrock clan village..." = "Vingt minutes plus tard, au camp d’Uther non loin du village du clan Rochenoire…"

Or as YAML with specific keys (this is a bit more standard, but wc3 doesn't let you really name your strings beyond assigning them a number):
YAML:
--
-- Example 2: YAML with specific keys
--

map_description: "Vingt minutes plus tard, au camp d’Uther non loin du village du clan Rochenoire…"

mission_failed: |
    |cffffcc00ÉCHEC DE LA MISSION|r
    Tous vos bâtiments ont été détruits

And then I'd write a script that can take in your English war3map.wts and spit out the translated war3map.wts. That way the order isn't really any issue and you can translate your strings in whatever format you desire. You could even make your script emit warnings for untranslated strings (or unused translations!). Just throwing out ideas, chatGPT could probably help whip up something that suits your needs. :thumbs_up:
 
Top