• 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

Does the even more tiny "Witch of Endor" need to be anywhere in there, you reckon?
From "Ships_init.c", Cutter2 has 12 guns of 6 lb, weight 100 tonnes, capacity 300, HP 1500, crew 54. PO_Hoy has 8 guns of 4 lb, weight 170 tonnes, capacity 1200, hp 800. Though perhaps smaller, Witch of Endor appears to be tougher and better armed. I'd therefore have Caroline for Midshipman and Witch of Endor for Junior Lieutenant.

That does mean we lose the HMS_Sophie for Hornblower altogether, but that isn't so bad because I think she's still used for Aubrey and possibly Nelson too.
As "Nk.c" stands at the moment, everybody gets HMS_Sophie. It's the default ship for Lieutenant in Napoleonic era.

Oh, absolutely! Which is why I don't at all care about having an Indy that doesn't look like the film one. I'd much rather have a proper frigate, which she is.
Indeed. I'm just not as certain what type of frigate is appropriate. ;)

Adding ships to the fleet is quite easy, but I'm not quite sure how to remove specific ships from your fleet again or how to replace them.
I'm sure it is possible, but there are a lot of variables to consider because of different player actions.
OK, Natividad is becoming more trouble than she's worth, so leave her for a future possible quest.
Commodore: Sutherland - Bellona
Rear Admiral: add Indefatigable as companion
Vice Admiral: add Phoebe as companion - Essex
Admiral: add Nonsuch as companion - RN_FirstRate

If you put Nonsuch into the first slot, replacing the player's current ship, it won't take long for someone to realise that a Vice Admiral can take some tiddler as a prize, swap ship to it, then claim his promotion to Admiral and have the tiddler replaced by the Nonsuch. So you may as well just add it as a companion and let the player decide which one to use as a flagship and what to dump so as to open up a slot for prize ships. By similar logic, if a Commodore can swap between ships then there's little point forcing anything into the player's own ship slot for any promotion beyond Commodore - just add companion ships.

Would be much appreciated! I should be able to sort out the English Hornblower progression there as per your suggestions today.
But I'd really rather not do the same for all periods and all other nations too.
My basic strategy would probably be to copy the entire British code to one of the other nations, replace all the rank names, then look through "Ships_init.c" for suitable ship replacements. Comment out exceptions for specific names, maybe pick suitable heroes for other nations to replace them.
 
From "Ships_init.c", Cutter2 has 12 guns of 6 lb, weight 100 tonnes, capacity 300, HP 1500, crew 54. PO_Hoy has 8 guns of 4 lb, weight 170 tonnes, capacity 1200, hp 800. Though perhaps smaller, Witch of Endor appears to be tougher and better armed. I'd therefore have Caroline for Midshipman and Witch of Endor for Junior Lieutenant.
Certainly possible. :yes

As "Nk.c" stands at the moment, everybody gets HMS_Sophie. It's the default ship for Lieutenant in Napoleonic era.
Yups. :yes

Indeed. I'm just not as certain what type of frigate is appropriate. ;)
Since we're not sure, we might as well use the "HMS_Indefatigable" ship model to play the role of the HMS Indefatigable.... :wp

OK, Natividad is becoming more trouble than she's worth, so leave her for a future possible quest.
Fair enough. Does make more logical sense. :yes

Commodore: Sutherland - Bellona
Rear Admiral: add Indefatigable as companion
Vice Admiral: add Phoebe as companion - Essex
Admiral: add Nonsuch as companion - RN_FirstRate
Sounds good. But doesn't that double up on the Essex because the Lydia is one too?

If you put Nonsuch into the first slot, replacing the player's current ship, it won't take long for someone to realise that a Vice Admiral can take some tiddler as a prize, swap ship to it, then claim his promotion to Admiral and have the tiddler replaced by the Nonsuch. So you may as well just add it as a companion and let the player decide which one to use as a flagship and what to dump so as to open up a slot for prize ships. By similar logic, if a Commodore can swap between ships then there's little point forcing anything into the player's own ship slot for any promotion beyond Commodore - just add companion ships.
I'm not sure about adding more than two companion ships; that way you'd be FORCED to sell one of them if you want to be able to take prize ships.
Should that be required?

