• 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 Smuggler ship in "Smuggling For Thomas O'Reily" sunk by fort

Grey Roger

Sea Dog
Staff member
Administrator
Storm Modder
In "Smuggling for Thomas O'Reily", assuming you chose to stick with him rather than give in to the smuggler gang on the beach, you end up having to capture a ship. You've probably just left Port Royale port. So you're near the fort, and so is the smuggler's ship, which is flying a pirate flag. If you don't get into position to board it really quickly (and if you don't have the "Instant Boarding" perk), the fort will soon sink the ship.

Suggestion: give the ship a Personal flag instead. That should mean its relations are the same as yours. If you're friendly to Britain, the fort won't fire on the ship. If you're not, either you're moored at a beach, or you're in a battleship and got into port by destroying the fort - either way, the fort won't fire on the ship. Also set both the "recognized" and "skipRM" attributes for the captain, so he will attack you and there shouldn't be any weirdness resulting from you sinking or capturing a "Personal" ship.
 
Maybe there's also a possibility to use 'PRIVATEER_NATION' which I think was intended for situations like this.
But I'm not sure how well that works...
 
Assuming that "PRIVATEER_NATION" works at all, what are its international relations?
 
Assuming that "PRIVATEER_NATION" works at all, what are its international relations?
Haven't a clue. I don't think they're set, so probably hostile to all by default which of course doesn't help you.
But if it is created as a more proper nation, I imagine custom relations could be set prior to the encounter.
 
Hmm... maybe use 'SetNationRelationBoth(ENGLAND, PRIVATEER_NATION, RELATION_NEUTRAL);' to make Britain peaceful to the smuggler. It would need to be done right at the quest case in which the ship spawns because if this works, I'm going to use it again in the "Assassin" storyline. You go to Sao Jorge to sabotage a ship which is pretending to be not French by flying a Personal flag, and the fort starts shooting at it because you're hostile to Portugal. So, set PRIVATEER_NATION to have the same relations as France, and it effectively becomes a French ship flying a Personal flag.
 
Sounds like it's worth a try!

If it doesn't work, perhaps copying the personal nation init entry for privateer would help.
Otherwise I could imagine there kind-of is no nation to change the relatations for.
 
It appears to work. Here's what I added at case "thomas_contraband_12_exit_2", which is where the sea battle is set up:
Code:
           NPChar = CharacterFromID("Pirate Captain 04");
           NPChar.recognized = true;
           NPChar.nation = PRIVATEER_NATION;
           SetNationRelationBoth(ENGLAND, PRIVATEER_NATION, RELATION_NEUTRAL);
           if(sti(GetAttribute(PChar, "flags.personal")) == 6 && sti(GetAttribute(PChar, "flags.personal.texture")) == 1)
           {
               NPChar.flags.personal = 1;
               NPChar.flags.personal.texture = 2;
           }
           else
           {
               NPChar.flags.personal = 6;
               NPChar.flags.personal.texture = 1;
           }
           NPChar.skipRM = true;
The smuggler captain is set to PRIVATEER_NATION, and PRIVATEER_NATION is set to be neutral to Britain. The captain has a choice of two flags. Normally he uses the one with red at the top and bottom, a black bar across the middle, and three white crossbones. If you're using that then he uses the red one with the raised sword arm instead. The "recognized" attribute makes him attack you regardless of your flag, and the "skipRM" attribute means you're not penalised for attacking him if you're flying a British flag.

First test: the fort didn't fire at him, he fired at me, and I got a warning about firing on a friendly ship when I fired back - I was flying a British flag and at that point I'd forgotten to add the "skipRM". :facepalm

Second test: the fort didn't fire at him, he fired at me, I fired back, and I didn't get the warning because I'd now added "skipRM".

Third test: I'd used a console command to turn Britain hostile to me, though I was still flying a (now false) British flag. The fort didn't fire at him, he fired at me. When I hoisted a Personal flag, the fort started shooting at me, proving that the fort was hostile to Personal (me) but not to him, even though he was flying a Personal flag, because he was doing so as a result of being PRIVATEER_NATION.

So it seems to work as intended. Now I need to add something similar to "Assassin" - the not-French ship doesn't need to be hostile to me so the "recognized" and "skipRM" attributes won't be needed, but it does need to be PRIVATEER_NATION to avoid the silliness of the fort firing at the warship because it thinks the warship is me.
 
It doesn't work as well as I'd hoped. In another test, I did what I normally do when boarding a ship that doesn't need to be boarded in a hurry, which is soften up the crew with a few broadsides of grapeshot. The smuggler ship surrendered. And I couldn't board it. It showed up non-hostile on the compass but I never got a boarding icon, even if I sailed right next to it - which you don't normally need to do anyway when taking a surrendered ship.

I couldn't save and reload the game, either. It was as if the battle was still in progress. Maybe there was another hostile ship somewhere around, though if there was, I couldn't see it.

As a quick fix, I added the "nosurrender" attribute to the captain. That bug when the ship surrenders won't happen if the ship can't surrender...
 
Does that happen also if you do this?
Code:
SetNationRelationBoth(PERSONAL_NATION, PRIVATEER_NATION, RELATION_ENEMY);
 
Will that work if I'm flying something other than a Personal flag? I almost never do that, and anyway a player who is hostile to Britain won't get into Port Royale except under a false British (or allied nation) flag.
 
Will that work if I'm flying something other than a Personal flag?
I'm hoping it will. From what I understand, you can board a surrendered ship if its original nation was hostile to you personally.
I don't know that for certain, but it could be worth a try...
 
It didn't work. For that matter, I'm not so sure that you can board a surrendered ship which was originally hostile to you personally. Suppose, for example, you're under a false French flag and you run into a battle between French and British ships. Normally you're hostile to France and friendly to Britain, and you don't want to lose your British LoM, so you stay out of it. If a British ship surrenders, you can board it (and probably lose your LoM in the process). If a French ship surrenders, I don't think you can board it, even though you're normally hostile to France.

So the smuggler ship surrenders but still won't let me board. It's hostile to me but neutral to Britain, that being the whole idea, so that the fort doesn't sink it before you can board it. And I'm flying a British flag. It might let me board if I fly a Personal flag, or for that matter anything other than British, but anyone sailing into Port Royale is probably flying a British flag. (Remember your advice to anyone entering a hostile port - fly that port's flag, so the fort doesn't log you as being another, currently friendly nation, and then attack you if that nation becomes hostile to this port later. Me, I'm friendly to Britain, but I never use a Personal flag except occasionally for testing.)
 
@Bartolomeu o Portugues: have you any objection to the following fix to "Assassin"?

At case "manovela":
Code:
//           Characters[GetCharacterIndex("Aurelien Bergerat")].nation = PERSONAL_NATION;
           Characters[GetCharacterIndex("Aurelien Bergerat")].nation = PRIVATEER_NATION;
           SetNationRelationBoth(PORTUGAL, PRIVATEER_NATION, RELATION_NEUTRAL);
           Characters[GetCharacterIndex("Aurelien Bergerat")].ship.name = "A Desconhecida";
This is La Fougueuse, the ship France covertly sends to help Sao Jorge, though when you get to Sao Jorge, the ship has changed both name and appearance. If it's set to PERSONAL_NATION then the fort thinks that ship is you. And if you're hostile to Portugal, the fort will attack it.

Setting the ship to PRIVATEER_NATION, and setting PRIVATEER_NATION neutral to Portugal, should mean it will fly the same Personal flag that it has been given, but the fort won't attack it. It's the same fix that I applied to prevent Port Royale fort from attacking the smuggler ship in the "Smuggling for Thomas O'Reily" sidequest.
 
@Bartolomeu o Portugues: have you any objection to the following fix to "Assassin"?

At case "manovela":
Code:
//           Characters[GetCharacterIndex("Aurelien Bergerat")].nation = PERSONAL_NATION;
           Characters[GetCharacterIndex("Aurelien Bergerat")].nation = PRIVATEER_NATION;
           SetNationRelationBoth(PORTUGAL, PRIVATEER_NATION, RELATION_NEUTRAL);
           Characters[GetCharacterIndex("Aurelien Bergerat")].ship.name = "A Desconhecida";
This is La Fougueuse, the ship France covertly sends to help Sao Jorge, though when you get to Sao Jorge, the ship has changed both name and appearance. If it's set to PERSONAL_NATION then the fort thinks that ship is you. And if you're hostile to Portugal, the fort will attack it.

Setting the ship to PRIVATEER_NATION, and setting PRIVATEER_NATION neutral to Portugal, should mean it will fly the same Personal flag that it has been given, but the fort won't attack it. It's the same fix that I applied to prevent Port Royale fort from attacking the smuggler ship in the "Smuggling for Thomas O'Reily" sidequest.
Yes, do it :)
 
Update: I've done this and tested it while playing "Assassin", and it will be going into the next update. A Desconhecida is PRIVATEER_NATION so it displays its custom flag. Unlike with PERSONAL_NATION, if you're hostile to Portugal, the ship won't be attacked by the fort, nor will the ship attack you if you direct-sail into port and get too close to it.

It also showed up a bug which probably also appeared while I was doing "Smuggling for Thomas O'Reily" but which I either didn't notice or didn't try to fix at that time. The spyglass data bar doesn't show the flag icon for PRIVATEER_NATION. A single line added to "PROGRAM\BATTLE_INTERFACE\ispyglass.c" to make function "TranslateNationCode" take account of PRIVATEER_NATION fixed that. As with PERSONAL_NATION, it displays a default blue flag with a yellow bird regardless of which Personal flag is actually in use. But at least it displays something.
 
As with PERSONAL_NATION, it displays a default blue flag with a yellow bird regardless of which Personal flag is actually in use. But at least it displays something.
The bird is a hawk, because Nathaniel.
Just a bit of extra loyalty to the original game. ;)
 
The bird is a hawk, because Nathaniel.
Just a bit of extra loyalty to the original game. ;)
The flag image in the spyglass data bar is too small to be certain:
spyglass_view.jpg
But I always thought a yellow bird on a blue background was Jack Swallow's flag:
sparrow_flag.jpg
OK, he's supposed to be Jack Sparrow, but sparrows don't tend to have pointed wings and forked tails. :p

As for Nathaniel, the original game didn't have personal flags, of course. Build 13 gave him a pair of nicely drawn hawks on a white background. Build 14 gives him a stylised white hawk on a red background. Perhaps use one of those for the spyglass data bar if it's supposed to be Nathaniel's flag?
 
Upscaled, it's still not all that clear, but I don't think it's a skull - and wasn't the old skull on a black background rather than blue?
personal_databar.jpg
 
Back
Top