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

PTBR Translation

Peter Norton

Sailor Apprentice
Hello everybody!!!

I have the original game and 2 CDs purchased 20 years ago.
I am immensely grateful for this wonderful work in improving the original game.
But I'm not fluent in English so reading and interpreting the text becomes very tiring.

I'm translating "Build 14 FINAL Update" to PTBR, just the dialogue files and descriptive bits, is there anyone here who wants to accompany me on this journey?
The soft does not accept extended characters from the ASCII table such as [Ç, á, í, ã, ê, õ] and other similar characters, does anyone know how to make it accept these characters?

I don't intend to change game behavior scripts, I just want to play in PTBR
 
Perhaps you should change the text encoding. For example, I use Notepad++ and the encoding for the Russian language is Windows-1251 instead of the standard utf-8. For the Portuguese language, if I understand you correctly, this is like OEM 860. Before applying the encoding, I copy all the text that I translated, then apply the encoding - which leads to that the letters turn into encoding, and then I paste the text that I copied. You can try this, maybe it will work, it’s better to make a backup first so as not to spoil anything.
 
Thanks for the tip, I tried that but it didn't work, so I'm doing the translation without these characters.
Any Brazilian can read and understand even if they don't have the accents and "ç".

Manual translation is too tiring for just one person to do. For this reason I am researching how to use an AI resource that I can have all files translated at once.
Apparently I can zip the 490 dialog files, send them to the AI, which returns them to me without these problematic characters.
 
Manual translation is too tiring for just one person to do. For this reason I am researching how to use an AI resource that I can have all files translated at once.
Apparently I can zip the 490 dialog files, send them to the AI, which returns them to me without these problematic characters.
Cool, what kind of AI are you using? It won’t help me anymore, since I’ve already translated everything and am now checking the plots, but maybe some people will also want to translate the game into their language.
Thanks for the tip, I tried that but it didn't work, so I'm doing the translation without these characters.
Any Brazilian can read and understand even if they don't have the accents and "ç".
Maybe @Grey Roger can help you, he doesn't appear here on the weekends but will be here soon.
 
I did some translations using Google Translation, recognizing that some literals should not be translated. The translation does not comply with the PTBR's standard standards, so I would have to review each text and correct it within the standard, but in any case I don't think anyone would care about that, as long as it is possible to understand. And even then, it would be too much work for just one person to review each text.

After translating I used chat.openai.com to remove the problematic characters, the AI recognizes that it is an array of phrases for use in the game. You just need to give the instructions correctly.

I believe that the characters are problematic because they do not exist in the font used to create the soft, I saw this same occurrence in Blair Witch and Diablo 1, but in these 3 the amount of text is much smaller.

For Diablo I used a hexadecimal editor, changing the executable and adjusting the translation within the available space.

Apparently with the website www.systran.net/en/translate/ it is possible to send a set of files in zipfile for translation.
 
Special Portuguese characters do appear in the game but they're replaced by other ASCII characters which the code can recognise, then converted to appear as the proper characters by mapping them to parts of the texture files which produce on-screen text in the game. For example, the town on La Grenade appears in "RESOURCE\INI\TEXTS\ENGLISH\common.ini" as "SÝo Jorge". "SÝo" appears as "São" in the game. So, wherever you want "ã" to appear in your text, use "Ý" instead.

"ç" should appear correctly, otherwise several French and Portuguese random character names won't work. In "PROGRAM\Characters\Characters_names.c", you should find a few names containing this letter.

Both "common.ini" and "Characters_names.c" use basic ANSI encoding. Some files get away with using UTF-8, but in Build 14, questbooks must be in ANSI if they are to work at all.

By the way, the so-called "Build 14 FINAL" isn't final. Make sure you get the latest update. It's currently available from here:
https://piratesahoy.bowengames.com/potc/Grey Roger/post_1Jan_updates_101023.zip
Keep an eye on this thread:
Mod Release - Build 14 Gamma Version [Last update: 10th October 2023]That's where I post news of further updates.

Or you could try Build 15:
WIP - Beyond New Horizons Alpha Release
 
