• 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

An interesting side effect, not planned but not unexpected, concerns what happens if you're in a hostile port. If you don't pass "tradecheck" then the storekeeper just tells you to get out. If you do pass, you can trade cargo and items as normal, but you can't get delivery quests:
wrong_nation.jpg
Excusez moi? I am French, you imbecile!

That's the existing version. James Griffiths is the storekeeper in Charlestown. His dialog was presumably cloned from a French storekeeper's dialog and whoever did the cloning didn't pay attention to details. There are probably others with similar mistakes.

The general dialog obviously can't have a fixed nation here, so I'm using a preprocessed place-holder filled by 'GetNationDescByType(sti(NPChar.nation))'. And so:
right_nation.jpg
Storekeepers should always object to you sinking ships of the correct nationality. That includes stores in towns which change nation due to period, e.g. one town on Eleuthera is Spanish in "Spanish Main", British in "Golden Age of Piracy" and "Colonial Powers", and American in "Revolutions" and "Napoleonic". They'll also correctly refer to "English" or "British" as appropriate.
 
Another side effect, not expected and definitely not planned:
While testing one of the storekeepers which I'd just converted to use the general dialog (Ricardo Sanchez on Turks Island, to be exact), I took a delivery quest which happened to be aimed at Buccaneers Camp. The questbook entry ended by saying that it had to go "to the store owner ." A space before a full stop usually means a preprocessed variable hasn't been filled in, and I was sure that the store owner's name is supposed to appear there. Sure enough, trying again and getting a quest to somewhere else, the name did appear. After some console work and some digging, I found out why Buccaneers Camp doesn't show its owner.

In "PROGRAM\STORE\store_init.c":
Code:
    Stores[ORANJESTAD_STORE].Island   = "Aruba";
   Stores[ORANJESTAD_STORE].group   = "Oranjestad";
   Stores[ORANJESTAD_STORE].owner   = "Cornelis Huijser";
   Stores[ORANJESTAD_STORE].dockyard = "Abraham Hollander";
   Stores[ORANJESTAD_STORE].tavern = "Johannes Harlekeyn"; // KK
   Stores[ORANJESTAD_STORE].usurer = "Oranjestad Usurer"; // KK
   Stores[ORANJESTAD_STORE].taylor = "Jan Thijs"; // KK
   STORE_QUANTITY++;

   Stores[BUCCANEERS_CAMP_STORE].Island   = "Hispaniola";
   Stores[BUCCANEERS_CAMP_STORE].group   = "Buccaneers Camp";
   Stores[BUCCANEERS_CAMP_STORE].tavern = "Florentin Destot"; // KK
   STORE_QUANTITY++;
Comparing Buccaneers Camp to Oranjestad for no reason other than that they're in direct sequence, you can see that Buccaneers Camp has no "dockyard", "usurer" or "taylor" attributes, which is fine because Buccaneers Camp has no shipyard, loanshark or tailor. But it also has no "owner" attribute, and that's the one which is supposed to tell the rest of the game who owns the store.

The attached version adds the "store" attribute to Buccaneers Camp. After that, I made a savegame at Turks Island, repeatedly loaded, asked for a delivery quest, and reloaded, until I finally got one for Buccaneers Camp. Apart from checking almost every other store in the Caribbean, this showed that a delivery quest to Buccaneers Camp now does put Eugene Martin's name into the questbook.
 

Attachments

  • store_init.c
    12.3 KB · Views: 227
