• 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 Sidequests for Additional Storylines

I see the gambling girl is added to the main quest while the others are added to the storylines. wouln't it be better to add everything to the main quests because when a new storyline is added we else need to do everything again?

I could be seeing it wrong. Do we know for sure all those quests are added for all storylines?

Edit: Actually I'm pretty sure most of those quests are only added to a few storylines, not all.
As far as I can see we need to make sure the dialogs are in the main dialog folder and the things from quest_reactions have to be move to quest_common and the characters have to be moved to the main character init.
Thats all right?
 
Last edited:
Okay I did a little testing and came to this conclusion:

Most of the storylines do have the sidequest, but not all. Also they are added to each storyline seperatly (at least most).
This could be solved relatively easy.
Just take a free to play storyline (say JeanLafitte) and copy "\PROGRAM\Storyline\JeanLafitte\quests\both_reaction.c" to "\PROGRAM\QUESTS" I would sugest renaming it "sidequest_reactions.c"
also copy everything from the Dialog folder in the storyline to the normal dialog folder (both c and h files) and also the things from the locations and characters folder. All things should go to theire respective main folder. You can just keep the sidequest names.
Now to keep the free to play quests playable the folders still need to be in place and as far as I could see the characters and locations folder do need something in the ini. but if you remove all "cases" from the files and only keep the initialisation they work. It seems to mee this enables all the sidequests which where already converted to be played by all storylines.
I think this would be a lot easier cause you only need to edit 1 file. Also it would decrease the size of the mod.

It seems there are some conflicts while copying the dialog files. In most cases the ones form the sidequest are larger so I guess they can be overwritten, but the blaze one I dont know for sure. I think they are dialog files incase there is no quest. but that should also be in the quest dialog file cause as far as I could see potc can only read 1 dialog file for character and it can't swich the dialog file. But this would require some testing.

