Now those crashes are back again. Just happens twice times for me engaging enemy ships.
Sometimes there are no enemy ships, when you reload from worldmap.
Sometimes there are no enemy ships, when you reload from worldmap.
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 -
Thanks a lot! Hadn't noticed you edited your post, but indeed that is Confirmed from my side too. UGH!Update: Saw a French fleet on the worldmap sailed to it saved my game, attacked it it said that is was a "Group of merchant flying the French flag, should we engage?" clicked "Yes" immediately a crash uploading the save and crash files.
The fleet is near Jamaica on the world map I sailed behind them.
I will post two savegames prior to the crashes. The 5 June save is the one whit no ships reloading fromIf you have a save on the worldmap just prior to an encounter that crashes
chr_ai =
hp = 0.0000000
hp_max = 65.0000000
type = stay
tmpl = stay
login = 0
group = corpses
SEA: Ship_Add2Sea adding character fenc_2000 to sea
SEA: Ship_Add2Sea character is DEAD!
id = fenc_2000
index = 2000
name = Desire
old =
name = Maugis
lastname = Terhune
chr_ai =
hp = 40.0000000
hp_max = 40.0000000
type = stay
dialog =
currentnode = First time
tempnode = First time
items =
blade2+1 = 1
blade = blade2+1
lastname = Saint-Chéron
sex = man
model = man6_1
entity = NPCharacter
animation = man
height = 1.8000000
location = none
group =
locator =
from_sea =
stime = 6.0000000
etime = 21.9833298
ship =
type = FastMerchantman1
idx = 53
mode = trade
cannons =
charge =
type = 2
type = 2
speedv0 = 125.0735703
fireangmax = 1.0000000
fireangmin = 1.0000000
borts =
cannonf =
qty = 0
cannonb =
qty = 0
cannonl =
qty = 5
cannonr =
qty = 5
tune =
cplates =
on = 0
bcannons =
on = 0
gchasers =
on = 0
nsails =
on = 1
speedrate = 0.1197339
sails = 0.0424534
ltopmasts =
on = 0
speedrate = 0.0097647
sailcrit = 4
stays =
on = 0
rhull =
on = 0
hp = 568.9332275
incaliber = 1
flushed =
on = 0
tack = 0
tackmod = 0
maxcaliber = 32
name = Libre
crew =
quantity = 168
morale = 37
minratio = 1.0000000
hp = 1377
sp = 200
pos =
x = 1775.38
z = -2435.51
mode = 0
y = 1.22236
ang =
y = 0.946212
x = 0.0536488
z = -0.0112466
cargo =
load = 1291
goods =
ration = 0
rum = 0
balls = 55
grapes = 0
knippels = 60
bombs = 0
gunpowder = 1365
sailcloth = 14
planks = 20
gold = 0
silver = 0
cinnamon = 0
chocolate = 180
coffee = 0
wheat = 0
medicines = 0
paprika = 354
wine = 0
sandal = 0
ebony = 0
mahogany = 0
sugar = 0
tobacco = 0
ale = 0
silk = 0
linen = 0
fruits = 0
clothes = 0
bricks = 0
oil = 0
cotton = 0
copra = 0
leather = 0
recalculatecargoload = 0
impulse =
rotate =
x = 0.0000000
y = 0.0000000
z = 0.0000000
speed =
x = 0.0000000
y = 0.0000000
z = 0.0000000
lastballcharacter = -1
speed =
z = 11.0813
y = -0.00822715
x = 0
strand = 0
sndid = 0
stopped = 0
maxspeedz = 15.0681667
maxspeedy = 0.0549420
correctimmersion = 0.3994061
immersion = 0.3994061
boxsize =
x = 9.54322
y = 27.9055
z = 24.6521
old =
masts =
mast1 = 0
mast2 = 0
mast3 = 0
plunder =
plunder0 = 24
plunder1 = 6
plunder2 = 55
plunder4 = 60
plunder6 = 1365
plunder7 = 14
plunder8 = 20
plunder12 = 180
plunder16 = 354
stats =
nation = 1
weight = 11680
capacity = 2337
maxcrew = 177
mincrew = 31
speedrate = 14.8000698
turnrate = 44.4599113
price = 91960
hp = 2571
origspeed = 14.6803360
sails =
gerald = 0
dialog =
currentnode = First time
tempnode = First time
quest = True
meeting = 0
officertype = merchant captain
officerprice = 4456
nation = 1
name = 1
known = -2
skill =
freeskill = 0
sneak =
modifier = 0
party = 1
ship = 1
shipclass = 6
fleetsize = 1
sailing =
modifier = 0
party = 1
shipclass = 5
fleetsize = 1
ship = 1
leadership = 1
modifier = 0
party = 1
shipclass = 5
fleetsize = 1
ship = 1
commerce =
modifier = 0
party = 1
ship = 1
shipclass = 6
fleetsize = 1
defence =
modifier = 0
party = 1
ship = 1
shipclass = 6
fleetsize = 1
grappling =
modifier = 0
party = 1
ship = 1
shipclass = 6
fleetsize = 1
repair =
modifier = 0
party = 1
ship = 1
shipclass = 6
fleetsize = 1
fencing =
modifier = 0
party = 1
ship = 1
shipclass = 6
fleetsize = 1
accuracy =
modifier = 0
party = 1
ship = 1
shipclass = 6
fleetsize = 1
cannons =
modifier = 0
party = 1
ship = 1
shipclass = 6
fleetsize = 1
rank = 1
reputation = 45
headmodel = h_man6_1
chr_ai =
hp = 0.0000000
hp_max = 65.0000000
type = stay
tmpl = stay
login = 0
group = corpses
abordagemode = 1
issoldier = 0
seaai =
group =
name = egroup__2
task = 6
target =
pos =
x = 8855.1904297
z = 4646.0307617
shiptype = FastMerchantman1
fantomtype = trade
points = 2.3360000
faceid = 30
items =
blade2+1 = 1
blade2-1 = 1
merchantsblade = 2
pistol1-2 = 1
gunpowder = 3
pistolbullets = 4
equip =
blade = MerchantsBlade
gun = pistol1-2
shipmoney = 6
features =
geraldsails = 0
tmpperks =
turn = 0
basicdefence = 0
advanceddefence = 0
toughness = 0
criticalhit = 0
swordplayprofessional = 0
rush = 0
gunman = 0
improveaiming = 0
gunprofessional = 0
gunfighter = 0
improvepotions = 0
defendpoison = 0
shipturnrateup = 0
shipspeedup = 0
turn180 = 0
sandbankmaneuver = 0
stormprofessional = 0
sailingprofessional = 0
basicbattlestate = 0
advancedbattlestate = 0
shipdefenceprofessional = 0
fastreload = 0
immediatereload = 0
hulldamageup = 0
sailsdamageup = 0
crewdamageup = 0
criticalshoot = 0
longrangeshoot = 0
cannonprofessional = 0
longrangegrappling = 0
musketsshoot = 0
grapplingprofessional = 0
instantboarding = 0
troopers = 0
lightrepair = 0
instantrepair = 0
cooking = 0
highstakes = 0
improvesmuggling = 0
advancesmuggling = 0
basiccommerce = 0
advancedcommerce = 0
trustworthy = 0
basiclandowner = 0
sharedexperience = 0
ironwill = 0
brander = 0
contriblist =
basicdefence = 0
advanceddefence = 0
toughness = 0
criticalhit = 0
swordplayprofessional = 0
rush = 0
gunman = 0
improveaiming = 0
gunprofessional = 0
gunfighter = 0
improvepotions = 0
defendpoison = 0
shipturnrateup = 0
shipspeedup = 0
turn180 = 0
sandbankmaneuver = 0
stormprofessional = 0
sailingprofessional = 0
basicbattlestate = 0
advancedbattlestate = 0
shipdefenceprofessional = 0
fastreload = 0
immediatereload = 0
hulldamageup = 0
sailsdamageup = 0
crewdamageup = 0
criticalshoot = 0
longrangeshoot = 0
cannonprofessional = 0
longrangegrappling = 0
musketsshoot = 0
grapplingprofessional = 0
instantboarding = 0
troopers = 0
lightrepair = 0
instantrepair = 0
cooking = 0
highstakes = 0
improvesmuggling = 0
advancesmuggling = 0
basiccommerce = 0
advancedcommerce = 0
trustworthy = 0
basiclandowner = 0
sharedexperience = 0
ironwill = 0
brander = 0
lastsailstate = 2
tmpskill =
commerce = 0.1000000
leadership = 0.1000000
sneak = 0.1000000
defence = 0.1000000
grappling = 0.1000000
sailing = 0.1000000
repair = 0.1000000
fencing = 0.1000000
accuracy = 0.1000000
cannons = 0.1000000
perks =
list =
flags =
seatime =
basecrewmorale = 37
basecrewquantity = 95
timesincelast = 0
tempmorale = 37.0000000
lasthit = 125
status = dead
position = captive
fight = 0
fakelevels = 0
deathx = 0.0000000
deathy = 100.0000000
deathz = 1771.8800049
deathay = -2446.3200684
storedattributes = 1
actions =
idle =
i1 = idle_1
i2 = idle_2
i3 = idle_3
i4 = idle_4
i5 = idle_5
i6 = idle_6
i7 = idle_7
i8 = idle_8
i9 = idle_9
i10 = idle_10
walk = walk
backwalk = back walk
run = run
backrun = back run
stsup = stairs up
stsuprun = run stairs up
stsdown = stairs down
stsdownrun = run stairs down
stsupback = back stairs up
stsdownback = back stairs down
stsuprunback = back run stairs up
stsdownrunback = back run stairs down
turnleft = turn left
turnright = turn right
swim = swim
hit = face_hit
h1 = hit_1
h2 = hit_2
h3 = hit_3
sidestep_left_on = skip
sidestep_right_on = skip
fightwalk = fight walk
fightbackwalk = fight back walk
fightrun = fight run
fightbackrun = fight back run
attack =
a1 = attack_1
a2 = attack_2
a3 = attack_3
a4 = attack_4
a5 = attack_5
a6 = attack_6
a7 = attack_7
a8 = attack_8
attacktl =
a1 = attack_left_1
attacktr =
a1 = attack_right_1
block = block
blockhit = block_hit
recoil = Recoil
shot = Shot
fightsidestep_left_on = skip
fightsidestep_right_on = skip
fightdead =
d1 = death_0
d2 = death_1
d3 = death_2
d4 = death_3
fightidle =
i1 = fight stand_1
i2 = fight stand_2
i3 = fight stand_3
i4 = fight stand_4
dead =
d1 = death_citizen_1
d2 = death_citizen_2
money = 0
killer =
index = 0
status = 2
isfantom = 1
needsaildmg = 7.0000000
Done adding character
I had three captains. I may accidentally have pasted the first lines from Captain and the whole entry for another....
The problem most likely comes from these characters being reused but not properly reset.
That is indeed pretty much what must be happening. Though they aren't part of the "corpse" group; it seems it is just that HP thing.In the case you quote the cr index is 2000 ie the first permanent fantom number - so is it a case that the array slowly fills up with corpse captains etc which is why the crashes only come later in playing, when you've run to the end of available slots at 2250. Perhaps all you need is a check to see if they are in corpse group and if so reset them as they are about to be re-used.
// return new added fantom character
void Fantom_AddFantomCharacter(string sGroupName, int iShipType, string sFantomType, int iEncounterType, int iNation) // NK 04-09-05 add nation argument
{
ref rFantom = GetFantomCharacter(iNumFantoms);
ClearCharacter(rFantom); // PB: Clear ALL attributes from previous character
rFantom.nation = iNation; // NK
DeleteAttribute(rFantom, "relation");
rFantom.SeaAI.Group.Name = sGroupName;
rFantom.Ship.Type = GetShipID(iShipType); // PS
//trace("added fantom " + rFantom.index + " with ship " + rFantom.ship.type);
rFantom.Ship.idx = iShipType; // PS
rFantom.Ship.Mode = sFantomType;
rFantom.ship.cannons.Charge.Type = GOOD_BALLS;
//NK -->
DeleteAttribute(rFantom,"ship.cannons.borts"); rFantom.ship.cannons.borts = ""; // NK 05-04-18 cannon qty
// PRS3 -->
aref arship; makearef(arship, rFantom.ship);
DeleteAttribute(rFantom, "ship.stats");
//KB - Tuning ships - changed call to SetRandomStatsToShip
SetRandomStatsToShip(sti(rFantom.index), iShipType, iNation);
//KB - orig SetRandomStatsToShip(arship, iShipType, iNation);
//KB
// PRS3 <--
if(sti(rFantom.nation) == PIRATE) { sFantomType = "pirate"; }
else { if(sFantomType == "pirate") { sFantomType = "war"; } }
rFantom.shiptype = GetShipID(iShipType); // PS
rFantom.FantomType = sFantomType;
float mult = 1.0;
if(DEBUG_EXPERIENCE>0) TraceAndLog("Fantom_AddFantomCharacter: Set officer type for " + GetMySimpleName(rFantom));
switch(sFantomType)
{
case "trade":
mult *= 1.0;
rFantom.quest.officertype = OFFIC_TYPE_CAPMERCHANT;
break;
case "war":
mult *= 1.25;
rFantom.quest.officertype = OFFIC_TYPE_CAPNAVY;
break;
case "pirate":
mult *= 1.25;
rFantom.quest.officertype = OFFIC_TYPE_CAPPIRATE;
break;
case "error":
mult *= 1.0;
rFantom.quest.officertype = OFFIC_TYPE_CAPPIRATE;
break;
}
ref Shiptype = GetShipByType(iShipType);
int iMCShipClass = makeint(GetCharacterShipClass(GetMainCharacter()));
if (sti(Shiptype.Class) < iMCShipClass) {
mult *= 1.15;
} else {
if (makeint(Shiptype.Class) > iMCShipClass) mult *= 0.85;
}
rFantom.Points = mult * stf(GetLocalShipAttrib(&arship,&Shiptype,"Weight")) / 5000; // PRS3
//Log_SetStringToLog("Type: " + rFantom.FantomType + "; Mult: " + rFantom.Points);
// NK <--
CheckCharacterSetup (rFantom); // PB: Sets minimum character attributes
PrepareSelectPerksForCharacter(rFantom); // PB: Prepare perks list to avoid errors on the next step
FinishCharInit (rFantom); // PB: Includes resetting character HP
iNumFantoms++;
}
InitCharacterSkills(rFantom);
This is the final "fix" I came up with:I will take a look at it later but looks to me like it's working more or less .
void Fantom_AddFantomCharacter(string sGroupName, int iShipType, string sFantomType, int iEncounterType, int iNation) // NK 04-09-05 add nation argument
{
ref rFantom = GetFantomCharacter(iNumFantoms);
ClearCharacter(rFantom); // PB: Clear ALL attributes from previous character
rFantom.nation = iNation; // NK
// DeleteAttribute(rFantom, "relation"); // PB: Character already cleared
rFantom.SeaAI.Group.Name = sGroupName;
rFantom.Ship.Type = GetShipID(iShipType); // PS
//trace("added fantom " + rFantom.index + " with ship " + rFantom.ship.type);
rFantom.Ship.idx = iShipType; // PS
rFantom.Ship.Mode = sFantomType;
rFantom.ship.cannons.Charge.Type = GOOD_BALLS;
//NK -->
// DeleteAttribute(rFantom,"ship.cannons.borts"); rFantom.ship.cannons.borts = ""; // NK 05-04-18 cannon qty // PB: Character already cleared
// PRS3 -->
aref arship; makearef(arship, rFantom.ship);
// DeleteAttribute(rFantom, "ship.stats"); // PB: Character already cleared
//KB - Tuning ships - changed call to SetRandomStatsToShip
SetRandomStatsToShip(sti(rFantom.index), iShipType, iNation);
//KB - orig SetRandomStatsToShip(arship, iShipType, iNation);
//KB
// PRS3 <--
if(sti(rFantom.nation) == PIRATE) { sFantomType = "pirate"; }
else { if(sFantomType == "pirate") { sFantomType = "war"; } }
rFantom.shiptype = GetShipID(iShipType); // PS
rFantom.FantomType = sFantomType;
float mult = 1.0;
if(DEBUG_EXPERIENCE>0) TraceAndLog("Fantom_AddFantomCharacter: Set officer type for " + GetMySimpleName(rFantom));
switch(sFantomType)
{
case "trade":
mult *= 1.0;
rFantom.quest.officertype = OFFIC_TYPE_CAPMERCHANT;
break;
case "war":
mult *= 1.25;
rFantom.quest.officertype = OFFIC_TYPE_CAPNAVY;
break;
case "pirate":
mult *= 1.25;
rFantom.quest.officertype = OFFIC_TYPE_CAPPIRATE;
break;
case "error":
mult *= 1.0;
rFantom.quest.officertype = OFFIC_TYPE_CAPPIRATE;
break;
}
ref Shiptype = GetShipByType(iShipType);
int iMCShipClass = makeint(GetCharacterShipClass(GetMainCharacter()));
if (sti(Shiptype.Class) < iMCShipClass) {
mult *= 1.15;
} else {
if (makeint(Shiptype.Class) > iMCShipClass) mult *= 0.85;
}
rFantom.Points = mult * stf(GetLocalShipAttrib(&arship,&Shiptype,"Weight")) / 5000; // PRS3
//Log_SetStringToLog("Type: " + rFantom.FantomType + "; Mult: " + rFantom.Points);
// NK <--
InitCharacterSkills(rFantom); // PB: Reset this character
iNumFantoms++;
}
Haven't a clue. Looks like "CreateFantomCharacter" is generally only called ashore.Why doesn't this call CreateFantomCharacterEx though?
that function should have everything in place also ...
// PB: Why is this function not used outside the Standard Storyline quests_reaction.c file???
void SetUpShip(ref chr, string ftype, bool isgen)
{
if(!CheckAttribute(chr,"ship.type")) return;
if(chr.ship.type == SHIP_NOTUSED_TYPE_NAME) return;
int iShipType = GetCharacterShipType(chr);
if(iShipType == -1) return;
if(iShipType == SHIP_NOTUSED) return;
SetBaseShipData(&chr);
ref Shiptype = GetShipByType(iShipType);
// PRS3 -->
aref arship; makearef(arship, chr.ship);
// PRS3 <--
if(sti(chr.nation) == PIRATE) ftype= "pirate";
chr.FantomType = ftype;
float mult = 1.0;
if(isgen && DEBUG_EXPERIENCE>0) TraceAndLog("SetUpShip: Set officer type for " + GetMySimpleName(chr));
switch(ftype)
{
case "trade":
mult *= 1.0;
if(isgen) chr.quest.officertype = OFFIC_TYPE_CAPMERCHANT;
break;
case "war":
mult *= 1.25;
if(isgen) chr.quest.officertype = OFFIC_TYPE_CAPNAVY;
break;
case "pirate":
mult *= 1.0;
if(isgen) chr.quest.officertype = OFFIC_TYPE_CAPPIRATE;
break;
case "error":
mult *= 1.0;
if(isgen) chr.quest.officertype = OFFIC_TYPE_CAPPIRATE;
break;
}
int iMCShipClass = makeint(GetCharacterShipClass(GetMainCharacter()));
//Log_SetStringToLog("Mult 1 = " + mult);
if(makeint(Shiptype.Class) < iMCShipClass) mult *= 1.5;
if(makeint(Shiptype.Class) > iMCShipClass) mult *= 0.75;
chr.Points = mult * stf(GetLocalShipAttrib(arship, Shiptype, "Weight")) / 5000; // PRS3
//Log_SetStringToLog("NewM " + mult);
//end hack.
//set various stuff using AIFantom calls.
if(isgen) LAi_Create_Officer(0, chr);
if(isgen) Fantom_SetRandomMoney(chr, ftype);
Fantom_SetCannons(chr, ftype);
Fantom_SetSails(chr, ftype);
if(isgen) Ship_SetFantomData(chr);
Fantom_ClearCargo(chr); // TIH clear out prior slot cargo
Fantom_SetBalls(chr, ftype);
Fantom_SetGoods(chr, ftype);
}
// PS <--