The assimilation continues, though I'm beginning to wonder whether this really will make things easier for modders in future, because it's getting very messy. Alan Milds, the storekeeper in Speightstown, has a lot of custom dialog, plus code to prevent him from giving delivery quests when Speightstown is occupied by France during the "Tales of a Sea Hawk". That means he's personally accounting for about a quarter of the combined "dialog.h" file and the code needed to be rearranged, e.g.:
Code:
                           link.l1 = XI_ConvertString("quest_map");
                           link.l1.go = "exit_map";
                           link.l2 = DLG_TEXT[18];
                           link.l2.go = "exit_trade";
                           link.l3  = DLG_TEXT[19];
                           link.l3.go = "exit";
                           switch(store_type)
                           {
                               case 1:
                                   dialog.snd = "Voice\EMRI\EMRI010";
                                   dialog.text = DLG_TEXT[15] + sNation + DLG_TEXT[16] + pchar.quest.generate_trade_quest_progress.iMoney + DLG_TEXT[17];
                               break;

                               case 2:
                                   dialog.text = DLG_TEXT[15] + sNation + DLG_TEXT[16] + pchar.quest.generate_trade_quest_progress.iMoney + DLG_TEXT[35];
                               break;

                               case 3:
                                   dialog.text = DLG_TEXT[15] + sNation + DLG_TEXT[16] + pchar.quest.generate_trade_quest_progress.iMoney + DLG_TEXT[35];
                               break;

                               case 4:
                                   dialog.text = DLG_TEXT[15] + sNation + DLG_TEXT[16] + pchar.quest.generate_trade_quest_progress.iMoney + DLG_TEXT[46];
                               break;

                               case 5:
                                   dialog.snd = "Voice\EMRI\EMRI010";
                                   dialog.text = DLG_TEXT[15] + sNation + DLG_TEXT[16] + pchar.quest.generate_trade_quest_progress.iMoney + DLG_TEXT[17];
                               break;

                               case 6:
                                   dialog.snd = "Voice\GHDA\GHDA010";
                                   dialog.text = DLG_TEXT[15] + sNation + DLG_TEXT[16] + pchar.quest.generate_trade_quest_progress.iMoney + DLG_TEXT[17];
                               break;

                               case 7:
                                   dialog.snd = "Voice\EMRI\EMRI010";
                                   dialog.text = DLG_TEXT[15] + sNation + DLG_TEXT[16] + pchar.quest.generate_trade_quest_progress.iMoney + DLG_TEXT[17];
                               break;

                               case 8:
                                   dialog.text = DLG_TEXT[15] + sNation + DLG_TEXT[16] + pchar.quest.generate_trade_quest_progress.iMoney + DLG_TEXT[35];
                               break;

                               case 9:
                                   dialog.snd = "Voice\ARMA\ARMA048";
                                   dialog.text = DLG_TEXT[15] + sNation + DLG_TEXT[16] + pchar.quest.generate_trade_quest_progress.iMoney + DLG_TEXT[17];
                               break;

                               case 10:
                                   dialog.snd = "Voice\EMRI\EMRI010";
                                   dialog.text = DLG_TEXT[15] + sNation + DLG_TEXT[16] + pchar.quest.generate_trade_quest_progress.iMoney + DLG_TEXT[17];
                               break;

                               case 11:
                                   dialog.snd = "Voice\EMRI\EMRI010";
                                   dialog.text = DLG_TEXT[15] + sNation + DLG_TEXT[16] + pchar.quest.generate_trade_quest_progress.iMoney + DLG_TEXT[17];
                               break;

                               case 12:
                                   dialog.snd = "Voice\EMRI\EMRI010";
                                   dialog.text = DLG_TEXT[71] + sNation + DLG_TEXT[72] + pchar.quest.generate_trade_quest_progress.iMoney + DLG_TEXT[73];
                                   link.l2 = DLG_TEXT[74];
                                   link.l2.go = "exit_trade";
                                   link.l3  = DLG_TEXT[75];
                                   link.l3.go = "exit";
                               break;

                               dialog.snd = "Voice\EMRI\EMRI010";
                               dialog.text = DLG_TEXT[15] + sNation + DLG_TEXT[16] + pchar.quest.generate_trade_quest_progress.iMoney + DLG_TEXT[17];
                           }
The common "link.2" and "link.l3" are moved to before the switch block so that case 12, which is Alan Milds, can override them.

I'm beginning to wonder if it might be easier on future modders just to leave the storekeeper dialogs as they are in the current version, except for replacing all the specific nation names with preprocessed place holders. Anyone wanting to modify the code for delivery quests would then need to go through all the individual storekeeper files, which might be easier than trying to make sense of this lot. xD (And I've yet to add Thomas O'Reily or the Antigua victualler...)
 

Attachments

  • storekeeper_dialog.c
    22.4 KB · Views: 212
  • storekeeper_dialog.h
    5.1 KB · Views: 223
Wouldn't work then to keep the sidequest dialog stuff in the individual dialogs?

Antigua victualler
Ouch! That'll be a headache!! :shock

To be fair, indeed this does sound much more massive than that governor dialog code change ever was... :unsure
 
Sidequest stuff is indeed staying in individual dialogs. For example, Arnaud Matton has a whole load of sidequest stuff relating to Sabine Matton, some more for "Cargo for Thomas O'Reily" - and another lot apparently for a quest going the other way, delivering something to Thomas O'Reily, which doesn't seem to be activated anywhere in the game. All that is still in his specific dialog files. His general trading and delivery quest dialog, on the other hand, is mostly fairly standard, though he has a few unique lines.

Alan Milds has almost entirely his own special lines. His quest speciality isn't a sidequest; rather, during the occupation of Speightstown, he must not offer a standard delivery quest.

