• 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

I've been playing and making several small corrections to my translation. I see that when I buy treasure information it doesn't mark the red X on the map, and it also doesn't mark "escort destination" and "cargo destination". I only saw the red X mark when the treasure was in Barbados.
Question: Is this a known bug or did I bug the game with the translation?
 
Last edited:
Mission:

"The tailor of Kralendijk asked me to get 333 units of cotton from somewhere and deliver it back to him for 51948 gold coins. But I have to deliver it before September 9, 1754 or I will receive nothing."

I bought the cotton and went back to the tailor. The dialogue required to deliver the product does not appear.
The same thing happened with the tailor from Oranjestad.

Can you help with this?

follow save.
 

Attachments

  • -=Player=- QuickSave.zip
    1.1 MB · Views: 70
Mission:

"The tailor of Kralendijk asked me to get 333 units of cotton from somewhere and deliver it back to him for 51948 gold coins. But I have to deliver it before September 9, 1754 or I will receive nothing."

I bought the cotton and went back to the tailor. The dialogue required to deliver the product does not appear.
The same thing happened with the tailor from Oranjestad.

Can you help with this?

follow save.
I don't know what happened, I went to another island, the cotton I bought was gone, I bought it again, and I accomplished the mission.
 
Perhaps you sold the cotton? If you normally use the "Auto Trade" button instead of buying and selling goods individually, this could easily happen. Or perhaps you had a second ship, some of the cotton was on that, and you sold the ship?
 
Perhaps you sold the cotton? If you normally use the "Auto Trade" button instead of buying and selling goods individually, this could easily happen. Or perhaps you had a second ship, some of the cotton was on that, and you sold the ship?
I don't know, the mission was to buy cotton and take it to Curacao, I went to the nearest island of Boneire, then the dialog didn't appear, so I went to Aruba and coincidentally acquired a similar mission by changing the amount of cotton, the dialog didn't appear either. I remember now that I was tired and sleepy, maybe I didn't click ok when I went to buy the cotton the first time.

By the way, the fact that the map doesn't mark X or cargo destination is probably due to the translation of the island's name, I don't know which file to restore the name to fix this.
 
There's an easy way to test that. Set the game back to English. Start a FreePlay as a merchant - if you choose named character Piers Downing or Valerie Downing, you start with an East Indiaman which will give you plenty of cargo space. You should easily be able to get a delivery mission.

Then switch the game back to Portuguese, start another FreePlay and do the same.

If you consistently see cargo destinations on the map when playing in English and never see them when playing in Portuguese, it's the translation. Upload "compile.log", "system.log", and "error.log" if it exists, and I'll take a look to see if those show any clues as to what is going wrong.

If you don't see destinations on the map when playing in English either, the problem is with the game itself, not your translation.
 
There's an easy way to test that. Set the game back to English. Start a FreePlay as a merchant - if you choose named character Piers Downing or Valerie Downing, you start with an East Indiaman which will give you plenty of cargo space. You should easily be able to get a delivery mission.

Then switch the game back to Portuguese, start another FreePlay and do the same.

If you consistently see cargo destinations on the map when playing in English and never see them when playing in Portuguese, it's the translation. Upload "compile.log", "system.log", and "error.log" if it exists, and I'll take a look to see if those show any clues as to what is going wrong.

If you don't see destinations on the map when playing in English either, the problem is with the game itself, not your translation.
This is a b15 problem that Hammie hasn't solved yet.
 
There's an easy way to test that. Set the game back to English. Start a FreePlay as a merchant - if you choose named character Piers Downing or Valerie Downing, you start with an East Indiaman which will give you plenty of cargo space. You should easily be able to get a delivery mission.

Then switch the game back to Portuguese, start another FreePlay and do the same.

If you consistently see cargo destinations on the map when playing in English and never see them when playing in Portuguese, it's the translation. Upload "compile.log", "system.log", and "error.log" if it exists, and I'll take a look to see if those show any clues as to what is going wrong.

If you don't see destinations on the map when playing in English either, the problem is with the game itself, not your translation.
I did as you described EN language, Freeplay, Piers Downing. I got a delivery mission and it didn't show the delivery point. I have been observing that several times the ship is pointed out on the map in a different place than where I actually am, in the screenshot below I am in Mertinique and the location of the ship indicates that I am very far from there.
I still think I improperly translated some file with locale names.

Interestingly, when the treasure was in Barbados, the X appeared.

By the way, I haven't tried incorporating the PTBR language into the game yet, I'm using my .CMD script and replacing the Spanish one.
 

Attachments

  • 1711055506700.png
    1711055506700.png
    647.7 KB · Views: 43
Last edited:
@Grey Roger the file "\BNH\PROGRAM\QUESTS\Quest Messages.h" contains text that in my opinion should be translated, I suppose it would be convenient for this file to be in "\BNH\resource\INI\TEXTS\ENGLISH\"
 
