OMSI 2
评价数不足
Locale Emulator - fix foreign content with special characters not working
由 shanie 制作
Create shortcuts to launch OMSI 2 with an emulated system locale, allowing content with special characters (e.g. Russian) to load properly - without changing the game's UI language!
   
奖励
收藏
已收藏
取消收藏
What is Locale Emulator and why use it?
To understand the point of Locale Emulator, you must first understand what the system locale is.

For simplicity and the purposes of this guide, we will assume the system locale is essentially the "language" OMSI 2 is running under (not the same as the in-game user interface language) and the characters it can recognise. You can learn more here[docs.microsoft.com].

OMSI 2, by default, will use the locale of your system's currently set language.

We can use Locale Emulator to change the locale for OMSI 2 only, without affecting your system or any other applications. This can be useful for using content with non-Latin / Crylic characters on a system whose current locale does not support them.

These may be present be anywhere in the content, from relatively harmless areas such as the map's description text (in the main menu), to part of a definition file or it's path which could break the content entirely.

Let's take the "Cheboksary" small Russian village map as an example. I will load it on my computer, which has the system locale set to "United Kingdom".



You can already see that the description has failed to load, as it features Russian characters.

As reported by the Blue Sky tool[cdlbt.co], I have all of the required dependencies for this map installed:



Yet, it still fails to load properly:



The logfile reveals that some characters of the folder names of some scenery objects (dependencies) are not being recognised by OMSI 2 due to my current system locale - they are replaced with question marks instead, referring to a non-existent path:

In map file "maps\Cheboksary\tile_-1_-5.map" there was an error in line 471! In map file "maps\Cheboksary\tile_-1_-4.map" there was an error in line 490! The file "Sceneryobjects\???? ???????????\??? 6_1\??? 6_1.sco" could not be loaded! Invalid Object: Sceneryobjects\???? ???????????\??? 6_1\??? 6_1.sco" The file "Sceneryobjects\???? ???????????\??? 1\??? 1.sco" could not be loaded! Invalid Object: Sceneryobjects\???? ???????????\??? 1\??? 1.sco" In map file "maps\Cheboksary\tile_0_-4.map" there was an error in line 2460!

These problems occur due to OMSI 2's use of Delphi's AnsiString[docwiki.embarcadero.com] data type in these applications. Without careful reverse engineering it is impossible for this to be fixed directly in the OMSI 2 main program executable so no third party programs are required.

Emulating OMSI 2 with a Russian locale fixes this problem and the map loads properly. Even the map description displays properly now:



Installation & Locale Profiles
This tool does not require the prior installation or uninstallation of any other external dependencies - it is completely standalone.

  1. Click here[drive.google.com] to download the archive with the required files.

  2. Open the downloaded archive with File Explorer / Windows Explorer.

  3. Open the OMSI 2 folder.

  4. Copy the contents inside.

  5. Open Steam.

  6. Hover your cursor over the Library tab in the top left, then click on Home.

  7. Right click on the OMSI 2 entry in the games list on the left.

  8. Click on Properties....

  9. Click on the Local Files option on the left.

  10. Click on Browse.... A File Explorer / Windows Explorer window will appear.

  11. Paste the contents into this location and click Replace the files in the destination (or similar) if prompted.

  12. Go back to the downloaded archive with File Explorer / Windows Explorer and open the Locale Emulator + LEShortcutCreator + Configs folder.

  13. Copy the contents inside to a safe folder on your PC. It should not be moved anywhere else after completing this guide. Note down where it is - you will need this for the next section.

  14. Double click on the LEGUI .exe / Application file to launch it.

  15. Click on the top-most drop-down to expand it. If your preferred locale is not present, select your preferred locale from the Location drop-down. Otherwise, continue onto the next section.

    You can safely ignore the Timezone drop-down. It has no effect on how OMSI 2 sees system time.

  16. Tick the Run as administrator and Show this profile in main menu boxes.

  17. Click the Save As... button at the top, name the profile appropriately, then click Save.

  18. If you would like to create more locale profiles, repeat Steps 5-7. Otherwise, continue onto the below section.

