• 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

What sort of bug? That line certainly works in English, I've played that quest many times.
I encountered the problem with the Spanish language.
on line 71 and 72 of the file "Father Bernard_dialog.h";
In the Spanish version "Father" is translated, until now I had problems translating this term, and this time it came up because it is not translated.
The correct translation to "padre" would be because no one here calls a priest "Father", whatever their class.
 
Lines 70 and 71 should not be translated. They're not the character's name, they're his ID. From "Father Bernard_dialog.c":
Code:
dialog.text = DLG_TEXT[69] + GetMyFullName(&Characters[GetCharacterIndex(DLG_TEXT[70])]) + DLG_TEXT[72];
So it looks up character "Padre Domingues", which is defined in "PROGRAM\Characters\init\IslaMuelle.c":
Code:
    ch.name = TranslateString("","Padre");
    ch.lastname = TranslateString("","Domingues");
    ch.id        = "Padre Domingues";

In the most recent version of "Father Bernard_dialog.h" which I got from you, lines 70 and 71 are:
Code:
"Father Domingues",
"Father Domingues",
Unless you have changed "IslaMuelle.c" to match, the dialog will not give Padre Domingues' name because it can not find character "Father Domingues". And if you have changed it, that's probably why Father Bernard is calling him "Father".

As for line 155:
Code:
"Obrigado, #sFather#. Estou disponível para ajudá-lo novamente imediatamente, mas também gostaria de receber algumas informaçoes sobre algo que estou investigando pessoalmente. Disseram-me que você pode me ajudar.",
"#sFather#" is a preprocessed variable set at the top of "Father Bernard_dialog.c":
Code:
Preprocessor_Add("Father", GetMyFirstNames(CharacterFromID("Father Bernard"), false));
Character "Father Bernard" is defined in "PROGRAM\Characters\init\Redmond.c":
Code:
    ch.name = TranslateString("","Father");
    ch.lastname = TranslateString("","Bernard");
    ch.id        = "Father Bernard";

People in Portugal and Spain would refer to their priests as "Padre", but people in Britain would call their priests "Father". That includes people in British colonies such as Port Royale. But if you're playing a FreePlay in "Early Explorers" period, that town is Spanish, as is the priest, so his name is changed to "Padre". This is why the preprocessed variable is used. It means the dialog will work whether the character is a British Father or a Spanish Padre.
 
What sort of bug? That line certainly works in English, I've played that quest many times.
File ItemsDescribe.txt line 30
A letter from #sFatherBernard# to Padre Domingues.

File Father Bernard_dialog.h line 12
"I need to talk to you, #sFather#.",

In which file is the string that replaces #sFatherBernard# and #sFather#?
 
As I said, "#sFather#" is set near the top of "Father Bernard_dialog.c" to be Father Bernard's first name.

"#sFatherBernard#" is set in "PROGRAM\utils.c" to be Father Bernard's full name:
Code:
Preprocessor_Save("FatherBernard",    GetMySimpleName(CharacterFromID("Father Bernard")));
Both his first name (translated version of "Father") and last name (translated version of "Bernard") are set in "Redmond.c".

Both "Father" and "Bernard" are translated in "RESOURCE\INI\TEXTS\PORTUGUESE\characters_names.txt".
 
Lines 70 and 71 should not be translated. They're not the character's name, they're his ID. From "Father Bernard_dialog.c":
Code:
dialog.text = DLG_TEXT[69] + GetMyFullName(&Characters[GetCharacterIndex(DLG_TEXT[70])]) + DLG_TEXT[72];
So it looks up character "Padre Domingues", which is defined in "PROGRAM\Characters\init\IslaMuelle.c":
Code:
    ch.name = TranslateString("","Padre");
    ch.lastname = TranslateString("","Domingues");
    ch.id        = "Padre Domingues";

In the most recent version of "Father Bernard_dialog.h" which I got from you, lines 70 and 71 are:
Code:
"Father Domingues",
"Father Domingues",
Unless you have changed "IslaMuelle.c" to match, the dialog will not give Padre Domingues' name because it can not find character "Father Domingues". And if you have changed it, that's probably why Father Bernard is calling him "Father".

As for line 155:
Code:
"Obrigado, #sFather#. Estou disponível para ajudá-lo novamente imediatamente, mas também gostaria de receber algumas informaçoes sobre algo que estou investigando pessoalmente. Disseram-me que você pode me ajudar.",
"#sFather#" is a preprocessed variable set at the top of "Father Bernard_dialog.c":
Code:
Preprocessor_Add("Father", GetMyFirstNames(CharacterFromID("Father Bernard"), false));
Character "Father Bernard" is defined in "PROGRAM\Characters\init\Redmond.c":
Code:
    ch.name = TranslateString("","Father");
    ch.lastname = TranslateString("","Bernard");
    ch.id        = "Father Bernard";

