• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Fix in Progress Some island names do not appear in Ship Berthing

Grey Roger

Sea Dog
Staff member
Administrator
Storm Modder
Looking through the "Ship Berthing" screen in a game in "Spanish Main" period:
shipberthing1.jpg
Two islands have no names. One is Saint Martin, which in "Spanish Main" is Isla de San Martín. The other is Curaçao.

The problem is somewhere in the "kam_shipberthing" files. Somehow island names are being translated twice. So "Curacao" is translated to "Curaçao" (with the modified "c"), then "Curaçao" doesn't translate to anything. Likewise, "Isla de San Martin" translates to "Isla de San Martín" (accent above the "i"), then "Isla de San Martín" doesn't translate to anything. Other island names are fine because the base name and translated name are the same.

A quick'n'dirty fix is to add a couple of extra lines into "RESOURCE\TEXTS\INI\ENGLISH\common.ini":
Code:
string = Isla de San Martín,"Isla de San Martín"
string = Curaçao,"Curaçao"
And now:
shipberthing2.jpg

That will also work for any other language which doesn't translate island names - as far as I can see, the Spanish and Polish versions have the same island names as English. But Russian translates everything into the Cyrillic alphabet, which means Russian isn't going to show any island names at all.
 

Attachments

  • common.ini
    75.1 KB · Views: 190
Last edited:
Nice fix!

Preferable would've been to prevent the double translation altogether, but as long as the end result works, the end result works! :woot
 
It's not a nice fix, it's a quick fix to allow the island names to appear in English. Ideally someone will fix the double translation, otherwise the only way the Russian translation will show any island names is if the Russian version of "common.ini" has an extra line for every island!
 
Time to resurrect this thread as I think I've come up with a nice fix. In "PROGRAM\INTERFACE\kam_shipberthing_miscfunctions.c", function 'FillScroll()':
Code:
GameInterface.islandslist.(pic).str1 = FindIslandName(island);
'FindIslandName' translates the island name. I couldn't find where else it's translated so this is where I tried to fix the double translation:
Code:
            iIsland = FindIsland(island);
            if (iIsland > 0) GameInterface.islandslist.(pic).str1 = Islands[iIsland].name;
            else
            {
                GameInterface.islandslist.(pic).str1 = "";
                trace("kam_shipberthing_miscfunctions.c, FillScroll(): '" + island + "' not found");
            }
Then I tested it and Martinique failed to show its name. There are exceptions for "Falaise De Fleur" and several other islands in 'FindIslandName' so I thought that whatever weirdness required those exceptions might be affecting this, even though all the other islands with similar exceptions were displaying correctly. Various attempts to do special things for "FalaiseDeFleur" failed.

And then, cursing my own idiocy, I finally realised what the problem was. See that check on 'iIsland > 0'? That's to prevent errors if for any reason the interface tries to show an island with no index - that shouldn't happen, but I'm a paranoid programmer. But - as I'd told someone else in a completely different context just yesterday - program code counts up from 0. "FalaiseDeFleur" is the first island to be defined, so its index is 0. I changed the condition to 'iIsland >= 0', all was sweetness and light, and Martinique took its rightful place among the displayed island names.
And the Russian translation now also shows island names. :bounce
 
Back
Top