I don't think that file is used in "New Horizons", so it probably isn't used in BNH either. Look in "RESOURCE\INI\TEXTS\ENGLISH\globals.txt", where you should find all those quest messages plus some other text. Function 'GlobalStringConvert' translates messages using this file. For example, if you have the updated version of "PROGRAM\Storyline\standard\quests\both_reaction.c", at case "Seen_Black_Pearl" you will see:
Code:
Log_SetStringToLog(GlobalStringConvert("QUEST_MESSAGE7"));

By the way, I haven't tried incorporating the PTBR language into the game yet, I'm using my .CMD script and replacing the Spanish one.
I have! It was in "New Horizons", not BNH, but the scripts should still work.
 

Attachments

  • Portuguese scripts.zip
    126.3 KB · Views: 51
I don't think that file is used in "New Horizons", so it probably isn't used in BNH either. Look in "RESOURCE\INI\TEXTS\ENGLISH\globals.txt", where you should find all those quest messages plus some other text. Function 'GlobalStringConvert' translates messages using this file. For example, if you have the updated version of "PROGRAM\Storyline\standard\quests\both_reaction.c", at case "Seen_Black_Pearl" you will see:
Code:
Log_SetStringToLog(GlobalStringConvert("QUEST_MESSAGE7"));


I have! It was in "New Horizons", not BNH, but the scripts should still work.

I abandoned NH because it doesn't work on Windows 10 home and to run it I need to use a VM. Therefore, I am only working in BNH and I don't know if all files translated from BNH will work in NH.
I applied the scripts for PTBR in BNH, the game didn't even start. I believe Hammie will easily solve this.

By the way, I made a change to buttons 2 and 3, using a shovel and pickaxe, I think they are more useful.

Let me know when the next version(BNH) is released and I will make my translation available including several corrections that I have been making day-to-day, until then I will continue correcting any errors I find.
 
Last edited:
I abandoned NH because it doesn't work on Windows 10 home and to run it I need to use a VM. Therefore, I am only working in BNH and I don't know if all files translated from BNH will work in NH.
I applied the scripts for PTBR in BNH, the game didn't even start. I believe Hammie will easily solve this.

By the way, I made a change to buttons 2 and 3, using a shovel and pickaxe, I think they are more useful.

Let me know when the next version(BNH) is released and I will make my translation available including several corrections that I have been making day-to-day, until then I will continue correcting any errors I find.
Write to Hammie and he will add you to Github as a translator.
Here is an example of how I create a branch.
You can write to me on discord, I’ll explain in more detail, or look at this link Contributing to Beyond New Horizons
 
@Grey Roger
In the new BNH version I noticed that the Gunsmith_dialog.c and Hendrick Vanderdecken_dialog.c files have the dialog embedded.
I separated the dialog into .h files and adjusted the .c files
The files follow.
 

Attachments

  • Gunsmith_dialog & Hendrick Vanderdecken_dialog.zip
    7.6 KB · Views: 32
Thanks, @Peter Norton! :cheers

Someone else had pointed out that "Gunsmith_dialog.c" has the text embedded so I'd already separated it out into "Gunsmith_dialog.h", but I re-used the same lines for each quality change so they don't need to be duplicated. Here are my versions. But "Hendrick Vanderdecken_dialog.c" certainly also needed the same treatment, so thanks for that.

Could you also upload the Portuguese "dialog.h" files?
 

Attachments

  • Gunsmith_dialog.c
    20.4 KB · Views: 34
  • Gunsmith_dialog.h
    2.3 KB · Views: 32
Thanks, @Peter Norton! :cheers

Someone else had pointed out that "Gunsmith_dialog.c" has the text embedded so I'd already separated it out into "Gunsmith_dialog.h", but I re-used the same lines for each quality change so they don't need to be duplicated. Here are my versions. But "Hendrick Vanderdecken_dialog.c" certainly also needed the same treatment, so thanks for that.

Could you also upload the Portuguese "dialog.h" files?
Sorry for the duplicates, I separated the sentences and reassembled them with the variables indexed in Excel and I only saw the duplicates in the last lines.
Since I posted my PTBR translation here, many files have been changed, duplicated texts, files without translation, names that should not be translated, misinterpreted translation.
You'd better replace the previous one with this one. It is certain that there will be new adjustments in the future, and I have not yet translated WoodesRogers' story


By the way..
I left a significant amount of gold at the loan shark and I don't remember which city, is there any quick way to see this?
How do I loop scripts?
For better convenience I changed some weapon equipping keys, 3 and 4 equipping shovel and pickaxe.
I also changed 5 to equip "Brace of four horse pistols", but there is a difference between "pistol25" and "pistol25+3" so that if(CheckCharacterItem(Pchar,"pistol25")) does not equip "pistol25+3", nor even recognizes.
I think I can adjust this with a loop or case.
Obviously such an adjustment is only personal, unless someone wants to do the same.
 

Attachments

  • PORTUGUESE.zip
    1.8 MB · Views: 60
