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

Hook's fixes

I played with the L key. One press sets it to level 3 verbose. Another press sets it to 0 quiet, then 1 laconic, then back to 2 normal. The only problem I saw, without looking at the code to try to figure it out, was that on level 3 verbose I was not getting my updates on food and morale on the hour. By this time I was falling asleep, and wasn't up to even posting about it, so you're only hearing about it now. :)

While I like the idea of setting the navigator's log to one of the existing controls, and the L key would be perfect for this, I don't want to get into a situation where the player has to press the key multiple times to get back to where he was originally just to turn the navlog off. That and the fact that the L key might not be working as intended makes me shy away from using it.

I'd also prefer not to add another global variable, so I'm going to have to think about it a bit to figure out how to handle it. BTW, I'm not sure adding a new variable causes any problems, just changing or removing an existing one which will cause saved games to crash on load. One way might be to add it as an attribute to the existing directsail1 object, but I'm looking into it before deciding.

I'm currently sailing from Cayman to Cartagena as a final test of directsail on the normal map, and after I arrive I'll test at least part of that trip again on the open sea map to see if it's different.

Hook
 
I upgraded my gaff schooner to an Endymion class frigate. JEEZ that ship is big! Given the size and the 56 guns I'm surprised that it's tier 3 rather than tier 2, but that's not important.

What is interesting is that while an hour of game time took 10.6 minutes on the schooner, on the much more complicated model of the frigate it's taken from 10.6 minutes to 12 minutes. I'll be testing this more to make sure that's what's actually happening, but it looks like the real time to game time isn't constant, but will depend on the player's computer and frame rate set by the limiter.

Hook
 
I wonder if that "time depends on frame rate" issue is a Windows 10 effect.
It wasn't until that version that people needed a frame rate limiter.

The code for the L-key isn't very complicated.
If parts of it really don't work as intended, surely that must be easily fixed.
If you can confirm it is indeed wrong, please make a Bug Tracker entry.

You do need to press several times to scroll through the settings, but there are only a few settings so it isn't so bad.
I think most keyboard controls are in use by now, so adding a new control might be tricky.
Plus people wouldn't notice the added feature. :facepalm
 
I have just now downloaded b14_beta4-1_installer.exe and POTC_BETA4_1_WIP_22092016.zip so I can winmerge my changes with the latest version. I already had b14_beta4_final.tar from my original download. Is there anything else I need?

Just to be sure, is it possible to extract these to their own folder so that I don't overwrite the game I've got and lose any of my changes? What's the proper procedure for having more than one version of the game, assuming that's possible.

I said 10.6 minutes before (down from the expected 12 because I'm using 1.11 as normal time), but it should be 10.8. I haven't seen a 12 minute hour lately but I think that will only be on the more complex frigate model and near land and other ships.

I've reverted to a previous save to get my gaff schooner back. The frigate wasn't worth giving up about 10% of my speed, a lot of my maneuverability, the ability to sail very close to the wind and getting the added expense for the larger ship for maybe a 25% increase in usable cargo capacity. Of course the huge crew (612 vs 90 for the schooner) loaded cargo in no time at all, and I didn't have to worry about any ship I encountered. :)

I'm satisfied with directsail on the normal map, and am currently testing Iron Man (with open sea, obviously) with a voyage from Guadeloupe to Jamaica then Cayman, then will sail to Cartagena. This will be a lot of real time sailing hours without using time compression, but I'll love it, and I have the navigator's report to keep me amused. :)

Hook
 
You can have as many installs as you can fit on your hard drive. Start by installing the stock game somewhere different, then run "b14_beta4-1_installer.exe" and tell it where you've put that new installation. You can extract "POTC_BETA4_1_WIP_22092016.zip" to any destination you like, then copy the contents into your new game installation. If you really want the latest version, do the same with Levis' Stuff [October 7th (v2)].

Personally, I've put all my installs into "C:\Games". In there are "Pirates of the Caribbean - Stock Version" (installation straight from CD, used only to copy into a new folder when I want to create a new install as it's quicker than another CD installation); "Pirates of the Caribbean - 28th July" (Beta 4.1 without any updates); "Pirates of the Caribbean - 7th October" (Beta 4.1 with all the updates); and "Pirates of the Caribbean - 28th July fixed" (Beta 4.1 without the 23rd September or 7th October zips, but with my own collection of fixes as described here).
 
Thanks @Grey Roger

