• 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 Cargo Quest that i cannot complete. PotC New Horizons

Can quest cargo be washed overboard?
'Cargo washing overboard in a storm' is a feature I added.
Since I didn't want it to be super annoying for players, I added code to safeguard the quest cargo.
Whether that still works though...?
 
Also, shouldn't those island Import/Exports not be updated at some point?
Maybe that should be done first?
Why? Is there something wrong with the current import/export setup?

Anyway, if someone else wants to change them, and if it doesn't then break trading, they're welcome to do so. As for "Cargo For Thomas O'Reily", some time ago I changed that to use variables instead of hard-coded cargo type and amount in case they ever needed to be changed, then simply never got round to picking a more suitable cargo.

Until now. A check on Jamaica and Martinique on the "Colonies" interface, then checking a couple of savegames in Port Royale and St. Pierre, showed that Clothes seems to be suitable - export in Port Royale and nothing special in St. Pierre.

Changing the cargo and amount is easy, just change these lines in "Thomas O'Reily_dialog.c":
Code:
    NPChar.deliver_cargo = GOOD_CLOTHES;   // GR: was GOOD_SILK which is import at Jamaica and export at Martinique!  Clothes is export at Jamaica.
    NPChar.deliver_amount = 250;       // GR: x3 = 750 space, was 200 which for silk is x4 = 800 space

The quest code in Thomas O'Reily's and Arnaud Matton's dialogs uses the variables and so does the questbook, so with the lines updated:
thomas_cargo.jpg

Next phase: use similar variables instead of the fixed values "GOOD_EBONY" and 134. For one thing, 134 is wrong because if you choose to go after the smugglers' ship, it's carrying 100 ebony, and that's what Andre Juliao is expecting. Presumably the smugglers weren't feeling generous enough to leave Thomas with 34 ebony, they'd have taken the lot, so if what they got was 100 ebony then that's what Thomas should have wanted you to carry.
 
Last edited:
'Cargo washing overboard in a storm' is a feature I added.
Since I didn't want it to be super annoying for players, I added code to safeguard the quest cargo.
Whether that still works though...?
I'd like to know how cargo can be washed overboard from anything bigger than a lugger. It's below deck in the hold. If anything is floating out of there, you have bigger problems than loss of a couple of crates of cargo!

Whether it still works, I can't say - I tend to travel around on worldmap, avoid storms when I see them, reload a savegame if a storm shows up when I switch to sailing and there wasn't one on the map, and try to get the bows in line with the waves as soon as possible. Occasionally all that fails and I do lose some cargo, but if it's random then I've no way of knowing if it's actively avoiding quest cargo, and anyway the failure to avoid the storm would need to coincide with a delivery mission in progress.

Anyway, with the new dialog, you'll know if cargo has gone missing. So even if the safeguarding has somehow stopped working, at least you won't arrive at the destination and wonder why the storekeeper doesn't give the option to complete the quest.
 
Why? Is there something wrong with the current import/export setup?
I thought someone mentioned that there was a lot of copy-pasting in that from island to island which didn't make for great gameplay.
But you would know better than me.

I'd like to know how cargo can be washed overboard from anything bigger than a lugger. It's below deck in the hold. If anything is floating out of there, you have bigger problems than loss of a couple of crates of cargo!
:rofl :rofl

It was part of my attempt at making storms require a bit more active involvement by the player to survive.
It's one of the levels of escalation in the Capsize functionality.

Whether it still works, I can't say - I tend to travel around on worldmap, avoid storms when I see them, reload a savegame if a storm shows up when I switch to sailing and there wasn't one on the map, and try to get the bows in line with the waves as soon as possible. Occasionally all that fails and I do lose some cargo, but if it's random then I've no way of knowing if it's actively avoiding quest cargo, and anyway the failure to avoid the storm would need to coincide with a delivery mission in progress.
The way to check would be to look at the code and then use debugging logs to see if the right parts still get triggered.

Anyway, with the new dialog, you'll know if cargo has gone missing. So even if the safeguarding has somehow stopped working, at least you won't arrive at the destination and wonder why the storekeeper doesn't give the option to complete the quest.
Very true.
So not exactly high priority to check.
Except... I don't like formerly functional functionality being dysfunctional.
Especially when it was me who wrote it in the first place... :facepalm
 