My basic strategy would probably be to copy the entire British code to one of the other nations, replace all the rank names, then look through "Ships_init.c" for suitable ship replacements. Comment out exceptions for specific names, maybe pick suitable heroes for other nations to replace them.
That was pretty much my thought as well. The other nations will be simpler than England because they don't need exceptions for specific characters.
So just one ship per rank per period would be good enough. Also worth to note that Portugal and Holland are capped at Tier 3 ships in some time periods, if I recall.

One extra trick for this that could make this a LOT simpler is to ENABLE_CHEATMODE at the bottom of PROGRAM\InternalSettings.h .
That makes ALL period-correct ships available in the Select Storyline Choose Ship interface.
So then you can set the nation to whichever one you're working on and set the starting date to match with the period you're doing, then look for appropriate ships per Tier.
I'd have to make one change in the code so that it displays the model code name instead of using a pretty display name, but that is easy enough.
Only information you don't have available then is number of cannons, which still needs to be taken from ships_init.c .
But other than that, it saves a lot of time and effort crawling through a huge code file.
 
Sounds good. But doesn't that double up on the Essex because the Lydia is one too?
You won't have the Lydia by that time as she's been replaced as your own ship by the Sutherland. And, unless you swap to her in preference to the Sutherland, she's only a companion, not your command ship.

I'm not sure about adding more than two companion ships; that way you'd be FORCED to sell one of them if you want to be able to take prize ships.
Should that be required?
It's not required. Not since the Build Mod introduced berthing, anyway. ;)

That was pretty much my thought as well. The other nations will be simpler than England because they don't need exceptions for specific characters.
That's just because nobody has added any heroes for other nation, whether fictional or factual. I'm surprised you haven't already worked out a progression list for Michiel de Ruyter, for example. ;)
 
You won't have the Lydia by that time as she's been replaced as your own ship by the Sutherland. And, unless you swap to her in preference to the Sutherland, she's only a companion, not your command ship.
True, the double ship use doesn't actually do any harm. I was mainly thinking of variety.

It's not required. Not since the Build Mod introduced berthing, anyway. ;)
Valid point. :yes

That's just because nobody has added any heroes for other nation, whether fictional or factual. I'm surprised you haven't already worked out a progression list for Michiel de Ruyter, for example. ;)
I just about managed to find the time to do England since that was clearly the most important one at this time.
Didn't really want to do any other nations until we had feedback on how England works, but that has been sorted now.
Also.... Since basically anyone could do other nation progressions now that the foundation is there, I'd really rather not have to do it myself.
Would be quite a waste of my time and effort.

Until I saw the Michiel de Ruyter film a month ago or so, I didn't really know all that much about him.
Actually, the only semi-historical figure I AM familiar with is Hornblower because I read all the books several times.
Holland won't be the easiest progression either, because there aren't that many ship models available and the specific Dutch ones we do have tend to be merchant ships.
For good reason, since The Netherlands were well-known for their trade, but that doesn't make sense for the navy, does it?
 
It is now:

Midshipman: Caroline (PO_Hoy) + Midshipman Hornblower model
Junior Lieutenant: Witch of Endor (Cutter2) + Lieutenant Hornblower model
Lieutenant: Le Rève (FR_Sloop)
Senior Lieutenant: Hotspur (RN_Volage)
Commander: Atropos (HMS_Greyhound) + Lieutenant William Bush
Post Captain: Lydia (RN_Essex)
Commodore: Sutherland (HMS_Bellona)
Rear Admiral: Indefatigable (HMS_Indefatigable) commanded by Sir Edward Pellow as companion + Regular Order of Bath model
Vice Admiral: Nonsuch (RN_FirstRate)
Admiral: Phoebe (RN_Essex again) as companion + Regular Admiral model

All tested in the game and found working. And I also enabled him Midshipman/Lieutenant/Commander for Free Play.
That will actually jump-start you to the correct rank at game start as well, but will ONLY work for Hornblower (to keep it somewhat simple).

I'm wondering if any Hornblower-specific officers should be added in the progression as well.
Right now only Bush makes an appearance and all other officers are either random or from the Nelson progression as that is default.
 
If you want Hornblower-specific officers then there's Bracegirdle, and possibly Chadd, who is a desk clerk for most of the story but ends up on Hotspur in time for the action at Guadeloupe.

I still say you may as well make Nonsuch a companion rather than a replacement if a Rear Admiral is allowed to swap ships, otherwise a sneaky player will just swap himself into a small prize ship, get that replaced by Nonsuch, and end up with both Nonsuch and Sutherland. Either by such trickery or by being given Nonsuch as a companion, the player can then decide whether to sell or berth one of the battlewagons if he wants to free up a slot for prize-taking.

