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

Editing Encounter details

Takeda-One

Prussian Corsair
Storm Modder
Hey mates,

I am up to change the encounter.init file so that the game is better to enjoy. I have a rough idea what to do, but to go for sure I`d like to know the exactly meaning of these lines:
(...)
rEnc.MinRank = 1;
rEnc.MaxRank = 1000;
rEnc.worldMapShip = "galleon";
Enc_AddShips(rEnc, "Merchant", 1, 3);
Enc_ExcludeNation(rEnc, PIRATE);

Enc_AddClasses(rEnc, 1, 4, 6, 3, 5);
Enc_AddClasses(rEnc, 1000,4, 6, 3, 5);

Can anyone help here?
 
It is good you mention this, just a few days ago someone made a thread about some of their findings in regards to this, but I can't remember in what thread it was :shrug

I tried to edit this file a little myself in the COAS CM, I really did not like the idea of not even being allowed to command a frigate properly but having the possibility of running into a large squadron. Perhaps the original poster will see this post and post his findings on here as well.

Once I'm done working on some current projects for the CM, I'll check back here and tweak the encounter file again.
 
I hope so, it would be better to a realistic variety of encounters/traders on sea instead of dozend of big Fleets (5 - 7 ships at most of the time, leading to game chrashing when forced to enter the battle) having nothing esle to do but hunting the players little lugger!
 
Hey mates,

I am up to change the encounter.init file so that the game is better to enjoy. I have a rough idea what to do, but to go for sure I`d like to know the exactly meaning of these lines:
(...)
rEnc.MinRank = 1;
rEnc.MaxRank = 1000;
rEnc.worldMapShip = "galleon";
Enc_AddShips(rEnc, "Merchant", 1, 3);
Enc_ExcludeNation(rEnc, PIRATE);

Enc_AddClasses(rEnc, 1, 4, 6, 3, 5);
Enc_AddClasses(rEnc, 1000,4, 6, 3, 5);

Can anyone help here?


It has been a while since I have messed with this file but I might be able to help

rEnc.MinRank = 1; A: this is the minimum Skill level for the combined fleet
rEnc.MaxRank = 1000; A:this is the maximum
rEnc.worldMapShip = "galleon"; B: this is the Icon / Avatar / or whatever you want to call it that will be used in the WORLD MAP ONLY not battles
Enc_AddShips(rEnc, "Merchant", 1, 3); C: Look below for explanation this is the nuts and bolts of what you are looking for
Enc_ExcludeNation(rEnc, PIRATE); D: The exlcusion is exactly what it say it will use this format for all fleets of this type except for the indicated.

Enc_AddClasses(rEnc, 1, 4, 6, 3, 5); These two were harder to figure out and at one time I could remember but it has been to long
Enc_AddClasses(rEnc, 1000,4, 6, 3, 5); but if you look at the top of the file they have examples and with a reasonable amount of effort you
should be able to figure them out, I would do it now but I am at work and not at my home PC so I can't see it.

The 1 is where you indicate the minimum # of ships you want the fleet to have. Where the 3 is placed is the max amount of ships for the fleet. For example: If I want a fleet to always have just 1 ship in it then it would need to look like this Enc_AddShips(rEnc, "Merchant", 1, 1); If I wanted them to have between 5 and 10 then it would be
Enc_AddShips(rEnc, "Merchant", 5, 10); etc, etc never put a 0 in either slot or none of you fleets will have ship (found this out the had way)
Also if you change this it IS NOT SAVE GAME COMPATIBLE any change to this file and you will have to restart a new game.
I hope this helps, I personaly have all my fleets set at 1:1 except for the ones that are supposed to be huge fleets all the conveys and pirate though are 1:1
Then again I never command more than 1 ship, to me it adds realism.

happy Sailing,
John W. Hamm
 
Thanks, this was roughly, what I had in mind. Its nice to see this confirmed!

I guess these lines: Enc_AddClasses(rEnc, 1, 4, 6, 3, 5);
Enc_AddClasses(rEnc, 1000,4, 6, 3, 5);

define the available shipclasses for the fleet at min rank 1 & max rank 1000, but it looks a bit strange for such a command line, it is only a guess...
 
Thanks

It would be nice to see better ship encounters and not alway's find yourself out matched for speed, out classed, out crewed and out gunned. I know to keep COAS competative the ship encounters had to be harder and require more frequently than in previous pirate RPG games but it gets really annoying when everything is against you, the wind, a storm and enemy ships appearing all over the place. While on the topic of weather i have noticed, if you aviod the enemy ships 9 out of 10 times you will come across a storm thats almost impossible to aviod and the wind is as alway's against you till you are almost at your destination. So if the ship encounters is fixed that would please many people who find the game unplayable because of the above facts, maybe the weather can be altered one day (not an area i know about) then that would be another annoying part of the game fixed too. :onya


