• 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!

Included in Build Hornblower updates

Grey Roger

Sea Dog
Staff member
Administrator
Storm Modder
Here's what I've been up to over the last few days. Various tweaks to "Hornblower", as well as a couple of dialog changes outside the storyline. Rachel Blacque has a very minor punctuation correction. Fred Bob has something a bit more substantial. There are three ways an officer can join your party:
. 'SetOfficersIndex(Pchar, <slot>, getCharacterIndex(<insert officer's name>))' - forces the officer into <slot>, displacing any officer who was already there, which is bad news if the displaced officer was important for a quest.
. 'SetOfficersIndex(Pchar, -1, getCharacterIndex(<insert officer's name>))' - puts the officer into any free slot, fails if all slots are already occupied.
. 'AddPassenger(Pchar, characterFromID(<insert officer's name>), 0); - doesn't put the officer into any slot, just puts him into your "Passengers" list. You can then assign him as and when you like.

Several other side-quest officers already use the 'AddPassenger' method and I've changed Fred Bob to do likewise. Hornblower can't assign such officers until the main quest ends but they can still contribute skills and perks, and be placed in command of captured ships.

And then there's something I'm working on at the end. It's not finished and is very definitely still a WIP. But if you want to see how far I've got then, when Admiral Pellew has given you your new ship and free-play orders, you may want to try your luck near Martinique. You're looking for a sloop named Loup-Garou. It means "Werewolf"...
 

Attachments

  • Hornblower.zip
    170.2 KB · Views: 173
Just a couple of notes and questions on this one:
- Actually tying up all loose ends of the story is great; thanks for working on that! :cheers
- I recommend making the additions to "Greenford Commander_dialog" directly in the PROGRAM\DIALOGS folder rather than making a copy of the file
- Are the GiveItem2Character "LongRifle_C" lines in quests_reaction.c required now that all those soldiers get equipped earlier in Story.c?
- How many cobblestones does Hornblower now get throughout? Should any of those be removed again to prevent him getting a large collection of near-useless stuff? :confused:
- I see you still have the old dialog code with the node changes in use rather than my rewrites; have you confirmed my fixes not working then?
 
I'm not sure whether normal procedure is to make a storyline-specific version of a character's dialog file or to put all the stuff from all storylines into the general file. Being paranoid in case my alteration messed up anything for other storylines or general play, I went with the former.

The extra "GiveItem2Character" lines for "LongRifle_C" are definitely required. Sharpe and his men appeared without rifles on the beach prior to the assault on the fort until I did that.

Hornblower will definitely need at least one cobblestone so that it can be equipped to prevent him carrying a pistol or musket while in prison. Since there'll therefore be one in his inventory unless he gets rid of it, adding more does no harm. And in case he does get rid of it, he'll need another one when he's again imprisoned and disarmed during the Guadeloupe raid.

The old dialog code works. You didn't bother putting your version in for the update so I left the old version alone. Basic rule: if it ain't broke, don't fix it. Especially if I can put the time to better use fixing things which do need fixing. ;)

And on that note: as it stands, "Hornblower" works. I didn't post the update until I'd done a complete play through. Feel free to make any of the modifications you suggest but don't post them in an update until you've also done a full playthrough to check what they do in reality, not in theory...
 
I'm not sure whether normal procedure is to make a storyline-specific version of a character's dialog file or to put all the stuff from all storylines into the general file. Being paranoid in case my alteration messed up anything for other storylines or general play, I went with the former.
As far as I'm concerned, if you can avoid having multiple copies of the same code, that is preferred.
Otherwise if any updates are made, there is a high risk of only parts being updated but not all the copies.
I spent a lot of time with the "sidequest splitting" and the "governor dialogs" to undo a lot of the copied code. :facepalm

The extra "GiveItem2Character" lines for "LongRifle_C" are definitely required. Sharpe and his men appeared without rifles on the beach prior to the assault on the fort until I did that.
Might that not be related to this section of code?
Code:
    case "Join_the_battle_company":
       SetCharacterRemovable(characterFromID("Richard Sharpe"), true);
       RemoveOfficersIndex(pchar, GetCharacterIndex("Richard Sharpe"));
       RemoveCharacterCompanion(Pchar, characterFromID("Richard Sharpe"));
       LAi_SetActorType(PChar);
       GiveItem2Character(characterFromID("Richard Sharpe"), "pistol2");
       EquipCharacterByItem(characterFromID("Richard Sharpe"), "pistol2");
       GiveItem2Character(characterFromID("Rifleman Cooper"), "pistol2");
       EquipCharacterByItem(characterFromID("Rifleman Cooper"), "pistol2");
       GiveItem2Character(characterFromID("Rifleman Higgins"), "pistol2");
       EquipCharacterByItem(characterFromID("Rifleman Higgins"), "pistol2");
       GiveItem2Character(characterFromID("Rifleman Haggman"), "pistol2");
       EquipCharacterByItem(characterFromID("Rifleman Haggman"), "pistol2");
       GiveItem2Character(characterFromID("Rifleman Harris"), "pistol2");
       EquipCharacterByItem(characterFromID("Rifleman Harris"), "pistol2");
       GiveItem2Character(characterFromID("Rifleman Tongue"), "pistol2");
       EquipCharacterByItem(characterFromID("Rifleman Tongue"), "pistol2");
       GiveItem2Character(characterFromID("Patrick Harper"), "pistol5+2");
       EquipCharacterByItem(characterFromID("Patrick Harper"), "pistol5+2");