By the way..
I left a significant amount of gold at the loan shark and I don't remember which city, is there any quick way to see this?
Check your ship's log.

How do I loop scripts?
There are several ways. You can use 'for' to make a loop based on a count. For example, in "PROGRAM\Storyline\Ardent\quest\quests_reaction.c":
Code:
            for (n=1; n<7; n++)
            {
                temp = "m" + (rand(5) + 1);
                sld = LAi_CreateFantomCharacter(false, 1, true, true, 0.25, Nations[FRANCE].fantomModel.(temp), "reload", "reload2_back");
                LAi_group_MoveCharacter(sld, "FRANCE_SOLDIERS");
                GiveSoldierWeapon(sld, FRANCE);
                sld.id = "soldier" + n;
                sld.nation = FRANCE;
                SetRandomNameToCharacter(sld);
            }
Using variable 'n' to count from 1 to 6 (the loop exits when n reaches 7), create 6 French soldiers with unique ID's by adding the value of 'n' to the ID.

Or you can use 'while' to make a loop based on a condition. In "PROGRAM\QUESTS\quests_common.c":
Code:
            i = 0;
            has_town = false;
            while (!has_town && i < TOWNS_QUANTITY)
            {
                if (CheckAttribute(Towns[i],"id") && GetAttribute(Towns[i],"skiptrade")!=true && CheckAttribute(Towns[i],"nation") && sti(Towns[i].nation)==j) has_town = true;
                i++;
            }
This is part of the code to find a suitable nation for a cargo delivery quest. Integer variable 'i' is set to 0 and boolean variable 'has_town' is set to false. The loop continues so long as 'has_town' is still false and 'i' hasn't gone over the total number of towns in the game. If town number 'i' exists, trade is not blocked there and the town belongs to the correct nation, 'has_town' is set to true. The effect is that this checks if nation 'j' has at least one town which can trade.

For better convenience I changed some weapon equipping keys, 3 and 4 equipping shovel and pickaxe.
I also changed 5 to equip "Brace of four horse pistols", but there is a difference between "pistol25" and "pistol25+3" so that if(CheckCharacterItem(Pchar,"pistol25")) does not equip "pistol25+3", nor even recognizes.
I think I can adjust this with a loop or case.
Obviously such an adjustment is only personal, unless someone wants to do the same.
In my experience, you don't need to bother. Key 2 equips the best pistol you have. The game's idea of "best pistol" might not be your idea of "best pistol" - the game will usually prefer a musket if you're carrying one, even if you'd prefer a pistol. But a brace of four horse pistols beats a musket, so if you're carrying a brace of four horse pistols, pressing 2 should equip it.
 
In my experience, you don't need to bother. Key 2 equips the best pistol you have. The game's idea of "best pistol" might not be your idea of "best pistol" - the game will usually prefer a musket if you're carrying one, even if you'd prefer a pistol. But a brace of four horse pistols beats a musket, so if you're carrying a brace of four horse pistols, pressing 2 should equip it.
I have the rifle with scope, and the four pistols, there are situations in which I prefer the rifle and others in which I prefer the 4 pistols.
key 2 equips rifle, so I reprogrammed key 5 to equip 4 pistols, however I need to specify the quality of the pistol, with the code below I equip 4 pistols of the best quality I have. Is there any easier way to do this? I chose not to use case so as not to fill it with "break" and also from what I know (at least on the mainframe) "case" instructions unfold into a bunch of "if" statements in machine code, most of the time it results in the same instruction number of machine.

tmp = "pistol25";
for (i=3; i>-4; i--)
{
if(i>0) {temp = tmp + "+" + i;}
if(i==0) {temp = tmp;}
if(i==-3)
{
Logit(TranslateString("","You don't have an Brace of four horse pistols to equip."));
break;
}
if(i<0) {temp = tmp + i;} // I know this "if" should be above the previous one for better design, but it would execute 1 unnecessary statement
if(CheckCharacterItem(Pchar,temp))
{
EquipCharacterByItem(&PChar, temp);
Logit(TranslateString("", temp));
Logit(TranslateString("","You equipped an Brace of four horse pistols."));
break;
}
}
 
Perhaps put this part:
Code:
if(i==-3)
   {
       Logit(TranslateString("","You don't have an Brace of four horse pistols to equip."));
       break;
   }
... above all the checks on i. If i is -3 then the loop has not found any of the valid qualities and is about to break with the line that you don't have a brace of four pistols, so there's no point checking i>0, i==0 or i<0, nor any need to set temp.

Beyond that, check the log files. If there's nothing suspicious, and if the code does what you want when you press 5, leave it at that.
 
@Grey Roger
My translation was bugged in the mission "Strange Things going on in the Caribbean" dialogue DLG_TEXT[155] file "Father Bernard_dialog.h"
I changed the language to EN and the bug persists.
Could you be kind enough to check if it's my error or is it really bugged?
 
What sort of bug? That line certainly works in English, I've played that quest many times.
 
Back
Top