What do you guys think? Should we organise it like this? If you do it would probally make porting the quests easier cause it would actually mean we just need to take the standaard questline and only remove everything from the normal quest from it. If thats done you can copy everything and you got all the sidequests in the other storylines (Okay that could also be done if we keep them in the storylines but it sounds nice doens't it :p).
 
Good points indeed; I never did come up with a good solution.
Generally speaking, I do think it might be best to have the side-quests moved into the MAIN game code and OUT of the storyline folders.
That means less copied code, which makes it easier to keep things up-to-date for the future.

On the other hand, some storylines shouldn't have sidequests. For example:
- Bartolomeu sidequest in Bartolomeu storyline would be weird to say the least
- Woodes Rogers and Hornblower aren't really meant for free play anyway, so probably shouldn't have sidequests available at all
- Jack Sparrow has customized versions of various sidequests instead of carbon-copies from the standard storyline

At the moment, for simplicity's sake, we have been using both_reaction.c for sidequest code.
Also, I made separate sidequest location and character init files, so that they can be copied easily into other storyline folders.
These are added to the following storylines: Devlin Opera, Master & Commander, The Buccaneer and Tales of a Chevalier .

I did try to add them also to Bartolomeu and Assassin, but ran into some incompatibility issues related mainly to blaze_dialog.c .
At the time, I couldn't really be bothered to sort that out and just left it as-is. This is the file generally used for "self dialog" cases.

Several of the sidequests are only enabled by some code added into StartStoryline.c .
Those would be quite easily to disable in various storylines if need be.

The reason why the "gambled girl" is in the main quest code is because it is triggered by habitue_dialog.c in the PROGRAM\DIALOGS folder.
Therefore it could be triggered in ANY storyline, but in previous modpack releases would only WORK in the Standard one.
That didn't make much sense, of course.

Other issues might arise with the dialog texts. For example, the "Escort Vigila Mendes Ship" one has a dialog
that refers to the main character's escape from captured Speightstown in the Standard storyline.
That technically doesn't make much sense in any of the others.
And even in Standard, you can now start as another nation and possibly not even have passed that part of the story.
 
Can't we just Define variables for all sidequest which are loaded at the start of the storyline. Then there is a check in the dialog files if the variable is 0 it should load the normal dialog file. If the value is 1 it should load the dialog file but with the quest disabled. If its 2 it should load the dialog file from the storyline.
That way you can set which sidequests to add to a specific storyline and you could also disable them so you can put in a added version.

It would mean some work but after that I think its way more clear how everything works. Altough it might need this also for the characters init. and locatioins init.
 
Different quests are started in different ways; some are triggered by entering a location, some by talking to a character.
Depending on the start trigger, the start would have to be handled differently. Can be done though, of course.

I did something vaguely similar for the storyline-dependent availability of the Isla de Muerta functionality.
That is done with this line in PROGRAM\Storyline\[Storyline].c:
Code:
AddStorylineVar(n, "JACK_SPARROW", "1");
That is used in this part of PROGRAM\Characters\characters_init.c:
Code:
  // PB: Isla de Muerte -->
   if(sti(GetStorylineVar(FindCurrentStoryline(), "ISLA_DE_MUERTE")) > -1)
   {
     ch.quest.Muerte = "";
     ch.quest.Muerte_start.win_condition.l1 = "location";
     ch.quest.Muerte_start.win_condition.l1.character = ch.id;
     ch.quest.Muerte_start.win_condition.l1.location = "Tortuga_tavern";
     ch.quest.Muerte_start.win_condition = "Muerte_start";
   }
   // PB: Isla de Muerte <--

The game tries to read any dialog file from the storyline folder first and if it doesn't find it there, reads it from PROGRAM\DIALOGS instead.
We can make use of that by always putting the sidequest versions in PROGRAM\DIALOGS unless the text needs changing.

Then the availability of the quest could be handled with an AddStorylineVar as above for location-activated sidequests.
Dialog-activated ones could have a similar if-statement in the applicable dialog files.

Characters and locations being initialized usually will not do much harm. If they aren't called for by the game's quest code, it will be as if they aren't even there.

So then the following would have to be done:
1. Moving all sidequest code from PROGRAM\Storyline\JackAubrey to the main PROGRAM folder
(doesn't matter which of the four storylines we move it from, but I know Jack Aubrey is nice and clean)
2. Remove all identical files from the other storylines, taking special care to remove it properly from the Standard storyline as well
3. Check how each quest is started and add if-statements as above around them as required
4. Do the same with the remaining sidequests from the Standard storyline
That would indeed offer improved flexibility without having too much doubled up code.

How much are you able to do though? I think I'm just about the only other active coder and I can't really afford to do it myself.
Real life is picking back up (thankfully!), so I'll be having much less time and enthusiasm to spend on PotC over the next several months.
I'm always willing to help out where I can though.
 
I would be able to do everything I think. I'm getting the hang of the game now and should be able to code it all. Thats no problem.
I want to work a bit on my fetch quest first and when I'm done with that I should have enough experience with that code so I do this.
Got some real life issues also soon so I think I could start with this job somewhere at the beginning of november and should be able to finish it in a day or 2 or 3 if I do it in a weekend where I dont have obligations.
Is that okay with you?
You can assign the task to me then.
 
Btw was thinking about it again. We will encounter some problems with this probally. because probally the modders working on the sidequests have files already which are more up to date. So we would first needs theire most recent files before we go start reorganising everything.
 
The only quest modders active right now are:
- Bartolomeu o Portugues who works on the Bartolomeu o Portugues storyline (Assassin is also his)
- Jack Rackham who works on the Gold-Bug storyline (Woodes Rogers is also his)

Neither of those storylines have sidequests anyway. So that shouldn't be a big problem.
 
okay.
I think I've tought up a really nice way to handle this :).
After the fetch mod is up to a level I'm happy with it I will work on this a bit. I might tweak some of the sidequests a bit tough :wp
 
Tweaking is good. They're not all "quite up there". I did some tweaking on a few of Bartolomeu's ones before.
I ended up doing a lot of other things since though and haven't touched that in several years now.
Will be good to have them improved some further. :cheers
 
In the Original Story Main Quest ( Tales of a Sea Hawk )

When I talk to Orable Caron in St Pierre Port and accept the Pirates in the tavern Sidequest.

Go and talk to Thierry Bosquet in tavern & he robs me of 500 gold. Then next time I go to jungle outside St Pierre, Bosquet appears and attacks me ( kill him- quest over).:duel:

However now I cannot get Orable Caron to give me the Fred Bob - Help the Boatswain quest - Orable just has normal town rumors and Fred Bob is not spawned on the other beach.:(

I think it is something to do with this code in orable caron_dialog.c

Code:
     case "node_9":
       PlayStereoSound("INTERFACE\took_item.wav");
       AddMoneyToCharacter(pchar, -1);
       Dialog.Text = DLG_TEXT[30] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[31];
       Link.l1 = DLG_TEXT[32];
       if (Characters[GetCharacterIndex("Turpin Cabanel")].quest.smugglers == "0")
       {
         Link.l1.go = "node_10";
       }
       else
       {
         if (Characters[GetCharacterIndex("Thierry Bosquet")].quest.gambling == "0")
         {
           Link.l1.go = "node_12";
         }

         else
         {
           Link.l1.go = "rumours";
         }
       }
     break;

which is stopping this

Code:
     case "node_12":
       Dialog.Text = DLG_TEXT[43];
       Link.l1 = DLG_TEXT[44];
       Link.l1.go = "node_14"; // <--added by CatalinaThePirate for Fred Bob quest
       Link.l2 = DLG_TEXT[45];
       Link.l2.go = "node_13";
     break;

     //  --> Fred Bob inclusion dialog added by CatalinaThePirate
     case "node_14":
       Dialog.Text = DLG_TEXT[135];
       Link.l1 = DLG_TEXT[136];
       Link.l1.go = "node_15";
       Link.l2 = DLG_TEXT[137] + GetMyName(NPChar) + DLG_TEXT[138];
       Link.l2.go = "node_21";
     break;


This seems to mean that you have to do the Fred Bob - Help the Boatswain quest before you go and talk to Thierry Bosquet in the tavern

However I am not sure about this as I find the code in orable caron_dialog.c and thierry bosquet_dialog.c confusing.:modding


ALSO

If you try and do the Thierry Bosquet quest in the Freeplay stories you cannot complete it. You can agree to pay Thierry's debt - but the tavernkeeper Antoine Lebretton does not have the dialogs to take the players 500 and give you Thierry's IOU.

I am not sure but this might also stop you from being given the Fred Bob - Help the Boatswain quest in the Freeplay stories.:shrug


I hope this makes sense - I am a bit confused here.:read

:drunk


PotC Beta 3 Thierry_Buccaneer1.JPG PotC Beta 3 Thierry_Buccaneer2.JPG PotC Beta 3 Thierry_Hawk1.JPG PotC Beta 3 Thierry_Hawk2.JPG
 
I've made a note on my To-Do list. Don't have time to look into it now though, I'm afraid. :(
 
It's indeed wrong. I will take a look at this later. Seems someone made a little mess of it.
My guess is that the boatswain quest isn't 0 so something has to be activated already or its just not that on default. and thats why it isn't showing.
If you want to enable it just get it out of the if statement for 1 conversation. Trigger the quest and put it back again.
 
Just so you know, the Fred Bob sidequest DOES work in the Free Play storylines if you don't do the pirates one.
That one doesn't work, because I don't think that was ever even transferred at all.
 
Just so you know, the Fred Bob sidequest DOES work in the Free Play storylines if you don't do the pirates one.
That one doesn't work, because I don't think that was ever even transferred at all.


Probably not transferred to the Free-play stories - since I never did a walk through for it as it was so short and simple.

PS you don't need to talk to Orable Caron to start the pirates ( Thierry Bosquet ) quest :no- it can be started by talking to Thierry in the Tavern. :yes


:drunk
 
Okay what I think the best solution is:

- Make a function which has as input the questname and storyline. Depending on the preferences of the storyline this either returns true or false.
- Make a sidequest.c in the main folder where all the sides quest code is moved to.
- For the locations check if the quest is enabled in the storyline, if so init it in the main folder
- For the characters the same.
- Make a file which contains the dialog options which have to be added. You give as input the character name, quest and storyline. If this storyline has the default sidequests it will return the dialog options in the file. Else it will go to the specific storyline folder and checks the file there for the dialog options. For this I use the same technique I used for my fetch mod which makes it really easy to add a piece of dialog to a character.
- If a storyline has a custom location or characters it can just put it in the storyline folder and it should work.

I think in this way it should become quite easy to find problems and fix them easy. And its easier to add stuff or change it because you don't have to do it for all storylines.
Anyone forseeing any problems with this? Else I might start trying this very soon to see if I can get it to work for the quest we have atm.
It would mean a lot of changing in the code and a lot of moving the files so it will probally cause some problems but lets hope we can minimize them.
 
I tried installing the latest update, all my savegames were declared incompatible, so I reinstalled the 4th March update.

"Brave Black Flag" is basically the "Standard" storyline minus the story, so I copied all its questbook files into the general folder, loaded up my savegame, sailed to St. Pierre and captured a couple of French ships who hadn't heard that Britain and France are supposed to be at peace and tried to attack me. After selling the cargo, the ships, and the one captain who surrendered, I saved game again so I have a base point from which to do experiments on the various side quests at St. Pierre. Copying the files seems to have done the trick; the Blaque family saga, Fred Bob and Patric Cardonne now generate proper quest book entries.

Looking at the quest book files, some of them didn't need to be copied, but there aren't many so it's easier to list those rather than the ones which do need to be copied. So, do not copy these from the "Brave Black Flag" folder up to the general folder:
. Anything whose name begins with "Tutorial"
. "StormyStart.txt"

You probably also don't need "chest.txt", "Kill_Ogario.txt" or "Where_are_i.txt", and in fact I'm not even sure what those are doing in "Brave Black Flag". They appear to refer to incidents in the "Standard" main story. "chest.txt" is the chest you take from Speightstown shipyard to Port Royale tavern, "Where_are_i.txt" is you getting washed overboard and ending up on Bonaire, "Kill_Ogario.txt" is the alternative mission you get at Bonaire pirate settlement if you don't want anything to do with Anacleto Rui Sa Pinto.
 
Brave Black Flag is a carbon-copy of the Standard storyline with the main quest disabled.
While it does technically work, it is really messily done so ALL the standard storyline code is still in there.

Indeed the new update does require a new game because of changes to character initialization.
I thought I mentioned that somewhere.
 
Brave Black Flag is a carbon-copy of the Standard storyline with the main quest disabled.
While it does technically work, it is really messily done so ALL the standard storyline code is still in there.
True, but you previously said:
The solution is simple enough: Take the files from Brave Black Flag and put them in the Hornblower or general folder.
RESOURCE\INI\TEXTS\[something]\QUESTSTEXTS is what you're looking for.

If you can distinguish the "Standard Storyline Main Quest" from the "Side Quest" files, that would be quite welcome.
Saves me the trouble of figuring that one out and then we can put one set in the general folder instead of having multiple copies for each storyline. :woot
That is what I have done - identified the remaining "Standard" main quest files as well as those specific to "Brave Black Flag", copied the side quest files from "Brave Black Flag" to the general folder, and verified that the quest book works properly. ;)

Indeed the new update does require a new game because of changes to character initialization.
I thought I mentioned that somewhere.
Very possibly, but I didn't particularly want to play "Hornblower" all the way through again. So I went back to a slightly earlier version which accepts my savegames. I now have a savegame at St. Pierre so I can experiment with side quests, otherwise I'd rather like to try my luck with the latest update and the "Bartolomeu" storyline...
 
Back
Top