• 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 have installed Beta 4.1 and the POTC_BETA4_1_WIP_22092016.zip file.

I guess I should play this version a bit before merging in my previously uploaded changes. Something went wonky after I added the code to use a key command to toggle the navigator's report, so I'll leave that out.

Many thanks to the unknown benefactor who provided an easy way to install the stock PotC. ;)

Hook
 
I decided I couldn't play with the miniature HUD and text on my 1920x1080 monitor. I tried, I really did. So I've winmerged my changes into the 4.1 WIP code.

Wow. Winmerge is even cooler than I remembered. :)

I did notice that I had to start the game in full screen mode once or it was too big for windowed mode, even through the size was set correctly. After trying once in full screen, the windowed mode was fine.

With the original 4.1 code, I started a new game at the second difficulty, and found I didn't have enough money to repair my ship. This didn't happen with the 4.0 code, although I did end up with only 330 gold and had to sell half my cannons and ammo to have starting capital. One problem was that the cargo I had to sell was FOOD! I'm not going to sell all my food with a reduced crew; that might end up starving a few of them before the goods transfer is finished. Next game I started was at easiest difficulty and *still* didn't have enough to repair my ship without selling my guns. That time I had a few spare planks to sell. Whoever is responsible for THAT code, I'm gonna come to their house and shave their cat!

Well, it's time for the smoke test. That's where you turn it on and see if smoke comes out. Further updates as events warrant.

Hook
 
If you have installed "POTC_BETA4_1_WIP_22092016.zip", you should also install @Levis' fixes:
Mod Release - Levis' Stuff [October 7th (v2)] | PiratesAhoy!
The zip which you have already installed contains some experimental stuff, including bugs, and @Levis' stuff fixes some but not all of the bugs.

Alternatively you can re-install from scratch, install the 28th July build, then install this collection of fixes:
http://piratesahoy.bowengames.com/potc/Grey Roger/post_jul28_fixes.zip
This includes all the fixes from the New Content Post Build 14 Beta 4.0 Public Release thread from later than 28th July which do not relate to the experimental stuff, plus a few other bits and pieces (some of them yours ;)). This should be more reliable than the version you have now but naturally lacks some of the work done to alter the game since 28th July.

Play in "Napoleonic" period and choose Robert Fulton as your FreePlay character. Smoke is supposed to come out in that game. xD
 
I think at some point I made some corrections to the "random good chosen at game start" code so that it would do something sensible for alternate starting islands too.
But perhaps that has sone untended unintended side effects.
The whole related code is messy for sure though and could do with an update.
@Armada ran into annoyances because of that as well, especially for larger starting ships.

Wow. Winmerge is even cooler than I remembered. :)
Yep, that program is an absolute lifesaver! :woot
 
Thanks @Grey Roger and @Pieter Boelen.

Well, no smoke came out, Fulton notwithstanding. :)

I have to wonder if I had the wrong difficulty set, as the next game I had 100 gold to sell, and at Eleuthera too, where the gold prices are high.. This is the reason I wanted to play at a slightly higher difficulty setting. :) I wanted to be able to repair my ship and have *some* starting capital, but not be swimming in doubloons.

I'm going to mess with the code I have for a while before trying newer versions, but thanks. I needed to know what to load to get the proper version. I want to make sure my directsail changes still work.

The first thing I noticed was violent wind shifts while sailing. I think we can do a much better job using randnorm() to shift the wind. If we know the location of storms, we can make it even better. Something I learned from flight simming was "Drift right into danger." If you're drifting right, the wind is blowing from your left, and you're moving into a low pressure area. If the wind is blowing from your right, you're moving out of a low pressure area. If storms have definite locations, we can use this to determine general wind direction, then vary it by randnorm(), and if no weather cells are close, vary it around the trade winds, which in the Caribbean are generally from the northeast at 15-25 knots. Heck, I thought wind direction and speed were *already* being adjusted with randnorm(). You'll still need winds shifting more near islands, or you can get stuck in a port, or unable to enter one.

If you're not familiar with it, randnorm() takes a mean and a standard deviation and generates a random number that uses the bell curve. About 65% of all numbers will fall within one standard deviation of the mean, 95% will fall within two standard deviations, and 99% will fall within three. Random numbers generated this way will seem to be quite natural.

Hook
 
It would be quite awesome to take storm locations into account with the weather for sure!
Not sure if it's possible though; I'm afraid storms with coordinates only exist while on the worldmap.
Unless you add a new system where actual storms move around the 3D sailing mode world too.

As for the tutorial difficulty, have a look at this related thread by @Armada:
Penalties for starting with a Tier 5 Ship | PiratesAhoy!
 
Next game I had 100 gold AND 100 silver. Good. I was able to upgrade my ship, but lost money on a trade.

I reverted to the previous 4.0 directsail code to see if the sea_ai.dll crashes would stop. I sailed from Tortuga clockwise around the islands, and when I was going from Curacao to Aruba I finally got a crash. That was at least 15 sea logins before it happened. Next test is to install a clean version 4.0 and try it again. Yes, I used time compression, except when I expected a transition to take place.

I got far too many 180 degree wind shifts, so I commented out that part of the code. Just for fun, I replaced the frand(30) for max wind shft with abs(randnorm(0,30)) and was getting some reasonable wind shifts. About 1/3 of the time they were more than in the previous code produced as expected. (The actual code uses radians. I think in degrees.)

