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

Included in Build Adapt Escort Quests to be more Interesting

What do 'SetFleetInTown' and 'PlaceFleetNearShore' do? The condition section sets 'pchar.location.from_sea' to either 'Oxbay_lighthouse' or 'Greenford_port' and calls those two functions. (The function calls could just as easily be outside the condition since they both refer to 'pchar.location.from_sea'.) Something must be moving your own ship to the port because I've never had a problem boarding my ship - it's what the Montanez or possibly the fort then do to my ship which is the problem. ;)

For that matter, could not your additional 'SetCharacterShipLocation' lines could also be condensed to one line outside the condition if you change it to 'SetCharacterShipLocation(pchar, pchar.location.from_sea);'?

I agree that the line which should teleport you to either the port or the lighthouse, depending on the value of 'pchar.location.from_sea', is 'DoQuestReloadToLocation(pchar.location.from_sea, "reload", "reload1", "_");'. It certainly teleports you to the port. I've never been teleported to the lighthouse despite routinely arriving at Bridgetown under a Spanish flag so as not to upset the Montanez while I'm trying to rescue her from the Animists. The only problem I've had is that Montanez now objects when I raise the English flag before trying to leave Bridgetown. ;)
 
What do 'SetFleetInTown' and 'PlaceFleetNearShore' do?
I don't quite know. As far as I remember, that is part of an unfinished "fleets" mod by Nathan Kell and basically doesn't do much of anything.

The condition section sets 'pchar.location.from_sea' to either 'Oxbay_lighthouse' or 'Greenford_port' and calls those two functions. (The function calls could just as easily be outside the condition since they both refer to 'pchar.location.from_sea'.) Something must be moving your own ship to the port because I've never had a problem boarding my ship - it's what the Montanez or possibly the fort then do to my ship which is the problem. ;)
If your ship is at the Lighthouse, then you should bypass the fort and not have that problem.

For that matter, could not your additional 'SetCharacterShipLocation' lines could also be condensed to one line outside the condition if you change it to 'SetCharacterShipLocation(pchar, pchar.location.from_sea);'?
I do believe you're right. :yes

I agree that the line which should teleport you to either the port or the lighthouse, depending on the value of 'pchar.location.from_sea', is 'DoQuestReloadToLocation(pchar.location.from_sea, "reload", "reload1", "_");'. It certainly teleports you to the port. I've never been teleported to the lighthouse despite routinely arriving at Bridgetown under a Spanish flag so as not to upset the Montanez while I'm trying to rescue her from the Animists.
GetNationRelation2MainCharacter looks at your ACTUAL relation regardless of the flag you're flying, so you wouldn't be teleported until you actually ARE hostile to England.
If you want to take into account the flag you're flying, perhaps this is a better alternative:
Code:
      if (GetNationRelation(sti(PChar.nation), GetTownNation("Greenford")) == RELATION_ENEMY) // PB: was hardcoded for ENGLAND
       {
         pchar.location.from_sea = "Oxbay_lighthouse";
       }
       else
       {
         pchar.location.from_sea = "Greenford_port";
       }
       SetFleetInTown(GetTownIDFromLocID(pchar.location.from_sea), "pchar"); // NK 05-04-02 WM/IT set fleet.
       PlaceFleetNearShore(pchar.location.from_sea); // KK
       SetCharacterShipLocation(Pchar, pchar.location.from_sea); // PB

The only problem I've had is that Montanez now objects when I raise the English flag before trying to leave Bridgetown. ;)
As per yesterday's update, I don't think that should happen anymore because I disabled the GetRemovable check.
 
Something must be moving your own ship to the port because I've never had a problem boarding my ship - it's what the Montanez or possibly the fort then do to my ship which is the problem. ;)
If your ship is at the Lighthouse, then you should bypass the fort and not have that problem.
My point was, the extra line may not be necessary. You added the line 'SetCharacterShipLocation(Pchar, "Greenford_port");' (and an equivalent one for the lighthouse), which presumably is supposed to move your own ship to the relevant location. But your own ship is already there, since I can board the ship in port. The problem is not that my ship isn't where I am; rather it seems to be that the condition is failing to detect that England won't like my Spanish flag, so I (and my ship) are sent to the port rather than the lighthouse.

