• 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 Hornblower Storyline: Changes Required

If it is for the player character, then after pressing F11, you have to use GiveShip2Character as well because ships already owned by characters in the game retain their stats even after reinitalization.
The only way I get Atropos is from the "GiveShip2Character" line near the end of "quests_reaction.c". I have no savegame with Atropos already assigned.
All code files are loaded when you start ENGINE.exe . There are some exceptions, but those are specifically coded to load when they are requested.
This applies mainly to dialogs and console.c (why do you think console is so awesome? ;) ). All other things pretty much require you to close the game and reopen it again.
New game is not required, though. Just make a save, close the game, start the game and load your save and you should be back in business.
Nope. I always close the game and shut down the PC after finishing an evening's play session, and I always load up the same savegame when trying out my end game modifications. The results are consistent with "Old Friends - New Enemies.txt" not being read when "AddQuestRecord" is called.

I'm now close to the end of a more recent playthrough which was intended as a final check that other mods haven't fouled up "Hornblower", though I wrote my own mod while this playthrough was already in progress. But I've only just reached "Old Friends - New Enemies". So if the file is read when you start the quest then I should see the new line appear at the end of the closed quest. If it's only read when you start a whole new game then it will have to wait because I don't intend to start over yet again! There are other things awaiting my attention...

Which means, barring surprises during the final part of the playthrough or a sudden idea for something awesome and easy to do, that's it done. I've just posted a zip file with all my "Hornblower" updates" in the "List of Fixes" thread.

Other tweaks:
When you first meet Maria Mason, you stop and stare at her for quite a while. Two months, in fact. I found a section in "quests_reaction.c" titled "Two_months_later", so I added a "WaitDate" line to make it be two months later. The default viewing angle is, er, "interesting". :8q

At first I thought Percy Buckland might another traitor, but in fact he's just an idiot. xD When you're first assigned to Indy, starting out from Kingston, he tells you to set course south east for Charlestown, Nevis. That course will take you to somewhere around Barbados or Grenada, it certainly won't get you to Nevis. Buckland has now been given a short, sharp lesson in navigation. Those of you who don't know what "East by South" means, look it up (I had to :D) - I don't want you getting confused and heading for Cartagena...
 
LOL!

I'm pretty darn sure that quest texts do not require a new game to be started, because I've edited them "on the fly" often enough.
They might even update WHILE in the game, because they're no INI files. So it sounds to me like something else is going wrong there.

Hopefully I can find some time during my holiday next week to give this a check and help you out there.
To speed me up, can you post a savegame just prior to your quest extention so I can quickly check what is and isn't happening?

At first I thought Percy Buckland might another traitor, but in fact he's just an idiot. xD When you're first assigned to Indy, starting out from Kingston, he tells you to set course south east for Charlestown, Nevis. That course will take you to somewhere around Barbados or Grenada, it certainly won't get you to Nevis. Buckland has now been given a short, sharp lesson in navigation. Those of you who don't know what "East by South" means, look it up (I had to :D) - I don't want you getting confused and heading for Cartagena...
A lot of directions were wrong after Armada's worldmap update, so I'm not quite surprised that another such reference has been missed.
 
LOL!

I'm pretty darn sure that quest texts do not require a new game to be started, because I've edited them "on the fly" often enough.
They might even update WHILE in the game, because they're no INI files. So it sounds to me like something else is going wrong there.
They certainly don't update during this game because I tried it, repeatedly. What makes me sure that this one isn't updating is the fact that I can remove the line about marrying Maria, enter Mrs. Mason's house, go through the conversation and the questbook updates to add the line about marrying Maria. If it had read "Old Friends - New Enemies.txt" to update the questbook, the line about Atropos should have gone into the questbook at that point.
Hopefully I can find some time during my holiday next week to give this a check and help you out there.
To speed me up, can you post a savegame just prior to your quest extention so I can quickly check what is and isn't happening?
Right here. ;)

That's from my previous playthrough. I'll see whether the new line shows up in the questbook when I get to the end of the current playthrough. If not, I'll post an end-game save from there.
 
Couple of comments:

- If you see the latest ZIP I posted, I made some changes to a few dialog.c files to clean them up a bit.
Mainly related to dialog exit quests. Those changes should work as well and save some unnecessary code.
Not very important though.

- Assigning a dialog file to a character before talking is usually not required:
Code:
characters[GetCharacterIndex("Sir Edward Pellew")].Dialog.Filename = "Sir Edward Pellew_dialog.c";
If the character already has that dialog file assigned (and normally characters keep the same one throughout the game), then it isn't necessary.

- Looks like the AddQuestRecord line does work on a new game. Just tried that by starting one and triggering that line through console.
Bit odd; I was pretty sure those didn't need a new game. Perhaps storyline ones do, but general ones don't? Or something?
 