Thanks, this was roughly, what I had in mind. Its nice to see this confirmed!

I guess these lines: Enc_AddClasses(rEnc, 1, 4, 6, 3, 5);
Enc_AddClasses(rEnc, 1000,4, 6, 3, 5);

define the available shipclasses for the fleet at min rank 1 & max rank 1000, but it looks a bit strange for such a command line, it is only a guess...
Not sure if thats the class of ships that will be generated but it does look like that , what i don't get is why isn't there ship ranks for 3, 2 and 1 i would have expected them to have been defined in less it generates ships between classes ie 1,3 will mean class 2 ships are generated too in which case means if you put classes 1, 2, 3 as been the class of ships to be generated for ranks above say 40 then only the ships in class 1, 2 and 3 will be generated, if you put 1, 2, 3, 5 then that could mean ships from classes 1, 2, 3, 4 and 5 would be generated. Just a guess, not an area i have delved into but i hope what i have said makes sense and is on the right lines of course i could be totally wrong lol.
 
I hare not tested this yet but based on the description the file has, I think Enc is as follows:

Enc_AddClasses(rEnc, 1, 4, 6, 3, 5);

1-Min rank in which encounter occurs
4-Min level merchant ship class
6-Max level merchant ship class
3-Min level warship class
5-Max level warship class

Enc_AddClasses(rEnc, 1000,4, 6, 3, 5);
1000-Max rank in which encounter occurs
4-Min level merchant ship class
6-Max level merchant ship class
3-Min level warship class
5-Max level warship class

For COAS CM, I had tweaked some of the Enc #'s, but at the time I didn't know what the Enc #'s were. For instance you now have to be at level 10 to encounter a large squadron, where as in vanilla I think it used to be five. Another change that made into the COAS CM was I gave large pirate fleets an encounter rate of 30% I think, and I made sure war squadrons don't appear till your at least level 10, originally it was set at level 7 I belive.

Currently in my game I've made it so small actions are single ships, medium actions are two or three, and large actions three or four. For war squadrons I left the #'s unchanged for the most part. For pirates I've adjusted the size of their fleets as well, but I've changed their Enc #'s so they can't have anything larger than a 3nd rate; if you look at the ship list in COAS CM, you'll see lineships in the 2nd rate colum, a lineship pirate ship? Crazy! :facepalm

I haven't been able to test this though since some of the changes I've made requires a new game and I'm enjoying my current campaign.
 
Good work Oficerpuppy :onya , that will make the start easier and its good to know that we won't see pirates having warships and MOW's etc not that i have seen a pirate with either of those ships but i have heard about them having the warship.
 
Thanks, this was roughly, what I had in mind. Its nice to see this confirmed!

I guess these lines: Enc_AddClasses(rEnc, 1, 4, 6, 3, 5);
Enc_AddClasses(rEnc, 1000,4, 6, 3, 5);

define the available shipclasses for the fleet at min rank 1 & max rank 1000, but it looks a bit strange for such a command line, it is only a guess...


Yes actually I remeber that as well now

Enc_AddClasses(rEnc, 1, 4, 6, 3, 5); the 1 & the 1000 at the begining of both lines are the skill level between 1-1000 for the total combined skill lvl of fleet
Enc_AddClasses(rEnc, 1000,4, 6, 3, 5); the 4's & 6's are in the spot for the merchants ships meaning merchant ship between the levels of 4-6 will spawn
the 3 & 5 are in the spot for the escot ships meaning ships between levels 3 and 5 will spawn why they are redundant I do not know but I believe they have to be the same. don't quote me on that though but if memory serves from my test's they do.
 
Interested only merchants from class 4 and bellow huh, well thats weird since there are class 3 merchant ships the Pinnace is one of them the Galleon is another. But with the COAS CM mod there are many more merchant ships now, and i'm sure the class of merchant ships is either class 1 or class 2 now which means that code needs editing so that the other class of merchant ships are generated too.
 
Interested only merchants from class 4 and bellow huh, well thats weird since there are class 3 merchant ships the Pinnace is one of them the Galleon is another. But with the COAS CM mod there are many more merchant ships now, and i'm sure the class of merchant ships is either class 1 or class 2 now which means that code needs editing so that the other class of merchant ships are generated too.