People in Portugal and Spain would refer to their priests as "Padre", but people in Britain would call their priests "Father". That includes people in British colonies such as Port Royale. But if you're playing a FreePlay in "Early Explorers" period, that town is Spanish, as is the priest, so his name is changed to "Padre". This is why the preprocessed variable is used. It means the dialog will work whether the character is a British Father or a Spanish Padre.
From what I understand, it would be very difficult to replace all “father” with “padre”, which would be correct in the PTBR language.
Several sentences translated into PTBR have "father" in the middle.
The bug I mentioned was fixed with lines 72 and 73 changed to:
"Padre Domingues",
"Padre Domingues",
 
On the contrary, it should be very easy. Edit "RESOURCE\INI\TEXTS\PORTUGUESE\characters_names.txt" and find the translation for "Father". Change it to "Padre". You'll need to start a new game for it to take effect. Then character "Father Bernard" should show up in the game as Padre Bernard and you'll call him "Padre" in the dialog.
 
Something that has been bothering me is this empty line that appears in some dialogues. I couldn't understand what caused this.
 

Attachments

  • 1715269300607.png
    1715269300607.png
    432.5 KB · Views: 36
My translation made the option to reset the sword attack button, default mouse button 1, disappear. I have no idea what caused this
The sword attack works normally

line 92 in "init_pc.c":
CI_CreateAndSetControls( "FightModeControls", "ChrAttackFast", CI_GetKeyCode(CTL_FIGHT_ATTACK), 0, true );

replacing with:
CI_CreateAndSetControls( "FightModeControls", "ChrAttack", CI_GetKeyCode(CTL_FIGHT_ATTACK), 0, true );

the button reappears, however I believe that doing this will result in a runtime error.

I found the problem.
I don't see how to delete the post.
 

Attachments

  • 1715648352717.png
    1715648352717.png
    542.5 KB · Views: 52
Last edited:
@AkrimalS
I think you are the right person to ask this.
File questbook Patric.txt line 4.
In which file is the string #sFrench# defined??

text.t3=For a minor fee I’ve agreed to help a #sFrench# merchant named #sPatric Cardone# retrieve some statuary he’d been commissioned to get, and then had stolen from him. I suspect he was double-crossed. I need to find a man who’s a tall Spaniard with long, black hair and a scar on his face named Teodoro Fernandez.
 
@AkrimalS
I think you are the right person to ask this.
File questbook Patric.txt line 4.
In which file is the string #sFrench# defined??

text.t3=For a minor fee I’ve agreed to help a #sFrench# merchant named #sPatric Cardone# retrieve some statuary he’d been commissioned to get, and then had stolen from him. I suspect he was double-crossed. I need to find a man who’s a tall Spaniard with long, black hair and a scar on his face named Teodoro Fernandez.
This is somewhere in common.ini, perhaps line 1003. But for the Russian version I completely removed this variable, since it was not suitable. In principle, it is not so important what nationality the merchant is, only the name is important. You can do something like this:
For a modest reward, I will have to help a merchant named #sPatric Cardone#.
 
It's defined in "PROGRAM\DIALOGS\patric cardone_dialog.c" but I forgot to put 'XI_ConvertString' into the definition to make it translatable. Try this version.

String "#sFrench#" is used for more than just that line, and it needs to be variable because the island is Spanish if you're playing in "Early Explorers". The character's name "#sPatric Cardone#" is variable for the same reason; in "Early Explorers", he gets a different, random Spanish name.
 

Attachments

  • patric cardone_dialog.c
    14.1 KB · Views: 36
It's defined in "PROGRAM\DIALOGS\patric cardone_dialog.c" but I forgot to put 'XI_ConvertString' into the definition to make it translatable. Try this version.

String "#sFrench#" is used for more than just that line, and it needs to be variable because the island is Spanish if you're playing in "Early Explorers". The character's name "#sPatric Cardone#" is variable for the same reason; in "Early Explorers", he gets a different, random Spanish name.
Mission "Patric and the idols".
After the dialogue with Antoine Lebretton, the mission book is updated with errorerror, as shown in the screenshot below.
View attachment 44315

