• 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!

Fixed The not-Portuguese gunsmith

Grey Roger

Sea Dog
Staff member
Administrator
Storm Modder
The gunsmith in Saint George is a bit confused:
gunsmith_name_wrong.jpg

His dialog files have his name hard-coded to use his original Portuguese name. But I said "Saint George" - this is the "Revolutions" period in which the town is now British and the gunsmith has a new, random British name.

After a bit of fiddling with the dialog files to replace the name with a preprocessed place-holder:
gunsmith_name_right.jpg

The door icon is also wrong. "PROGRAM\Locations\init\AlanSmitheeLocations.c" labels it as "Portugese Gunsmith" which is not in "RESOURCE\INI\TEXTS\ENGLISH\interface_strings.txt" - that has "Portugese Blacksmith". This isn't a problem in English but it does mean the label probably won't be translated into Spanish or Russian. So the next version of "AlanSmitheeLocations.c" is going to have a couple of lines which set the label as "British Gunsmith" if the period is "Revolutions" or later, and "Portuguese Gunsmith" if the period is earlier. Both of the new labels will be in "RESOURCE\INI\TEXTS\ENGLISH\interface_strings.txt" so that, after the translators have updated their respective versions, the door label should show up correctly in other languages.
 
The door icon is also wrong. "PROGRAM\Locations\init\AlanSmitheeLocations.c" labels it as "Portugese Gunsmith" which is not in "RESOURCE\INI\TEXTS\ENGLISH\interface_strings.txt" - that has "Portugese Blacksmith". This isn't a problem in English but it does mean the label probably won't be translated into Spanish or Russian. So the next version of "AlanSmitheeLocations.c" is going to have a couple of lines which set the label as "British Gunsmith" if the period is "Revolutions" or later, and "Portuguese Gunsmith" if the period is earlier. Both of the new labels will be in "RESOURCE\INI\TEXTS\ENGLISH\interface_strings.txt" so that, after the translators have updated their respective versions, the door label should show up correctly in other languages.
How about changing all the labels to say either "Blacksmith" or "Gunsmith" without bothering to mention the nationality at all?
If there's no nation mentioned, then it also cannot be wrong when another nation takes over from the default. ;)

This is the same reason why the current mod loading screens only state "Port" and "Town" without the town name like the original game did do.
What isn't there, cannot be wrong! :rofl
 
I should never have bothered. :facepalm Make one fix, and someone then asks for more. :razz

A better fix, if I have time or if anyone else wants to try, would be to change all the blacksmith labels to "#stown_name# Blacksmith/Gunsmith". Other town labels already use preprocessed "#stown_name#".

As for loading screens, they might not have town names but they do sometimes have flags, and "Town_FalaiseDeFleur_Port2.tga.tx", which is used for the beach next to St. Pierre port, is wrong in all periods except Napoleonic - it shows the French tricolour. "Inside_Prison.tga.tx" shows soldiers in Spanish uniforms from the "Spanish Main" period, which looks odd when you're in Bridgetown prison during "Tales of a Sea Hawk".
 
I should never have bothered. :facepalm Make one fix, and someone then asks for more. :razz
What I suggest wasn't a requirement.
But it seemed like a simple thing to have it always right. :shrug

A better fix, if I have time or if anyone else wants to try, would be to change all the blacksmith labels to "#stown_name# Blacksmith/Gunsmith". Other town labels already use preprocessed "#stown_name#".
That works too; even better when it matches with all other regular locations. :onya

As for loading screens, they might not have town names but they do sometimes have flags, and "Town_FalaiseDeFleur_Port2.tga.tx", which is used for the beach next to St. Pierre port, is wrong in all periods except Napoleonic - it shows the French tricolour. "Inside_Prison.tga.tx" shows soldiers in Spanish uniforms from the "Spanish Main" period, which looks odd when you're in Bridgetown prison during "Tales of a Sea Hawk".
True; I just picked whichever period/nation I felt like and then took some screenshots.
Having it always 100% right is virtually impossible anyway, so I decided that a bit of artistic license should be acceptable.
At least it's far less obvious than the big bad banner blatantly lying. ;)
 
A better fix, if I have time or if anyone else wants to try, would be to change all the blacksmith labels to "#stown_name# Blacksmith/Gunsmith". Other town labels already use preprocessed "#stown_name#".
That turned out to be quick and easy. Testing it with a few quick FreePlay games took longer than the mod. :D The Port Royale blacksmith already has "#stown_name# Blacksmith" so all I needed to do was copy it to every other blacksmith location, replacing "Blacksmith" with "Gunsmith" where needed. So "Port Royale Blacksmith" already becomes "Kingston Blacksmith" in later periods, and now the one in Sao Jorge/Saint George automatically uses the correct town name:
kingston_en.jpg sao_jorge.jpg saint_george.jpg st_pierre_en.jpg

"RESOURCE\INI\TEXTS\ENGLISH\interface_strings.txt" had no entry for "#stown_name# Blacksmith" which means the Spanish and Russian versions don't have it either, which means "Port Royale Blacksmith" isn't translated. But there's a presumably obsolete entry for "Redmond Blacksmith" (yes, the fixed stock game name) which is translated, which gave me the Spanish translation, which meant I could add "#stown_name# Blacksmith" to both the English and Spanish versions (but not Russian as I can't edit Russian text). And so:
kingston_sp.jpg
 
I didn't originally show the gunsmith in Spanish because there was no reference including "gunsmith" in "interface_strings.txt" which I could copy. Then it occurred to me that Google Translate might be able to help, and indeed it provided two words for "gunsmith" because Spanish, unlike English, distinguishes between male and female smiths. That applies to blacksmiths too, which is significant to the one in St. Pierre. So I've added a new entry to "interface_strings.txt", "#stown_name# BlacksmithF", which in English translates to "#stown_name# Blacksmith" and in Spanish translates to "Herrera de #stown_name#". And so:
st_pierre_en (2).jpg st_pierre_sp (2).jpg

As for gunsmiths, there's the specialist in Sao Jorge and the multi-purpose smith in Grand Turk:
saint_george_en.jpg saint_george_sp.jpg turks_en.jpg turks_sp.jpg

Our resident translators can provide definitive versions of "interface_strings.txt", but at least there is now provision for separate translations for male and female smiths.
 
Back
Top