GetNationRelation2MainCharacter looks at your ACTUAL relation regardless of the flag you're flying, so you wouldn't be teleported until you actually ARE hostile to England.
If you want to take into account the flag you're flying, perhaps this is a better alternative:
Code:
      if (GetNationRelation(sti(PChar.nation), GetTownNation("Greenford")) == RELATION_ENEMY) // PB: was hardcoded for ENGLAND
       {
         pchar.location.from_sea = "Oxbay_lighthouse";
       }
       else
       {
         pchar.location.from_sea = "Greenford_port";
       }
       SetFleetInTown(GetTownIDFromLocID(pchar.location.from_sea), "pchar"); // NK 05-04-02 WM/IT set fleet.
       PlaceFleetNearShore(pchar.location.from_sea); // KK
       SetCharacterShipLocation(Pchar, pchar.location.from_sea); // PB
That ought to solve the problem! :onya (Though it will still need to be tested by someone else...)
 
My point was, the extra line may not be necessary. You added the line 'SetCharacterShipLocation(Pchar, "Greenford_port");' (and an equivalent one for the lighthouse), which presumably is supposed to move your own ship to the relevant location. But your own ship is already there, since I can board the ship in port. The problem is not that my ship isn't where I am; rather it seems to be that the condition is failing to detect that England won't like my Spanish flag, so I (and my ship) are sent to the port rather than the lighthouse.
Indeed now that I understand the problem was with the FLAG relations instead of your REAL relations, that does make more sense.
Still, the SetCharacterShipLocation is probably still required or otherwise you would end up at the Lighthouse, but still unable to go to sea because your ship isn't there. :facepalm
 
"Interesting" escort missions vs. story quests, round 2:
This time it's Roxanne Lalliere, who as part of the "Bartolomeu o Portugues" storyline wants to go with you from Point a Pitre, Guadeloupe, to San Juan, Puerto Rico. Spain is at war with everyone else, including France, so any flag you fly at the time of departure from Point a Pitre probably won't be welcome at San Juan. But once again, if you try to change flag, Roxanne objects.

I'm now firmly of the opinion that this mod, intended to make escort jobs interesting for people who want to betray their clients, messes things up too much for everyone else. Can we change it so that you have to visit the escorted ship's captain if you do intend to betray him, as opposed to the current situation where you must visit him if you don't want to betray him? That would solve all the problems with story quests and side quests involving companion ships in one stroke, as well as making regular escort missions less annoying for those of us who don't want to betray anyone but do change flags regularly as part of normal game play. Besides, if you can just walk into the other ship's captain's cabin, this would be the logical start to a betrayal anyway - go there, kill the captain, maybe fight your way out, then the other ship is now minus her captain and should be easier to take over.
 
"Interesting" escort missions vs. story quests, round 2:
This time it's Roxanne Lalliere, who as part of the "Bartolomeu o Portugues" storyline wants to go with you from Point a Pitre, Guadeloupe, to San Juan, Puerto Rico. Spain is at war with everyone else, including France, so any flag you fly at the time of departure from Point a Pitre probably won't be welcome at San Juan. But once again, if you try to change flag, Roxanne objects.
Are you quite sure you have the latest updates installed?
The "objecting to a hostile flag" should now only apply to characters who have "companion enemy enable" set for them.
That applies ONLY to escort captains and the Oisseau in the Standard storyline and should NOT be affecting any other ones at all.
So Roxanne should not be objecting to anything anymore.

I'm now firmly of the opinion that this mod, intended to make escort jobs interesting for people who want to betray their clients, messes things up too much for everyone else. Can we change it so that you have to visit the escorted ship's captain if you do intend to betray him, as opposed to the current situation where you must visit him if you don't want to betray him? That would solve all the problems with story quests and side quests involving companion ships in one stroke, as well as making regular escort missions less annoying for those of us who don't want to betray anyone but do change flags regularly as part of normal game play. Besides, if you can just walk into the other ship's captain's cabin, this would be the logical start to a betrayal anyway - go there, kill the captain, maybe fight your way out, then the other ship is now minus her captain and should be easier to take over.
While it is possible to swap the behaviour, I would prefer to keep it as-is.
Partly because changing more things is yet more work, especially if a duel in the captain's cabin is to be added,
but especially also because this really should not be an issue anymore in the first place.
And betrayal is something that should be possible at any time, while doing unexpected weird stuff (hoisting a hostile flag) might need some explanation.

If even with the latest changes it still happens, then please provide a savegame so I can have a look at this Roxanne situation.
Perhaps the code doesn't do what I think it should.
 
Roxanne and Mergilo are just symptoms. The fundamental problem is that the workround to allow you to change flags during an escort mission, which is annoying enough in itself, doesn't work for quest characters such as those two. The betrayal system is basically more trouble than it's worth.

If you don't want to change the cabin behaviour, can't you at least make it so that only hoisting a pirate flag will annoy the escort ship? Failing that, how do I go about disabling the whole thing in my own installation without simply reverting to Beta 3.4?
 