I think there is some error in the Antoine Lebretton_dialog.c script, line 522.
AddQuestRecord("Patric", 4); // NK
There is no text.t4 the options are:
text.t3
text.t4.p1
text.t4.p2
text.t5

I think you'll need my savegame Freeplay
 

Attachments

  • -=Player=- QuickSave.zip
    961.4 KB · Views: 41
Last edited:
Mission "Patric and the idols".
After the dialogue with Antoine Lebretton, the mission book is updated with errorerror, as shown in the screenshot below.
View attachment 44315
There is no attachment so I can't see the picture.

Can you upload "error.log"? That may show the problem.

I think there is some error in the Antoine Lebretton_dialog.c script, line 522.
AddQuestRecord("Patric", 4); // NK
There is no text.t4 the options are:
text.t3
text.t4.p1
text.t4.p2
text.t5
I'm not sure, but I believe that's because text.t4 is very long and is split into two parts.
 
There is no attachment so I can't see the picture.

Can you upload "error.log"? That may show the problem.


I'm not sure, but I believe that's because text.t4 is very long and is split into two parts.
Excuse me
1716210540709.png



I edited the \QUESTBOOK\Patric.txt file
I removed the line text.t4.p2
I changed text.t4.p1 to text.t4
and it worked as expected
 
Last edited:
Can you upload "error.log" after talking to Antoine Lebretton?
[2024-05-20 08:43:37.704] [error] [error] RUNTIME ERROR in <no debug information>(1): missed attribute: t4
[2024-05-20 08:43:37.705] [error] [error] RUNTIME ERROR in <no debug information>(1): no rAP data
[2024-05-20 08:43:37.705] [error] [error] RUNTIME ERROR in <no debug information>(1): missed attribute: t4
[2024-05-20 08:43:37.705] [error] [error] RUNTIME ERROR in <no debug information>(1): no rAP data
[2024-05-20 08:50:49.863] [error] [error] RUNTIME ERROR in <no debug information>(1): missed attribute: t4
[2024-05-20 08:50:49.863] [error] [error] RUNTIME ERROR in <no debug information>(1): no rAP data
[2024-05-20 08:50:49.864] [error] [error] RUNTIME ERROR in <no debug information>(1): missed attribute: t4
[2024-05-20 08:50:49.864] [error] [error] RUNTIME ERROR in <no debug information>(1): no rAP data
[2024-05-20 08:57:18.792] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:18.792] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:18.792] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:18.792] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:18.792] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:18.792] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:18.792] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:18.792] [error] [error] COMPILE ERROR in <no debug information>(1): invalid syntax
[2024-05-20 08:57:19.760] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:19.761] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:19.761] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:19.761] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:19.761] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:19.761] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:19.761] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:19.761] [error] [error] COMPILE ERROR in <no debug information>(1): invalid syntax
[2024-05-20 08:57:24.930] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:24.930] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:24.930] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:24.930] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:24.930] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:24.930] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:24.930] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:24.930] [error] [error] COMPILE ERROR in <no debug information>(1): invalid syntax
[2024-05-20 08:57:28.150] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:28.150] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:28.150] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:28.150] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:28.150] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:28.150] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:28.150] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:28.150] [error] [error] COMPILE ERROR in <no debug information>(1): invalid syntax
[2024-05-20 08:57:38.112] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:38.112] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:38.112] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:38.112] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:38.112] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:38.112] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:38.112] [error] [error] COMPILE ERROR in <no debug information>(1): Invalid Expression
[2024-05-20 08:57:38.112] [error] [error] COMPILE ERROR in <no debug information>(1): invalid syntax
[2024-05-20 09:01:31.932] [error] [error] RUNTIME ERROR in <no debug information>(1): missed attribute: t4
[2024-05-20 09:01:31.932] [error] [error] RUNTIME ERROR in <no debug information>(1): no rAP data
 
@Grey Roger

I think there is a sequential inconsistency.
I did the mission to investigate smuggling for the port chief after talking to ORABLE CARON, "Raoul Calmes" was arrested.

So in the mission "Patric and the idols" after talking to the tavern keeper I talk to Patric he says "! He went into that house to the left of the church!", this is the house of "Raoul Calmes", and it is empty because he was arrested. There is no error but I find it incoherent.
 
I'll try that quest to see if the questbook line appears correctly in Build 14. If not, the "t4.p1" line can be changed to "t4", the "t4.p2" line can be changed to a different number, and "Antoine Lebretton_dialog.c" can add both lines separately. It won't look as nice as there will be a gap between the lines as they will then be separate entries. But if it does work in Build 14 then there is a problem with Build 15's use of questbooks.

