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

Smaller Enemy Ship Fleet Size

Blaze Devlin

Sailor
Storm Modder
:ahoy

It happens quite often in GOF 2.0Mod Beta Patch Ver. 1.4 that an enemy ship fleet consisting of 4 merchant ships and 4 military ships for instance encounters my ships on the World Map. This equals to a total of 8 enemy ships. It could be of course smaller, for instance 3 and 3 or 2 and 2 or so. But the point is, that I suffering often an "ENGINE" crash after mowing to Sea Mode.

My idea is to reduce the enemy ship fleets to lets say a total of 6 ships. To do so, I guess I must modify some of the files. Can anybody tell me please if it is possible to do it? And if yes, how please?

Thanks a lot and happy boarding!! :bird:
:ship

AOP 2 PA! 1.png
 
If this is anywhere like PotC, look at PROGRAM\Encounters\Encounters_init.c
 
How many ships do you have? As I recall the enemy fleet size and type is set to be just a bit better than yours.
 
I got 4 ships at this time in action (including my flagship) as you can see at the picture above. Plus another 4 ships stored at the port control.
 
It is adjustable. Have you looked in the files Pieter mentioned? That looks like the place to adjust things, although I do not understand what the numbers mean.

Your only other alternative is to get more powerful hardware that can handle the heavy loads all of those class 1 and 2 ships put on the engine.
 
Yes. I already modified the file Pieter mentioned earlier. I did the following at the top of the file:

Code:
void InitEncounters()
{
    int i;
    ref rEnc;

    for (i=0; i<MAX_ENCOUNTER_TYPES; i++)
    {
        makeref(rEnc, EncountersTypes[i]);
        rEnc.Index = i;
        rEnc.Chance = 100;
        rEnc.Skip = false;
        rEnc.MinRank = 1;
        rEnc.MaxRank = 1000;
        rEnc.Merchant.ShipsMin = 0;        rEnc.Merchant.ShipsMax = 3;
        rEnc.War.ShipsMin = 0;            rEnc.War.ShipsMax = 3;
        rEnc.Type = ENCOUNTER_TRADE;

At the line "rEnc.Merchant.ShipsMax" and "rEnc.War.ShipsMax" I changed the values from 0 to 3. So as far I understand it should generate ONLY a max. of 3 merchant ships and 3 war ships.
In addition to that I modified the most of the specific encounter types. Here is an example for the case "Fleet":

Code:
makeref(rEnc, EncountersTypes[ENCOUNTER_TYPE_FLEET]);
    rEnc.Type = ENCOUNTER_WAR;
    rEnc.MaxRank = 1000;
    rEnc.Chance = 50;
    rEnc.worldMapShip = "manowar";
    Enc_ExcludeNation(rEnc, PIRATE);

    if(!REALISTIC_SHIP_ENCOUNTERS) // = If Realistic Ship Encounters is NOT enabled
    {
        rEnc.MinRank = 36;
    Enc_AddShips(rEnc, "War", 3, 3);
    Enc_AddClasses(rEnc, 18, 0, 0, 1, 4);
    Enc_AddClasses(rEnc, 1000,0, 0, 1, 4);

    }
               else // = If Realistic Ship Encounters IS enabled
        {
    rEnc.MinRank = 10;
    Enc_AddShips(rEnc, "War", 1, 5);
    Enc_AddClasses(rEnc, 8, 0, 0, 1, 7);
    Enc_AddClasses(rEnc, 1000,0, 0, 1, 7);
    }

Now if you look at the lines "Enc_AddShips" you see the numbers 3, 3 at the top and 1, 5 at the bottom. I reduced those values (before it was up to 3, 6 or so). But I`m not sure if it means 3 + 3 = 6 and 1 + 5 = 6? Or do the numbers not belonging together? Because that would be exactly what I want to do, that no more than 6 enemy ships show up at sea mode!

For example I having a total of 4 ships and it happens often that the enemy ships fleet consists of 8 ships. That is the DOUBLE size of my own fleet in other words! But it would be interesting to know if there is a multiplying factor that says: enemy ship fleet = player ship fleet x 2 or something like this? Since now I couldn`t find it! Does anybody having a tip or an idea to share with me?
 
Enc_AddShips(rEnc, "War", 1, 5);
^ That line means that the encounter contains between 1 and 5 warships; the actual amount should be randomly chosen.
As the maximum is 5, that exceeds the player fleet of 4 ships. If you want to prevent that, lower that second number.
New game probably required.
 
Back
Top