I'm sure you are correct I only copied and pasted the example he used in the top to use in this example I have no idea what his actual lines read, in my game it reads whatever the it was originally supposed to be in the vanilla game.


Edit Actually I just looked and this does come from the Vanilla so I certainly agree with you.
 
Could it be possible to define the shiptypes to choose from directly? In that way we would have control of ship-use by the nations!
 
I have not tried this, but there is a slight possibility of this.

Code:
Enc_ExcludeNation(rEnc, PIRATE);

That could be part of the answer to the puzzle. We would have to create many entries for all four nations So if we are doing France, using the code above, we exclude all the other nations then assign the ship class.

The second part which I perceive could be the other half of the answer is ship classes which is in another file.

We would have to re do all the ships classes to be nation specific, for example French 1st rates could be listed as class 1F, English ships, class 1E, etc etc.

In theory, it should look like this:
Code:
rEnc.MinRank = 1;
rEnc.MaxRank = 1000;
rEnc.worldMapShip = "galleon";
Enc_AddShips(rEnc, "Merchant", 1, 3);
Enc_ExcludeNation(rEnc, PIRATE);
Enc_ExcludeNation(rEnc, SPAIN);
Enc_ExcludeNation(rEnc, ENGLAND);
Enc_ExcludeNation(rEnc, HOLLAND);

Enc_AddClasses(rEnc, 1, 4F, 6F, 3F, 5F);
Enc_AddClasses(rEnc, 1000,4F, 6F, 3F, 5F);

Lastly, the ships_init file might need a complete overhaul as well which would be a big task. The ships are listed by class, 7, 3, etc. So if we create new classes, 7F, 3E etc, we need to make those changes in the ships_init as well. There is at least 40 ships in COAS CM, maybe more. Using 40 as a #, we would need 40 ships for France, 40 Ships for England etc, all the nations put together come out to 200 ships. Naturally not every nation would have the same exact # of ships either, for example Victory would be English only so you would have to remove the Victory entry for all other factions.


If I can put down ME2 sometime, I can give this a try or at least experiment with one or two ships, or perhaps someone else could try out what I've suggested.
 
I could help here, but I need to know which other files have to be included as far as the ship-class definition is concerned, for example the ships.h file or how can we edit the ships spawned at the ports... without a clear task I can not exclude heavy errors!
 
Program/ships/Ships_init
Program/ships/Ships
Program/encounters/Encounters_init

I think that's all, but I don't know for sure. Something that I don't know how will react to the changes are shipyards, hopefully they won't break with the changes we are proposing.
 
I am still working on the encounter.init file to make reasonable map encounter groups. There are still lines I can not understand:

3-5 òîðãîâöà 4-6 êëàññà.

or

1-3 òîðãîâöà 5-6 êëàññà ïëþñ 1 êîðàáëü îõðàíû

or

1-2 ïèðàòà

or

2-3 âîåííûõ êîðàáëÿ 3-4 êëàññà

can any one help here??? :shrug
 
1-3 òîðãîâöà 5-6 êëàññà ïëþñ 1 êîðàáëü îõðàíû
These are just comments in the code.

Code:
/// 1-3 òîðãîâöà 5-6 êëàññà ïëþñ 1 êîðàáëü îõðàíû

Notice the /// (only has has to be "//" to force a comment). This means it was something the programmer put in to describe the what the function did below. Unfortunately I do not know what language that is to translate it but I did try Russian to no avail.
 
1-3 òîðãîâöà 5-6 êëàññà ïëþñ 1 êîðàáëü îõðàíû
These are just comments in the code.

Code:
/// 1-3 òîðãîâöà 5-6 êëàññà ïëþñ 1 êîðàáëü îõðàíû

Notice the /// (only has has to be "//" to force a comment). This means it was something the programmer put in to describe the what the function did below. Unfortunately I do not know what language that is to translate it but I did try Russian to no avail.

So you it has ne consequenses to the game? In the Ships.init File there are simular lines for example:

= "Flyingdutchman"; // ËÃ

so this means also to be only a "comment"?
 
= "Flyingdutchman"; // ËÃ

so this means also to be only a "comment"?

The line :

Code:
refShip.Name            			= "Flyingdutchman";  // ËÃ

The code of this line is :

Code:
refShip.Name            			= "Flyingdutchman";

This is the program code that will be read by the computer to complete its function.

Below is the commented part :

Code:
// ËÃ

The "//" starts the comment anywhere in the line. Its also important to know that ";" is the 'end line' code. Which will force the computer to read the next line of code.
 
Back
Top