Sir Edward Pellew should not be in command of Indefatigable if that ship is to be assigned as a companion; he's still Hornblower's superior officer, and by the time Hornblower is a Commander in the storyline, Pellew is an Admiral. I've no idea where Pellew would be by the time Hornblower is Rear Admiral, but it's a good bet he wouldn't be on a mere frigate, and certainly not the one on which he served as Captain!
 
The final promotion ship now works the same as for all non Hornblower characters.

Indeed Pellew should not actually be in command, but then the Indy doesn't quite belong there at all.
She's just there because she's so recognizable and Pellew helps with that.
But feel free to tweak things further.
 
I'm not sure what you've done to "StartStoryline.c" or "quests_reaction.c", but here are my updated Hornblower files:
StartStoryline.c: Relations set so Portugal is allied to Britain, France is allied to Holland and Spain, everyone else is neutral to everyone else (though there were a few other alliances and wars not related to the French Revolutionary Wars, so I left them alone)
quests_reaction.c: Britain and Portugal declare war on France, Spain and Holland when the plot calls for it ("war_with_france"), then all make peace again when Hornblower is decommissioned. Magicienne is now RN_Volage.
Dialogs: Minor change to Sir Hew Dalrymple (originally explained the covert naval build-up by saying things aren't as clear-cut in the Caribbean, battles may happen even though Britain and France aren't actually at war; now he simply says that war could break out any time). Change to Sir Edward Pellew (direct references to "Jamaica" and "Port Royal" replaced with "#sisland_Redmond#" and "#sRedmond#").
characters\init\Story.c: At the start of the game, you're part of a fleet which includes Lydia under command of Percy Buckland. It took me some time to find out where that's being set. Lydia is now an Essex class, as she is in the free-play promotion rewards - previously she was a Unite class frigate. This makes next to no real difference because these other ships disappear when you board Justinian for the first time, but if Lydia is going to be mentioned then she may as well be correct. :D

Still to do: add some "RemovePassenger" lines at relevant places to take redundant characters out of the Passengers list.

"StartStoryline.c" and "quests_reaction.c" were modified before the latest zip update so if anything else was done to them, you'll either need to do it again or tell me what it was so I can modify my versions when I do the "RemovePassenger" stuff.
 

Attachments

  • Hornblower.zip
    93.8 KB · Views: 92
Cheers! I'll WinMerge them tonight. I don't think I did any large stuff on the Hornblower files;
the only change I remember making in the latest ZIP is to set the GiveShip2Character nation to FRANCE for the FR_Sloop .

If you haven't gotten it yet, I'd recommed you get WinMerge as well.
Even if you don't particularly need it, it allows you to see the code changes that I make and that might help to further familiarize yourself with the code as well.
 
And now I have WinMerge. :D

Comparing my current versions of "StartStoryline.c" and "quests_reaction.c" to what appears in the latest installer and zip update, the differences are what I'd expect. Now I've made the same change as you to the lines about Le Reve, the remaining differences are my relation changes and the Magicienne.
 
Next question: how do you align character relations to nation relations as part of being a commissioned officer? After I've set Britain + Portugal to war with France + Spain + Holland, Hornblower's personal relations with the other nations don't change, he's still neutral to everyone. I found a line in "StartStoryline.c", "SetRelationsAsNation", which seemed to do the job, except that also resets personal relations with your own nation - Hornblower's relations to Britain resets to 0. This isn't a problem the first time as he's still a midshipman, and right after that is the battle with the Temeraire, then he gets promoted to Acting Lieutenant and his relations increase to match. But when peace breaks out and everyone becomes neutral again, Hornblower is demoted back to Lieutenant and I'm not sure his relations are set to match; on the "Relations" screen, the number is green, meaning his relations are higher than appropriate for his current rank and he'd be due a promotion from a governor if he had a LoM.

As I recall, you had some way to overcome this problem during random changes of relation for a free-play commissioned officer. Would I be able to use that to correct Hornblower's relations as well?
 
Next problem: Nevis pirate settlement. The locals are hostile if you have a Letter of Marque. Hornblower doesn't; he's not a privateer, he's an honest commissioned naval officer, and the pirates are fine with that. Which means I'm on my way to Charleston, attack some pirate ships, then sell whatever goods I looted - er, confiscated legally - to the pirate store. :wp