Also to tell the game you've married Maria:
Code:
    case "Church_marriage_scene":
       AddQuestRecord("Old Friends - New Enemies", 18);
       characters[GetCharacterIndex("Maria Mason")].married = MR_MARRIED;
       characters[GetCharacterIndex("Maria Mason")].quest.meeting = "1"
       characters[GetCharacterIndex("Maria Mason")].Dialog.Filename = "Gov MR_dialog.c";
       characters[GetCharacterIndex("Maria Mason")].Dialog.CurrentNode = "First time";
       LAi_SetStayType(characterFromID("Maria Mason"));
       PChar.married = MR_MARRIED;
       PChar.married.id = "Maria Mason";

       Pchar.quest.assigned_to_atropos.win_condition.l1 = "location";
       PChar.quest.assigned_to_atropos.win_condition.l1.character = Pchar.id;
       Pchar.quest.assigned_to_atropos.win_condition.l1.location = "Greenford_town";
       Pchar.quest.assigned_to_atropos.win_condition = "Assigned_to_atropos";
     break;
 
Which means, barring surprises during the final part of the playthrough or a sudden idea for something awesome and easy to do, that's it done.
Well, there was a surprise. During your period of decommissioning, you go to the apothecary's shop for a late night card game with Pellew and the Hammonds. The apothecary himself is not there, which I originally thought was because it's night time and all citizens are removed. (I've sometimes been at a store, sold a load of goods, fast-travelled to the shipyard, only it's now gone midnight so the fast-travel worked but the shipyard owner isn't there.) In fact, the apothecary is removed by "quests_reaction.c", and he's never returned. Which is a bit of a problem if you've just arrived with three prize ships and one dead bird...

He's back now! :D I've also just added your wedding present. So this ought to be the final version.

Also included is a savegame from after I'd dealt with the missing apothecary. The marriage code hadn't been added when this was created, but the savegame puts you outside Mrs. Mason's house just before you go in to get married, so you can test it. Additionally, the Atropos does now have enough space for a positive amount of food and rum; it's not pre-loaded with planks, sailcloth or medicaments, though, so you still need to go to the store if you want a proper load of combat supplies. And the line about being assigned to Atropos does appear in the closed questbook.
 

Attachments

  • quests_reaction.zip
    75.1 KB · Views: 146
  • -=Test=- Barbados.zip
    868.1 KB · Views: 166
You added the code to give Hornblower the Atropos. I left it as it was. ;) Some supplies do seem to be auto-supplied - enough food and rum for about a month, plus powder and some of each ammo type. Should anything else be auto-supplied? And if so, how do I arrange it?

Also, how do I set relations to be variable?
 
I know medicine isn't part of the standard supply, but I thought that planks and sailcloth were.
 
I know medicine isn't part of the standard supply, but I thought that planks and sailcloth were.
 
So, as I said (only once, though ;)), if planks and sailcloth are supposed to be part of standard supply, how do I give it standard supply?

And how do I set variable relations?
 
The true, true part in GiveShip2Character means to supply and fully crew the ship. That is all that can be done.
If she doesn't get the full supply, perhaps there is a Cargo space issue.
 
There's plenty of space. Auto supply gives me about 30 days' worth of food and rum, a modest supply of each type of ammo plus powder to fire it, and that's all. I can then go to the store to load up on planks, sailcloth and medicaments, which I'd do manually anyway - I've never yet used auto-buy. ;)

Now, about variable relations?
 
Having played around with the Auto Buy code yesterday, I can confirm that it does include packs and sailcloth.

I'll have to check those nation relations when I get home from vacation next week.
 
Looking at some of the functions defined in "Nk.c", I've found "void SupplyShip(ref char)". This includes the lines:
Code:
AddCharacterGoods(char, GOOD_SAILCLOTH, makeint(makefloat(GetCharacterShipHP(&char)) * SAIL_PER));
AddCharacterGoods(char, GOOD_PLANKS, makeint(makefloat(GetCharacterShipHP(&char)) * PLANKS_PER));
The lines which supply food, rum and ammo don't depend on "GetCharacterShipHP(&char)". So now I'm wondering if the Atropos has had its HP set correctly?
 
You can check in ships_init.c .

For the nation relations, relevant code is at the bottom of worldmap\dailycrewupdates.c .
 
@Grey Roger: Am I correct in saying that we can consider this Solved?
Ideally, I suppose there should still be an actual Marriage scene and at least some dialog to explain the fate of the traitors.
But that isn't all that important since I think this is now at least working properly.

Additional recent changes made:
- Player given the Archipelago Map at game start (noticed that was missing a while ago for some strange reason :facepalm )
- Changing Nation Relations enabled when the storyline finishes
 
I already regarded it as solved, which is why I'd finished working on it and started on promotion ships for non-British commissioned officers. ;)

I intentionally left the traitors out of my final dialogs. They're a potential plot hook if someone later wants to write further quests for Hornblower. Besides, one of the traitors is identified, having revealed himself on Guadeloupe, but the other is not yet officially known. Sharpe suspects him but has no solid evidence. There is conclusive evidence proving him to be the traitor, but it's the result of making a wrong choice in a dialog on Antigua and you don't survive for very long afterwards...

An actual marriage scene would be a nice touch but not critical to the story.

The archipelago map may have been left out so you have to navigate the hard way, especially if you choose to Direct Sail everywhere. This is why it's important that dialogs which give courses to next destinations are correct. :D
 
Fixed it is!

I think the missing archipelago map was because of all the code juggling that happened before.
Forcing difficult navigation was never the intention I'm sure. If you want, I can check Beta 3.1 to confirm if you get the map there or not.
But I think you did and that just got jumbled at some point, but fixed again now.
 
Back
Top