Is that even needed? Why don't we just get rid of that altogether so that they keep their original assignments and be done with it?

Hornblower will definitely need at least one cobblestone so that it can be equipped to prevent him carrying a pistol or musket while in prison. Since there'll therefore be one in his inventory unless he gets rid of it, adding more does no harm. And in case he does get rid of it, he'll need another one when he's again imprisoned and disarmed during the Guadeloupe raid.
Couple of options:
- Replace:
Code:
GiveItem2Character(pchar, "pistolrock");
With:
Code:
if (!CheckCharacterItem(pchar, "pistolrock")) GiveItem2Character(pchar, "pistolrock");
- Remove the "pistolrock" after the prison scenes
- Since these are only cobblestones, it probably isn't very important and we might as well him getting 10 for free during the storyline. :cheeky

The old dialog code works. You didn't bother putting your version in for the update so I left the old version alone. Basic rule: if it ain't broke, don't fix it. Especially if I can put the time to better use fixing things which do need fixing. ;)
I'm pretty sure I DID add my latest stuff in the last update I posted.
Strange that you wouldn't have that. :shock

Feel free to make any of the modifications you suggest but don't post them in an update until you've also done a full playthrough to check what they do in reality, not in theory...
Like I'm ever going to have time to test everything always all the time! :shock
 
I just noticed: When you get onto the Justinian's deck the first time, there are "Senior Lieutenant Bracegirdle" AND "Senior Lieutenant Eccleston" there.
Plus a bunch of Midshipmen on the deck. Should not only ONE of those two be the SENIOR Lieutenant?
I think that should be Bracegirdle since he's got a recurring role in the movies (and the storyline too, I think?).
 
@Grey Roger: What still needs to be done here to get this ready for a public release?
When do you think you'll manage to complete it? Or should we temporarily bypass the extra extension?
 
Sorry, I've been away again, plus I have other non-pirate things needing to be done alongside developing "Hornblower".

The extension doesn't kick in unless you know to go to Martinique and look for Wolfe's ship. It's not signposted and does not affect general free play - or at least, should not. I'd leave it alone and see if anyone playing "Hornblower" notices anything odd as a result. Meanwhile, I've been working on what happens when you get to the beach on Hispaniola where the next part happens...
 
Sorry, I've been away again, plus I have other non-pirate things needing to be done alongside developing "Hornblower".
No worries. Good to see you around again in any case! :cheers

The extension doesn't kick in unless you know to go to Martinique and look for Wolfe's ship. It's not signposted and does not affect general free play - or at least, should not. I'd leave it alone and see if anyone playing "Hornblower" notices anything odd as a result.
Fair enough. I'll leave it as-is then.

Meanwhile, I've been working on what happens when you get to the beach on Hispaniola where the next part happens...
Exciting! :woot
 
As per this update, the above changes are shown for the player in F2>Character and the Perks Interface:
Mod Release - Build 14 Beta 3.5 Internal WIP For Testing | PiratesAhoy!

Hopefully this all makes sense now. You'll also notice that Hornblower is shown as "Navigator" rather than Captain until the story is completed.
After all, a "Naval Captain" has a LoM and can get promotions from any governor and Hornblower can not.
He is still a captain in that he is in charge of a ship, at least part way through. He's captain of Retribution and Hotspur, for example. Hornblower doesn't get promotions in the normal way because he gets promotions as part of the story. So he should really only be classed as "Navigator" in the earlier part of the story.

Can the code be modified so that any naval officer of rank 5 or higher is "Naval captain"? That's rank "Commander", who would expect to be in command of a smaller ship. Rank 6, "Captain", would be in command of something bigger, up to and including a 1st rate ship of the line. Beyond that you're into Flag Officers (perhaps have another label for those), who command a whole squadron or fleet.
 