When you first enter the pirate settlement, you meet Artois Voysey and Nigel Blythe. You don't have a choice, the encounter will happen, though you do have the choice of which one to support. Then you can hire one of them as an officer. Each comes with his own side quest. If you're unwise enough to do this before "The Duchess and the Devil", whichever one you took on will disappear when you go to the prison fort. And if you haven't completed his side quest by then, you never will...
 
But when peace breaks out and everyone becomes neutral again, Hornblower is demoted back to Lieutenant and I'm not sure his relations are set to match; on the "Relations" screen, the number is green, meaning his relations are higher than appropriate for his current rank and he'd be due a promotion from a governor if he had a LoM.
The game code probably doesn't quite understand nation relations going backwards.
At least because you don't have a LoM you cannot actually get your promotion when the number turns green.

As I recall, you had some way to overcome this problem during random changes of relation for a free-play commissioned officer. Would I be able to use that to correct Hornblower's relations as well?
This is the relevant thread from the Random Nation Relations Changes: http://www.piratesahoy.net/threads/relations-for-commissioned-officers.24624/page-2
Other places to look: bottom of PROGRAM\NATIONS\nations.c (I think)
If I recall, the Standard StartStoryline.c file has some player relation changes at the bottom too. You might want to check all StartStoryline.c files to be sure.
If you can't find it, remind me over the weekend and I'll have a look for a proper way to set relation numbers for the player.

Next problem: Nevis pirate settlement. The locals are hostile if you have a Letter of Marque. Hornblower doesn't; he's not a privateer, he's an honest commissioned naval officer, and the pirates are fine with that. Which means I'm on my way to Charleston, attack some pirate ships, then sell whatever goods I looted - er, confiscated legally - to the pirate store. :wp
I can imagine that being the case. The code doesn't give Hornblower his LoM until the Free Play stage later to prevent general promotions from the governors.
The HasLetterOfMarque (?) function in nations.c should have an extra line added to return true always for professionalnavy characters.
If you can't figure that out yourself, remind me tomorrow and I'll do it. Should be a quick fix.

When you first enter the pirate settlement, you meet Artois Voysey and Nigel Blythe. You don't have a choice, the encounter will happen, though you do have the choice of which one to support. Then you can hire one of them as an officer. Each comes with his own side quest. If you're unwise enough to do this before "The Duchess and the Devil", whichever one you took on will disappear when you go to the prison fort. And if you haven't completed his side quest by then, you never will...
Do they disappear as Passengers altogether?
If they stay on, but you cannot assign them as active officers anymore, that restriction is supposed to be lifted when the story transfers to Free Play at the end.
So that would mean you can finish those sidequests afterwards.

You aren't even intended to sidequests prior to that point in the first place, because you should be following orders.
But those sidequests are now generally available and there isn't anything in place (yet) to prevent it for Hornblower until later.
 
The game code probably doesn't quite understand nation relations going backwards.
At least because you don't have a LoM you cannot actually get your promotion when the number turns green.
I know. The point is, the number is probably green because your relation to Britain is still high enough to be Commander, which means it isn't being changed by the change of rank to Lieutenant, which means I can't count on that rank change to set it to something suitable after "SetRelationsAsNation" sets it to 0.
This is the relevant thread from the Random Nation Relations Changes: http://www.piratesahoy.net/threads/relations-for-commissioned-officers.24624/page-2
Other places to look: bottom of PROGRAM\NATIONS\nations.c (I think)
If I recall, the Standard StartStoryline.c file has some player relation changes at the bottom too.
All of those point to "SetActualRMRelation", which seems to change player's relation to a specific nation. So, instead of using the general "SetRelationsAs Nation" to do the lot, I'll just need to use "SetActualRMRelation" to do each one individually.
I can imagine that being the case. The code doesn't give Hornblower his LoM until the Free Play stage later to prevent general promotions from the governors.
The HasLetterOfMarque (?) function in nations.c should have an extra line added to return true always for professionalnavy characters.
If you can't figure that out yourself, remind me tomorrow and I'll do it. Should be a quick fix.
It's "HaveLetterOfMarque". If professionalnavy characters always show true for that, will that not allow Hornblower to get promotions from governors? Might it not make more sense for pirates to check for both LoM and professionalnavy status?

