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

DirectSail 1.1 Fix

kevinatlanta

Sailor
Storm Modder
OK, I'd been having intermittent trouble with DirectSail 1.1 (Build 14 Alpha 6) kicking off lately and I couldn't narrow the problem down. I was getting no sail-ho's and couldn't sail to any islands - I'd just sail for hours upon end and sail right through all islands. Then when I'd finally go to the worldmap, I'd get a quick land-ho sound and be nowhere near my island of choice.

I *FINALLY* figured out the problem was an error (some bad rope data on a ship) which could not be logged to an error log file (it looks like the new version of DirectSail writes some stuff to error.log and system.log). My guess is that these rope errors were causing some sort of hang-up and not allowing the mod to complete processing.

Anyhow, I just enabled logging, and everything is now working as it should (even with the rope errors)! If anyone needs to know how to do this, here are the instructions:

Open engine.ini (in root POTC folder) and make these changes:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->tracefilesoff = 0

[script]
debuginfo = 1
runtimelog = 1<!--c2--></div><!--ec2-->

FYI - I know most of the 'old-timers' already have error logging enabled and probably would never have seen this one...

Thanks again for all the hard work from EVERYONE here!!!

kevin


PS - I also turned on codefiles (changed from 0 to 1) in engine.ini, but this seemed to create a bunch of files with a ".b" extension in the root POTC folder. Not sure what this 'codefile' does, but I turned it back off. Anyone with more knowledge than me, please correct me if anything here is not right...


EDIT: Oops. See next message for solution.
 
Looks like I spoke too soon. This appears to be a problem with the check for "is the player below decks" abort function. If you enter your ship from the end of the dock, DirectSail seems to think that you are below decks and aborts. However, if you enter via the Ship Walk interface, it works fine.

EXAMPLE: Made a run from Conceicao to Douwesen and back. No changes made other than the way I accessed the ship. Results follow...

<u>Conceicao to Douwesen</u>
Entered ship via Ship Walk interface - goto Ship Deck
DirectSail worked properly

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->SEA: SeaLogin end
Whr_UpdateWeather start weather update Time: 09:48
Whr_UpdateWeather finish weather update
Directsail aborted, too close to coast
Whr_UpdateWeather start weather update Time: 10:03
Whr_UpdateWeather finish weather update
Whr_UpdateWeather start weather update Time: 11:03
Whr_UpdateWeather finish weather update
DirectsailCheck; next enemy: -1 dist: 0
DirectsailCheck; next neutral ship: 770 dist: 69748
DirectIslandCellCheck runs at Conceicao
DirectIslandCellCheck dir is
Add good direct : Oil, rCharacter.id = Blaze, iQuantity = 103
Whr_UpdateWeather start weather update Time: 12:03
Whr_UpdateWeather finish weather update
DirectsailCheck; next enemy: -1 dist: 0
DirectsailCheck; next neutral ship: 770 dist: 69748
DirectIslandCellCheck runs at Conceicao
DirectIslandCellCheck dir is north
pchar.directsail.tox 0 pchar.directsail.toz 5000
Captain, Douwesen to the north
Player map coord set to x: 775.0000000 , z : 243.3333435
Sea_reloadDirect at Douwesen<!--c2--></div><!--ec2-->


<u>Douwesen to Conceicao</u> (return from above voyage)
Entered ship via end of dock (ship icon) - using F3 or spacebar or OPEN
DirectSail DID NOT work properly.
It APPEARS that if you enter your ship this way, DirectSail does not work.

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->SEA: SeaLogin end
Whr_UpdateWeather start weather update Time: 14:03
Whr_UpdateWeather finish weather update
Directsail aborted, too close to coast
Whr_UpdateWeather start weather update Time: 15:03
Whr_UpdateWeather finish weather update
DirectsailCheck; next enemy: -1 dist: 0
DirectsailCheck; next neutral ship: 770 dist: 69748
Directsail aborted below decks<!--c2--></div><!--ec2-->


Here are my settings in Buildsettings.h

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->#define DECK_VIEW_ON_SEAENTER    0
// Decide where camera should start upon entering a ship
// 0: Stock PotC, external camera
// 1: Camera on ship deck