I thought someone mentioned that there was a lot of copy-pasting in that from island to island which didn't make for great gameplay.
But you would know better than me.
No, I don't know much about how islands' imports and exports work. I stumbled across a bit of it while trying to find out why Curacao wasn't showing its name in the "Ship Berthing" screen, but as the island code had nothing to do with that, I didn't look at it more closely. There seems to be something accounting for island economy types, which is perhaps why sandal is exported from Barbados and imported to Jamaica. Unless someone actively made them the same, it's likely that all the original islands (Oxbay/Barbados, Falaise de Fleur/Martinique, etc.) are different. Mod-added islands are probably copied from those originals, but provided they aren't all copied from the same one, there should still be enough diversity for trading.

In any case, the whole point of putting variables into "Thomas O'Reily_dialog.c" is that it's now extremely easy to change what you deliver in the delivery quest means that changing what you smuggle for Thomas O'Reily will also be easy. If someone does later change the imports, exports and contraband for Jamaica and Martinique so that delivering clothes no longer makes sense, all that's needed is to change those variables. Likewise, changing "Thomas O'Reily_dialog.c" to use variables instead of hardcoding in 'if (GetSquadronFreeSpace(pchar, GOOD_EBONY) < 134)' and then changing everywhere else in the quest to use those variables will mean I can replace it with 300 units of cinnamon; and if the contraband on Jamaica and Martinique is subsequently changed, "Thomas O'Reily_dialog.c" can be changed again to use whatever is then sensible.

As previously stated, that should really be 'if (GetSquadronFreeSpace(pchar, GOOD_EBONY) < 100)' because it's 100 ebony everywhere else. Ebony is 6 cwt per unit. Cinnamon, which is contraband on Martinique and not on Jamaica, is 2 cwt per unit. Partly to keep the cargo requirement the same, and partly because the questbook says "six hundred cwt of ebony", you'll be smuggling 300 cinnamon instead of 100 ebony. A comment will indicate that if it's changed again, the total weight of whatever you're smuggling should be six hundred cwt.
 
No, I don't know much about how islands' imports and exports work. I stumbled across a bit of it while trying to find out why Curacao wasn't showing its name in the "Ship Berthing" screen, but as the island code had nothing to do with that, I didn't look at it more closely. There seems to be something accounting for island economy types, which is perhaps why sandal is exported from Barbados and imported to Jamaica. Unless someone actively made them the same, it's likely that all the original islands (Oxbay/Barbados, Falaise de Fleur/Martinique, etc.) are different. Mod-added islands are probably copied from those originals, but provided they aren't all copied from the same one, there should still be enough diversity for trading.
As far as I understand, the bit about the economy types relates primarily to contraband goods.
This is part of @Levis' smuggling functionality.

Regular import/export goods should still be taken from PROGRAM\ISLANDS\Islands_init.c and that is fairly straightforward to modify.

For that Ship Berthing interface double translation, search the "PROGRAM\INTERFACE\kam_shipberthing*.c" files for "convert" or "translate".
That should show you all potentially relevant code.

Easiest is to use Notepad++ with the "search in all open files" button.
 
Last edited:
As far as I understand, the bit about the economy types relates primarily to contraband goods.
This is part of @Levis' smuggling functionality.

Regular import/export goods should still be taken from PROGRAM\ISLANDS\Islands_init.c and that is fairly straightforward to modify.
A quick look there indicates that original islands do have different export/import lists. The new islands which I checked are almost but not identical to original islands of the same nation, e.g. Guadeloupe is similar but not quite the same as Martinique, while Cuba and Hispaniola aren't quite the same as Puerto Rico or each other.
 
I would love to but I don't know if I have the time to make this and it have other projects left open.

If no one else tries this, then maybe in the future I will see what I can do, but as of now I can't.
 
That confirms what I would've suspected.
New islands are copied from the old ones.
Sounds to me like that makes for boring gameplay though.
Maybe this is something that @The Nameless Pirate or @DavyJack would feel like spicing up a bit?
New islands are mostly copied from old ones. There are differences. For example, Puerto Rico exports bricks and imports silver. Hispaniola doesn't care about bricks and exports silver. Both of them export gold. Cuba doesn't care about gold or silver. But from Cuba, you don't bother trying to trade to another Spanish island; you load up on sandal if you're an honest merchant or ebony if you're not, then head for Port Royale which is a little way to the south and where those are import and contraband respectively.
 
