ship design bug- Can't set invasion tactics.

Post bug reports and ask for support here.

Moderators: Icemania, elliotg

User avatar
author
Posts: 24
Joined: Mon May 10, 2010 11:49 am
Contact:

RE: ship design bug- Can't set invasion tactics.

Post by author »

kanka, that makes problem, more "country" oriented. It is not about language settings, but our computers bought in Turkiye.

Please try to intall game on another computer, not bought in turkiye, perhaps a friend's one. And lets see, if it will be work, or not.

User avatar
Data
Posts: 3909
Joined: Mon Jan 03, 2011 4:43 pm

RE: ship design bug- Can't set invasion tactics.

Post by Data »

I wonder why would that make a difference. I don't think it should but I've seen even weirder stuff so...[:)]
...Igniting stellar cores....Recharging reactors...Recalibrating hyperdrives....
User avatar
author
Posts: 24
Joined: Mon May 10, 2010 11:49 am
Contact:

RE: ship design bug- Can't set invasion tactics.

Post by author »

that is unbeliavble, but we cant play the game.

I have to stick to automatic designs, so I cant design armed, self defended stations or many other ships that I need for my strategies.

Without the design abilty, all I can do is find powerfull old ships and claim them so I can defend my self while trading, and trading, and trading.

dory
Posts: 9
Joined: Fri Feb 18, 2011 9:40 pm

RE: ship design bug- Can't set invasion tactics.

Post by dory »

weird indeed. i really don't think it is a language thing, but if so, maybe it is because in Turkish the uppercase for i is İ, and the lowercase of I is ı. different letters: 'I'nvasion tactics, remember.

but hey, how would it make a difference if the language setting is TR? And I've never seen it make a problem in any other games. so...

eventually, you are making too much noise. it IS very annoying but the game is still playable without custom ship designs.
User avatar
Data
Posts: 3909
Joined: Mon Jan 03, 2011 4:43 pm

RE: ship design bug- Can't set invasion tactics.

Post by Data »

I'd not go so far as to say he's making to much noise, it's a legitimate problem for him and I know how I'd feel if I couldn't design my own ships because of this. That being said I think as well that this is not the actual root cause for this problem; but if all else fails changing the locales on the computer to english as Elliot suggested will fix this. I see this was attempted before but it's not clear yet how exactly was it done, Windows has some quirks here.
...Igniting stellar cores....Recharging reactors...Recalibrating hyperdrives....
dory
Posts: 9
Joined: Fri Feb 18, 2011 9:40 pm

RE: ship design bug- Can't set invasion tactics.

Post by dory »

Well, I just remembered that some moons in Virgussu system were called İrgu, İphala etc. stuff like that. With the long "İ". Is it the same with your computers too?
dory
Posts: 9
Joined: Fri Feb 18, 2011 9:40 pm

RE: ship design bug- Can't set invasion tactics.

Post by dory »

You can see the names of the planets with the capital Turkish "İ" below. Does this happen to everyone else?

Image
Attachments
i.jpg
i.jpg (30.45 KiB) Viewed 232 times
bonesbro
Posts: 14
Joined: Thu Feb 24, 2011 11:48 pm

RE: ship design bug- Can't set invasion tactics.

Post by bonesbro »

Ah.  That's the classic "Turkish I" problem.  The developers are almost certainly determining which invasion tactic is selected by comparing the string value in the dropdown to a list of specific strings.  And the list of strings they are comparing against has a different case than the case that is used to display the string.  Perhaps they have a switch(dropdown.value.ToLower()).  And the default: for the case statement is to show the warning.  So they are reading the string from the dropdown "Do Not Invade" and the code is comparing it against the the constant string "do not invade".

It is a character problem.  In English we have capital-I-without-dot and lowercase-i-with-dot.  In the Turkish language there are both uppercase and lowercase versions of i-with-dot and i-without-dot.  When you call string.ToLower() in .NET, the default is to perform a culture-sensitive operation.  In a computer whose currentlocale is set to English, the I in "Invasion" changes from capital-i-without-dot to lowercase-i-with-dot, and the string comparison matches.  On a computer that uses the Turkish language, the capital I in "Invasion" goes from capital-i-without-dot to lowercase-i-without-dot, and the string comparison does not match.