There's certainly a problem with Build 15's reporting of errors. Where "error.log" says "<no debug information>", it should show the name of the file which produced the error.

So in the mission "Patric and the idols" after talking to the tavern keeper I talk to Patric he says "! He went into that house to the left of the church!", this is the house of "Raoul Calmes", and it is empty because he was arrested. There is no error but I find it incoherent.
Technically that's not an error - Patric tells you that he saw Teodoro Fernandez going into the house. Perhaps Teodoro Fernandez did not know that Raoul Calmes had just been arrested. We know from talking to Raoul Calmes that there is a back door, even though you can't go through it, so perhaps Teodoro Fernandez left that way this time as well.

However, since the purpose of that dialog line is to send you to see Raoul Calmes and get his letter, there's no point if you have already talked to Orable Caron and then told Turpin Cabanel about Raoul Calmes. The line in "patric cardone_dialog.c" which produces that dialog already has a condition and will not give that line if you have already visited Raoul Calmes; it should be possible to add a second condition that Raoul Calmes is still in the house. I'll try adding the line, then check that it works when I try the quest myself.
 
I'll try that quest to see if the questbook line appears correctly in Build 14. If not, the "t4.p1" line can be changed to "t4", the "t4.p2" line can be changed to a different number, and "Antoine Lebretton_dialog.c" can add both lines separately. It won't look as nice as there will be a gap between the lines as they will then be separate entries. But if it does work in Build 14 then there is a problem with Build 15's use of questbooks.

There's certainly a problem with Build 15's reporting of errors. Where "error.log" says "<no debug information>", it should show the name of the file which produced the error.


Technically that's not an error - Patric tells you that he saw Teodoro Fernandez going into the house. Perhaps Teodoro Fernandez did not know that Raoul Calmes had just been arrested. We know from talking to Raoul Calmes that there is a back door, even though you can't go through it, so perhaps Teodoro Fernandez left that way this time as well.

However, since the purpose of that dialog line is to send you to see Raoul Calmes and get his letter, there's no point if you have already talked to Orable Caron and then told Turpin Cabanel about Raoul Calmes. The line in "patric cardone_dialog.c" which produces that dialog already has a condition and will not give that line if you have already visited Raoul Calmes; it should be possible to add a second condition that Raoul Calmes is still in the house. I'll try adding the line, then check that it works when I try the quest myself.
option off, now on

[2024-05-20 23:36:56.300] [error] [error] RUNTIME ERROR in quests\quests.c(1818): missed attribute: t4
[2024-05-20 23:36:56.300] [error] [error] RUNTIME ERROR in quests\quests.c(1818): no rAP data
[2024-05-20 23:36:56.301] [error] [error] RUNTIME ERROR in quests\quests.c(1818): missed attribute: t4
[2024-05-20 23:36:56.301] [error] [error] RUNTIME ERROR in quests\quests.c(1818): no rAP data


1716259824452.png


Single solution, insert \n
text.t4= The Tavern is always a good place to go for information, but the owner, #sAntoine Lebretton#, needed some assistance with his memory. Golden assistance. Though he didn’t recognize the name ‘Teodoro Fernandez’, and laughed outright at the ‘tall dark scarred Spaniard’ bit, he commented that a stranger named Geronimo Elcano might just be my man. Elcano’d rented a room for a night, and left after speaking to one #sLucien Bescanceny#. #sAntoine# said #sBescanceny# is dangerous...I told him my middle name’s dangerous!\n#sAntoine# then looked at his room registry, and told me what my middle name is actually listed as...I got directions to #sBescanceny#’s house. Upon leaving the Tavern, I’m to turn to my right and go through first one, then another set of city gates. He lives in a house on the other side of that second set of doors. I’m kicking myself for registering for my tavern room using my middle name. Must have been the wine I had to drink to get the scoop out of #sAntoine#...
 
Last edited:
Good, then any other questbooks which use the "p1" and "p2" attributes to split a long line can have the same fix in Build 15.

The "p1" and "p2" attributes certainly work in Build 14, which can't handle such long single lines in questbooks. When I played this sidequest, the questbook entry about Antoine Lebretton appeared perfectly.

Now see what happens when you go to Lucien Bescanceny and fight him. For some reason, none of the names are filled in - yet if I choose the dialog path which allows me to make a deal with him and leave peacefully, it uses the exact same code to fill in the names in the exact same questbook line and does it successfully. I've still to figure out a way to work around this in Build 14. Let me know if Build 15 has the same problem.
 
Back
Top