Hellu, I'm converting my map to korean and am trying to put in korean commands for my map. However, I can't seem to write strings in korean - the galaxy editor changes it to weird unreadable symbols after word completion. Is there something I need to do for foreign strings to work?
Edit: In case people misunderstand, I'm not talking about translating game texts, I'm talking about being able to type korean letters in custom scripts for string comparisons. So example..
So if we have something like this, if I try to replace the contents of the message variable string with korean - the editor will turn into some unreadable symbols upon word completion.
1) You need to add that locale to the map. Map -> Locales -> Modify Locales -> Enable koKR
2) This may or may not be needed, I don't know if Starcraft 2 comes with this, but you need the language packs for the system to recongize the characters. So you may need to install the Korean language packs for windows. I hope it doesn't, because Microsoft requires the Ultimate or Enterprise editon of Win7 to install the Korean language pack.
1) You need to add that locale to the map. Map -> Locales -> Modify Locales -> Enable koKR
2) This may or may not be needed, I don't know if Starcraft 2 comes with this, but you need the language packs for the system to recongize the characters. So you may need to install the Korean language packs for windows. I hope it doesn't, because Microsoft requires the Ultimate or Enterprise editon of Win7 to install the Korean language pack.
1) That's not what I'm talking about, this isn't about translating game texts.
2) The base language enabled for my computer is Korean.
It might be that the system font the ditor uses doesnt support unicode.
My suggestion would be to save as sc2components, go to the koKR.SC2Data folder, and modify the gamestrings/objectstring and triggert strings files with a dedicated text editor that supports unicode/utf8/whatever
It might be that the system font the ditor uses doesnt support unicode.
My suggestion would be to save as sc2components, go to the koKR.SC2Data folder, and modify the gamestrings/objectstring and triggert strings files with a dedicated text editor that supports unicode/utf8/whatever
This answer is in the right direction, but I'm just hoping you are wrong.
Perhaps someone can confirm, but at the same time - this means that every non-english string comparison being made is done externally. While it's not hard to believe, seeing that nobody has made a thread about this makes me doubtful that the trigger editor doesn't support non-english font. And I've seen non-english commands in arcade games so.
Still, thanks for your response.
Edit: I just tried editing strings outside of the editor, when the map loads it just deletes non-english strings. I guess this means I need to find an alternative;;
I had some ideas (which i posted below).
But then i tested them and they don't work....
Some more testing, and you basically cannot paste anything other then base boring default english characters into a STRING.
But you can paste all sort of language script into a TEXT variable.
so... the chat trigger (using string) you are stuck.
------------
Whilst i havent tried this before, I'd imagine the following is the MINIMUM you need to do:
1) go into sc2 game and set language to Korean (which will force download the relevant locale support parts). yes, you probably already have this - checking anyway.
2) after 1, go into editor and set (menu)File... (option)Preferences ... (item)General for "Locale" to be Korean.
3) go into \Documents\StarCraft II\EditorVariables.txt and ensure that all of the following three are set correctly (koKR for you).
There is a way, but it is a hack/workaround at best.
1) Use a conversion function to compare the string to a text.
2) This is the hack part. Make all your commands as text (using the text editor, you can create any text entry). Give the text id something memorable.
3) In the comparision, use Get Game Text function to get the value of a text, using the ID you created earlier. So if the text has an ID of "CommandA" and a text value of "SomeKoreanTextHere", you can compare them as text. The drawback to this is that you will have to do this for every command you want in non english. Which may get tedious as hell. Also you have to remember to copy the external text to every locale.
You cannot put special characters into galaxy script (unless it's a part of comment) that's correct, and it has nothing to do with system configuration, nor editor configuration. It's a lexer issue which is apparently not capable of handling multibyte characters.
Quote:
Lol, I think texts comparisons are only for checking pointers and not stored values.
Yes, text comparisions always return true. Even if you compare some initialized Text variable against null. I'd expect them to at least compare pointers - whether it is the same Text instance, but it seems to not even do that. Yet, it is a totally meant behaviour, otherwise it could lead to desyncing of the games, due to different localizations.
As for the solution, i've did some testing and it is possible to escape multibyte characters inside string instance. For example this "명" can be stored as "\xEB\xAA\x85" (EB AA 85 in utf8). Here is the site where you can easly convert characters to their UTF8 representation - https://r12a.github.io/apps/conversion/
My snippet of the code i was doing tests on:
staticvoidprint(strings){UIDisplayMessage(PlayerGroupAll(),c_messageAreaChat,StringToText(s));}voidgameInit(){TriggerAddEventChatMessage(TriggerCreate("onMessage"),c_playerAny,"-",false);}boolonMessage(booltestConds,boolrunActions){stringmsg;// strip leading "-"msg=StringSub(EventChatMessage(false),2,StringLength(EventChatMessage(false)));if(msg=="\xEB\xAA\x85\xEB\xA0\xB9"){// -명령print("recognized command 1");}returntrue;}
Chat commands are obsolete in SC2 because better alternatives exist for actual game play.
You can create a button to link to the functionality. If the functionality is rarely used then you can turn the button into a pull down or pop up menu of sorts to minimize the screen space used. Look at Heroes of the Storm for example, there the only chat commands are the taunt and dance emotes which are common in Blizzard games.
Bank files should be able to store unicode strings. You could create a bank file mapping unicode commands to trigger function names and look up the trigger function by name to execute a specific trigger upon receving a chat cmd.
its quite hacky, too, but maybe a valid alternative to the escape sequence stuff.
Hellu, I'm converting my map to korean and am trying to put in korean commands for my map. However, I can't seem to write strings in korean - the galaxy editor changes it to weird unreadable symbols after word completion. Is there something I need to do for foreign strings to work?
Edit: In case people misunderstand, I'm not talking about translating game texts, I'm talking about being able to type korean letters in custom scripts for string comparisons. So example..
string message = "-command"
TriggerAddEventChatMessage(tempTrig, c_playerAny, message, true);
So if we have something like this, if I try to replace the contents of the message variable string with korean - the editor will turn into some unreadable symbols upon word completion.
I can't do something like
string message = "-명령"
1) You need to add that locale to the map. Map -> Locales -> Modify Locales -> Enable koKR
2) This may or may not be needed, I don't know if Starcraft 2 comes with this, but you need the language packs for the system to recongize the characters. So you may need to install the Korean language packs for windows. I hope it doesn't, because Microsoft requires the Ultimate or Enterprise editon of Win7 to install the Korean language pack.
1) That's not what I'm talking about, this isn't about translating game texts.
2) The base language enabled for my computer is Korean.
It might be that the system font the ditor uses doesnt support unicode.
My suggestion would be to save as sc2components, go to the koKR.SC2Data folder, and modify the gamestrings/objectstring and triggert strings files with a dedicated text editor that supports unicode/utf8/whatever
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!
This answer is in the right direction, but I'm just hoping you are wrong.
Perhaps someone can confirm, but at the same time - this means that every non-english string comparison being made is done externally. While it's not hard to believe, seeing that nobody has made a thread about this makes me doubtful that the trigger editor doesn't support non-english font. And I've seen non-english commands in arcade games so.
Still, thanks for your response.
Edit: I just tried editing strings outside of the editor, when the map loads it just deletes non-english strings. I guess this means I need to find an alternative;;
@Broot7: Go
I had some ideas (which i posted below). But then i tested them and they don't work....
Some more testing, and you basically cannot paste anything other then base boring default english characters into a STRING. But you can paste all sort of language script into a TEXT variable.
so... the chat trigger (using string) you are stuck.
------------Whilst i havent tried this before, I'd imagine the following is the MINIMUM you need to do:
1) go into sc2 game and set language to Korean (which will force download the relevant locale support parts). yes, you probably already have this - checking anyway. 2) after 1, go into editor and set (menu)File... (option)Preferences ... (item)General for "Locale" to be Korean. 3) go into \Documents\StarCraft II\EditorVariables.txt and ensure that all of the following three are set correctly (koKR for you).
try again with your editor text input ...
@Rohime: Go
hey thanks for the reply,
As for text inputs between locale changes I'm fine, I was just concerned about doing korean commands in game but I guess it isn't possible.
There is a way, but it is a hack/workaround at best.
1) Use a conversion function to compare the string to a text.
2) This is the hack part. Make all your commands as text (using the text editor, you can create any text entry). Give the text id something memorable.
3) In the comparision, use Get Game Text function to get the value of a text, using the ID you created earlier. So if the text has an ID of "CommandA" and a text value of "SomeKoreanTextHere", you can compare them as text. The drawback to this is that you will have to do this for every command you want in non english. Which may get tedious as hell. Also you have to remember to copy the external text to every locale.
Lol, I think texts comparisons are only for checking pointers and not stored values.
Otherwise, there is no reason for this thread if we can make text comparisons like that... :/
have someone send chat commands in korean. store those strings into bank files. see what happens.
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!
@Alevice: Go
that's a really interesting idea except it'll be a little quirky haha
Yes... looks that way.
Every Korean game that I've seen (not many) used NUMBERS for commands ... like "Defence the Zealot" ( has "-11" to trigger start.
I guess you need to do buttons with explanation in language of your choice...
You cannot put special characters into galaxy script (unless it's a part of comment) that's correct, and it has nothing to do with system configuration, nor editor configuration. It's a lexer issue which is apparently not capable of handling multibyte characters.
Yes, text comparisions always return true. Even if you compare some initialized Text variable against null. I'd expect them to at least compare pointers - whether it is the same Text instance, but it seems to not even do that. Yet, it is a totally meant behaviour, otherwise it could lead to desyncing of the games, due to different localizations.
As for the solution, i've did some testing and it is possible to escape multibyte characters inside string instance. For example this "명" can be stored as "\xEB\xAA\x85" (EB AA 85 in utf8). Here is the site where you can easly convert characters to their UTF8 representation - https://r12a.github.io/apps/conversion/
My snippet of the code i was doing tests on:
You sir are incredible, thanks for dropping some wisdom.
i think this should be stickied somewhere as a snippet for future references.
It will come in handy for doing foreign commands in the future for any editors.
he drops some good ideas from time to time
Chat commands are obsolete in SC2 because better alternatives exist for actual game play.
You can create a button to link to the functionality. If the functionality is rarely used then you can turn the button into a pull down or pop up menu of sorts to minimize the screen space used. Look at Heroes of the Storm for example, there the only chat commands are the taunt and dance emotes which are common in Blizzard games.
Bank files should be able to store unicode strings. You could create a bank file mapping unicode commands to trigger function names and look up the trigger function by name to execute a specific trigger upon receving a chat cmd.
its quite hacky, too, but maybe a valid alternative to the escape sequence stuff.