Do they disappear as Passengers altogether?
Yes. I found that out after I'd hired Rys Bloom before "The Duchess and the Devil", and didn't have him when I left prison. Here is the report.
 
Let's continue discussing this particular problem here, otherwise it'll just get lost in the dark and murky depths of the forum....
 
I know. The point is, the number is probably green because your relation to Britain is still high enough to be Commander, which means it isn't being changed by the change of rank to Lieutenant, which means I can't count on that rank change to set it to something suitable after "SetRelationsAsNation" sets it to 0.
You'd have to see what the SetRank function does; that one is defined either in nations.c or, more likely, in PROGRAM\Charactetrs\CharacterUtilite.c .

All of those point to "SetActualRMRelation", which seems to change player's relation to a specific nation. So, instead of using the general "SetRelationsAs Nation" to do the lot, I'll just need to use "SetActualRMRelation" to do each one individually.
Indeed that would be better. I had originally used SetRelationsAsNation for the random nation relations, but that caused the problem of your rank resetting all the time.
That function was originally written to change your starting nation relations. Though perhaps I should rewrite that function so that it CAN be used for the purpose during the game as well.

It's "HaveLetterOfMarque". If professionalnavy characters always show true for that, will that not allow Hornblower to get promotions from governors? Might it not make more sense for pirates to check for both LoM and professionalnavy status?
At @Jason Mafettone's suggestion, I changed the pirates to check if you have ANY letter of marque and tell you to get lost if you do.
This is a custom function that is at the moment used for only that purpose and will probably return false for Hornblower because he does NOT have a LoM while it should return true because he's in the navy.
That function does not affect the regular governor promotions in any way. However, Hornblower's lack of actual LoM does which is intentional and is reset after the storyline finishes.

Yes. I found that out after I'd hired Rys Bloom before "The Duchess and the Devil", and didn't have him when I left prison. Here is the report.
Moved to separate thread to prevent losing that one.
 
Do you know the exact point where your officers disappear? If played through, compile.log will show the quest case name(s) where this is most likely to happen.
This should allow us to find the code responsible for this.

I recall from the Standard storyline that there are sometimes situations where ALL your officers are removed, but there is then also a "restore" function later on.
Perhaps the same or similar functionality is used for Hornblower, but the restore line is missing?
 
I don't regard this as a bug. Hornblower isn't supposed to have any extra officers and you've been doing everything possible to stop him from getting them. The only ones which haven't been blocked (yet) are those from side quests, e.g. Rys Bloom, Fred Bob and Artois Voysey. Losing Rys Bloom is only an annoyance as he has no additional quest associated with him. Losing Fred Bob is also only an annoyance as his subsequent quest, "Help the Lady", is triggered immediately when you hire him. Artois Voysey is a different matter as he has his own quest, and if you lose him during "The Duchess and the Devil" then that quest can't complete.

There's probably no restore line for Hornblower as you're not supposed to have any officers to restore. Specific officers are assigned and removed as needed for the story.
 
Indeed that would be better. I had originally used SetRelationsAsNation for the random nation relations, but that caused the problem of your rank resetting all the time.
That function was originally written to change your starting nation relations. Though perhaps I should rewrite that function so that it CAN be used for the purpose during the game as well.
If you have spare time from other programming, perhaps. ;) Certainly "SetRelationsAsNation" does appear in "StartStoryline.c" for both "Hornblower" and "standard", where it does indeed set up your starting relations and where it makes sense to set your relation to your own nation as well. Elsewhere, it makes sense to change relations to specific nations as needed using "SetActualRMRelation" - no point wasting execution time by setting your relation to a nation whose relation to your own nation have not changed since last time. :)

At @Jason Mafettone's suggestion, I changed the pirates to check if you have ANY letter of marque and tell you to get lost if you do.
This is a custom function that is at the moment used for only that purpose and will probably return false for Hornblower because he does NOT have a LoM while it should return true because he's in the navy.
That function does not affect the regular governor promotions in any way. However, Hornblower's lack of actual LoM does which is intentional and is reset after the storyline finishes.
Perhaps at the moment, but someone writing a mod in future may find a function called "HaveLetterOfMarque" and want to use it to check if you do in fact have a LoM. Or someone might want to change pirate behaviour again and have them tolerate a LoM but hate genuine commissioned officers.

Besides, check "PROGRAM\DIALOGS\governor.c", then tell me again that "HaveLetterOfMarque" is only used by pirates. ;)
 
Back
Top