Special Portuguese characters do appear in the game but they're replaced by other ASCII characters which the code can recognise, then converted to appear as the proper characters by mapping them to parts of the texture files which produce on-screen text in the game. For example, the town on La Grenade appears in "RESOURCE\INI\TEXTS\ENGLISH\common.ini" as "SÝo Jorge". "SÝo" appears as "São" in the game. So, wherever you want "ã" to appear in your text, use "Ý" instead.

"ç" should appear correctly, otherwise several French and Portuguese random character names won't work. In "PROGRAM\Characters\Characters_names.c", you should find a few names containing this letter.

Both "common.ini" and "Characters_names.c" use basic ANSI encoding. Some files get away with using UTF-8, but in Build 14, questbooks must be in ANSI if they are to work at all.

By the way, the so-called "Build 14 FINAL" isn't final. Make sure you get the latest update. It's currently available from here:
https://piratesahoy.bowengames.com/potc/Grey Roger/post_1Jan_updates_101023.zip
Keep an eye on this thread:
Mod Release - Build 14 Gamma Version [Last update: 10th October 2023]That's where I post news of further updates.

Or you could try Build 15:
WIP - Beyond New Horizons Alpha Release
So simple and I'm beating myself up here...
There are still 3 characters left, do you know what the replacements for the ones below would be?
[Ã Õ õ]
 
I've just remembered something which means you may need to manage without accents and special characters after all, at least for dialogs.
Devlin Opera for the 65742th time
Need Help - Updating the Russian Translation


For some reason, special characters in dialog text do not show up correctly. They do show up correctly in words generated by functions, just not in actual text in a "dialog.h" file. Rank and gender titles should therefore be alright, but any other word with special characters is liable to cause trouble.
 
Last edited:
Hey Grey Roger!
Can you tell me if the dialogue text changes between these versions or is a new translation necessary for each version released?
 
Hey Grey Roger!
Can you tell me if the dialogue text changes between these versions or is a new translation necessary for each version released?
Dialog text may change from one version to the next as new dialog is added. Keep an eye on the threads for the Spanish and Russian translations:
WIP - Spanish translation
Need Help - Updating the Russian Translation

And in particular, the update thread:
Mod Release - Build 14 Gamma Version [Last update: 10th October 2023]
If English dialog.h files change then you may want to update your translation to match.

What is "PTBR"?
At a guess, Brazilian Portuguese.
 
In the AbilityDescribe.txt file
I found some repeated lines and also the definition below on line 120
I believe it should be "Quick Turn-Around" instead of "Club Hauling"
and that 90 degrees should also be 180 degrees

Turn180 {Club Hauling}
perkTurn180
{
The character's ship can initiate a quick 90 degree turn by lowering the anchor on one side while moving. This can be done once every three minutes.
Use the "Fast Run" toggle button to choose the preferred side to turn to.
}
perkTurn180Locked
{
You can get this from a captain of an enemy ship if you are civilized | The character's ship can initiate a quick 90 degree turn by lowering the anchor on one side while moving.
}
 
