^ If you've got any suggestions for better generic ships being used, feel free to post them.
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!
Quick links for Beyond New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
- Bug Tracker on Github
Quick links for Maelstrom
- Download the latest version of Maelstrom
- Download the latest version of ERAS II
- Download the latest version of New Horizons on Maelstrom
Quick links for PotC: New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
Thanks to YOUR votes, GOG.com now sells:
- Sea Dogs
- Sea Dogs: Caribbean Tales
- Sea Dogs: City of Abandoned Ships
Vote now to add Pirates of the Caribbean to the list!
Quick links for AoP2: Gentlemen of Fortune 2
- Downloads and info
- ModDB Profile
- Forums Archive
A Pirate Podcast with Interviews
Music, Comedy and all things Pirate!
- Episode Guide - About - Subscribe -
- Twitter - Facebook - iTunes - Android -
- Youtube - Fill the Coffers -
// PB: If all fails, return a random period-specific ship type instead of the player ship -->
switch((GetCurrentPeriod()))
{
case PERIOD_EARLY_EXPLORERS:
switch(rand(1))
{
case 0: return GetShipIndex("Carrack"); break;
case 1: return GetShipIndex("caravel1"); break;
}
break;
case PERIOD_THE_SPANISH_MAIN:
switch(rand(2))
{
case 0: return GetShipIndex("SP_Derfflinger"); break;
case 1: return GetShipIndex("RN_RevengeM"); break;
case 2: return GetShipIndex("FastGalleon1"); break;
}
break;
case PERIOD_GOLDEN_AGE_OF_PIRACY:
switch(rand(2))
{
case 0: return GetShipIndex("Barque4_47"); break;
case 1: return GetShipIndex("PiratPostillionen"); break;
case 2: return GetShipIndex("frigate1"); break;
}
break;
case PERIOD_COLONIAL_POWERS:
switch(rand(2))
{
case 0: return GetShipIndex("PiratHannah"); break;
case 1: return GetShipIndex("PO_Neptunus"); break;
case 2: return GetShipIndex("frigate2"); break;
}
break;
case PERIOD_REVOLUTIONS:
switch(rand(2))
{
case 0: return GetShipIndex("ketch"); break;
case 1: return GetShipIndex("Hooker"); break;
case 2: return GetShipIndex("Corvette47"); break;
}
break;
case PERIOD_NAPOLEONIC:
switch(rand(2))
{
case 0: return GetShipIndex("Schooner50"); break;
case 1: return GetShipIndex("FastMerchantman1"); break;
case 2: return GetShipIndex("lineship47"); break;
}
break;
}
// PB: If all fails, return a random period-specific ship type instead of the player ship <--
// return GetCharacterShipType(GetMainCharacter());
// PB: If all fails, return a random period-specific ship type instead of the player ship -->
trace("Force_GetShipType: unable to find ship, returning default ship instead");
switch((GetCurrentPeriod()))
{
case PERIOD_EARLY_EXPLORERS:
switch(rand(1))
{
case 0: return GetShipIndex("Carrack"); break;
case 1: return GetShipIndex("caravel1"); break;
}
break;
case PERIOD_THE_SPANISH_MAIN:
switch(rand(2))
{
case 0: return GetShipIndex("Caravel2"); break;
case 1: return GetShipIndex("RN_RevengeM"); break;
case 2: return GetShipIndex("FastGalleon1"); break;
}
break;
case PERIOD_GOLDEN_AGE_OF_PIRACY:
switch(rand(2))
{
case 0: return GetShipIndex("Barque4_47"); break;
case 1: return GetShipIndex("PiratPostillionen"); break;
case 2: return GetShipIndex("frigate1"); break;
}
break;
case PERIOD_COLONIAL_POWERS:
switch(rand(2))
{
case 0: return GetShipIndex("PiratHannah"); break;
case 1: return GetShipIndex("PO_Neptunus"); break;
case 2: return GetShipIndex("frigate2"); break;
}
break;
case PERIOD_REVOLUTIONS:
switch(rand(2))
{
case 0: return GetShipIndex("ketch"); break;
case 1: return GetShipIndex("Hooker"); break;
case 2: return GetShipIndex("Corvette47"); break;
}
break;
case PERIOD_NAPOLEONIC:
switch(rand(2))
{
case 0: return GetShipIndex("Schooner50"); break;
case 1: return GetShipIndex("FastMerchantman1"); break;
case 2: return GetShipIndex("lineship47"); break;
}
break;
}
// PB: If all fails, return a random period-specific ship type instead of the player ship <--
Those are NOT the default ships, so that is not the problem. Perhaps the minclass/maxclass/type is what is messing things up?One thing that bothers me is that, despite making PiratCorvette and CrimsonBlood considerably rare, the first pirate fleet I encountered in my Beta 2.5 game consisted of JUST those two ships.
I checked the code and the changes I made are present, so clearly I still haven't done enough to discourage those two from showing up too frequently.
Force_GetShipType: Maxclass = 3, Minclass = 8, Nat = Spain, Type = trade, Loop = 0, Ship ID = BarqueHeavy
Force_GetShipType: Maxclass = 3, Minclass = 8, Nat = Spain, Type = trade, Loop = 0, Ship ID = Yacht2
Force_GetShipType: Maxclass = 3, Minclass = 8, Nat = Spain, Type = trade, Loop = 0, Ship ID = US_Hannah
Force_GetShipType: Maxclass = 3, Minclass = 8, Nat = Spain, Type = trade, Loop = 0, Ship ID = Lugger1
Force_GetShipType: Maxclass = 1, Minclass = 8, Nat = Holland, Type = war, Loop = 0, Ship ID = Cutter1
Force_GetShipType: Maxclass = 1, Minclass = 8, Nat = Holland, Type = war, Loop = 0, Ship ID = Sloop2
Trace("Can't find ship type '" + sShipType + "' with ClassMin = " + iClassMin + " and ClassMax = " + iClassMax);
Can't find ship type 'Trade' with ClassMin = 3 and ClassMax = 3
Can't find ship type 'Trade' with ClassMin = 3 and ClassMax = 3
Can't find ship type 'Trade' with ClassMin = 3 and ClassMax = 3
Can't find ship type 'Trade' with ClassMin = 3 and ClassMax = 3
Can't find ship type 'Trade' with ClassMin = 3 and ClassMax = 3
[... continued 200 times ...]
Force_GetShipType: Maxclass = 4, Minclass = 6, Nat = Holland, Type = Trade, Loop = 2, Ship ID = Schooner2
Force_GetShipType: Maxclass = 4, Minclass = 6, Nat = Britain, Type = Trade, Loop = 1, Ship ID = FastMerchantman2
Force_GetShipType: Maxclass = 4, Minclass = 6, Nat = America, Type = Trade, Loop = 2, Ship ID = Shnyava1
Can't find ship type 'Trade' with ClassMin = 3 and ClassMax = 3
ERROR - Force_GetShipType: unable to find ship, returning a default ship instead
Yeah, I meant to say that was unrelated to the default ships problem.Those are NOT the default ships, so that is not the problem. Perhaps the minclass/maxclass/type is what is messing things up?
If the pirates just don't have enough ships available within those parameters, the same ones will keep cropping up.
Extract attached to PROGRAM\Ships . This will add lines like these into compile.log for EVERY single randomly encountered ship
Sorry; I was in the middle of editing my post due to excessive amounts of compile.log entries that I had not anticipated.Extract... what?
So if a default ship is selected, that means that EVERY ship that falls within the requested parameters has failed on the chance check 200 times.
The odds of that seem pretty astronomical to me. So that means that when a default ship IS generated, the game probably has literally nothing to choose from.
This is also indicated by the fact that in the short tests that I did, most of the time the game managed to generate a ship on first try.
A few times the game had to loop once or twice. Except that one Dutch encounter where the game looped 200 times and still didn't find anything.