• 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 Cargo Quests: No Variety in Destinations

Robert Nutter

Serving Victoria
3D Artist
QA Tester
Provisional
Storm Modder
Hi all,

Sorry if this one's already flagged but I couldn't find it. If so though, feel free to disregard and remove this thread!

I've been playing my current campaign since installing Public 4, and have put quite a few hours into it. So far I've probably done about 20+ trade missions, but all of them...without exception...to Pirate Settlement. Regardless of where from, ship, relations etc etc. I'm a British lieutenant and have +25 rep, so surely I should be being given British stores? Only triggered quests are Redmond Governor's Smuggling and Peter Bloods (which I comlpeted).

To clarify; every trade mission without exception sends me to Pirate Settlement (on Nevis). Is this known/intentional? :shrug

I've attached logs from my last game, in which I tried twice to get a different destination from Charlestown Store; once under my personal flag, then under the British one. I also had a night in the tavern hoping it may reset it, but I just ended up paying Kate Blowhorn yet another visit...:D After looking in compile, it acknowledges all of this but no hint of an error for convoy quest, unless I'm reading it wrong? :rolleyes:

EDIT: I've also tried breaking my letter of marque and serving pirates, but no difference.
 

Attachments

  • compile.log
    19.5 KB · Views: 118
  • system.log
    4.6 KB · Views: 127
Last edited:
Is this the Escort Quest or Cargo Quest you're talking about?

For Escort Quest I know for certain that it depends on your nation relations; never on your flag.
So what are your relations? Screenshot of the F2 interface should be good for that.

Also, post a save in front of the guy that gives these quests for testing.
 
This is Cargo Quest; sorry I got confused with convoy as it said it had been 'refused', which I did but with cargo quest. :oops:

Literally ALL shop owners give me the cargo quest to pirate settlement, regardless of island and relations so that'd take a while to give you screenshots of them, though of course I can if it'll help. The one they all go to though is Kate Blowhorn. It's happened well over 30 executive times now...o_O It's also been since the very beginning of the game, so I'm not sure relations could be a culprit...It's almost like I'm a pirate (which I'm not but that could be the problem) being sent to the only pirate settlement; though in which case the store owners wouldn't be giving me quests in the first place, would they? So perhaps a bug there? :shrug I havn't touched any of my files except ships_init; and then only to add entries.


I'm a Hero with level 6 commerce, though I wasn't all throughout the game so I doubt that makes a difference.

ddd.jpghhhh.jpg