I realised why "Thomas I'Reily_dialog.c" originally checked if you had space for 134 ebony. As well as 100 units of ebony (600 cwt), the smugglers also get 50 units of sandal (200 cwt). This is mentioned in the questbook:
Code:
A #sRedmond# merchant, on the island #sisland_Redmond#, named Thomas O'Reily ordered me to deliver a contraband cargo to #sFalaise de Fleur# on #sisland_Falaise de Fleur#, six hundred cwt of ebony and two hundred cwt of sandal. First I should sail to a small bay north from this town where Thomas's workers will load my ship with sandalwood. Then I should sail to #sFalaise de Fleur# and deliver the cargo to a fellow named Andre Juliao in the tavern there.
And in an unusual mechanism, it's transferred to your ship in "PROGRAM\QUESTS\quests_abordage.c" when you board the smuggler's ship:
Code:
   if (iCharacter1 == iTestCharacter || iCharacter2 == iTestCharacter)
   {
       Characters[GetCharacterIndex("Thomas O'Reily")].quest.contraband = "boarding";
       AddCharacterGoods(GetMainCharacter(), GOOD_SANDAL, 50);
   }
50 sandal = 33.333 ebony. Rounding up adding to the 100 actual ebony totals 134. Thomas checks that you have enough space for both loads. The story reason is that he doesn't know the cargo is about to be stolen. The game reason is that you might not be able to capture the smuggler's ship and leave the ebony where it is - leadership less than 5, too many ships already in your fleet, or no free officer.

I've now replaced ebony and sandal with variables and changed all relevant code to use them. And ebony is now replaced by cinnamon. The questbook also now uses the variables:
thomas_smuggle2.jpg
The bit about "Thomas's workers will load my ship with sandalwood" loses the specific cargo type; the original forgot to mention the ebony being loaded, and there's no point in repeating the whole cargo manifest, so now it just says "Thomas's workers will load my ship". I played through the quest to check that the correct cargo appears on your ship and the smuggler's ship, then disappears when you talk to Andre Juliao.
 
Okay, so for my personal future reference and to help others.

I'm running the stock game, but I don't think there's a big difference in this part. When you're stuck with one of the quests and don't want to have to delete your save, you can simply add the following code:
Code:
            CloseQuestHeader("trade_fra");

            CloseQuestHeader("trade_red");
            CloseQuestHeader("trade_ox");
            CloseQuestHeader("trade_green");
            CloseQuestHeader("trade_spa");
            CloseQuestHeader("trade_hol");
            CloseQuestHeader("trade_por");
            pchar.quest.generate_trade_quest_progress = "";
            pchar.quest.generate_trade_quest.over = "yes";

to the bottom of
Code:
case "generate_convoy_quest_completed":
in quest_reaction.c. Now run a convoy quest, and the game will have forgotten about your failed quest.
 
Welcome aboard @Daniël Van Den Berg! :cheers

The main difference between this and New Horizons is that it actually has a console.
So by adding this code to the "console.c" file you can run it at any point by pressing F12.
 
There are a lot of differences between "New Horizons" and the stock game as regards cargo quests! For one thing, as there are a lot more islands, there are no town-specific questbook entries. So to clear a "New Horizons" cargo quest, you would probably need this in "console.c":
Code:
DeleteQuestHeader("trade");
pchar.quest.generate_trade_quest_progress = "";
pchar.quest.generate_trade_quest.over = "yes";
Also, you won't find the code for cargo or convoy quests in "quests_reaction.c" any more. Look in "PROGRAM\QUESTS\quests_common.c" instead.

Having said that, cargo quests are a lot more reliable in "New Horizons" than in the stock game. Goods which can be expended, such as planks and sailcloth used for repairs, can not be used in cargo quests, so there's much less risk of arriving at your destination with some of the cargo missing. Also, if you have a fully up to date version of "New Horizons", and you can't complete a cargo quest because cargo is missing for any reason, the storekeeper will tell you what he is expecting.
 
Having said that, cargo quests are a lot more reliable in "New Horizons" than in the stock game. Goods which can be expended, such as planks and sailcloth used for repairs, can not be used in cargo quests, so there's much less risk of arriving at your destination with some of the cargo missing.
Did stock PotC allow you to actually use your planks and sailcloth at all...?
 
I think it did, if you had the right perk of course.
Though I could be wrong on this, it has been a while since I played the stock game.
 
Keep an eye on the officer in charge of the store in Antigua. I experienced once to deliver to him, but because I didn't have a letter of marque, I wasn't able to get to that part of the dialogue. Eventually I chose to go back to an earlier save and avoid that cargo mission altogether.
 
That's odd. @Pieter Boelen added some code into the Antigua victualler's dialog so that, if you have a cargo quest aimed at Antigua, you should have an extra option at the initial dialog. You may need to scroll down past the end of the visible options to find it if there isn't room on the dialog screen to display all choices.
 
Back
Top