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

Need Help Increase Number of DirectSail Encounters

imado552

Master Mariner
have a question i always play iron man mod sometimes i switch to realistic or arcade to do quick tests but how can i make myself encounter a lot of ships cuz my travels in sea are quite i meet sometimes USA ships in the other corner of the map don't know why in the hell they are there and i meet week pirates no 1st rate at sea only in some towns as defending fleet or attacking fleet do i need to change a code or does it depend on the level of my character thanks
 
i have a question i always play iron man mod sometimes i switch to realistic or arcade to do quick tests but how can i make myself encounter a lot of ships cuz my travels in sea are quite i meet sometimes USA ships in the other corner of the map don't know why in the hell they are there and i meet week pirates no 1st rate at sea only in some towns as defending fleet or attacking fleet do i need to change a code or does it depend on the level of my character thanks
I think you can increase the chance of them happening with this line in PROGRAM\NK.c:
Code:
void InitOpenSeaMod()
{
   ref PChar = GetMainCharacter();
   if(iRealismMode>1 || OPEN_SEA_MOD)
   {
     DIRECTENCOUNTERCHANCE =                 25;     // chance in percent that an encounter fleet appears every hour
     DIRECTENCOUNTERDISTANCE =               2250;   // distance from player at which random ships appear
     ENCOUNTERBREAK =                   3.0;   // LDH - Changed to float, number is hours per encounter, directsail is called every 5 minutes occasionally
Try setting ENCOUNTERBREAK to 6.0; if I recall correctly, that should give you double the amount of "Sail Ho!" encounters.

Ship encounters are really quite random. There is no logic to what type of ships appear where.
While you CAN encounter lots of huge ships, that particular encounter has a very low chance of happening.
After all, this IS the Caribbean and there generally just weren't all that many ships around.
 
While the ships for each pirate promotion ARE defined, they are deliberately not used because, as you say, it doesn't make sense.
You do get the occasional sword and unlock some abilities on pirate promotions though.


I think you can increase the chance of them happening with this line in PROGRAM\NK.c:
Code:
void InitOpenSeaMod()
{
   ref PChar = GetMainCharacter();
   if(iRealismMode>1 || OPEN_SEA_MOD)
   {
     DIRECTENCOUNTERCHANCE =                 25;     // chance in percent that an encounter fleet appears every hour
     DIRECTENCOUNTERDISTANCE =               2250;   // distance from player at which random ships appear
     ENCOUNTERBREAK =                   3.0;   // LDH - Changed to float, number is hours per encounter, directsail is called every 5 minutes occasionally
Try setting ENCOUNTERBREAK to 6.0; if I recall correctly, that should give you double the amount of "Sail Ho!" encounters.

Ship encounters are really quite random. There is no logic to what type of ships appear where.
While you CAN encounter lots of huge ships, that particular encounter has a very low chance of happening.
After all, this IS the Caribbean and there generally just weren't all that many ships around.
thanks and just a question what will happen if I set 6.0 to 12.0 does that gives me triple the amount if yes hell I'm gonna put 12.0 I want the sea to be the hell for the weak even if that was me hahaha
 
thanks and just a question what will happen if I set 6.0 to 12.0 does that gives me triple the amount if yes hell I'm gonna put 12.0 I want the sea to be the hell for the weak even if that was me hahaha
12.0 = 4 * 3.0 ;)
Go right ahead and see what happens.

Come to think of it though, maybe I've got the logic wrong and it should actually be 1.0 for it to be triple the amount.
You'll have to experiment a bit. I don't remember by the top of my head.
 
While the ships for each pirate promotion ARE defined, they are deliberately not used because, as you say, it doesn't make sense.
You do get the occasional sword and unlock some abilities on pirate promotions though.


I think you can increase the chance of them happening with this line in PROGRAM\NK.c:
Code:
void InitOpenSeaMod()
{
   ref PChar = GetMainCharacter();
   if(iRealismMode>1 || OPEN_SEA_MOD)
   {
     DIRECTENCOUNTERCHANCE =                 25;     // chance in percent that an encounter fleet appears every hour
     DIRECTENCOUNTERDISTANCE =               2250;   // distance from player at which random ships appear
     ENCOUNTERBREAK =                   3.0;   // LDH - Changed to float, number is hours per encounter, directsail is called every 5 minutes occasionally
Try setting ENCOUNTERBREAK to 6.0; if I recall correctly, that should give you double the amount of "Sail Ho!" encounters.
If that number is "hours per encounter", should you not reduce it to increase the frequency of encounters?

Ship encounters are really quite random. There is no logic to what type of ships appear where.
While you CAN encounter lots of huge ships, that particular encounter has a very low chance of happening.
After all, this IS the Caribbean and there generally just weren't all that many ships around.
The other factor is that big ships were very expensive to put to sea, so they generally weren't sent out unless there was a very good chance of them being needed for a major battle. Most of the work was done by frigates.
 
If that number is "hours per encounter", should you not reduce it to increase the frequency of encounters?
That's what I was thinking in my last post above as well.

The real answer would be in PROGRAM\CCCdirectsail.c ; there must be something related to "encounter chances" in there.
I know I've dabbled with some vaguely related code in the past, but it was a long time ago and I just don't remember the specifics.
 
Right at the top of "CCCdirectsail.c", among the declarations:
Code:
float ENCOUNTERBREAK = 1.0;         // Set in function InitOpenSeaMod() in PROGRAM\NK.c
Will the setting in "NK.c" override this?

Elsewhere are these:
Code:
    if(stf(pchar.directsail.count) >= ENCOUNTERBREAK)
       pchar.directsail.encounter = 1; // for new ships at new island
and
Code:
    if(stf(pchar.directsail.count) < ENCOUNTERBREAK)
     {
       DSTrace("Directsail encounter aborted, encounterbreak "+stf(pchar.directsail.count));
       return;
     }
So it looks as though the higher ENCOUNTERBREAK is, the less chance of the first bit doing something and the greater chance of the second bit preventing something.

It also shows up in "Events.c", specifically in 'LaunchRandomTownEvent':
Code:
  //Check if we can launch an event.
  if((day + (EVENT_PER_DAYS*ENCOUNTERBREAK)) < yeardays && nosmuggle)
  {
So if you change ENCOUNTERBREAK, ship encounters might not be the only thing affected.
 
Thanks for checking, Grey Roger! :cheers

Will the setting in "NK.c" override this?
Yes.

It also shows up in "Events.c", specifically in 'LaunchRandomTownEvent':
Code:
//Check if we can launch an event.
if((day + (EVENT_PER_DAYS*ENCOUNTERBREAK)) < yeardays && nosmuggle)
{
So if you change ENCOUNTERBREAK, ship encounters might not be the only thing affected.
What is THAT doing there???

Oh well, I suppose it makes some sort of sense to reduce the amount of town evens when the Open Sea Mod is active.
That being said, I'd have expected it to be linked to some sort of "time scale value" and not that one.
 
Back
Top