He is still a captain in that he is in charge of a ship, at least part way through. He's captain of Retribution and Hotspur, for example. Hornblower doesn't get promotions in the normal way because he gets promotions as part of the story. So he should really only be classed as "Navigator" in the earlier part of the story.
Agreed. If you know at which point to do it, you should move the DeleteAttribute(pchar, "isnotcaptain"); to earlier in the quest code.
I think right now it is at the end of the original storyline (minus your extension), but that can certainly be done sooner.
You may need to test how that affects the storyline though because as soon as you do, you WILL need to pay salary and concern yourself with your crew's rations.
But that could be handled by auto-adding money and cargo at appropriate points during the story.

Can the code be modified so that any naval officer of rank 5 or higher is "Naval captain"? That's rank "Commander", who would expect to be in command of a smaller ship. Rank 6, "Captain", would be in command of something bigger, up to and including a 1st rate ship of the line. Beyond that you're into Flag Officers (perhaps have another label for those), who command a whole squadron or fleet.
You mean for the F2>Character interface labels? I think my above suggestion should already sort that one out.

If not needed, I think we should avoid making it automatic based on rank.
The main reason for it being there is to understand what the underlying code is doing for testing purposes.
For example, noticing that a character with a navy rank is shown as "Privateer" would indicate that something went wrong in the background.
 
Agreed. If you know at which point to do it, you should move the DeleteAttribute(pchar, "isnotcaptain"); to earlier in the quest code.
I think right now it is at the end of the original storyline (minus your extension), but that can certainly be done sooner.
You may need to test how that affects the storyline though because as soon as you do, you WILL need to pay salary and concern yourself with your crew's rations.
But that could be handled by auto-adding money and cargo at appropriate points during the story.
OK, I've added it at case "A_new_Quest_Line", which is where you get Retribution. I'm still working on my extension but once that's done, I'll install whatever is the latest version then, replay the whole story and see whether it still works.

But one thing which occurs to me is that later on Hornblower reverts to being a not-captain because he's decommissioned and dropped to Lieutenant, so I've also added 'PChar.isnotcaptain = true;' to case "Meet_Mrs._Mason", which is where the demotion happens; and then another 'DeleteAttribute(pchar, "isnotcaptain");' at case "Set_up_the_quest1", which is where Hornblower is re-promoted to Commander and given the Hotspur.
 
OK, I've added it at case "A_new_Quest_Line", which is where you get Retribution. I'm still working on my extension but once that's done, I'll install whatever is the latest version then, replay the whole story and see whether it still works.

But one thing which occurs to me is that later on Hornblower reverts to being a not-captain because he's decommissioned and dropped to Lieutenant, so I've also added 'PChar.isnotcaptain = true;' to case "Meet_Mrs._Mason", which is where the demotion happens; and then another 'DeleteAttribute(pchar, "isnotcaptain");' at case "Set_up_the_quest1", which is where Hornblower is re-promoted to Commander and given the Hotspur.
Makes sense to me. :onya
 
@Grey Roger: I understand you're working on this again, so I'd most definitely like to include it in the Beta 4 public release if we can!

I've been aiming for a release "as soon as possible", but we're nearing mid-winter now and there is almost no point in releasing prior to Christmas.
Does that sound like a reasonable deadline for your work on this?
 
If I can figure out how to get out of real life so that I can concentrate on Hornblower...

... and if I don't run into more programming problems such as the ones which held up my work on the duel and battle...

... and if Beta 4 doesn't have anything new which fouls up Hornblower, whether the extension or anywhere else, so that a test run through the whole story under Beta 4 goes smoothly...

... then yes, it's reasonable. xD

(If there's a problem with sinking a non-pirate ship while not having a LoM then the battle against Temeraire could have trouble.)
 
Last edited:
If I can figure out how to get out of real life so that I can concentrate on Hornblower...
That's always the story. :rofl

... and if I don't run into more programming problems such as the ones which held up my work on the duel and battle...
We can deal with those as they come. Thankfully we've got people here available to help.

... and if Beta 4 doesn't have anything new which fouls up Hornblower, whether the extension or anywhere else, so that a test run through the whole story under Beta 4 goes smoothly...
That's indeed a bit of an 'if', but definitely an important test to be done.
We cannot really guarantee that everything will work right from the start, so if we find out about unexpected issues after the public release, then so be it.
That is going to happen anyway. :wp

(If there's a problem with sinking a non-pirate ship while not having a LoM then the battle against Temeraire could have trouble.)
Hornblower is a navy officer and therefore has the effects of having a LoM even when he technically doesn't.
The player doesn't know that anyway; it is just a code mechanic to prevent him getting random promotions outside the storyline.
So that should be a non-issue.
 
Back
Top