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

Included in Build Ship Encounter Chances Correction

I play Iron Man mode. I'll have a go in the revolutions period tomorrow; as you understand it's quite a slow process with my settings, not optimal for any form of statistical testing ^^
 
Wow, someone actually USING Iron Man Mode. Always good to know we didn't add it for nothing. :cheeky

Indeed you wouldn't get any results quick with that, but that is OK. I'm just happy to get any feedback at all.
 
I just got in a battle with 3 pirates ships. Two sloops and a caravel. In heavy seas it is almost impossible to hit the sloops and I ended up ramming them with my light fleut. It turned out that was a bad idea as I was boarded and slaughtered.
 
Revolutions period, first encounter off Eleuthera.
Two pairs of these US Ships.
vc6z.png

EDIT: I got the "Sail Ho!" message, but I'm quite close to the coast. Is there any difference in these kinds of "Sail Ho!" encounters between when you're by the coast and on the open sea?


EDIT2: Encounter within sight of Turks.
A rather large Dutch squadron.
vwrj.png
 

Attachments

  • compile.log
    19.7 KB · Views: 181
  • compile2.log
    33.3 KB · Views: 197
Last edited:
First one:
Code:
Fantom_GenerateEncounter: type = L - Punitive Squadron, a scratch patrol, # Mer = 0, Mer MAX = 0, Mer MIN = 0, # War = 4, War MAX = 1, War MIN = 4
Force_GetShipType: Maxclass = 1, Minclass = 4, Per = Revolutions, Nat = America, Type = War, Loop = 1, Ship ID = US_BattleFrigate
Force_GetShipType: Maxclass = 1, Minclass = 4, Per = Revolutions, Nat = America, Type = War, Loop = 0, Ship ID = US_BattleFrigate
Force_GetShipType: Maxclass = 1, Minclass = 4, Per = Revolutions, Nat = America, Type = War, Loop = 1, Ship ID = US_BattleFrigate
Force_GetShipType: Maxclass = 1, Minclass = 4, Per = Revolutions, Nat = America, Type = War, Loop = 2, Ship ID = US_BattleFrigate
That proves two things:
1. DirectSail encounters with US ships DO work now
2. The larger and newer encounter types ARE being used during DirectSail now
That is both VERY good news!

Bit of a shame that the encounter consists of four times the same ship.
The tier requirements for that encounter were any warships between tiers 1 and 4, but the game decided to choose the Tier 3 "United States class Frigate" every time.
The loop numbers prove the game did try to generate another ship most of the times, but it looks like that particular ship is fairly common as opposed to the other ships in that category.
With some luck, you might have encountered first rates there!

Second one:
Code:
Fantom_GenerateEncounter: type = L - Punitive Squadron, a scratch patrol, # Mer = 0, Mer MAX = 0, Mer MIN = 0, # War = 7, War MAX = 1, War MIN = 4
Force_GetShipType: Maxclass = 1, Minclass = 4, Per = Revolutions, Nat = Holland, Type = War, Loop = 4, Ship ID = RN_Surprise
Force_GetShipType: Maxclass = 1, Minclass = 4, Per = Revolutions, Nat = Holland, Type = War, Loop = 1, Ship ID = RN_Surprise
Force_GetShipType: Maxclass = 1, Minclass = 4, Per = Revolutions, Nat = Holland, Type = War, Loop = 3, Ship ID = Lineship47
Force_GetShipType: Maxclass = 1, Minclass = 4, Per = Revolutions, Nat = Holland, Type = War, Loop = 0, Ship ID = Corvette2
Force_GetShipType: Maxclass = 1, Minclass = 4, Per = Revolutions, Nat = Holland, Type = War, Loop = 0, Ship ID = NL_Amsterdam
Force_GetShipType: Maxclass = 1, Minclass = 4, Per = Revolutions, Nat = Holland, Type = War, Loop = 1, Ship ID = RN_Surprise
Force_GetShipType: Maxclass = 1, Minclass = 4, Per = Revolutions, Nat = Holland, Type = War, Loop = 5, Ship ID = Lineship47
Happens to be exactly the same encounter type as that US encounter: they're both "L - Punitive Squadron". No errors and looks nicely varied.
"RN_Surprise" is a used a bit much there though, which could be because she is relatively common. It could be purely random, but it is something to keep an eye on. :yes