In the AbilityDescribe.txt file
I found some repeated lines and also the definition below on line 120
I believe it should be "Quick Turn-Around" instead of "Club Hauling"
and that 90 degrees should also be 180 degrees
That is how it was in the stock game. The mod changes it to "Club Hauling", which does indeed involve dropping the anchor on one side to turn quickly. You'll see it being done in the film "Pirates of the Caribbean: Curse of the Black Pearl" when the Interceptor is being chased by the Black Pearl. And although it's still called "Turn180" in game code because nobody wanted to go through all the code looking for it and changing it to "Turn90", it does now result in a quick 90 degree turn, not 180 degrees. (Actually, it kicks the ship round 60 degrees. But the mod also accounts for the ship's inertia, so after the ability has finished, the ship continues turning for about another 30 degrees. So the overall effect is a quick 90 degree turn.)
 
In my translation I was inclined to replace one of the existing languages with PTBR.
I think it's more convenient to ask here: How do I include the PTBR language option in the language list?
 
That's likely to be tricky! For a start, you'll need to create folders "RESOURCE\INI\TEXTS\PORTUGUESE" and "PROGRAM\DIALOGS\PORTUGUESE". Those are where most of your translations will go. Individual storylines also have their own dialog folders, e.g "PROGRAM\Storyline\standard\DIALOGS", which will also need "PORTUGUESE" sub-folders for translations. But the single most important file is "RESOURCE\INI\TEXTS\PORTUGUESE\common.ini" because the game won't recognise that the language exists if it has no "common.ini". (Replace "PORTUGUESE" with whatever you want to call the language. Just make sure it is consistent throughout.)

Edit "PROGRAM\globals.c". Find this section:
Code:
#define ILANG_ENG   0
#define ILANG_RUS   1
#define ILANG_SPA   2
#define ILANG_FRA   3
#define ILANG_GER   4
#define ILANG_POL   5
#define ILANG_SWE   6

int iLangInterface = ILANG_ENG;
int GetInterfaceLanguage() { return iLangInterface; }
void SetInterfaceLanguage(int il) { if (il >= 0 && il < 7) iLangInterface = il; }
int iKeyboardLayout = iLangInterface;
int GetKeyboardLayout() { return iKeyboardLayout; }
void SetKeyboardLayout(int kl) { if (kl >= 0 && kl < 7) iKeyboardLayout = kl; }
Add a line something like '#define ILANG_PTBR 7'. In functions 'SetInterfaceLanguage' and 'SetKeyboardLayout', replace the 7 with 8.

In "PROGRAM\utils.c", look for anything involving ILANG. You may need to add extra code for ILANG_PTBR. Especially in function 'GetInterfaceLanguageName'.

I'll have to look to see if anything else needs to be added.
 
Did I understand correctly?
"New Horizons", "Beyond New Horizons" and "New Horizons on Maelstrom!" Are there different games (mods) based on "Pirates Of The Caribean", and should I choose one of them to change my original game?
 
That's likely to be tricky! For a start, you'll need to create folders "RESOURCE\INI\TEXTS\PORTUGUESE" and "PROGRAM\DIALOGS\PORTUGUESE". Those are where most of your translations will go. Individual storylines also have their own dialog folders, e.g "PROGRAM\Storyline\standard\DIALOGS", which will also need "PORTUGUESE" sub-folders for translations. But the single most important file is "RESOURCE\INI\TEXTS\PORTUGUESE\common.ini" because the game won't recognise that the language exists if it has no "common.ini". (Replace "PORTUGUESE" with whatever you want to call the language. Just make sure it is consistent throughout.)
I'm doing this little by little, first translating the interface text, then the dialog, there are more than 500 files and I'm doing it alone so it's going to take me a long time.
It seems that there are no Brazilians interested in helping with the translation.

I am aware of the tree structure that is needed for the resource to work, I don't know about other files that need to tell the soft where to find the selected language.

I looked at the "PROGRAM\utils.c" file and apparently it doesn't need additional lines of code because the behavior would be similar to the English language, and from what I observed the conditional instructions only have the other languages to change some characters (at least that was it that I understand), except for the "GetInterfaceLanguageName" function which needs to enumerate the languages.
 
"New Horizons", "Beyond New Horizons" and "New Horizons on Maelstrom!" Are there different games (mods) based on "Pirates Of The Caribean", and should I choose one of them to change my original game?
I'm doing a translation based on "New Horizons". "Beyond New Horizons" is basically the same thing, only in some places there is a different interface and a translation may be required for it, and there is also a different utf-8 encoding for all files (not ANSI). "New Horizons on Maelstrom!" - probably the same as Beyond New Horizons, only this is a different developer and he does not add new updates that Gray Roger includes, which is why a normal translation is impossible. It seems like he said that he would transfer everything when the translation was completed.
It's up to you... After checking the free play, I'll probably move on to "Beyond New Horizons".
 
I'm doing a translation based on "New Horizons". "Beyond New Horizons" is basically the same thing, only in some places there is a different interface and a translation may be required for it, and there is also a different utf-8 encoding for all files (not ANSI). "New Horizons on Maelstrom!" - probably the same as Beyond New Horizons, only this is a different developer and he does not add new updates that Gray Roger includes, which is why a normal translation is impossible. It seems like he said that he would transfer everything when the translation was completed.
It's up to you... After checking the free play, I'll probably move on to "Beyond New Horizons".
Translation to PTBR???
If so, we can join our efforts.
 
Back
Top