• 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 Boarding: Stuck, but No Crash

@Pieter Boelen I've got a theory why it isn't working.
Captain are stored as fantoms. and in the past most data wasn't cleared that well. but I remember recently you added the Clearcharacter code somewhere else too. I think this might clear the captain when you reload from sea to the boarding location.
Going to look into this now.
Not "somewhere". It is actually at the top of that code I already posted above: ;)
Code:
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
But if the character were fully cleared, we'd be seeing those "missing nation attribute" errors again and those ones have been fixed.
Also, if that were the problem, my above fix WOULD have worked, because the Clear is at the top and I added SetBaseShipData at the bottom of the same function.
So it should be impossible to DO the clearing there, but NOT the SetBaseShipData after that.
There are no 'return' statements inbetween that could cause that effect. :no

My suspicion is that worldmap encounters do not call Fantom_AddFantomCharacter at all.
Or any calls leading there get aborted half-way for some reason so it never completes.
 
I've added a skill init to Sea_AbordageStartNow
and a dump attribute at:
LAi_StartBoarding

At this point the character still has everything it needs (now going to check without the skill init).
But I'm now getting these errors:

Code:
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 1699
missed attribute: nation
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 1699
no rAP data
RUNTIME ERROR - file: ships\ships.c; line: 891
missed attribute: nation
RUNTIME ERROR - file: ships\ships.c; line: 891
no rAP data
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 1782
missed attribute: morale
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 1782
no rAP data
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 1366
missed attribute: morale
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 1366
no rAP data

So that sugest to me something fishy is going on here. Because at the point of the dump attribute everything is there.
 
I just got stuck on the deck after installing @Pieter Boelens suggestion.
Now I have this logs:
 

Attachments

  • error.log
    82 KB · Views: 135
  • compile.log
    44.2 KB · Views: 122
Code:
index = 2000
id = fenc_2000
location = none
  locator = 
  group = 
nation = 3
  name = 1
  known = -2
seaai = 
  group = 
    name = egroup__1
  task = 1
    target = 1316