The actual code for delivery quests is already separated out as functions such as 'GenerateGoodForTrade' or parts of "quests_common.c" such as "generate_trade_quest". If anyone wants to modify the way delivery quests work, that's probably where they'll do it. All I've done is copy the duplicate dialog parts such as case "generate_quest" from everyone's individual dialog files and made one copy of each - except that it branches off so many ways to account for different dialog texts that it hasn't saved as much as doing the same for governors.

Back to Arnaud Matton, and that unused quest to deliver "cacao" - probably chocolate in the current game. I wonder if that was part of the original plan to have a different story for Danielle?
 
Alan Milds has almost entirely his own special lines. His quest speciality isn't a sidequest; rather, during the occupation of Speightstown, he must not offer a standard delivery quest.
Maybe a temporary dialog swap with a mostly dysfunctional file would work?

Back to Arnaud Matton, and that unused quest to deliver "cacao" - probably chocolate in the current game. I wonder if that was part of the original plan to have a different story for Danielle?
Or one of those many side quests that were never finished?
Some were completed for the mod, but there's still unused stuff left...
 
The temporary dialog swap would only complicate things even more!

The basic problem is that, to accommodate the various different dialog texts from different storekeepers, the general files need a lot of text from those storekeepers merged into one text tile, and a lot of switches to select the right pieces of text for various storekeepers.

So, if you want to add a new store somewhere:

Current system: copy your choice of existing storekeeper dialog, customise the text however you like, done.
New system:
  • Copy your choice of existing storekeeper's specific files. Customise the text if you like.
  • Find the line at the top of "storekeeper_dialog.c" corresponding to the storekeeper whose dialog you originall copied. Copy that line to assign a "store_type" value for your character.
  • If you want to customise your character's trade and quest dialogs, that will need to be a new value. Add your new text to the end of "storekeeper_dialog.h". Now go through "storekeeper_dialog.c" looking for all the 'switch(store_type)' blocks and in each one, add a new case to pick out your new lines for your new character.
If you want to change the mechanism for delivery quests, you won't be looking at the dialog files, you'll be looking at "quests_common.c", either at the trade function definitions or the relevant cases in "CommonQuestComplete".

So the only time the general dialog file does any good is for the sort of job required by the earlier part of this thread, i.e. adding a couple of extra lines to the delivery quest dialog so that the storekeeper tells you what cargo he's expecting if you don't have it.
If the purpose of gathering all the trade and delivery quest dialog into one common file was to make things easier for modding, I don't think it's succeeded. :facepalm

But it hasn't been a total waste of effort because it showed up a couple of issues with the current system. Even if I revert to the current system of completely separate dialogs for each storekeeper, I'll change the lines about not giving a delivery quest as long as you're sinking <insert_nation> ships so that they use preprocessed variables. That, of course, will require changing each storekeeper's dialog, and I'll add the new stuff about the expected cargo while I'm at it. And regardless of which dialog system we end up using, the fix to "store_init.c" for Eugene Martin is going into the next update.
 
The temporary dialog swap would only complicate things even more!
Ah. Right.
Then don't do that. :rofl