Initial test with Iron Man from Guadeloupe to Jamaica went very well and I do like the scale of the open sea map. Still tweaking the timing of the nav report so you aren't getting spammed, but it'll get there shortly. A short hop to Cayman and a long sail to Cartagena and if I don't see any problems, it's down to cleaning up the code.

Hook
 
Cayman was fine except for very low winds at the end and having to navigate into the harbor at night.

Lost my fighter, but picked up a pepperbox 4 barrel pistol. Ok, it's a good trade. New fighter is a Horror of the High Seas. My character is a Hero. Gee, I hope I don't have to fight the guy... but at least I can shoot him 4 times if I do. :D

Next: a 5 hour sail to New Grenada.

Hook
 
If you have a quad-barrel pistol then presumably you're playing in "Revolutions" or "Napoleonic" period. ("Napoleonic" also has a quad-barrel grapeshot pistol, so you can shoot everybody four times. :D)

If you put the "Horror of the High Seas" fighter in charge of a companion ship, he'll probably incite the crew to mutiny. Other than that, I don't think you'll need to fight him. In fact, if you keep him as part of your shore party and continue doing heroic stuff, he gets a small share of your reputation increases and may eventually change to your way of thinking. If you get him up to at least Neutral, you'll be able to trust him in command of a companion ship.
 
Finally got to Cartagena, and it took a lot more real life hours than the nominal 2.5 days would suggest. Tweaking the timing on the navigator's report displays was busting my chops. I finally repurposed one of the string slots in the report to remember when the last report was run, which I should have done in the first place but didn't want to add more global variables. Basically one more test run should have it ready for public consumption. I've already gone through and cleaned up the code and updated the internal documentation, i.e. comments. I haven't done the winmerge yet.

As for adding a key command to toggle the report, oddly enough the "N" key is free. I did some preliminary code to implement it (to display the latest report), and it works as intended BUT it messes up other commands. For example, the L key toggles turnaround to port or starboard, and the R and G keys don't seem to do anything. The code is still there but commented out in case someone wants to tell me what I've missed or provide a link. I patterned it after existing commands. I think the N key is pretty much perfect for this, as I hit it all the time by accident when I'm trying to look at the map.

Thursday is Thanksgiving, a major holiday here, so I won't be putting as much time in that day, but should still have the zip file before Saturday, preferably as early as I can.

Code:
== Navigator's report:
== Navigator's report:  The time is 09:47
== Navigator's report:  We are sailing SEbE at 9.8 knots
== Navigator's report:
== Navigator's report:  The closest islands are:
== Navigator's report:  New Granada     distance: 2492 yards SEbE  2 hours
== Navigator's report:  Aruba           distance: 16305 yards NEbN  12 hours
== Navigator's report:  Curaçao         distance: 21747 yards ENE  16 hours
== Navigator's report:
== Navigator's report:  The closest landfalls are:
== Navigator's report:  New Granada     San Felipe Fort   distance: 1668 yards  SSE  75 minutes
== Navigator's report:  Aruba           Rocky Cove        distance: 14502 yards  NEbN  11 hours
== Navigator's report:
== Navigator's report:  Island transition to Aruba is 6417 yards NEbN 5 hours
== Navigator's report:

Hook
 
As for adding a key command to toggle the report, oddly enough the "N" key is free. I did some preliminary code to implement it (to display the latest report), and it works as intended BUT it messes up other commands. For example, the L key toggles turnaround to port or starboard, and the R and G keys don't seem to do anything. The code is still there but commented out in case someone wants to tell me what I've missed or provide a link. I patterned it after existing commands. I think the N key is pretty much perfect for this, as I hit it all the time by accident when I'm trying to look at the map.
You may have to "Reset Controls to Default" after adding a new keyboard control.

Which is actually an extra reason to consider not adding any new keyboard controls,
because to prevent issues for players, I'd have to make the Installer EXE remove the "options" file.
But that would get rid of players' settings.
 
Ah, thank you Sir! I'll give that a try.

There may be a way around deleting the options file. I'll have a look while I'm in the code.

Hook
 
And while you're here, are the rx and rz values correct for Isla Mona?
I'm not sure, from memory. What are the values?

Could the problem also be solved by replacing Isla Mona with a smaller 3D model?
It is supposed to be only a tiny Island anyway; we just don't have a small enough Island model.
I wonder though how difficult it would be for @Armada to make a replacement.
Not very difficult, but not something I'd like to do, either.

