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

Army of BlackPearls

superdurnius

Corsair
Coordinator
3D Artist
Storm Modeller
I was sailing near Jamaica (Via Map)... Crew reported that there is battle, Portugal vs. Spain... And guess what Portugal are using in their navy?
[attachment=3815:BlackPearls.jpg][attachment=3816:BlackPearls2.jpg]
 
Did you change some settings in your game? Because that is definitely NOT supposed to happen. :?
 
nothing... Pure alpha 10 on my machine... I simply summoned black pearl to me via the console... Nothing more...
 
Ok what has happened is that the game has tried to put Portugal made ships in for that fleet and failed to do this a certain ammount of times ;)

When this happens it will use the players ship (which is the BlackPearl) as there ship. [Pieter told me all about this some time ago xD:]

Now this might mean there is something wrong with Portugal (as a nation) can you get in another fight again with Portugal and see if you have the same result :yes
 
When the game can't find a ship for a random encounter, eventually it'll use the player ship for that encounter.
Refer to this code in PROGRAM\Ships\Ships.c:
Code:
int Force_GetShipType(int maxclass, int minclass, string type, int nat)
{
//these are JUST IN CASE...
if(maxclass > minclass) {int tmp = maxclass; maxclass = minclass; minclass = tmp; } // NK to swap min/max if needed 05-04-15
// 04-09-09 NK-PRS3
if(type == "pirate")
{
if(PIRATES_USE_BOTH_TYPES) { type = ""; }
else { type = "war"; }
}
// NK <--
switch(type) // add this 05-05-01 for just in case.
{
case "trade":
maxclass = iclamp(MAXMERCHANTCLASS, MIN_CLASS, maxclass);
minclass = iclamp(MAXMERCHANTCLASS, MIN_CLASS, minclass);
break;

case "pirate":
maxclass = iclamp(MAXPIRATECLASS, MIN_CLASS, maxclass);
minclass = iclamp(MAXPIRATECLASS, MIN_CLASS, minclass);
break;
// default, war, where max class is MAX_CLASS
maxclass = iclamp(MAX_CLASS, MIN_CLASS, maxclass);
minclass = iclamp(MAX_CLASS, MIN_CLASS, minclass);
}

// Screwface
bool finish = false;
int end = 0; // Security to avoid infinite loop
while(!finish && end < 100) // maximum of 100 loop should be enough
{
int iShipType = Fantom_GetShipType(maxclass, minclass, type, nat);
if(iShipType < SHIP_TYPES_QUANTITY && iShipType >= 0)
{
finish = true;
}
else
{
end++;
}
}
if(finish){return iShipType;}
else{return GetCharacterShipType(GetMainCharacter());}

// old section outcommented
/*int iShipType = Fantom_GetShipType(maxclass, minclass, type, nat);
if(iShipType < SHIP_TYPES_QUANTITY && iShipType >= 0) { return iShipType; }
trace("oh no, we didn't find a ship the first go!");
iShipType = Fantom_GetShipType(maxclass, minclass, type, nat); // try again, for randomness
if(iShipType < SHIP_TYPES_QUANTITY && iShipType >= 0) { return iShipType; }
iShipType = Fantom_GetShipType(maxclass, minclass, type, -1); // clear nation
if(iShipType < SHIP_TYPES_QUANTITY && iShipType >= 0) { return iShipType; }
iShipType = Fantom_GetShipType(maxclass, minclass, "none", -1); // clear type too
if(iShipType < SHIP_TYPES_QUANTITY && iShipType >= 0) { return iShipType; }
iShipType = GetCharacterShipType(GetMainCharacter());
return iShipType;*/
}
I was rather hoping that this wouldn't happen anymore,
considering that Screwface's code tries to select a ship 100(!) times before selecting the player ship.
Even even if that does happen, it should be only one and not ALL of them.
But theoretically it could happen that for each ship, after 100 tries,
the game couldn't select a ship and chooses the player ship (Black Pearl in this case) for each one.
I'm not sure how this could be solved though... :?
 
That is why I thought it was very unlikly for it to happen and thought maybe it was the Portugal ships that were causing the error :shrug
 
Back
Top