Roxanne and Mergilo are just symptoms. The fundamental problem is that the workround to allow you to change flags during an escort mission, which is annoying enough in itself, doesn't work for quest characters such as those two. The betrayal system is basically more trouble than it's worth.
Roxanne and Mergilo are symptoms of a problem that I'm pretty sure should have been fixed a few days ago.
I understand what the problem was. But I don't understand what the problem is now because I already changed the behaviour a few days back.
I don't think that should happen anymore, but since I didn't test it, I can't be sure.

So I don't want to make any further code changes at all right now.
First I need to figure out if and why the problem would still occur in the first place, which at the moment I do not understand.
Please upload a savegame with Roxanne as your companion so that I can try this evening to upset her by flying a different flag.
 
Since I don't have a savegame with Roxanne, I can't test that particular scenario.

However, I did test the following:
- Started the game as a Spanish Navy Officer
- Got Claire Larousse to join me (originally of nation PIRATE)
- Got an escort ship to join me (Spanish or French)

Then hoisted a Pirate flag while at sea. Escort ship turned hostile and Claire didn't mind.
That was to be expected as Claire was a pirate to begin with. However, after then hoisting a Spanish flag, Claire was still OK with it.
So that suggests that quests ships are no longer fussy over you hoisting a hostile flag which means that the Roxanne issue should also already have been resolved.

If you do not believe that is the case, please upload the savegame so I can check what actually happens.
 
I found an old savegame at Anse Casse Bois, Guadeloupe, where you can try changing flags in front of Roxanne. The last update I've applied is the one from 5th May as later updates apparently require a new game, so I'll install them when I've completed my current play through the "Bartolomeu" storyline. What this means is that whatever you did to fix escort quests won't have been applied, and neither will the more recent updates to cargo. Which means that when you put to sea, flags are going to be the least of your worries...
 

Attachments

  • -=Player=- Guadeloupe. Anse Casse-Bois. September 11th, 1661.zip
    1 MB · Views: 189
The last update I've applied is the one from 5th May as later updates apparently require a new game, so I'll install them when I've completed my current play through the "Bartolomeu" storyline. What this means is that whatever you did to fix escort quests won't have been applied, and neither will the more recent updates to cargo. Which means that when you put to sea, flags are going to be the least of your worries...
You can skip the new game if you really want to; I posted a short explanation on how to override that here:
http://www.piratesahoy.net/threads/...nal-wip-for-testing.24817/page-21#post-506919

Anyway, I'll load your save in my current game version tonight and see what happens.
 
I found an old savegame at Anse Casse Bois, Guadeloupe, where you can try changing flags in front of Roxanne. The last update I've applied is the one from 5th May as later updates apparently require a new game, so I'll install them when I've completed my current play through the "Bartolomeu" storyline. What this means is that whatever you did to fix escort quests won't have been applied, and neither will the more recent updates to cargo. Which means that when you put to sea, flags are going to be the least of your worries...
I just tested that save in the latest game version and Roxanne is fine with whatever flag I choose to hoist. So I think we're good.

By the way, just noticed how many nations are hostile with each other in The Spanish Main.
With your extra change added, it'll pretty much be a complete free-for-all with everyone being mad at everyone! :shock
 
Because Escort Ships no longer turned hostile when you fired on them, I added in functionality that would turn them hostile when you would hoist a flag hostile to them instead.
To allow players to still use false flags, I also added a dialog option to announce this to the merchant, which again disabled this functionality.

However, as per yesterday, the original functionality that allowed traders to turn hostile when you fired on them should be operational again:
http://www.piratesahoy.net/threads/ship_fireaction-not-working.25565

This does mean you have TWO ways of double-crossing a merchant you're escorting:
You can either fire upon him when he's friendly, which turns him hostile, gives you a reputation loss and should also turn the nation of the merchant hostile to you if it wasn't already (I am not 100% sure this second part will work as expected).
The second option is to hoist, for example, a pirate flag near the merchant. This will turn him hostile too and give you a reputation hit as well because you double-crossed your companion.
However, it doesn't turn his original nation hostile to you. This might still happen later when you sink/capture his ship.


This means that theoretically we could drop the secondary system that I put in place.
So now my question: Should we do that or is it OK to have both functions in place side-by-side?
 
Simplyfing code is always good
 
Simplyfing code is always good
On the one hand, I'm inclined to agree.
But I do like having the dialog option and ability to get your escort to panic because of your flag change; makes the game feel a bit more "real" for me.
If we do decide to keep both, it would be nice to point both methods towards the same function for dealing with it so that you don't get a different result, no matter which way you do it.

Actually, it seems fair to get less of a penalty for first hoisting a hostile flag, because at least you're giving them "fair warning".
 
Back
Top