You have now successfully setup the locales you would like to emulate, but still need to create shortcuts to launch OMSI 2 with them. Continue onto the below section to do this.

Creating a locale profile shortcut
  1. Open the folder from Step 13 of the previous section (where you copied the contents of the Locale Emulator + LEShortcutCreator + Configs folder)

  2. Double click on the LEShortcutCreator .cmd / Windows Command Script file to launch it. Please wait around a minute for it to launch - it may take some time. If a window does not appear, check if this icon appears on your taskbar - if so, click it:


  3. Click on Browse.. under Target(s) then locate the Omsi .exe / Application file in your OMSI 2 installation directory (from Step 10 of the previous section). Select it and click on Open.

  4. At this point you may optionally add any preferred OMSI 2 launch options[reboot.omsi-webdisk.de] to the Target Arguments (optional) box (each separated with a single space) if you wish.

  5. Select your preferred locale profile from the Language dropdown that you checked / created in the above section of this guide.

  6. If you would like to save a shortcut for this locale profile to somewhere other than your Desktop, click on Browse... under Default Save Directory, find and select your preferred folder, then click on OK. To ensure all future shortcuts save to this folder too, you may optionally tick the Remember Settings box if you wish.

  7. Click on Run Target if you would like to test this locale profile once, or Save Shortcut to create a shortcut that will always run OMSI 2 with this locale profile.

  8. Repeat Steps 5-8 for any other locale profiles you wish to try. Once you have finished, close the window.

You have now successfully setup the locales you would like to emulate and tested or created their launch shortcuts.

Frequently Asked Questions
Q: Will emulating the system locale change OMSI 2's main user interface language?
A: No.


Q: When I launch OMSI 2 with an emulated locale, a Steam window appears / the OMSI 2 DLC Launcher appears, instead of OMSI 2 running directly. The locale does not appear to be emulated.
A: Close the window, restart Steam and try again. This is a confirmed fix and not a general tip.


Q: Can I launch the OMSI 2 map editor with an emulated locale?
A: Yes - refer to Step 4 of the "Creating a locale profile shortcut" section.


Q: Does this have the potential to alter files in my OMSI 2 installation or corrupt them?
A: No.


Q: The main user interface fonts are displaying incorrectly, like this:



A: Close OMSI 2, restart your PC and try again. This is a confirmed fix and not a general tip.


Q: The red "SHIFT + Z / SHIFT + Y" information text displays with an extremely small font, like this (ALT menu for comparison):



A: This is a known side effect of locale emulator with OMSI 2. There is currently no known fix.
A: If you would like to check some of the information usually displayed by this red text, you can either look at in-cab equipment (not always present with every bus), look very closely at your monitor or Bus Company Simulator which uses an external UI for this.
A: I am currently in the process of developing a free external user interface addon that replicates (most of) this information via OMSI's plugin system that should help alleviate this problem and mean screenshots can be taken without needing to dismiss the red information text.


Q: How can I tell OMSI 2's locale is being emulated properly?
A: There is currently no sure-fire way of knowing this, but you can check the above FAQ to check for the tell-tale small red text, which should occur 100% of the time.


Q: Why do I need to copy the Steam files to my OMSI 2 directory in the "Installation & Locale Profiles" section?
A: The .dll Steam library & .txt Steam appid definition files simply allow for the direct startup of the main Omsi .exe / Application executable file instead of launching it through Steam.

It does not "crack" or "pirate" the game in any way as OMSI 2 will still require that you have Steam running and signed into an account that owns OMSI 2 to launch it. You can try opening Omsi.exe with Steam closed to test this.

It does not interfere with your current in-game status on Steam or the operation of the OmniNavigation, Bus Company Simulator or Control Centre Simulator DLCs.

