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

Fixed Sea AI: Hostile Navy Ships Chase Player Despite False Flag

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
Started a new game as Sao Feng and found myself some worldmap encounters.
The English navy ones would chase me all over the sea, despite me flying a (false!) English flag.

Doesn't make sense though, since either they should be HOSTILE and chase me or NEUTRAL and go about their business. o_O

EDIT: It appears that @Screwface's "Improved Sea AI" functionality isn't being executed for ship encounters from the worldmap at all.
Some more investigating to be done, by the looks of it....
 
Last edited:
This is probably somewhat related:
Code:
RUNTIME ERROR - file: globals.c; line: 260
invalid index 539354448 [size:2250]
RUNTIME ERROR - file: globals.c; line: 260
function 'GetCharacter' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 1759
Using reference variable without initializing
RUNTIME ERROR - file: globals.c; line: 260
invalid index 453030328 [size:2250]
RUNTIME ERROR - file: globals.c; line: 260
function 'GetCharacter' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 1759
Using reference variable without initializing
RUNTIME ERROR - file: globals.c; line: 260
invalid index 463468648 [size:2250]
RUNTIME ERROR - file: globals.c; line: 260
function 'GetCharacter' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 1759
Using reference variable without initializing
RUNTIME ERROR - file: globals.c; line: 260
invalid index 458647424 [size:2250]
RUNTIME ERROR - file: globals.c; line: 260
function 'GetCharacter' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 1759
Using reference variable without initializing
RUNTIME ERROR - file: globals.c; line: 260
invalid index 52791696 [size:2250]
RUNTIME ERROR - file: globals.c; line: 260
function 'GetCharacter' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 1759
Using reference variable without initializing
RUNTIME ERROR - file: globals.c; line: 260
invalid index 558291384 [size:2250]
RUNTIME ERROR - file: globals.c; line: 260
function 'GetCharacter' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 1759
Using reference variable without initializing
 
PROGRAM\BATTLE_INTERFACE\LogInterface.c this change should get worldmap generated ships to join in the improved Sea AI behaviour:
Code:
            if (!HasSubStr(groupe, "Directenc") && !HasSubStr(groupe, "egroup")) // DirectSail encounter don't have a location set // <--------- Extra exception on this line
             {
               if (!CheckAttribute(rGroup,"AlreadyLoaded")) continue;
               if (GetAttribute(rGroup, "location") != mchr.location)   continue; // Skip any groups that aren't where the player is
             }
 
This is probably somewhat related:
Code:
RUNTIME ERROR - file: globals.c; line: 260
invalid index 539354448 [size:2250]
RUNTIME ERROR - file: globals.c; line: 260
function 'GetCharacter' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 1759
Using reference variable without initializing
RUNTIME ERROR - file: globals.c; line: 260
invalid index 453030328 [size:2250]
RUNTIME ERROR - file: globals.c; line: 260
function 'GetCharacter' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 1759
Using reference variable without initializing
RUNTIME ERROR - file: globals.c; line: 260
invalid index 463468648 [size:2250]
RUNTIME ERROR - file: globals.c; line: 260
function 'GetCharacter' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 1759
Using reference variable without initializing
RUNTIME ERROR - file: globals.c; line: 260
invalid index 458647424 [size:2250]
RUNTIME ERROR - file: globals.c; line: 260
function 'GetCharacter' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 1759
Using reference variable without initializing
RUNTIME ERROR - file: globals.c; line: 260
invalid index 52791696 [size:2250]
RUNTIME ERROR - file: globals.c; line: 260
function 'GetCharacter' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 1759
Using reference variable without initializing
RUNTIME ERROR - file: globals.c; line: 260
invalid index 558291384 [size:2250]
RUNTIME ERROR - file: globals.c; line: 260
function 'GetCharacter' stack error
RUNTIME ERROR - file: sea_ai\AIShip.c; line: 1759
Using reference variable without initializing
Actually, that is just me outcommenting lines that shouldn't be outcommented.
Never mind that one.... :wp
 
Should be fixed, yes. I'd just hope players keep an eye on what the Sea AI does during general play.
 
Back
Top