Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: A system to make EUD maps with multiple languages
A system to make EUD maps with multiple languages
Yesterday, 2:00 pm
By: LDConval  

Yesterday, 2:00 pm LDConval Post #1



This is a system to create EUD maps with multiple languages.
By changing one parameter in the code, it makes EUD editor compile it to a different language.
It can convert strings in SCMDraft triggers, forces, map name and description, mission briefing, unit names and stat_txt text.

This reduces the effort needed to manage different code for different languages when you update the map every time.

Result:


For example:

Compiles to English
function onPluginStart() {
   db.init("en", "1.00"); // version 1.00
   ...
   DisplayTextAll(ST.GAME_START);
}


Compiles to Korean
function onPluginStart() {
   db.init("kr", "1.00"); // version 1.00
   ...
   DisplayTextAll(ST.GAME_START);
}


I have used it for multiple maps right now, and it is useful to create Korean maps to fool Korean players into playing it on the Korean server.

It only works with EUD maps. For non-EUD maps you can use Map String Viewer to export the strings, then translate them and import it back.

How it works:
  • Write every string for each language in an Excel spreadsheet.
  • Run convert.ps1 (right click => run in powershell) to convert the spreadsheet to JSON.
  • Import the db.py in EUD Editor.
  • import db.ST in the epScript code, then whenever you need to print a string, print ST.STRING_NAME instead.
  • Every time you update the map, simply change the language parameter to compile it to different language. (db.init("en", "1.00") => db.init("kr", "1.00"))

For the translation part, simply ask an AI to translate it. They won't notice. (Even if they complain something translated wrong we don't understand them anyways.)

Image walkthrough:

Write strings in each language in the "strings" sheet.
If you need to add more languages, simply add for example val_fr in the next column and write each string.
The first two strings are used for map name and description.


Convert the Excel sheets into data.json using the powershell script.
I originally used a python script, but for cases where Python is not installed, I vibecoded this powershell script which always works.
If it does not work, ask CHatGPT to fix it.


Put the db.py in the same folder and use the option "temp files location" => "map file folder".
Then add the db.py file as plugin here [../../db.py] to load it.


Import db and db.ST in epScript code.
Whenever you need to display text/printAt, change the string to variable ST.STRING_NAME.


SCMDraft triggers can use it too. (I usually write everything in EUD editor but it should work as well)


Write mission briefing, forces, stat_txt and unit names in the "map_strings" sheet.
For mission briefing, use type "mb" in the spreadsheet, then write whatever in the briefing text and it replaces each string from top to bottom.
For forces, stat_txt and unit names use types "f", "s" and "u" and it replaces them based on stat_txt index or unit ID.


For stat_txt strings, also make it very long in the EUD editor text editor to make sure it can contain every language.
If the string is too short, it may spill into other strings.


Using it in EUD editor 2:

For some reason it always crashes for me when I save the file, but I figured out how to do it in EE2 as well.

Add the plugin here with absolute path to load it.


Change the path in db.py to use absolute path as well, since you cannot make EE2 use the map folder.


Add the import instruction at the top, then write raw code => db.init("en"); inside onPluginStart.


Use ST.STRING_NAME in the trigger editor.


Demo map and source code download:
https://staredit.net/?downloadAttachment=12283&key=2224870
(the "i18n_demo.zip")

Attachments:
ee3-1.jpg
Hits: 9 Size: 68.23kb
ee3-2.jpg
Hits: 9 Size: 141.22kb
ee3-3.jpg
Hits: 9 Size: 197.72kb
scmd1.jpg
Hits: 9 Size: 35.03kb
sh1.jpg
Hits: 9 Size: 144.75kb
sh2.jpg
Hits: 9 Size: 128.98kb
star.jpg
Hits: 9 Size: 515.95kb
ee2-1.jpg
Hits: 9 Size: 37.95kb
ee2-1a.jpg
Hits: 9 Size: 56.59kb
ee2-2.jpg
Hits: 9 Size: 285.93kb
ee2-3.jpg
Hits: 9 Size: 157.64kb
star2.jpg
Hits: 9 Size: 492.33kb
i18n_demo.zip
Hits: 0 Size: 434.54kb
pshell.jpg
Hits: 7 Size: 40.41kb

Post has been edited 16 time(s), last time on Yesterday, 2:42 pm by LDConval.




Yesterday, 2:54 pm Oh_Man Post #2

Find Me On Discord (Brood War UMS Community & Staredit Network)

Nice, a great contribution to community and helps thin that language barrier.

Based on what I'm reading here, we can't use it to auto-translate Korean EUD maps into English, because we don't have access to the source code for strings? That's a shame that's what I'm really chasing.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[02:47 am]
Symmetry -- :wob:
[12:38 am]
Symmetry -- :wob:
[12:32 am]
Moose -- :wob:
[12:07 am]
Oh_Man -- One day we'll prob b able to generate maps with a push of a button
[06:02 pm]
NimoStar -- How I learned to stop worrying and love the chatbot https://staredit.net/topic/18917/
[2026-8-30. : 4:12 am]
Symmetry -- scmscx I think is the largest DB available. scrmaps is new.
[2026-8-30. : 3:19 am]
Hacksaw222 -- are those sites you mentioned more popular for downloading?
[2026-8-30. : 3:18 am]
Hacksaw222 -- thanks
[2026-8-30. : 3:13 am]
Symmetry -- or upload to scmscx.com or scrmaps.com
[2026-8-30. : 3:13 am]
Symmetry -- you could also start a thread and attach the map
Please log in to shout.


Members Online: NudeRaider