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

WIP Unique Ship/Captain Encounters

Sounds good. The main reason I wanted to bring the curse into it is to penalise capturing the ship. Maybe this is where it could come in? So if the player just sinks it then nothing happens, but if they take the ship then the curse might consume its captain and crew (if it’s handed over as a companion then the player isn’t affected).

I’ve been thinking about the difficulty of capturing them, it shouldn’t really be very easy at all, at least much more difficult than sinking them outright. With 500+ hit-points anyway on the skeletons, some armour and more potent weapons would certainly make it substantially more difficult. I also thought about giving them considerably more hull which would never repair (I know enemy ships actually do repair, I spent half-hour trying to kill HMS Victory because it was continuously repairing up to 9% and faster than my cannons were reloading). Assuming they couldn’t repair, their hit-points would eventually drop far enough after continuous encounters (and this in itself could allow for increasing the encounter rate without having to worry so much about balance). The way I’m looking at it is that these ships really would be the prizes of the Caribbean, and maybe capturing all of them would be the end-game for a lot of people.
 
Will there be a way to disable this mod? I really don't want to see cursed ships outside the storylines and side quests for which they're intended, as I normally much prefer a game free of supernatural stuff.
 
When you say cursed ships... do you mean the ships actually being cursed, or the existence of ships like the Black Pearl cursed or not?
 
Will there be a way to disable this mod?
Do you even need to ask? :cheeky

Over the years, I have spent a LOT of time to limit fantasy elements to only storylines/areas where they belong.
So I will not add it to any official modpack updates, unless the ship appearances can be customized to only appear where we would want them to appear.

I completely agree that, for example, the Black Pearl doesn't belong in the Hornblower storyline.
Nor the Standard and Jack Sparrow storylines, since she's used for specific quest purposes there.

And the encounters should be period-correct as well, of course.
We didn't make the Periods mod for nothing, after all. :)
 
If they're not cursed then they're not supernatural. :D

Having said that, Black Pearl in all its versions really shouldn't appear outside the "Tales of a Sea Hawk" or "Hoist the Colours" storylines, unless someone else writes a new storyline which needs them. Likewise the Satanist Frigate and Fluyt of War have no business appearing outside the "Strange Things Going On" side quest. And I wonder what @Bartolomeu o Portugues will say if his "PiratBattleGalleon" shows up outside the "Bartolomeu" storyline... Ships which are marked "unique" and "refShip.CanEncounter = false" are so marked for a reason - having them appear at random devalues their significance to their respective stories. What's the point of playing the whole way through "Tales of a Sea Hawk" to a climactic duel with Black Pearl if you're just going to run into it in a random, albeit perhaps one-off, encounter which has nothing to do with the quest? Why bother doing "Strange Things Going On" if you can meet the Satanist ship anyway?
 
These ship encounters should at the very least be period-specific. Black Pearl should appear only in Colonial Powers, for example.
Additionally, I imagine most of them would only make sense in the Free Play storyline.

Definitely not ALL unique ships are meant to be showing up at random.
I think the more relevant part is having various "famous characters" sail around as "special encounters".
Who those encounters end up being should depend on period and, possibly, storyline.

I'd also envision being able to specify specific of these encounters to be disabled in certain storylines.
So if you want a realistic storyline in Colonial Powers, you can disable the Pearl and Dutchman, but keep whatever historical ones may be defined.

Anyway, that is all added complexity for future concern. First step is getting the functionality workable, right?
 
I have a idea for a update of the beta.
I think ya know PotCO (pirates online).
there ya have cursed ships with skeleton pirates that are summonded by Jolly Roger, maybe ya can have new ship on the map that are cursed and fightable.
 
I have a idea for a update of the beta.
I think ya know PotCO (pirates online).
there ya have cursed ships with skeleton pirates that are summonded by Jolly Roger, maybe ya can have new ship on the map that are cursed and fightable.
Most moved here, which seems like a much more appropriate spot. :rolleyes:
 
I’ve already gone so far as making the crew on the Black Pearl to be skeletons. ;)

It’s not a mod feature though, just a personal obsession with changing everything in the game.
 
Assuming you already have multiple such encounters defined, how are they chosen?
Could an attribute be added to one to skip that specific one, for example?
 
I’m not sure I understand. At the moment, every encounter with the Black Pearl will have cursed crew.
 
I’m not sure I understand. At the moment, every encounter with the Black Pearl will have cursed crew.
Imagine having these encounters defined:

- HMS Victory
- HMS Bounty
- Black Pearl
- Flying Dutchman

All those should appear only in their correct time periods, so no Victory in Early Explorers.
They should also not appear if those ships already belong to the player, for example if the player chose Davy Jones for Free Play.
For storyline purposes, they may also need to be disabled. For example, the Black Pearl is used in the Standard and Jack Sparrow storylines.
 
The periods are set on each ship so it’s easily configurable. Personally, I have all of those set to show in each period at the moment just so I can see them pop up here and there, but that’s my own preference.

As for story-lines, since I’m now using CanEncounter = UNIQUE_ENCOUNTERS and I imagine this can be overridden if a story is in effect at all or if a specific one is. I don’t know what the code is to grab the current quest status but I imagine it’s easy enough.
 
Changing ship attributes based on storyline might not be the best approach.
Do you have the characters defined in a character init file somewhere?
Adding a "disable" attribute to a character through a StartStoryline.c file is easy enough.
 
If the ship hasn’t been generated then it wouldn’t be a problem, would it? What I mean is that if a story is active... no, wait... if free-play is active then the attribute gets set to true, and at the start of the game no ships have been created so no attributes have even been set. Or... the flag just stays false and it’s simply there as a handy way for people to change it if they want to.
 