Once more into the breach.

Hook
 
I bit the bullet and started commenting out parts of my updates, hoping one of them would fix the sea_ai.dll crash. They didn't, but I started noticing a pattern. Thanks to whoever started tracing the set tasks in sea.c. When you make a change, please date it and give your initials so we know who did what. If I didn't do that, I couldn't keep up with my changes.

There are a lot of references to CTDs in sea.c and the sea login function in the code, so this isn't a new problem. The problem doesn't appear to be in my code, but I can't rule out that something I did causes a problem in sea.c. I'm back to actually playing the game and collecting statistics. I hated the idea of abandoning my changes; some of them are very nice indeed.

Hook
 
I did once add a whole bunch of Trace statements to the "Set Tasks" code because indeed they caused CTDs.
This was related to some changes that for some reason prevented ships from being logged in.
If a task is sent to a ship that isn't there, the game crashes.
 
The crashes I'm getting are after "SEA: SeaLogin end" and before it gets a chance to display "Sea_FirstInit". That's a fairly small window. The code gets past the task traces apparently without problem. Often the last lines in the compile log are

DS: DirectsailCheck; next enemy: -1 dist: 0
DS: DirectsailCheck; next neutral ship: 1000 dist: 261

I put in a trace and abort to prevent StartPostInitChars() from being run when it was already running, but aborting the process gave me a CTD in locations.dll the one time it triggered. I left the trace in without the abort, but it doesn't correspond with the crashes at all. I'm currently looking at possible timing problems as these processes are run by PostEvent.

I'm up to 46 compile logs that I've saved, and several times I didn't save the logs. Version 4.0 didn't get the crash, version 4.1 without my changes did. With my changes, both versions crash.

Oh, and I'm over 300 hours of game time. :D That doesn't include code time or forum time, another 150 hours. I installed the game on 10/25/16, call it 40 days. That's an average of over 11 hours a day. :)

Hook
 
In other news, I'm going back to the intermediate scale map. I'm happy with how it works.

If you're playing Arcade, OR prefer to use the world map, OR have a slow ship (typically under 8 knots top speed) use the normal map. If you're playing Realistic, AND do most of your sailing between islands without using the world map, AND have a faster ship (above 8 knots top speed), the scale30 map will give a much better gaming experience. This does not affect the open sea map, as it's a different map. If someone wants to do Iron Man on the scale30 map, we'll have to make some code changes, as Iron Man mode assumes the open sea map everywhere in the code.

I'll have to figure out how SetNodeUsing works to make the map switch automatic. Right now, I have to replace the file. The times I tried it, I got a map with no islands.

Hook
 
Surely it must be possible in map.c to have a three-way switch on the image it uses?
You probably do need to define the image also in the accompanying map.ini files.
 
@SuperCrumpets: I have never touched TEHO, so I'm afraid I haven't the foggiest how that game handles worldmap fleets differently.

Its mostly the same but they dont disappear if you say no to fighting them and if you get attacked by multiple fleets you get a message saying you're being attacked by fleet 1 &2
You cant do it yourself to other fleets though, meaning you cant hide behind allied fleets for help since they wont appear even if you're right on top of them.

@Talisman Thank you Sir!

You can always use the Print Screen key.... but it just copies the image to the clipboard. You have to open a graphics program, make a new file, and paste the clipboard into the new file, then save it. Unless you know of a better way (he says hopefully).

Hook

You could always do what I did and add the game to steam so you can use the overlay and steam screenshots
 
Its mostly the same but they dont disappear if you say no to fighting them and if you get attacked by multiple fleets you get a message saying you're being attacked by fleet 1 &2
You cant do it yourself to other fleets though, meaning you cant hide behind allied fleets for help since they wont appear even if you're right on top of them.
Ah, that's cool that is! :onya
 
Surely it must be possible in map.c to have a three-way switch on the image it uses?
You probably do need to define the image also in the accompanying map.ini files.

I found the two a_map.ini files and added the new map file, but it doesn't work. I wonder if setnodeusing can only have two options. Oh well, it would have been nice. :)

Hook
 
You'd probably have to set the nodes for the two existing maps to "not using" and then use only your new one.
In theory I think that should work.
 
You'd probably have to set the nodes for the two existing maps to "not using" and then use only your new one.
In theory I think that should work.

That's what I though too. I tried it a couple of different ways, changed the order, etc... doesn't seem to work.

Hook
 
That's what I though too. I tried it a couple of different ways, changed the order, etc... doesn't seem to work.
Odd. I assume you already put in Trace statements to double-check that the code you edited gets run at all?
 
@Pieter Boelen You don't need a lot of trace statements when the game either gives you a blank map with just names, or a map with islands. :) You can switch between maps in the game by changing realism. It works if there are only two maps, but doesn't work right with three.

I was able to get more accurate island shapes for Eleuthera, Isla Mona and *Nevis* by using the gm viewer. The mainland is so far off that there's not much help for it, but I did scale the area from Cartagena to the east edge (than sailed beyond it to see what was there. :D ) and while the display map is a bit odd, it works. I'll make it look as good as I can. That part of the mainland is only accessible in Iron Man, but you can sail near the coast and avoid a transition to Aruba on the scale30 map.

Hook
 
Back
Top