(Griffith is a devil for this; sending me to the other side of his own island and paying me handsomely! Surely he shouldn't be doing this every time?)
 
Last edited:
Nevis pirate settlement is often the default destination when the game cannot find any other.

Please post a savegame.
 
I think my only preference changes are to the lockpick, pickpocket, camera angles and brothel access; as far as I know everything else is default. Here's my latest save, and as far as I know it's still doing it:

Thanks for any help in this as it does seem to only be me :onya
 

Attachments

  • -=Player=- Jamaica.zip
    869.2 KB · Views: 122
The code for this looks like it hasn't been touched in a while and I don't quite understand all of it.

One thing you can try is to open PROGRAM\QUESTS\quests_common.c and find:
Code:
int GenerateNationTrade(int nation)
{
   int i = -1;
   string friendlyNations = "";
   for(int j=0; j<NATIONS_QUANTITY; j++)
   {
     if(GetNationRelation2MainCharacter(j)==RELATION_ENEMY) continue;
     if(nation != PIRATE && GetNationRelation(nation, j)==RELATION_ENEMY) continue; // PB: Allow pirates to send you to nations hostile to them
     if(nation==j) continue;
     if(j==PIRATE) continue;
     string tmpNat = j;
     friendlyNations = StoreString(friendlyNations,tmpNat);
   }
   i = sti(GetRandSubString(friendlyNations));

   return i;
}
Replace with:
Code:
int GenerateNationTrade(int nation)
{
   int i = -1;
   string friendlyNations = "";
   for(int j=0; j<NATIONS_QUANTITY; j++)
   {
     if (j != PIRATE)                                       // PB: Any pirate town is fair game
     {
     //   if (GetNationRelation2MainCharacter(j) == RELATION_ENEMY)           continue;   // PB: You should never have to go to ports hostile to yourself
       if (GetNationRelation(nation, j) == RELATION_ENEMY && nation != PIRATE)     continue;   // PB: Nor towns that are hostile to the current location (unless it is pirate)
     }
     string tmpNat = j;
     friendlyNations = StoreString(friendlyNations,tmpNat);
   }
   TraceAndLog("Friendly nations = " + friendlyNations);
   i = sti(GetRandSubString(friendlyNations));

   return i;
}
I think that should allow Cargo Quests to ANY nation, including the same nation where you came from (e.g. England to England) and nations hostile to the player.
And pirates could send you anywhere.

It also looks confusing, because it ends up doing the same thing twice in different ways and in different sections of the code. :facepalm
 
Thanks Pieter, but I'm getting the runtime error after pasting that directly :/

EDIT: I'm also getting the runtime error after reverting changes now.:facepalm Damn I must really have butter fingers when it comes to coding...I may need a new quests_common file...:rofl

Here's the whole section:

Code:
// boal <--

bool CreateParticleSystemOnLocator(string _location_id, string _locatorName, string _particleName)
{
    aref locator;
    if (!FindLocator(_location_id, _locatorName, &locator, true))
        return false;

    CreateParticleSystemX(_particleName,stf(locator.x),stf(locator.y),stf(locator.z), stf

(locator.vz.x),stf(locator.vz.y),stf(locator.vz.z),0);
    return true;
}

int GenerateNationTrade(int nation)
{
   int i = -1;
   string friendlyNations = "";
   for(int j=0; j<NATIONS_QUANTITY; j++)
   {
     if(GetNationRelation2MainCharacter(j)==RELATION_ENEMY) continue;
     if(nation != PIRATE && GetNationRelation(nation, j)==RELATION_ENEMY) continue; // PB: Allow

pirates to send you to nations hostile to them
     if(nation==j) continue;
     if(j==PIRATE) continue;
     string tmpNat = j;
     friendlyNations = StoreString(friendlyNations,tmpNat);
   }
   i = sti(GetRandSubString(friendlyNations));

   return i;
}

// NK -->
int GenerateGoodForTrade(int FromNat, int ToNat, ref fromprice, ref toprice) // NK add prices 05-

05-12
{
    //int fstoreidx = GetTownStoreIndex(GetTownIDFromGroup(Stores[GetCharacterCurrentStore

(GetMainCharacter())].group));
    int fstoreidx = GetTownStoreIndex(GetCurrentTownID());
    //trace("from " + fstoreidx + " of " + GetCurrentTownID());
    string destCol;
    string friendlyTowns = "";
    for(int j=0; j<TOWNS_QUANTITY; j++)
 
Last edited:
Ah, NOW I get it. According to the code, it tries to find a nation that is NOT your source nation.
That ends up being Portugal. But Portugal has ZERO colonies (Grenada is English), so you get sent to the "default" one all the time.

I changed my rewrite above, so that it now uses pretty much the exact same logic that is used for Escort Quests as well.
People may have to decline quests because they're too dangerous, but at least there should be plenty more variety.

Testing on your savegame, so far I got tasks for Antigua and Charlestown.
The Pirate Settlement does occasionally show up as well, but that isn't necessarily a bad thing.

Try attached file.
 

Attachments

  • quests_common.zip
    38.7 KB · Views: 102
That's great, and makes sense too! Surely though others would be having this problem with Portugal when playing in the late era? And surely English stores would trade with stores on other islands in real life? Thanks for looking into that for me :)

Really? Antigua? As I was only getting Pirate Settlement! Or do you mean after implementing your code?

Anyway, tried it and working perfectly! Might it be worth including this change in the build? As if anyone else wants to play as England after 1770 they'll have the same issue...also, the changing nation relations option is gone in preferences. I'd love to be able to change that if possible? As with them locked means the same old enemies :D
 
Last edited:
Surely though others would be having this problem with Portugal when playing in the late era?
Yes, they would. Since nobody reported it before, apparently nobody actually played as England in that time period and tried to do a Cargo Quest.

Really? Antigua? As I was only getting Pirate Settlement! Or do you mean after implementing your code?
After my code change, yes. :cheeky

Anyway, tried it and working perfectly!
"Fixed" it is then. :doff

Might it be worth including this change in the build?
It'll be in whatever update I post next for sure. :yes
 
Back
Top