I can't seem to quite wrap my head around your approach on this one.
My suggestion would be to have this feature based primarily on captains defined in a character init file somewhere.
Or alternatively to have the encounters defined completely separately, which would allow defining specific fleets as well (Treasure Fleet?).

You are basing it primarily on ship, which is convenient for the period encounter chances, of course.
And that also allows those ships to show up basically in any type of encounter.
But it is giving me a headache trying to think through the potential effects that approach might have. :unsure
 
What effects could there possibly be? I can imagine it might conflict with stories, but if it’s open-play then what could go wrong?

Are treasure fleets defined separately from generic encounters? If so, I need to look at it.
 
What effects could there possibly be?
I don't know. If these encounters are handled separately from the regular ones, the potential effects are easy to oversee.
But if they're intertwined everywhere, then it becomes difficult to think through all the way.

Are treasure fleets defined separately from generic encounters?
At the moment, not really, no. I'd like them to be handled differently than they currently are.
Having them tied in with your ship encounters in a system like the one I proposed would allow them to be worked into a story/sidequest/rumours system of some kind.
I think there is a lot of potential to that approach, but it doesn't exist yet in that form.

At the moment they are defined in Encounters_init.c:
Code:
// TREASURE FLEET!!! - TRANS ATLANTIC (deep ocean waters) merchants - ESCORTED by warships
   makeref(rEnc, EncountersTypes[ENCOUNTER_TYPE_LMERCHANT2]);
   n++; rEnc.Skip = false;
   if(GetCurrentPeriod() >= PERIOD_NAPOLEONIC) rEnc.Skip = true; // PB: No Treasure Fleets after 1790
   rEnc.Type = ENCOUNTER_TRADE;
   rEnc.Chance = 3;
   rEnc.MinRank = 5;
   Enc_AddShips(rEnc, "Trade", 2, 4);
   Enc_AddShips(rEnc, "War", 2, 6);
   Enc_ExcludeNation(rEnc, ENGLAND);
   Enc_ExcludeNation(rEnc, FRANCE);
   // !!!SPAIN ONLY!!! //
   Enc_ExcludeNation(rEnc, PIRATE);
   Enc_ExcludeNation(rEnc, HOLLAND);
   Enc_ExcludeNation(rEnc, PORTUGAL);
   if (bGuest1NationExists) Enc_ExcludeNation(rEnc, GUEST1_NATION);
   if (bGuest2NationExists) Enc_ExcludeNation(rEnc, GUEST2_NATION);

   Enc_AddClasses(rEnc, 5, 3, 5, 3, 4);
   Enc_AddClasses(rEnc, 7, 3, 5, 2, 4);
   Enc_AddClasses(rEnc, 8, 3, 5, 2, 3);
   Enc_AddClasses(rEnc, 11,3, 5, 2, 3);
   Enc_AddClasses(rEnc, -1,MAXMERCHANTCLASS, 5, 1, 4); // NK for shipcap off
And have this in AIFantom.c:
Code:
    case ENCOUNTER_TYPE_LMERCHANT2:
       encountertype = "L - Merchant 2: -->SPAIN ONLY<--, Trans-Atlantic Treasure Fleet, a convoy";
       if(rand(100) < 75)
       {
         TreasureFleet = true;
         trace("Fantom_GenerateEncounter: Spanish Treasure Fleet loaded with Gold and Silver!");
       }
     break;

The way this is handled with that global 'TreasureFleet' variable is rather clumsy, but it was the quickest way I could get it to work at the time.

Encounters like these only occur randomly on the worldmap and during DirectSail. It would be nice if it was more quest-like coding.
Then the encounter could be generated at Cartagena and then moved to several other appropriate towns, with accompanying rumours.
 
Looking at the treasure fleet logic, it looks like the main relevance is whether or not the fleet gets valuable goods. Such a fleet could be generated anyway but without the nice cargo.

Bear in mind that all of the ships which are defined as unique can also not be encountered by default, so we actually have two attributes which can be used to determine being generated. Therefore, even if CanEncounter is set to true then under certain scenarios a check could be done to see if a ship is unique, and thus skip it.

Personally, I don’t think the current logic I’m using could even conflict with anything. Yes, there could be conflicts regarding stories, but not code. The characters I’m using are new, so the only real problem I could envisage is the same ship being generated as the player is using. If that could happen, then why not just check if the ship is unique and if the player is also using it?

In fact, my code already checks to see if a unique ship has been sunk and if so then it won’t be re-spawned. Therefore, it’s feasible to create the relevant flag in the event the player owns that ship, or even if a specific storyline is active. In other words, the code would believe the ship to be dead and won’t spawn it. This is shown here. So I could change that to include a catch for an attribute set on the main char to skip either a particular unique ship or indeed all of them.
 
Last edited:
Looking at the treasure fleet logic, it looks like the main relevance is whether or not the fleet gets valuable goods.
That is indeed what it currently does.

At the moment we have no control over when and where they show up and I'd much prefer if we did so that you can actually track them down.
I've got some ideas for that which will probably work for both Treasure Fleets and all sorts of other unique encounters.
But I don't know if it's worth to do anything with that.

Personally, I don’t think the current logic I’m using could even conflict with anything. Yes, there could be conflicts regarding stories, but not code.
Even since the Levelling debacle of last year, I am trying to be far, far more cautious with what mods I include now.
That feature had an effect on everything all over the place and the person who wrote it never did manage to fix and finish it properly.
It then fell to me to sort it all out and I really don't want to go through something like that again.
So now I've got to admit being a bit wary of functionality that isn't self-contained..... :unsure

Anyway, I'm sure your work is fine. I'm just having a hard time wrapping my head around it. :oops:
 
Back
Top