It's up to @Armada what to do about it, if anything. I've tried everything I could, and the only solution I can come up with is excluding Isla Mona from island transitions on the normal if you don't have a reason to go there, and that can be turned off with a toggle. Even if it's excluded, you can get there by using the world map (and it's not excluded from the open sea map), but you might get surprised by a nasty teleport.
This sounds like the most sensible solution, to me. Simple usually does the trick.
 
I'm not sure, from memory. What are the values?

From worldmap_init.c

Code:
    //18=========================================================================
    //Name
    worldMap.islands.IslaMona.name = "IslaMona";
    //Geometry parameters
    worldMap.islands.IslaMona.isVisibleName = 0;
    worldMap.islands.IslaMona.position.x = -288.5556;  // East  = +, West  = -
    worldMap.islands.IslaMona.position.y = 20.0;
    worldMap.islands.IslaMona.position.z = -235.5098;   // North = -, South = +
    worldMap.islands.IslaMona.position.rx = -314.0483; // What's this???
    worldMap.islands.IslaMona.position.rz = -201.129;  // What's this???

Those comments aren't mine.

This sounds like the most sensible solution, to me. Simple usually does the trick.

Ok, if you're happy with it. I'm not sayin' I like it, but it's the only thing I can think of to do to attempt a fix.

==========

I found something that will add the new controls and fix the existing ones without needing to delete the options file, and does not appear to update the options file.

If you go to the character screen and click on your character's name, you can edit it, then press Enter. Sometimes it adds some spurious garbage characters at the end of the name that you'd have to backspace to get rid of before hitting the Enter key. Now, I've been using this to reset what music is playing if I'm tired of the current selection, but it also updates the controls for the changes I made. It does not update the options file, which could probably be done separately. I do not know if this will change all the controls to default, and I'll be testing that. I doubt it will or people would be complaining.

You don't want to require the user to go through the name changing process, but we might be able to make it automatic.

This would make it easy for anyone to add new controls, and you'll quickly run out of keys to use if that starts happening. I'd prefer to discourage adding new controls.

Hook
 
From worldmap_init.c

Code:
//18=========================================================================
//Name
worldMap.islands.IslaMona.name = "IslaMona";
//Geometry parameters
worldMap.islands.IslaMona.isVisibleName = 0;
worldMap.islands.IslaMona.position.x = -288.5556; // East = +, West = -
worldMap.islands.IslaMona.position.y = 20.0;
worldMap.islands.IslaMona.position.z = -235.5098; // North = -, South = +
worldMap.islands.IslaMona.position.rx = -314.0483; // What's this???
worldMap.islands.IslaMona.position.rz = -201.129; // What's this???
Those comments aren't mine.
It does correspond correctly to a locator in the Maya file, but I'm not sure what it's used for.

IslaMonaRXZ.png
 
Thanks, @Armada When I plotted the various island locations with their anchor points in a chart, based on the numbers from worldmap_init.c, it looked like Isla Mona's rx and rz point was farther away from the main point of the island than it should have been. I have no idea what those values actually are, but they're used extensively to calculate the ship's position.

=================

This is a very rough first draft of what the map would look like with the scale I suggested earlier. It's only intended to show island sizes and placement. It is sized to appear like it does in the game.

Cuba, Hispaniola and Puerto Rico look more natural on the map that we're using, but the smaller islands are too big. On this map, the smaller islands are ok, but those three are too small.

Using a map scale of 30 (up from 19.6 and down from 60 on the open sea map), even Isla Mona isn't a problem.

Hook
 

Attachments

  • map scale 30 v1.jpg
    map scale 30 v1.jpg
    308.4 KB · Views: 128
@Levis As requested, all changes to date.

@Pieter Boelen you may want to look at this too. These are tested and ready for inclusion in the mod.

These changes have been made to the Build 14 Beta 4 WIP: 2 Apr 2016 version of the code, which is noted in LDH Notes.txt.

cccdirectsail.c is the only file I was worried about having to do too many changes after a winmerge, but it turns out that the version I was working on had not been updated since the Beta 4 WIP 2 Apr 2016 release. Other changes are fairly minor.

I did not remove the code to add the N key to toggle the navigator's log, but I commented it all out. The log is set to display by default, and it's changed by a #define at the top of cccdirectsail.c.

Hook
 

Attachments

  • Hook Changes Nov16.rar
    777.7 KB · Views: 134
Back
Top