#define VISIT_DECK    1
// 0: Stock PotC: When anchoring, you go directly to shore
// 1: When anchoring, you go to your ship's deck. From there you can
    go to shore in the same way as in the tutorial<!--c2--></div><!--ec2-->

kevin
 
Looks like this problem may be related to a fix I applied over the 14a6 + PB Mods. It is a fix for boarding and the dead captains called B14A7_giuliootto_Fix3.zip. Thread is here:

<a href="http://www.piratesahoy.com/forum/index.php?showtopic=10443" target="_blank">http://www.piratesahoy.com/forum/index.php?showtopic=10443</a>

More info as I find out....

kevin
 
I suppose that problem was caused by non-initiating Direct Sail when moving directly from dock into sea. Please open file PROGRAM\BATTLE_INTERFACE\LandInterface.c and replace procedure (it's the last one, at the end of file):

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->void ReloadFromLandToSea()
{
    ref pchar = GetMainCharacter();
    Log_SetActiveAction("Nothing");
    Reload(chrWaitReloadRef, chrWaitReloadLocator, pchar.location);
    chrWaitReloadLocator = "";
    chrWaitReloadIsNoLink = false;
}<!--c2--></div><!--ec2-->

into:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->void ReloadFromLandToSea()
{
    ref pchar = GetMainCharacter();
    Log_SetActiveAction("Nothing");
    Reload(chrWaitReloadRef, chrWaitReloadLocator, pchar.location);
    chrWaitReloadLocator = "";
    chrWaitReloadIsNoLink = false;
    DirectsailCheck();
}<!--c2--></div><!--ec2-->

(add <i>DirectsailCheck();</i> as the last instruction).

I think that fixed problem for me. Please, if somebody tests it, report for some further problems.

pirate_kk
 
That function is not present in my LandInterface.c file. And I cannot find that function in any of my files (UltraEdit - "Find in Files") so, it's not there, as far as I can tell. I also looked in the downloaded zips (as referenced below) and couldn't find it there either.

I'm using b14_alpha6.zip + pb_modifications.zip. Is this a new function in b14 Alpha 7? Can I simply add that function into my LandInterface.c at the end? Or does it make calls to more than that one file?

Thanks!

kevin
 
I just checked and indeed Alpha 6 does not have that function. There is no point adding that function into Alpha 6 either, because it is not called anywhere. If it were called somewhere, it would cause the game to crash because the function isn't there.
 
<!--quoteo(post=213626:date=Sep 4 2007, 11:52 PM:name=KevinAtlanta)--><div class='quotetop'>QUOTE(KevinAtlanta @ Sep 4 2007, 11:52 PM) [snapback]213626[/snapback]</div><div class='quotemain'><!--quotec-->That function is not present in my LandInterface.c file. And I cannot find that function in any of my files (UltraEdit - "Find in Files") so, it's not there, as far as I can tell. I also looked in the downloaded zips (as referenced below) and couldn't find it there either.

I'm using b14_alpha6.zip + pb_modifications.zip. Is this a new function in b14 Alpha 7? Can I simply add that function into my LandInterface.c at the end? Or does it make calls to more than that one file?

Thanks!

kevin<!--QuoteEnd--></div><!--QuoteEEnd-->

I'm sorry I didn't understand - thought it's for Build Alpha 7. But since you have Build Alpha 6 you shouldn't have VISIT_DECK option either introduced in Build Alpha 7? Do I understand correctly, that DirectSail didn't work when you went to sea after entering a ship deck?

pirate_kk
 
I added VISIT_DECK in one of the PB Modifications ZIP files which Kevin is using. However, here you only visit the deck when anchoring, not when leaving port.
 
OK, it's probably not worth chasing this one down, since it's a new function in b14 alpha 7 (and since b14 alpha 8 might be out soon). I thought maybe this was a problem with some existing code that was carried over from a6 into a7 - but it looks like just an anamoly from pb_mods. I'll just suffer through it until alpha 8 comes out. FYI - I couldn't ever get alpha 7 working properly on my machine.

kevin

-----

Oh, one other thing, that I THINK might be related to this. When I drop anchor in port, and goto deck, then walk to the midship and exit that way (spacebar or F3) when the icon pops up - the location where it says I'm going appears to be where I just came from. Or put more simply - it looks like there is some mix up in how the indexes are being read.

An example of the above:
Depart from Oxbay port and sail to Redmond.
When I arrive in Redmond port on ship deck and goto leave, the message says "enter Oxbay port".
If I go that way, and then use the spacebar to talk to anyone, I'm transported BACK to Oxbay port.
However, if I use the fast move option, and select "goto port" (the anchor), everything is fine.

I think I've seen a couple of other folks report that one.

Anyhow, thanks for the quick replies!!!

kevin
 
Well, this mod used to work for me just fine (Buildmod 13). But when I switched from using the black pearl to the wicked wench, it no longer works. I end up sailing forever without any encounters to the ends of the map. I know it was suggested that entering the ship via the Ship walk interface seemed to fix the problem, but I have no idea what that even is. I've only seen Spacebar, F3 and Open as my options to enter my ship from shore or dock. Is there something I'm missing that could help me use this mod again?
 
With direct sail are you able to sail to a port after an open sea battle without entering the world map?

I could really use a tool like this because I have had ctds with the buildmods when entering the world map after large open sea battles. The other parts of the build are great but the ctds are annoying espesially after fighting an hour long naval engagement.

Will direct sail fix my problem or what other things could I do to prevent the crashes. I am currently using build 13 final.
 
<!--quoteo(post=262738:date=Jun 18 2008, 11:49 AM:name=Stowaway)--><div class='quotetop'>QUOTE (Stowaway @ Jun 18 2008, 11:49 AM) <a href="index.php?act=findpost&pid=262738"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->With direct sail are you able to sail to a port after an open sea battle without entering the world map?

I could really use a tool like this because I have had ctds with the buildmods when entering the world map after large open sea battles. The other parts of the build are great but the ctds are annoying espesially after fighting an hour long naval engagement.

Will direct sail fix my problem or what other things could I do to prevent the crashes. I am currently using build 13 final.<!--QuoteEnd--></div><!--QuoteEEnd-->Not exactly...
With the direct sail mod (which should be in Build 13 full - open the program file, scroll down and look for: CCCdirectsail and CCCFunctions - if they are there you have it.) you sail out from a port (say Oxbay) and head towards another island (say by heading due north in this case) after an hour or so of sailing random events will start to occur, every hour or so, such as sailors marooned in a life raft, (for which you will get a bonus if you rescue them) a floating log, (which can damage your ship), and other events, or you will encounter other ships - some of which you can do battle with, others may have treasure aboard which you can take.
After each event you can continue sailing till you get the "land ho" message which means you are nearing another island, and you can sail diectly into the port there if you wish, or sail on past to somewhere else.
All courtesy of Couch Captain Charles.
 
If you entered the worldmap, you cannot go to another port with the DirectSail mod anymore. You can only sail from island-to-island if you remain in 3D sailing mode from the first port to the next. If you encounter enemies in DirectSail, you can battle with them, then proceed to port without going in map-mode. If you entered the battle through the map, you must go to port through the map as well.

Very frequently CTDs after sea battles at the worldmap are caused by full cargo holds. Dumping some cargo before going to the worldmap tends to circumvent that CTD. Worth a try. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />
 
Thanks for the tips Short Jack and Pieter,

I was hoping that direct sail would help fix the ctds after a large naval engagement when entering the world map, or at least let me get to the nearest port without entering the map at all. Direct-sail still sounds like fun though, and I'll have to try it out in my game.

As far as the ctds are concerned, I'll try dumping cargo to see if it helps. My last ctd may have occured because my ships where filled to the brim with goods that I intended to sell. I would sink smaller ships and send their cargo to my galleons and merchantman.

If I am dividing the plunder and need to make the most money in a limited timeframe, without filling the cargoholds, what strategy should I use? Alot of times I transfer crew too, could their total morale play a part in the ctds as well? The rest of Build 13 Final works great, what are some other things I could do to minimize ctds?

Thanks
Stowaway
 
You <i>can</i> fill your cargo hold, just make sure you dump a little of the cargo before going to worldmap. We have yet to figure out how to fix this issue. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
Back
Top