This is required for the proper functioning of Locale Emulator which only wraps around .exe / Application executable files and cannot interact with Steam.

If you open Omsi.exe without these files, it will simply send a steam://rungameid/252530 command to Steam, which will then launch OMSI 2 by itself, meaning the locale is no longer emulated.

Here[www.virustotal.com] is the VirusTotal analysis for steamclient.dll (the first detection is a false positive detection by a fringe antivirus) and here[www.virustotal.com] is the one for ValveAPI.dll.

If you would like to remove the files and undo this change, you should delete the following files from your OMSI 2 installation directory (Step 10 of the "Installation & Locale Profiles" section)

  • steam_appid .txt / Text Document file
  • steamclient .dll / Application extension file
  • ValveAPI .dll / Application extension file

Additional Information & Credits
Usage

You should only use OMSI 2 with Locale Emulator if you are experiencing technical issues with foreign content that have the telltale signs of a locale problem. Otherwise, it is not required - e.g, most German map content will work normally on systems with the locale set to "United Kingdom".

It is generally rare for content to have locale problems or use non-Latin / Crylic characters, but not out of the question. You should not need to use Locale Emulator very often.

Emulating a locale other than your system's default will not replace it. For example, if I emulated OMSI 2 with a Russian locale, it would not replace or remove my default "United Kingdom" system locale. All content with non-Crylic / Latin characters such as UK map content would still function normally.

Once you have completed an OMSI 2 session with an emulated locale, simply close the game normally. There is no "uninstallation". To launch OMSI 2 as normal again without emulating a locale, simply run the game via Steam instead of using a locale emulator shortcut.


Compatibility & Stability

As with any modification to software, please be aware that this is not guaranteed to work the same across all systems. It is extremely unlikely but still possible this tool may cause instability.

Remember that if stability is important to you, it is not recommended to use this modification during important times, such as Bus Company Simulator drives or Virtual Transportation Group meetings. Only use this modification when you are not in a position to lose any work.


Updating

If you already have a previous version of this tool installed, simply follow the instructions of the "Installation" section above as normal to install / update to the latest version.

Advanced users: Do note, however, that this may overwrite the LEConfig .xml / XML file (locale profile configuration file), so back it up before you update this modification if you have made any manual edits yourself.

If you are updating this tool be sure to check the list of changes of the "Changelog of updates" section below incase there is a "WARNING" or "NOTE" you should be aware of.


Support

If you have a technical issue, before commenting, please check the "Frequently Asked Questions" and "Usage" sections above to see if it has already been addressed. If it has not been addressed or you have further queries, you may continue.

Please upload the contents of the logfile .txt / Text Document in the folder from Step 11 of the "Installation" section to Pastebin[pastebin.com] and include it in your comment if you are experiencing instability.

Please do not use any other means of contact for support (e.g., adding me as a friend on Steam then messaging me privately).


Credits

sjain - Creating Steam guide, additional locale profiles, testing

xupefei -- Creator of Locale Emulator[github.com]

Svintooo -- Creator of LEShortcutCreator[github.com]

Changelog of updates
v2021.0 - 16th August 2021
  • Initial release

5 条留言
Ronnykellermann 2022 年 10 月 30 日 上午 6:06 
wie kann ich denn fehler beheben
shanie  [作者] 2021 年 11 月 2 日 上午 2:41 
Interesting, ive never experienced this myself, all the addons stay activated in my options menu... does it return to normal when you start with Steam normally?
BSTrans 2021 年 11 月 1 日 下午 7:17 
I got a new problem , when i start omsi2 with LEShortcut and load DLC addon Hamburg. It lost the activation and whole map only display few trees and some static bus model. Do you have this problem?:lunar2019crylaughingpig:
shanie  [作者] 2021 年 10 月 22 日 下午 12:17 
np :D glad to help
BSTrans 2021 年 10 月 22 日 上午 1:27 
It looks quite useful. thx!!!