EDIT: I got the "Sail Ho!" message, but I'm quite close to the coast. Is there any difference in these kinds of "Sail Ho!" encounters between when you're by the coast and on the open sea?
"Sail Ho!" encounters are always the open sea worldmap-style encounters. However, you of course also get the Coast Raiders around the islands.
 
Has anyone still encountered the "ERROR - Force_GetShipType: unable to find ship, returning a default ship instead" message in any of the recent modpack versions?

And is there anything that still seems wrong in any way about the encounters? I'd like to know if we can consider this one "Solved" at long last.
 
Well, I'm marking this one as "Solved" for now. As far as I'm aware, this now finally does what it is intended to do.
Of course we still welcome any and all feedback on this. We can make adjustments as required. But at least it isn't broken now.
 
Wha? Build 13??? o_O

Build 13 simply didn't have a Periods mod. Plus a bug with the encounter code. So ship encounters were pretty purely random.
If that's what you want, set PERIOD_ACCURACY_LEVEL to 0 at the top of the Build 14 ships_init.c file.

Impossible to put the code actually IN Build 13. There is too much that has been changed.
 
Then I'm still confused on what exactly you want, I'm afraid. What game version do you want this working on?
I'd suggest to just get the latest update and change that PERIOD_ACCURACY_LEVEL value to see if that is what you like.
 
I needed the files to store in case something gets sc-d again in a next update. :p

Cause since 2.5 it didn't work properly and I want to guarantee a future update I can use with the current encounters since the older are inapplicable.

The current Build 3 Full Test de 22sept13 looks OK again even without changing anything. :onya
 
We weren't exactly planning on breaking it again.

In fact, as far as I could tell, part of the encounter code was broken for many, many years. Must have been broken in Build 13 as well.
Though nobody noticed, because we didn't look into it and it didn't matter much anyway.

Anyway, now that it seems that the system DOES actually do what we want it to at long last,
any further adjustments would be merely some value changes here or there if something seems "off".
But we'll see about that if people have further comments.
 
Yeah but because I most surely suspect there are more files involved than the Encounters folder, it is better to be published as minimod attached to the OP of this thread.
 
I already told you exactly which files are involved and how they're used. The only one that is commonly modified is ships_init.c .
Now that things appear to work, the other ones we do not need to touch anymore.
 
I think it's not solved at all. I am playing in iron man mode and continuosly i have messages like:

ERROR - Force_GetShipType: unable to find ship, returning a default ship instead
ERROR - Force_GetShipType: Maxclass = 3, Minclass = 8, Per = Colonial Powers, nation... blablabla, this happens for all the nations.

Strangely theat messages appear from the beginning of a new play, started as adventurer and choosing a light fleut tier 6.
And shipyards they are ever empty, no ships at all, even changing the game options.
Previously I made several new different plays and there were no error messages.
The game is still playable, however.
(sorry for my bad english).
 
:ahoy

What build are you playing? Please note that as of last September this has been considered fixed, and no one has complained.

If you are playing beta 3.1 then we must think that something else is going wrong. Do you have a good internet connection? You might have a bad download.
 
When that happens, please post your compile.log . That should contain some more details that will hopefully tell us what is going on.
 
I am playing Build 14 Beta 3.1 , my connection is more than average, and I play the game from January.
In fact, as I wrote, this happens from a week, when I started a new play.
I did not changed the program files, only played a bit with dialogs (but not referred with ships, I altered the dialogs of the governors of Tortuga and Port Royale so they would allow me to change relactions with France and Pirates, a less than bad "repair" but not so critical).
The message of "ERROR - Force_GetShipType" is (obviously?) related with the complete absence of vessel of any kind in the shipyards.
The both problems happened lately, and together.
I post the compile and error logs, the only thing I can notice is the "uninitialized aref" message, but my lack of knowledge about the program makes me not smarter than the ox in the thumbnail aside.
For the sake of fairness today I will remove those dialogs rebuilding a clean install, but I see no relationship.
Best regards.
 

Attachments

  • compile.log
    43.9 KB · Views: 180
  • error.log
    440 bytes · Views: 198
Back
Top