ship = 
  type = Brigantina1
  idx = 29
  mode = war
  cannons = 
    charge = 
      type = 2
    borts = 
      cannonf = 
        qty = 2
        curqty = 2
        maxfiredistance = 396.883
        chargeratio = 1
      cannonb = 
        qty = 2
        curqty = 2
        maxfiredistance = 308.372
        chargeratio = 1
      cannonl = 
        qty = 9
        curqty = 9
        maxfiredistance = 308.17
        chargeratio = 1
      cannonr = 
        qty = 9
        curqty = 9
        maxfiredistance = 387.323
        chargeratio = 1
    type = 2
    speedv0 = 132.2023163
    fireangmax = 1.0000000
    fireangmin = 1.0000000
  tune = 
    cplates = 
      on = 0
    bcannons = 
      on = 0
    gchasers = 
      on = 0
    nsails = 
      on = 0
    ltopmasts = 
      on = 0
    stays = 
      on = 0
    rhull = 
      on = 0
    flushed = 
      on = 0
    tack = 0
    tackmod = 0
  stats = 
    nation = 3
    weight = 5357
    capacity = 1014
    maxcrew = 138
    mincrew = 29
    speedrate = 11.9647026
    turnrate = 112.7191086
    price = 70549
    hp = 1381
  hp = 998.0722046
  sp = 172.0000000
  pos = 
    x = 572.827
    z = -1349.46
    mode = 0
    y = 1.26832
  ang = 
    y = -0.193156
    x = 0.0151179
    z = -0.0210649
  crew = 
    morale = 53
    quantity = 135.0000000
    minratio = 1.0000000
  cargo = 
    load = 879
    goods = 
      ration = 47
      rum = 28
      balls = 334
      grapes = 270
      knippels = 135
      bombs = 0
      gunpowder = 2281
      sailcloth = 4
      planks = 5
      gold = 54
      silver = 36
      cinnamon = 0
      chocolate = 0
      coffee = 0
      wheat = 0
      medicines = 18
      paprika = 0
      wine = 0
      sandal = 0
      ebony = 0
      mahogany = 0
      sugar = 0
      tobacco = 0
      ale = 0
      silk = 54
      linen = 0
      fruits = 0
      clothes = 0
      bricks = 18
      oil = 0
      cotton = 0
      copra = 0
      leather = 0
    recalculatecargoload = 0
  name = Royal Fortune
  impulse = 
    rotate = 
      x = 0.0000000
      y = 0.0015000
      z = 0.0000000
    speed = 
      x = 0.0000000
      y = 0.0000000
      z = 0.0000000
  lastballcharacter = 0
  speed = 
    z = 0.041003
    y = 0.0215366
    x = 0
  strand = 0
    sndid = 0
  stopped = 0
  maxspeedz = -0.7771941
  speedmult = 7.6137280
  maxspeedy = 0.0349346
  correctimmersion = 0.3467456
  immersion = 0.3467456
  sails = 132
    mast3 = 
      1 = 
        hc = 5
        hd = 563
        mhc = 10
        sp = 0.0593864
        dmg = 7.1262708
      2 = 
        hc = 3
        hd = 280
        mhc = 10
        sp = 0.0688098
        dmg = 5.5046806
    mast1 = 
      3 = 
        hc = 2
        hd = 192
        mhc = 10
        sp = 0.0340776
        dmg = 2.0445564
      1 = 
        hc = 1
        hd = 512
        mhc = 10
        sp = 0.0677899
        dmg = 2.7114975
      2 = 
        hc = 2
        hd = 34
        mhc = 10
        sp = 0.0312446
        dmg = 1.8745788
    rey_b1 = 
      0 = 
        hc = 2
        hd = 1025
        mhc = 12
        sp = 0.0400168
        dmg = 2.0007405
    rey_c2 = 
      0 = 
        hc = 3
        hd = 672
        mhc = 12
        sp = 0.0608282
        dmg = 4.0551157
    rey_a1 = 
      0 = 
        hc = 1
        hd = 512
        mhc = 12
        sp = 0.0405936
        dmg = 1.3530197
    rey_a3 = 
      2 = 
        hc = 0
        hd = 0
        mhc = 12
        sp = 0.2440738
        dmg = 1.3295386
  blots = 256
    b000 = 
      rnd = 41
      x = -0.570728
      y = 2.65542
      z = -14.3231
      vx = -0.42856
      vy = -0.0767799
      vz = -0.900245
      time = 0
    b001 = 
      rnd = 18467
      x = 1.02612
      y = 0.0213798
      z = 10.07
      vx = -0.920766
      vy = -0.0521592
      vz = -0.386612
      time = 0
    b002 = 
      rnd = 6334
      x = 3.73181
      y = 2.72221
      z = 2.75179
      vx = -0.899871
      vy = 0.0227432
      vz = -0.435563
      time = 0
  masts = 
    mast1 = 0
    mast2 = 0
    mast3 = 0
  boxsize = 
    x = 12.1607
    y = 28.4477
    z = 45.1375
shiptype = Brigantina1
fantomtype = pirate
quest = 
  officertype = pirate captain
  officerprice = 446
points = 1.5401375
experience = 49850
  leadership = 0
  fencing = 0
  sailing = 0
  accuracy = 0
  cannons = 0
  grappling = 0
  repair = 0
  defence = 0
  commerce = 0
  sneak = 0
skill = 
  freeskill = 0
  leadership = 1
    importance = 11
    bonus = 1.0000000
    modifier = 0
    party = 1
    ship = 1
    shipclass = 5
    fleetsize = 1
  fencing = 3
    importance = 403
    bonus = 1.0000000
    modifier = 0
    party = 3
    ship = 3
    shipclass = 5
    fleetsize = 1
  sailing = 1
    importance = 125
    bonus = 1.0000000
    modifier = 0
    party = 1
    ship = 1
    shipclass = 5
    fleetsize = 1
  accuracy = 3
    importance = 127
    bonus = 1.0000000
    modifier = 0
    party = 3
    ship = 3
    shipclass = 5
    fleetsize = 1
  cannons = 2
    importance = 202
    bonus = 1.0000000
    modifier = 0
    party = 2
    ship = 2
    shipclass = 5
    fleetsize = 1
  grappling = 7
    importance = 330
    bonus = 1.2500000
    modifier = 0
    party = 7
    ship = 7
    shipclass = 5
    fleetsize = 1
  repair = 1
    importance = 22
    bonus = 1.0000000
    modifier = 0
    party = 1
    ship = 1
    shipclass = 5
    fleetsize = 1
  defence = 1
    importance = 21
    bonus = 1.0000000
    modifier = 0
    party = 1
    ship = 1
    shipclass = 5
    fleetsize = 1
  commerce = 2
    importance = 12
    bonus = 1.2500000
    modifier = 0
    party = 2
    ship = 2
    shipclass = 5
    fleetsize = 1
  sneak = 1
    importance = 4
    bonus = 1.0000000
    modifier = 0
    party = 1
    ship = 1
    shipclass = 5
    fleetsize = 1
