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

Need Help Updating the Russian Translation

1) In line 119 of the "Lair_crewmember.c" file, you need to remove the extra space between sentences.
d.Text = RandPhrase(TimeGreeting() + DLG_TEXT[8] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + " " + DLG_TEXT[9] + DLG_TEXT[10], DLG_TEXT[11] + DLG_TEXT[12], DLG_TEXT[13], &dialog, dialog.snd1, dialog.snd2, dialog.snd3);
2) After I send the carpenter to get the wood, an error occurs and "DLG_TEXT[10] + planksboarded + DLG_TEXT[11]" is not output.
1: True. Looking at English, Spanish and Russian "Lair_crewmember.h", DLG_TEXT[9] begins with a "." Remove that space.
2: In "error.log" are several copies of this:
Code:
RUNTIME ERROR - file: dialogs\Carpenter.c; line: 6
No data on this event
Lines 6 and 7 of "Carpenter.c" are:
Code:
    int iOurCharacterIndex = GetEventData();
    ref rOurCharacter = GetCharacter(iOurCharacterIndex);
'OurCharacter' is used in case "Planks":
Code:
            int casualties = makeint(sti(rOurCharacter.Ship.Crew.Quantity)* rand(3)/100 );    // a few men may die
            RemoveCharacterCrew(rOurCharacter,casualties);
See what happens if you delete lines 6 and 7, and in case "Planks", change that to:
Code:
            int casualties = makeint(sti(PChar.Ship.Crew.Quantity)* rand(3)/100 );    // a few men may die
            RemoveCharacterCrew(PChar,casualties);
That should apply crew casualties to your ship, which is consistent with what happens to the planks:
Code:
            AddCharacterGoods(Pchar, GOOD_PLANKS, makeint(planksboarded));

Also remove this lot:
Code:
            // NK -->
            }
            else
            {
                dialog.text = DLG_TEXT[14] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[15];
                Link.l1 = DLG_TEXT[16];
                Link.l1.go = "exit";
            }
            // NK <--
That appears to be copied from normal trader dialog, except trader dialog uses that dialog if you are hostile. Your carpenter will not be from a nation hostile to you! So this code is not needed.
 
1: True. Looking at English, Spanish and Russian "Lair_crewmember.h", DLG_TEXT[9] begins with a "." Remove that space.
2: In "error.log" are several copies of this:
Code:
RUNTIME ERROR - file: dialogs\Carpenter.c; line: 6
No data on this event
Lines 6 and 7 of "Carpenter.c" are:
Code:
    int iOurCharacterIndex = GetEventData();
    ref rOurCharacter = GetCharacter(iOurCharacterIndex);
'OurCharacter' is used in case "Planks":
Code:
            int casualties = makeint(sti(rOurCharacter.Ship.Crew.Quantity)* rand(3)/100 );    // a few men may die
            RemoveCharacterCrew(rOurCharacter,casualties);
See what happens if you delete lines 6 and 7, and in case "Planks", change that to:
Code:
            int casualties = makeint(sti(PChar.Ship.Crew.Quantity)* rand(3)/100 );    // a few men may die
            RemoveCharacterCrew(PChar,casualties);
That should apply crew casualties to your ship, which is consistent with what happens to the planks:
Code:
            AddCharacterGoods(Pchar, GOOD_PLANKS, makeint(planksboarded));

Also remove this lot:
Code:
            // NK -->
            }
            else
            {
                dialog.text = DLG_TEXT[14] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[15];
                Link.l1 = DLG_TEXT[16];
                Link.l1.go = "exit";
            }
            // NK <--
That appears to be copied from normal trader dialog, except trader dialog uses that dialog if you are hostile. Your carpenter will not be from a nation hostile to you! So this code is not needed.
The text also does not appear.
Perhaps with "Lair_crewmember3.c" something is also wrong.
 

Attachments

  • error.log
    412 bytes · Views: 13
  • error1.log
    554 bytes · Views: 12
I'm not sure why "Carpenter.c" is now complaining about a variable. The only variable on line 50 is "planksboarded" which is defined on line 48.

"Lair_crewmember3.c" does indeed have the same problem that "Lair_crewmember.c" had. Try these versions of the files.

(Edit: "Carpenter.c" deleted. A newer version is in a later post.)
 

Attachments

  • Lair_crewmember3.c
    3.3 KB · Views: 12
Last edited:
"Lair_crewmember3.c" does indeed have the same problem that "Lair_crewmember.c" had. Try these versions of the files.
Everything is fine here now.
I'm not sure why "Carpenter.c" is now complaining about a variable. The only variable on line 50 is "planksboarded" which is defined on line 48.
On line 92, you commented out “}”, which caused an empty dialog.
After correction, the sound of a monkey appeared, but displays the letter "e" instead of the text.
RUNTIME ERROR - file: dialogs\Carpenter.c; line: 50
Global variable not found
RUNTIME ERROR - file: dialogs\Carpenter.c; line: 50
Unknown data type
RUNTIME ERROR - file: battle_interface\loginterface.c; line: 189
Unknown data type
RUNTIME ERROR - file: battle_interface\loginterface.c; line: 189
CreateMessage: Invalid Data
 

Attachments

  • 1740405689479.png
    1740405689479.png
    633.3 KB · Views: 20