The fix is to do one of three things: change your string comparisons from equality to StringComparison.OrdinalIgnoreCase(), pass in CultureInfo.InvariantCulture as an optional parameter to string operations, or use String.ToLowerInvariant() instead of String.ToLower().  There's also an FxCop globalization rule that catches this error.

A similar bug is visible in dory's final screenshot of the planet names.  I suspect that the planet names are stored lowercase, and there is a method that formats the strings for display purposes, and that method calls ToUpper() on the first character of the planet name.  So the lowercase-i-with-dot becomes uppercase-i-with-dot in Turkish, which leads to the screenshot above.

Another fix the developers will probably want to make is to set the DataSet.Locale property on all DataSets used in the codebase.  Yall will probably want to set it to CultureInfo.InvariantCulture, which might avoid some other funny globalization issues, like the way that some languages sort characters in a different order.  I don't remember offhand if that will cause problems in places where string operations should be culture-sensitive, like formatting dates or decimal numbers, though I also can't think of anywhere in DW that displays decimal numbers.
User avatar
Data
Posts: 3909
Joined: Mon Jan 03, 2011 4:43 pm

RE: ship design bug- Can't set invasion tactics.

Post by Data »

way to go, bonesbro, that is some tour de force [:)]
...Igniting stellar cores....Recharging reactors...Recalibrating hyperdrives....
dory
Posts: 9
Joined: Fri Feb 18, 2011 9:40 pm

RE: ship design bug- Can't set invasion tactics.

Post by dory »

WOW! So it IS a country problem. so author, you were right, mate! [:D]
bonesbro
Posts: 14
Joined: Thu Feb 24, 2011 11:48 pm

RE: ship design bug- Can't set invasion tactics.

Post by bonesbro »

As a temporary workaround, try changing your Windows regional settings to one of the English languages.  Start > Control Panel > Regional and Language Options.  I'm not sure exactly which setting it uses.  Unfortunately, this is a system wide setting and will affect your entire computer.  I don't think there are per-app compat flags that let you run an app in a different locale.
User avatar
Data
Posts: 3909
Joined: Mon Jan 03, 2011 4:43 pm

RE: ship design bug- Can't set invasion tactics.

Post by Data »

No, indeed they are not....there is the vmware option in case you're proficient enough with it to make a virtual machine for DW
...Igniting stellar cores....Recharging reactors...Recalibrating hyperdrives....
User avatar
elliotg
Posts: 3934
Joined: Mon Sep 10, 2007 9:32 am

RE: ship design bug- Can't set invasion tactics.

Post by elliotg »

After changing absolutely everything to Turkish on my English edition of Windows 7 (language, format, location and keyboard), I was finally able to partially reproduce this behavior! Strangely, I could save designs no problem, but I couldn't alter the invasion tactics from the default.

But with the helpful hints from bonesbro, I was able to resolve the problem so that I you can now change the invasion tactics, as well as save designs when Windows settings are Turkish. Thanks for the tips bonesbro!

This fix will be in the 1.5.0.5 update for ROTS. We'll also add this fix to the next update for the original Distant Worlds.

Thanks for all the input!
User avatar
Kayoz
Posts: 1516
Joined: Sun Dec 19, 2010 10:55 pm
Location: Timbuktu
Contact:

RE: ship design bug- Can't set invasion tactics.

Post by Kayoz »

elliotg -

Localization troubles. I feel your pain. Wait till you get some MBCS languages to deal with.
“That which can be asserted without evidence, can be dismissed without evidence.” ― Christopher Hitchens
dory
Posts: 9
Joined: Fri Feb 18, 2011 9:40 pm

RE: ship design bug- Can't set invasion tactics.

Post by dory »

Yay! Love you all.
Post Reply

Return to “Tech Support”