rank = 7
money = 61
loyality = 15
alignment = good
homelocation = none
  group = 
  locator = 
homestate = citizen
skillimportancetotal = 1257
skillsetup = pirate captain
fakelevels = 0
chr_ai = 
  hp_max = 134.0000000
  hp = 134.0000000
bonussetup = 1
perks = 
  freepoints = 0
  list = 
    gunman = 1
    basicdefence = 1
    criticalhit = 1
    advanceddefence = 1
  unlocked = 
    advanceddefence = 1
perktypes = 80
  combat = 10
  sailing = 10
  sea combat = 10
  boarding = 10
  merchant = 10
  daring = 10
  party = 10
  misc = 10
  highest = 0
completeinit = 1
isfantom = 1
sex = man
name = Aurel
lastname = Farry
old = 
  name = Aurel
  lastname = Farry
model = corsair1_2
  animation = man
  height = 1.8000000
faceid = 12
headmodel = h_corsair1_2
items = 
  blade21+1 = 1
  piratespistol = 1
  gunpowder = 2
  pistolbullets = 2
equip = 
  blade = blade21+1
  gun = PiratesPistol
shipmoney = 1014
flags = 
  pirate = 4
    texture = 3
features = 
  geraldsails = 0
tmpperks = 
  turn = 0
  basicdefence = 1
  advanceddefence = 1
  toughness = 0
  criticalhit = 1
  swordplayprofessional = 0
  rush = 0
  gunman = 1
  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 = 1
  advanceddefence = 1
  toughness = 0
  criticalhit = 1
  swordplayprofessional = 0
  rush = 0
  gunman = 1
  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.2000000
  leadership = 0.1000000
  sneak = 0.1000000
  defence = 0.1000000
  grappling = 0.7000000
  sailing = 0.1000000
  repair = 0.1000000
  fencing = 0.3000000
  accuracy = 0.3000000
  cannons = 0.2000000
curshipnum = 7
seatime = 
  basecrewmorale = 60
  basecrewquantity = 135
  timesincelast = 2
  tempmorale = 53.2500000
  lastfired = 132
  lasthit = 383
relation = 
  0 = 2
  1106 = 2
  1314 = 2
  1315 = 2
  1316 = 2
  1317 = 2
  1318 = 2
  1319 = 2
  2000 = 0
  2001 = 0
  2002 = 0

This is a dump from a captain before more boarding function apply to it. So at the start all data is present. Now we just need to find out why it gets removed...
going to add more dumps to see when this happens
 
Install fresh new game,
playing build 14 from Nov 15 + Levis fix
Free play,
first boarding successfully with coastal encounter
after that, 5 boardings from world map, all stuck on main deck.
Game did not crush until try to loot corpses.
 

Attachments

  • error.log
    2 KB · Views: 132
Forgot to mention: My first boarding was successful too and I could loot the cops.
 
After installing Pieter's fix in Post#42 above