On line 92, you commented out “}”, which caused an empty dialog.
After correction, the sound of a monkey appeared, but displays the letter "e" instead of the text.
RUNTIME ERROR - file: dialogs\Carpenter.c; line: 50
Global variable not found

The mistake was not commenting out the "}", but failing to spot this line:
Code:
if(TradeCheck(PChar, NPChar, true)) { // NK
Comment that out as well. That's the line which checks if you are hostile and should not be in a dialog with your own officer. (In a trader dialog, this line is why, if you are in a hostile port, the trader will sometimes refuse to trade with you.)

The attached version now moves the declaration of "planksboarded" (and, for good measure, "casualties" as well) up to the rest of the variable declarations. See if that helps.
(Edit: it didn't work. Deleted. A newer version is attached in another post.)
 
Last edited:
The mistake was not commenting out the "}", but failing to spot this line:
Code:
if(TradeCheck(PChar, NPChar, true)) { // NK
Comment that out as well. That's the line which checks if you are hostile and should not be in a dialog with your own officer. (In a trader dialog, this line is why, if you are in a hostile port, the trader will sometimes refuse to trade with you.)

The attached version now moves the declaration of "planksboarded" (and, for good measure, "casualties" as well) up to the rest of the variable declarations. See if that helps.
No, unfortunately does not work. In compile.log writes that the dialogue file cannot find.
 

Attachments

  • error.log
    1.6 KB · Views: 13
  • compile.log
    4.1 KB · Views: 13
No, unfortunately does not work. In compile.log writes that the dialogue file cannot find.
Fixed!

The problem was not with variables "planksboarded" or "casualties". "Lair_crewmember3.c" does the same, though it has "foodboarded" instead of "planksboarded". But it uses two pieces of text translated from "interface_strings.txt", while "Carpenter.c" uses two "DLG_TEXT" references. I tried replacing them with hard-coded pieces of text:
Code:
Log_SetStringToLog("We got " + planksboarded + " planks");
... and...
Code:
Log_SetStringToLog("but " + casualties + " men were lost in the jungle");
And that worked. It doesn't matter that they aren't translated because that's not the final version. The reason that the "DLG_TEXT" references didn't work is that case "Planks" has this at the top:
Code:
Diag.CurrentNode = Diag.TempNode;
NPChar.quest.meeting = NPC_Meeting;
DialogExit();
The dialog is closed, so "DLG_TEXT" no longer exists. I moved those lines to the end of case "Planks", put back the "DLG_TEXT" references, and then it worked.
 

Attachments

  • Carpenter.c
    3 KB · Views: 17
1) Alice Town is not displayed in the fast travel menu if I have a Spanish flag. The town only appears after changing the flag to English.
2) If you die while going through the mission to rescue Roxanne and you have revival enabled, the character won't go to the tavern and the menu won't open.
 

Attachments

  • 1741111360952.png
    1741111360952.png
    609.7 KB · Views: 3
  • 1741111372147.png
    1741111372147.png
    634.5 KB · Views: 5
  • 1741111648592.png
    1741111648592.png
    786.4 KB · Views: 5
1: Odd. It was already known that if a location's type is "port", it won't show up it you're flying a hostile flag:
Fixed - Unable to sail to Peninsula de Zapata
Apparently "town" does the same. In normal ports, that's because if you're flying a hostile flag, the fort will appear instead. But not if the place has no fort. Oranjestad will do the same.

I'm in the process of looking at "BattleInterface.c" to try to make it check if a town has a fort before blocking fast travel to it. Having said that, consider: in reality, even if Alice Town has no fort, it does have a garrison. If you approach under a Spanish flag, they're alerted and you should be facing a couple of dozen muskets when you walk onto the pier. (Besides, why is Bartolomeu flying a Spanish flag while trying to enter an English port? He's Portuguese. He should be flying a Portuguese flag unless he's trying to sneak into a Spanish port. ;))

2: At first I thought that might be intentional because if you are killed at that point and you resurrect, you might not be able to get the key from the fort commandant, which would break the quest. However, I can't see any code anywhere near that part of "quests_reaction.c" to disable resurrection or disable the menu. Possibly resurrection doesn't work properly from the fort. It's not the normal fort location for Eleuthera, it's a special quest version of the location.

@Bartolomeu o Portugues: possibly disable resurrection during the attack on the fort so that at least if you are killed, the game can end properly?
 
Having said that, consider: in reality, even if Alice Town has no fort, it does have a garrison. If you approach under a Spanish flag, they're alerted and you should be facing a couple of dozen muskets when you walk onto the pier.
On the other hand, even if you can't fast-travel to Alice Town, you can sail there manually and land unopposed. So, try this version of "PROGRAM\BATTLE_INTERFACE\BattleInterface.c", which should only block fast-travel to a hostile port if it has a fort. I tried it with a different savegame in which I'm testing a new ship type - I sailed to Eleuthera, raised a pirate flag, then tried fast-travel, and it showed me Governor's Harbour fort and Alice Town port. (You'll see Puerto La Cruz instead of Governor's Harbour because you're playing in "Spanish Main" period while I'm in "Golden Age of Piracy".)
 

Attachments

  • BattleInterface.c
    107.3 KB · Views: 3
Back
Top