In "PROGRAM\Characters\CharacterUtilite.c", function 'SetBaseShipData' contains this:
This seems to set the ship's stats modified by the character's nation, then set the ship's HP and crew unmodified by nation. The effect of that, in the original code to give you Anacleto's ship in "Tales of a Sea Hawk", is that I got a Dutch version of a "Pinnace1" because I was flying a Dutch flag at the time. Dutch ships get 90% MaxCrew. So my MaxCrew was a little over 90 and my actual crew was a little over 100.
I got round this by using a different method to give you Anacleto's ship, but there may still be problems anywhere else this function is used.
Code:
if(!CheckAttribute(refShip,"stats")) {
//KB - Tuning ships - changed call to SetRandomStatsToShip
SetRandomStatsToShip(GetCharacterIndex(refCharacter.id), nShipType, sti(refCharacter.nation)); // PRS3
//KB - orig SetRandomStatsToShip(refShip, nShipType, sti(refCharacter.nation)); // PRS3
}
refBaseShip = GetShipByType(nShipType);
refShip.HP = GetLocalShipAttrib(refShip, refBaseShip, "HP");
refShip.SP = GetLocalShipAttrib(refShip, refBaseShip, "SP");
if (nShipType != SHIP_FORT) // PB: Don't overwrite this for forts
{
refShip.Pos.x = 0;
refShip.Pos.z = 0;
}
refShip.Ang = "";
refShip.Cannons.Borts = "";
if (USE_REAL_CANNONS)
refShip.Cannons.Charge.Type = GOOD_BALLS; // KNB
else
refShip.Cannons.Charge.Type = GOOD_BOMBS;
if(!CheckAttribute(refShip,"Cannons.Type")) { refShip.Cannons.Type = MakeInt(GetLocalShipAttrib(refShip, refBaseShip, "Cannon")); }
if(!CheckAttribute(refShip,"Crew.Morale")) { refShip.Crew.Morale = 45; }
if(!CheckAttribute(refShip,"Crew.Quantity")) { refShip.Crew.Quantity = GetLocalShipAttrib(refShip, refBaseShip, "MaxCrew"); }
I got round this by using a different method to give you Anacleto's ship, but there may still be problems anywhere else this function is used.