Fought ship encountered on World Map - was boarded by enemy ship - killed enemies - still unable to get to next Boarding Deck.:(

:drunk
 

Attachments

  • error.log
    571 bytes · Views: 131
  • compile.log
    128 KB · Views: 135
  • system.log
    18.9 KB · Views: 138
.............................................................................:modding:modding:modding:modding
...................................................................... :modding //////////////////:modding
............................................................. :modding''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''':modding
.......................................................... :modding,,,,,,,,,,, :modding,,,,,,,,,,:modding,,,,,,,,,,,,,,:modding
..........................................................:modding,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, :modding
......................................................... :modding,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, :modding
......................................................... :modding,,,,,,,,,,,,,,,,,, :modding:modding ,,,,,,,,,,,,,,,,,,,,:modding
...........................................................:modding ,,,,,,,,,,,,:modding,,,,,,,,,,,:modding ,,,,,,,,,,,,,:modding
...............................................................:modding,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,:modding
.....................................................................:modding,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,:modding
..................................................................................:modding:modding:modding
 
I think we found the problem
put this file in your potc PROGRAM folder
 

Attachments

  • globals.c
    13.1 KB · Views: 166
Careful if you force the emoticons to do all your headbanging for you - they are not going to be happy about it. :no

Then you will have a mutiny on your hands :duel:

:rofl:rofl
 
I was going to post the below much sooner, but I couldn't access the forum so it is a bit late now:
This is a short overview of the functions being called in order:
Code:
Sea.c: SeaLogin


QUEST:

Sea.c: Sea_LoginGroup

Sea.c: Call Ship_Add2Sea


NON-QUEST:

AIFantom.c: Fantom_GenerateEncounter

AIFantom.c: Fantom_AddFantomCharacter (contains ClearCharacter and my other needed fixes)

Sea.c: LoadShipsToSea


In AIShip.c:

AIShip.c: Ship_Add2Sea

AIShip.c: Ship_Login

Then some tests....

1: At the end of Fantom_AddFantomCharacter:
Code:
index = 2000
id =
location = none
  locator =
  group =
nation = 5
seaai =
  group =
  name = egroup__0
ship =
  type = PinnaceMerchant
  idx = 6
  mode = trade
  cannons =
  charge =
  type = 2
  tune =
  cplates =
  on = 1
  speedrate = 0.2374699
  turnrate = 0.3898584
  bcannons =
  on = 0
  gchasers =
  on = 0
  nsails =
  on = 0
  ltopmasts =
  on = 0
  stays =
  on = 0
  rhull =
  on = 1
  hp = 243.3218536
  incaliber = 1
  flushed =
  on = 0
  tack = 0
  tackmod = 0
  stats =
  nation = 5
  weight = 15609
  capacity = 5956
  maxcrew = 126
  mincrew = 40
  speedrate = 12.7172995
  turnrate = 34.0805244
  price = 51500
  hp = 3591
  origspeed = 12.4798298
  origturn = 33.6906662
  orighp = 3348
  maxcaliber = 12
skill =
  sneak = 1
  shipclass = 5
  fleetsize = 1
  importance = 122
  bonus = 1.0000000
  sailing = 2
  shipclass = 5
  fleetsize = 1
  importance = 328
  bonus = 1.2500000
  freeskill = 0
  leadership = 1
  importance = 9
  bonus = 1.0000000
  fencing = 1
  importance = 21
  bonus = 1.0000000
  accuracy = 1
  importance = 22
  bonus = 1.0000000
  cannons = 1
  importance = 16
  bonus = 1.0000000
  grappling = 1
  importance = 14
  bonus = 1.2500000
  repair = 1
  importance = 126
  bonus = 1.0000000
  defence = 1
  importance = 87
  bonus = 1.0000000
  commerce = 1
  importance = 245
  bonus = 1.0000000
shiptype = PinnaceMerchant
fantomtype = trade
quest =
  officertype = merchant captain
  officerprice = 78
points = 3.5900700
experience = 3500
  leadership = 31
  fencing = 74
  sailing = 102
  accuracy = 77
  cannons = 56
  grappling = 61
  repair = 445
  defence = 307
  commerce = 866
  sneak = 431
rank = 2
money = 93
loyality = 11
alignment = good
homelocation = none
  group =
  locator =
homestate = citizen
skillimportancetotal = 990
skillsetup = merchant captain
fakelevels = 0
chr_ai =
  hp_max = 74.0000000
  hp = 74.0000000
bonussetup = 1
perks =
  freepoints = 0
  list =
  shipturnrateup = 1
perktypes = 92
  combat = 10
  sailing = 20
  sea combat = 12
  boarding = 10
  merchant = 10
  daring = 10
  party = 10
  misc = 10
  highest = 1
completeinit = 1
Note that there is NO character ID here yet and indeed the crew morale hasn't been assigned.

2. After loading the scene has completed, manual DumpAttribute through console:
Code:
index = 2000
id = fenc_2000
location = none
  locator =
  group =
nation = 5
  name = 5
  known = -2
seaai =
  group =
  name = egroup__0
  task = 7
  target =
  pos =
  x = 3809.9536133
  z = -9245.7695313
ship =
  type = PinnaceMerchant
  idx = 6
  mode = trade
  cannons =
  charge =
  type = 2
  borts =
  cannonl =
  qty = 10
  curqty = 10
  maxfiredistance = 236.43
  chargeratio = 1
  cannonr =
  qty = 10
  curqty = 10
  maxfiredistance = 503.007
  chargeratio = 1
  cannonb =
  qty = 2
  curqty = 2
  maxfiredistance = 339.832
  chargeratio = 1
  cannonf =
  qty = 2
  curqty = 2
  maxfiredistance = 413.512
  chargeratio = 1
  type = 2
  speedv0 = 132.2023163
  fireangmax = 1.0000000
  fireangmin = 1.0000000
  tune =
  cplates =
  on = 1
  speedrate = 0.2374699
  turnrate = 0.3898584
  bcannons =
  on = 0
  gchasers =
  on = 0
  nsails =
  on = 0
  ltopmasts =
  on = 0
  stays =
  on = 0
  rhull =
  on = 1
  hp = 243.3218536
  incaliber = 1
  flushed =
  on = 0
  tack = 0
  tackmod = 0
  stats =
  nation = 5
  weight = 15609
  capacity = 5956
  maxcrew = 126
  mincrew = 40
  speedrate = 12.7172995
  turnrate = 34.0805244
  price = 51500
  hp = 3591
  origspeed = 12.4798298
  origturn = 33.6906662
  orighp = 3348
  maxcaliber = 12
  name = Ilha Terceira
  crew =
  quantity = 110
  morale = 37
  minratio = 1.0000000
  hp = 2425
  sp = 155.9999847
  pos =
  x = 50.3435
  z = -229.38
  mode = 0
  y = 2.32965
  ang =
  y = 2.7487
  x = -0.00839209
  z = 0.045643
  cargo =
  load = 5953
  goods =
  ration = 137
  rum = 0
  balls = 124
  grapes = 0
  knippels = 120
  bombs = 0
  gunpowder = 2146
  sailcloth = 19
  planks = 7
  gold = 0
  silver = 0
  cinnamon = 0
  chocolate = 0
  coffee = 0
  wheat = 0
  medicines = 0
  paprika = 0
  wine = 0
  sandal = 0
  ebony = 0
  mahogany = 0
  sugar = 0
  tobacco = 0
  ale = 0
  silk = 0
  linen = 0
  fruits = 0
  clothes = 1467
  bricks = 0
  oil = 0
  cotton = 0
  copra = 255
  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 = 3.78552
  y = -0.00111585
  x = 0
  strand = 0
  sndid = 0
  stopped = 0
  maxspeedz = 11.0031548
  maxspeedy = 0.0363012
  correctimmersion = 0.7995970
  immersion = 0.7995970
  sails = 96
  rey_b2 =
  2 =
  hc = 3
  hd = 592
  mhc = 12
  sp = 0.1668903
  dmg = 11.1259184
  rey_b1 =
  3 =
  hc = 2
  hd = 48
  mhc = 12
  sp = 0.0601017
  dmg = 3.0049851
  rey_b3 =
  5 =
  hc = 2
  hd = 20
  mhc = 12
  sp = 0.2216818
  dmg = 11.0839911
  rey_b4 =
  8 =
  hc = 2
  hd = 136
  mhc = 12
  sp = 0.0812509
  dmg = 4.0624466
  rey_a1 =
  9 =
  hc = 2
  hd = 520
  mhc = 12
  sp = 0.0791312
  dmg = 3.9564605
  rey_a4 =
  0 =
  hc = 1
  hd = 16
  mhc = 12
  sp = 0.0654984
  dmg = 2.1831799
  rey_a2 =
  1 =
  hc = 1
  hd = 1024
  mhc = 12
  sp = 0.1439410
  dmg = 4.7979341
  rey_a3 =
  4 =
  hc = 1
  hd = 2048
  mhc = 12
  sp = 0.1815046
  dmg = 3.7850826
  blots = 256
  masts =
  mast0 = 0
  mast2 = 0
  mast3 = 0
  mast4 = 0
  boxsize =
  x = 23.4
  y = 50.0272
  z = 54.2255
skill =
  sneak = 1
  shipclass = 5
  fleetsize = 1
  importance = 122
  bonus = 1.0000000
  modifier = 0
  party = 1
  ship = 1
  sailing = 2
  shipclass = 5
  fleetsize = 1
  importance = 328
  bonus = 1.2500000
  modifier = 0
  party = 2
  ship = 2
  freeskill = 0
  leadership = 1
  importance = 9
  bonus = 1.0000000
  modifier = 0
  party = 1
  ship = 1
  shipclass = 5
  fleetsize = 1
  fencing = 1
  importance = 21
  bonus = 1.0000000
  modifier = 0
  party = 1
  ship = 1
  shipclass = 5
  fleetsize = 1
  accuracy = 1
  importance = 22
  bonus = 1.0000000
  modifier = 0
  party = 1
  ship = 1
  shipclass = 5
  fleetsize = 1
  cannons = 1
  importance = 16
  bonus = 1.0000000
  modifier = 0
  party = 1
  ship = 1
  shipclass = 5
  fleetsize = 1
  grappling = 1
  importance = 14
  bonus = 1.2500000
  modifier = 0
  party = 1
  ship = 1
  shipclass = 5
  fleetsize = 1
  repair = 1
  importance = 126
  bonus = 1.0000000
  modifier = 0
  party = 1
  ship = 1
  shipclass = 5
  fleetsize = 1
  defence = 1
  importance = 87
  bonus = 1.0000000
  modifier = 0
  party = 1
  ship = 1
  shipclass = 5
  fleetsize = 1
  commerce = 1
  importance = 245
  bonus = 1.0000000
  modifier = 0
  party = 1
  ship = 1
  shipclass = 5
  fleetsize = 1
shiptype = PinnaceMerchant
fantomtype = trade
quest =
  officertype = merchant captain
  officerprice = 78
points = 3.5900700
experience = 3500
  leadership = 31
  fencing = 74
  sailing = 102
  accuracy = 77
  cannons = 56
  grappling = 61
  repair = 445
  defence = 307
  commerce = 866
  sneak = 431
rank = 2
money = 93
loyality = 11
alignment = good
homelocation = none
  group =
  locator =
homestate = citizen
skillimportancetotal = 990
skillsetup = merchant captain
fakelevels = 0
chr_ai =
  hp_max = 74.0000000
  hp = 74.0000000
bonussetup = 1
perks =
  freepoints = 0
  list =
  shipturnrateup = 1
perktypes = 92
  combat = 10
  sailing = 20
  sea combat = 12
  boarding = 10
  merchant = 10
  daring = 10
  party = 10
  misc = 10
  highest = 1
completeinit = 1
isfantom = 1
sex = man
name = Annes
lastname = Santoso
old =
  name = Annes
  lastname = Santoso
model = corsair1_2
  animation = man
  height = 1.8000000
faceid = 12
headmodel = h_corsair1_2
items =
  blade10-1 = 1
equip =
  blade = blade10-1
shipmoney = 30
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 = 1
  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 = 1
  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.2000000
  repair = 0.1000000
  fencing = 0.1000000
  accuracy = 0.1000000
  cannons = 0.1000000
curshipnum = 1
flags =
seatime =
  basecrewmorale = 37
  basecrewquantity = 110
  timesincelast = 1
  tempmorale = 37.0000000
relation =
  0 = 2
  2000 = 0
  2001 = 0
  2002 = 0
  1317 = 0
  1318 = 0
  1319 = 0
This is clearly the same character, just like it should be. He got his character ID now, along with the morale and a lot more ship attributes.
So far, so good.

3. After getting stuck on boarding, another manual DumpAttribute on what should be the same character:
Code:
index = 2000
id = Location fantom character <0>
location = BOARDING_ShipDeck1
  locator = aloc1
  group = rld
  from_sea =
  fantom = 1
model = sailor1
  entity = NPCharacter
  animation = man
  height = 1.8000000
sex = man
faceid = 35
headmodel = h_sailor1
reputation = 39
friend = 1
nation = 3
  name = 1
name = Adhemar
lastname = Delluc
old =
  name = Adhemar
  lastname = Delluc
  chr_ai =
  group = player
  hp = 50
  hp_max = 50
  type = warrior
  dialog = 0
  dmgbldmin = 15.0000000
  dmgbldmax = 18.0000000
  piercing = 0.1500000
  block = 0.1100000
  dialog =
  currentnode = First time
  tempnode = First time
  items =
  blade4 = 1
  blade = blade4
issoldier = 1
rank = 6
officertype = fighter
money = 85
fakelevels = 0
chr_ai =
  hp_max = 50.0000000
  hp = 0
  group = corpses
  alarmreact = 1
  grpalarmr = 1
  charge = 0
  dmgbldmin = 15.0000000
  dmgbldmax = 18.0000000
  piercing = 0.1500000
  block = 0.1100000
  chargeprc = 1
  type = warrior
  stay = 0
  index =
  dialog = 0
  tmpl = walk
  locator =
  time = 20.7752094
  maxtime = 60
  state = stay
spyglass =
  itemid = spyglass2
dialog =
  currentnode = First time
  tempnode = First time
quest = True
  meeting = 0
  officertype = guard
  officerprice = 343
experience = 36731
  leadership = 783
  fencing = 3117
  sailing = 826
  accuracy = 534
  cannons = 783
  grappling = 739
  repair = 739
  defence = 457
  commerce = 478
  sneak = 435
skill =
  freeskill = 0
  leadership = 1
  importance = 18
  bonus = 1.0000000
  fencing = 4
  importance = 402
  bonus = 1.2500000
  modifier = 0
  sailing = 1
  importance = 19
  bonus = 1.0000000
  accuracy = 3
  importance = 167
  bonus = 1.0000000
  cannons = 1
  importance = 18
  bonus = 1.0000000
  grappling = 1
  importance = 17
  bonus = 1.0000000
  repair = 1
  importance = 17
  bonus = 1.0000000
  defence = 3
  importance = 163
  bonus = 1.0000000
  commerce = 1
  importance = 11
  bonus = 1.0000000
  sneak = 1
  importance = 8
  bonus = 1.2500000
  modifier = 0
loyality = 8
alignment = good
homelocation = BOARDING_ShipDeck1
  group =
  locator =
homestate =
skillimportancetotal = 840
skillsetup = guard
bonussetup = 1
perks =
  freepoints = 0
  list =
  criticalhit = 1
  rush = 1
  gunman = 1
perktypes = 116
  combat = 30
  sailing = 0
  maxed = 1
  sea combat = 16
  boarding = 16
  merchant = 10
  daring = 16
  party = 28
  misc = 0
  maxed = 1
  highest = 0
completeinit = 1
isfantom = 1
items =
  blade4 = 1
equip =
  blade = blade4
iswarrior = 1
contriblist =
  sharedexperience = 0
deathx = 0.5458709
deathy = 2.6359897
deathz = 4.3006854
deathay = 2.5666656
corpse = 1
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
Except this is NOT the same character at all! Some sort of other character 'stole' his identity and it looks to be one of the boarding crew.

This is all based on the "character index".
If I try to find out if the captain himself is still exists, I find out the hard way that he is NOT.
These simple lines manage to crash the game!
Code:
   ch = CharacterFromID("fenc_2000");
   DumpAttributes(ch);

In other words: It seems the boarding crewmembers are overriding the captain of the ship so that by the time you still need the captain, it is as if he never existed! :shock
 
@Levis and myself did some thorough further investigating on this one while we couldn't access the forum.
It turned out to be related to something that wasn't at all what I originally thought.
"Correlation does not necessary mean causation" definitely applies here.

The reason why I couldn't replicate the problem is because I was using an old globals.c to test some savegames from people who hadn't yet upgrades to the new release.
But it was the new one that had the issue in it. I didn't think that would have anything to do with it, but it most certainly did! :shock
 
YOUR A FUCKING BLOODY LYRICAL MIRACLE WORKER ... HOT DAMN GOOD JOB...

ps i think we be needed more piraty speak in game an forum....... arg
 
:aarthats why we have these :ship
 
:ahoy

Yes that works - attacked World Map generated pirate ship - they boarded me - fought through all decks and fought Captain in cabin - got ransack screen & sank ship :dance

All OK :bow:bow

:drunk
 
Back
Top