If the purpose of gathering all the trade and delivery quest dialog into one common file was to make things easier for modding, I don't think it's succeeded. :facepalm
:( :(

But as you say: it was still worth it to find the issues that you did!
And kudos for even attempting such a big undertaking!! :bow
 
There's another clue about why a delivery quest fails. In the "Cargo" section of the F2 interface screens:
cargo_mission.jpg

Mind you, I never noticed that before, and I routinely do a few delivery quests at the start of "Tales of a Sea Hawk" or most "FreePlay" games - easy money and a boost on reputation, what's not to like? So it wouldn't be surprising if others haven't seen it either.

I've updated all the storekeeper dialogs. All the lines where they refuse to give you a quest "at least, not as long as you're sinking Spanish ships" (or whatever nation applies to the storekeeper) now have the nation name replaced by a preprocessed variable, while a couple more lines are added to allow the storekeeper to remind you what you're supposed to be delivering. And now:
cargo_missing.jpg

The attached zip contains all the dialog files, a revised questbook with an extra line to remind you that you need to buy some replacement cargo, and the update to "store_init.c".
 

Attachments

  • storekeepers.zip
    130.1 KB · Views: 187
There's another clue about why a delivery quest fails.
AH! YOU FOUND IT!
That's indeed what I meant with the "quest status" of certain cargoes.

I didn't remember it even already mentioned how much cargo was missing.
Looks like that feature is even better than I thought. :woot

So it wouldn't be surprising if others haven't seen it either.
Indeed you have to already know it's there before being able to use it. And it IS quite hidden.
It is also potentially quite useful though. Could you think of a way to make the existence of that feature more obvious to players?

I've updated all the storekeeper dialogs. All the lines where they refuse to give you a quest "at least, not as long as you're sinking Spanish ships" (or whatever nation applies to the storekeeper) now have the nation name replaced by a preprocessed variable, while a couple more lines are added to allow the storekeeper to remind you what you're supposed to be delivering.
Very; VERY nice!

The only other thing I could think of is to mention in dialog the amount that is missing.
Since the interface already does that too, it should be possible. :doff

Alternatively, perhaps your new dialog could be used as the hint for players to start using that interface feature.
 
Indeed you have to already know it's there before being able to use it. And it IS quite hidden.
It is also potentially quite useful though. Could you think of a way to make the existence of that feature more obvious to players?
It's hidden, and I've been doing delivery quests for years without needing it. If I need a reminder of what I'm supposed to be delivering, it's in the questbook.

If quest cargo can't be expendables such as food, rum, sailcloth or planks, and can't be washed overboard, then the only way it's missing is if you sold it. Either some of it was on a companion ship which you sold; or you sold it as regular cargo, in which case you're probably missing the whole lot.

Very; VERY nice!

The only other thing I could think of is to mention in dialog the amount that is missing.
Since the interface already does that too, it should be possible. :doff

Alternatively, perhaps your new dialog could be used as the hint for players to start using that interface feature.
I am not going through the whole lot a third time! What you see is what you're getting, unless you want to change all the dialogs to show the missing amount. :p

What does happen is a questbook update, though the new questbook line simply says "Some of the cargo which I was supposed to deliver is missing! I shall need to buy more to replace it, and quickly if I want to meet the deadline." But then, if you're looking at the questbook, you're also looking at the line which tells you what you're supposed to be delivering. Then you just need to see how much of it you're already carrying, by looking at the "Cargo" interface, and work out how much more you need to buy. If you look carefully at the "Cargo" interface, you don't even need to do the calculation. ;)
 
I am not going through the whole lot a third time! What you see is what you're getting, unless you want to change all the dialogs to show the missing amount. :p
Fair enough.

Indeed the calculation is more of a bonus and not even remotely necessary.

But perhaps a general 'search-and-replace' update or questbook addition as a hint to players that the Cargo Hold interface information exists could be an easy last thing to do.
 
If it's that easy, the zip file contains all the dialog files - go ahead. ;)

Otherwise, the questbook update tells you that something has happened to the questbook. There you'll get a permanent reminder of what you're supposed to delivering, in addition to the reminder from the dialog. If you can't figure out that the "Cargo" interface might be a good place to find out what cargo you have now, a further subtle reminder in the dialog probably isn't going to help. xD

What I want to do next is decide on something more appropriate for Thomas O'Reily to send to Arnaud Matton. Right now, he gives you 200 silk. You sell it straight back to him, at import price. You go to Arnaud Matton and buy 200 silk from him, at export price. You give him his silk back. Then you buy it again, return to Port Royale, and sell it to Thomas O'Reily at import price. :D I'm open to suggestions for a more suitable cargo. The only requirements are that it should be either an export from Port Royale, an import at St. Pierre, or preferably both; and that it's not contraband at either end because this is supposed to be an honest cargo run, you get to do smuggling in the next mission.
 
If it's that easy, the zip file contains all the dialog files - go ahead. ;)
Easy? Yes.
Takes a bit of time? Yes.
Do I have time? NOT EVEN IN THE SLIGHTEST!!! :shock

Otherwise, the questbook update tells you that something has happened to the questbook. There you'll get a permanent reminder of what you're supposed to delivering, in addition to the reminder from the dialog. If you can't figure out that the "Cargo" interface might be a good place to find out what cargo you have now, a further subtle reminder in the dialog probably isn't going to help. xD
:rofl :rofl :rofl

Well, I never do cease to be amazed with how... uhm... NOT bright people can be. :wp

What I want to do next is decide on something more appropriate for Thomas O'Reily to send to Arnaud Matton. Right now, he gives you 200 silk. You sell it straight back to him, at import price. You go to Arnaud Matton and buy 200 silk from him, at export price. You give him his silk back. Then you buy it again, return to Port Royale, and sell it to Thomas O'Reily at import price. :D I'm open to suggestions for a more suitable cargo. The only requirements are that it should be either an export from Port Royale, an import at St. Pierre, or preferably both; and that it's not contraband at either end because this is supposed to be an honest cargo run, you get to do smuggling in the next mission.
Something. Anything. Doesn't really matter, does it?

Also, shouldn't those island Import/Exports not be updated at some point?
Maybe that should be done first?
 
Can quest cargo be washed overboard?

If I remember correctly, in Sea dogs TEHO, shopkeepers do tell you if you don't have enough of quest cargo on board.
 
Back
Top