• 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 Hireing VC Characters as officers crashes the game.

Hylie Pistof

Curmudgeon
QA Tester
Storm Modder
Pirate Legend
Another thing. When I meet random officers wanting me to hire them in towns first they turn into citizens and then the game crashes.
 

Attachments

  • -=Player=- Curaçao.7z
    596 KB · Views: 214
Confirmed. This happens sometimes but not always if I try to recruit a random citizen. It's why I always save game when I'm about to talk to someone - if the game then crashes, I can reload and resume from the same place.

I've got an alternate version of "PROGRAM\DIALOGS\Enc_Walker.c" rigged so that the walker always wants to be hired, which I can use for testing. So I can rename the dialog files to make that one active and the normal one becomes the alternate, then I talk to the same person and eventually the hiring works. Or sometimes the hiring works first time without needing to mess with dialog files and reload.
 
I have some vague memory of this being an issue in the past as well.
There was some stuff I did in an attempt to fix it, but apparently unsuccessful.
Hopefully @Levis has better luck. :onya
 
This seems to be every time you meet an officer in the field - not in a tavern (had one walk up to me in a tavern and it worked without crashing) all of them outside come straight up to you and start the dialogue and then CTD.
Hope this helps. - Current November version.
 
This seems to be every time you meet an officer in the field - not in a tavern (had one walk up to me in a tavern and it worked without crashing) all of them outside come straight up to you and start the dialogue and then CTD.
Hope this helps. - Current November version.
When exactly in the dialog does the ctd happen?
 
Definitely something missing there; they should say what a great "actual officer type" they are.
The used to. :shock
 
In my experience, it's even sooner than that. You talk to a random walker, he says "Greetings. Not often do I encounter such respectable persons here. You must be a captain?", you answer, and then the game crashes. If it gets as far as him saying that he's a citizen, it proceeds properly.

Recruiting walkers certainly used to work reliably. My guess is that whatever tries to work out what sort of officer type to assign to the would-be recruit is failing randomly and only works if it gives up on assigning an officer type, then defaults to "citizen". But this has been a problem for some time now, so it's likely to be tied into the levelling system. It certainly worked reliably before that was "improved".
 
Does anyone have any clue when this started acting up again?
I definitely remember attempting a fix for this at some point and I thought that worked once I forced a proper officer type to be defined, instead of "citizen".
 
You may have an older version. Somehow a version got into the update archive which had the line to force proper officer types commented out. The one above is corrected and will go into the next archive. Which will probably be uploaded fairly soon because I also found a mistake in the governor dialog file, now corrected; plus there has been some new stuff produced already since the last upload.
 
You may have an older version. Somehow a version got into the update archive which had the line to force proper officer types commented out. The one above is corrected and will go into the next archive. Which will probably be uploaded fairly soon because I also found a mistake in the governor dialog file, now corrected; plus there has been some new stuff produced already since the last upload.
If you can wait untill monday I can try to fix the bug with the fetch quests also
 
I think this was my attempted fix for this:
Code:
if (UsableOfficer(NPChar) && 11 < Rand(19))  // officer, PB: Only for REAL officers
Or it is related this:
Code:
   //Levis let's use the unique types you can get from the enc_walker.
   //NPChar.quest.officertype = GetRandomOfficerType(); //Levis let's use a global function so we can easily add types later.
   LAi_Create_Officer(rand(8), &NPChar); //so that these officers are better than tavern ones.
 
It seems this bug also happens if you try to hire a captain of a boarded ship to be your officer. I'm not looking into it!

edit: apprently not always. now it did work

edit2: hmmmm it seems to be a problem with military captains.

Edit3: or maybe something else entirely .. it seems to be a bit random ... looking into it more
just posting this here for reference.
This captain caused an error after the TIH hireing function has hired him:
Code:
index = 2104
id = fenc_2104
model = corsair1
  entity = NPCharacter
  animation = man
  height = 1.8000000
location = 
  locator = 
  group = 
  stime = 0.0000000
  etime = 24.0000000
chr_ai = 
  group = guards
  type = guardian
    enemy = 
    etime = 0
    wait = 
    group = 
    locator = 
  tmpl = stay
  hp_max = 550.0000000
  hp = 550.0000000
  dmgbldmin = 22.0000000
  dmgbldmax = 38.5000000
  piercing = 0.3700000
  block = 0.3100000
  charge_max = 2
  charge = 2
  chargeprc = 1
  charge_dlt = 0.0357143
  dmggunmin = 55.0000000
  dmggunmax = 247.5000000
  accuracy = 0.7200000
nation = 5
  name = 5
  known = -2
sex = man
faceid = 10
headmodel = h_corsair1
fantomtype = war
reputation = 77
quest = 
  officertype = navy captain
  officerprice = 3672
rank = 48
name = Mendez
lastname = Baiano
old = 
  name = Mendez
  lastname = Baiano
  chr_ai = 
    group = 
skipsetfantom = 1
nodisarm = 1
dialog = 
  filename = Cabinfight_dialog.c
  currentnode = First time
greeting = Gr_Dark Teacher
experience = 3009709
  leadership = 116551
  fencing = 14073
  sailing = 71232
  accuracy = 13970
  cannons = 24066
  grappling = 2230
  repair = 14302
  defence = 94
  commerce = 94
  sneak = 11934
skill = 
  freeskill = 0
  leadership = 10
    importance = 0
      old = 325
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 10
    ship = 10
    shipclass = 3
    fleetsize = 1
  fencing = 10
    importance = 168
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 10
    ship = 10
    shipclass = 3
    fleetsize = 1
  sailing = 10
    importance = 0
      old = 249
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 10
    ship = 10
    shipclass = 3
    fleetsize = 1
  accuracy = 8
    importance = 85
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 8
    ship = 8
    shipclass = 3
    fleetsize = 1
  cannons = 9
    importance = 126
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 9
    ship = 9
    shipclass = 3
    fleetsize = 1
  grappling = 5
    importance = 21
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 5
    ship = 5
    shipclass = 3
    fleetsize = 1
  repair = 4
    importance = 17
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 4
    ship = 4
    shipclass = 3
    fleetsize = 1
  defence = 4
    importance = 8
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 4
    ship = 4
    shipclass = 3
    fleetsize = 1
  commerce = 4
    importance = 8
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 4
    ship = 4
    shipclass = 3
    fleetsize = 1
  sneak = 4
    importance = 13
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 4
    ship = 4
    shipclass = 3
    fleetsize = 1
money = 382
loyality = 13
alignment = bad
homelocation = 
  group = 
  locator = 
homestate = guardian
skillimportancetotal = 446
skillsetup = navy captain
officerprice = 0
fakelevels = 0
perks = 
  freepoints = 17
  list = 
    lightrepair = 1
    crewdamageup = 1
    criticalhit = 1
    ironwill = 1
    sharedexperience = 1
    highstakes = 1
    rush = 1
    gunman = 1
    troopers = 1
    fastreload = 1
    improveaiming = 1
    gunprofessional = 1
    basicdefence = 1
    hulldamageup = 1
    sailsdamageup = 1
  unlocked = 
    troopers = 1
    improveaiming = 1
    gunprofessional = 1
  contributed = 
    basicdefence = 1
    advanceddefence = 0
    toughness = 0
    criticalhit = 1
    swordplayprofessional = 0
    rush = 1
    gunman = 1
    improveaiming = 1
    gunprofessional = 1
    gunfighter = 0
    improvepotions = 0
    defendpoison = 0
    shipturnrateup = 0
    shipspeedup = 0
    turn180 = 0
    sandbankmaneuver = 0
    stormprofessional = 0
    sailingprofessional = 0
    basicdamagecontrol = 0
    advanceddamagecontrol = 0
    professionaldamagecontrol = 0
    basicfirstaid = 0
    advancedfirstaid = 0
    rigging = 0
    riggingadvance = 0
    fastreload = 1
    immediatereload = 0
    hulldamageup = 1
    sailsdamageup = 1
    crewdamageup = 1
    criticalshoot = 0
    longrangeshoot = 0
    cannonprofessional = 0
    longrangegrappling = 0
    musketsshoot = 0
    grapplingprofessional = 0
    instantboarding = 0
    troopers = 1
    lightrepair = 1
    instantrepair = 0
    cooking = 0
    highstakes = 1
    disguiser = 0
    improvesmuggling = 0
    advancesmuggling = 0
    basiccommerce = 0
    advancedcommerce = 0
    trustworthy = 0
    basiclandowner = 0
    sharedexperience = 1
    ironwill = 1
    brander = 0
    cureinjuries = 0
    ammunitionrestock = 0
  contributers = 
    basicdefence = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    advanceddefence = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    toughness = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    criticalhit = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    swordplayprofessional = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    rush = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    gunman = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    improveaiming = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    gunprofessional = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    gunfighter = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    improvepotions = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    defendpoison = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    shipturnrateup = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    shipspeedup = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    turn180 = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    sandbankmaneuver = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    stormprofessional = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    sailingprofessional = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    basicdamagecontrol = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    advanceddamagecontrol = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    professionaldamagecontrol = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    basicfirstaid = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    advancedfirstaid = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    rigging = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    riggingadvance = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    fastreload = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    immediatereload = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    hulldamageup = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    sailsdamageup = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    crewdamageup = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    criticalshoot = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    longrangeshoot = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    cannonprofessional = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    longrangegrappling = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    musketsshoot = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    grapplingprofessional = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    instantboarding = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    troopers = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    lightrepair = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    instantrepair = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    cooking = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    highstakes = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    disguiser = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    improvesmuggling = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    advancesmuggling = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    basiccommerce = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    advancedcommerce = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    trustworthy = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    basiclandowner = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    sharedexperience = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    ironwill = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    brander = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    cureinjuries = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
    ammunitionrestock = 
      chridx = 2104
      officertype = navy captain
      freepoints = 17
bonussetup = 1
perktypes = 654
  combat = 78
  sailing = 100
  sea combat = 80
  sea defence = 46
  boarding = 60
  merchant = 40
  daring = 52
  party = 58
  repair = 40
  misc = 100
  special = 0
  highest = 1
completeinit = 1
ship = 
  type = NL_Essex
  name = Pedras Negras
  idx = 251
  cannons = 
    borts = 
      cannonf = 
        qty = 2
        curqty = 2
        maxfiredistance = 417.701
        chargeratio = 1
      cannonb = 
        qty = 2
        curqty = 2
        maxfiredistance = 384.069
        chargeratio = 1
      cannonl = 
        qty = 21
        curqty = 21
        maxfiredistance = 256.339
        chargeratio = 0.499023
      cannonr = 
        qty = 21
        curqty = 21
        maxfiredistance = 526.632
        chargeratio = 1
        numfired = 6
        deleteme = 21
    charge = 
      type = 2
    type = 4
    speedv0 = 139.3534698
    fireangmax = 1.0000000
    fireangmin = 1.0000000
  sp = 134.8644714
  hp = 4267.3852539
  crew = 
    quantity = 343
    morale = 73
    minratio = 1.0000000
  cargo = 
    goods = 
      ration = 280
      rum = 63
      balls = 764
      grapes = 450
      knippels = 270
      bombs = 0
      gunpowder = 6741
      sailcloth = 10
      planks = 6
      gold = 20
      silver = 0
      cinnamon = 10
      chocolate = 0
      coffee = 20
      wheat = 0
      medicines = 0
      paprika = 0
      wine = 0
      sandal = 10
      ebony = 30
      mahogany = 0
      sugar = 0
      tobacco = 0
      ale = 0
      silk = 0
      linen = 0
      fruits = 0
      clothes = 0
      bricks = 0
      oil = 0
      cotton = 0
      copra = 20
      leather = 0
    load = 1693
    recalculatecargoload = 0
  sails = 198
    gerald = 1
    rey_b4 = 
      10 = 
        hc = 2
        hd = 260
        mhc = 12
        sp = 0.0331199
        dmg = 1.6558945
    rey_c3 = 
      7 = 
        hc = 5
        hd = 3520
        mhc = 12
        sp = 0.1302615
        dmg = 10.8551226
    rey_a4 = 
      9 = 
        hc = 1
        hd = 2
        mhc = 12
        sp = 0.0136189
        dmg = 0.4538642
    rey_c4 = 
      11 = 
        hc = 3
        hd = 1538
        mhc = 12
        sp = 0.0608580
        dmg = 4.0570979
    mast_1 = 
      3 = 
        hc = 3
        hd = 521
        mhc = 10
        sp = 0.0264619
        dmg = 1.9980000
      2 = 
        hc = 2
        hd = 272
        mhc = 10
        sp = 0.0341306
        dmg = 1.9980000
      1 = 
        hc = 3
        hd = 11
        mhc = 10
        sp = 0.0264669
        dmg = 1.9980000
    rey_a22 = 
      4 = 
        hc = 4
        hd = 27
        mhc = 12
        sp = 0.0895400
        dmg = 7.4615645
    rey_a2 = 
      1 = 
        hc = 6
        hd = 1400
        mhc = 12
        sp = 0.0230661
        dmg = 2.6909466
    mast_2 = 
      1 = 
        hc = 7
        hd = 1955
        mhc = 12
        sp = 0.0666191
        dmg = 7.7722321
    rey_e4 = 
      3 = 
        hc = 3
        hd = 140
        mhc = 12
        sp = 0.0748223
        dmg = 3.7411129
    rey_a3 = 
      5 = 
        hc = 2
        hd = 3
        mhc = 12
        sp = 0.0244222
        dmg = 1.2210079
    rey_b3 = 
      6 = 
        hc = 2
        hd = 2056
        mhc = 12
        sp = 0.0611177
        dmg = 3.0557864
    mast_3 = 
      2 = 
        hc = 2
        hd = 68
        mhc = 12
        sp = 0.0405162
        dmg = 1.9980000
    rey_c2 = 
      3 = 
        hc = 6
        hd = 2792
        mhc = 12
        sp = 0.1154595
        dmg = 11.5459490
    rey_b2 = 
      2 = 
        hc = 2
        hd = 66
        mhc = 12
        sp = 0.0568878
        dmg = 2.6329546
  tune = 
    cplates = 
      on = 0
    bcannons = 
      on = 0
    gchasers = 
      on = 0
    nsails = 
      on = 1
      speedrate = 0.6688229
      sails = 0.1000000
    ltopmasts = 
      on = 0
    stays = 
      on = 0
    rhull = 
      on = 1
      hp = 472.7999878
      incaliber = 1
    flushed = 
      on = 1
      speedrate = 1.5727451
      turnrate = 4.9968305
      hp = -236.3999939
      capacity = 592.2000122
    tack = 0
    tackmod = 0
  stats = 
    nation = 5
    maxcaliber = 24
    weight = 27653
    capacity = 3553
    maxcrew = 471
    mincrew = 85
    speedrate = 15.6180258
    turnrate = 42.0890007
    price = 261151
    hp = 4964
    origspeed = 13.3764572
    orighp = 4728
    origturn = 37.0921707
    origcapacity = 2961
  ang = 
    y = -1.12185
    x = -0.00329385
    z = -0.0327409
  impulse = 
    rotate = 
      x = 0.0000000
      y = 0.0000000
      z = 0.0000000
    speed = 
      x = 0.0000000
      y = 0.0000000
      z = 0.0000000
  lastballcharacter = 2100
  speed = 
    z = 5.66379
    y = 0.0727236
    x = 0
  strand = 0
    sndid = 0
  stopped = 0
  pos = 
    mode = 0
    x = -460.03
    y = 1.12675
    z = 289.902
  maxspeedz = 10.1330366
  maxspeedy = 0.0923811
  correctimmersion = 0.4764987
  immersion = 0.4764987
  blots = 256
    b000 = 
      rnd = 2995
      x = -4.9815
      y = 1.85813
      z = 11.288
      vx = 0.996595
      vy = -0.071063
      vz = 0.0418222
      time = 0
    b001 = 
      rnd = 11942
      x = -4.85963
      y = 3.12212
      z = -10.8356
      vx = 0.991651
      vy = -0.0602362
      vz = -0.114012
      time = 0
    b002 = 
      rnd = 4827
      x = -4.91845
      y = 1.61221
      z = -4.949
      vx = 0.997286
      vy = -0.0653437
      vz = -0.0339303
      time = 0
    b003 = 
      rnd = 5436
      x = -4.17455
      y = 4.46489
      z = -8.09177
      vx = 0.99035
      vy = -0.0570073
      vz = -0.126325
      time = 0
    b004 = 
      rnd = 1842
      x = 3.76617
      y = 3.9643
      z = 14.2544
      vx = 0.833819
      vy = -0.0718774
      vz = 0.547338
      time = 0
    b005 = 
      rnd = 4966
      x = 1.50949
      y = 2.13033
      z = 19.15
      vx = -0.00424701
      vy = -0.0854486
      vz = -0.996333
      time = 0
    b006 = 
      rnd = 7376
      x = -5.28777
      y = 0.401231
      z = 4.52172
      vx = 0.797429
      vy = -0.0712125
      vz = 0.599196
      time = 0
    b007 = 
      rnd = 26308
      x = -0.971455
      y = 3.63121
      z = -13.3911
      vx = 0.0773003
      vy = -0.116735
      vz = -0.99015
      time = 0
    b008 = 
      rnd = 5537
      x = 4.64079
      y = 3.80254
      z = 2.98923
      vx = -0.687735
      vy = -0.0875382
      vz = -0.720665
      time = 0
    b009 = 
      rnd = 16118
      x = 4.40382
      y = 4.06593
      z = -3.3635
      vx = -0.716858
      vy = -0.13252
      vz = -0.68451
      time = 0
    b010 = 
      rnd = 2082
      x = -3.18485
      y = 3.76489
      z = -15.5368
      vx = -0.671452
      vy = -0.141904
      vz = -0.727335
      time = 0
    b011 = 
      rnd = 22929
      x = 2.39485
      y = 4.66844
      z = 18.5873
      vx = -0.750728
      vy = -0.152685
      vz = -0.642724
      time = 0
  masts = 
    mast_1 = 0
    mast_2 = 0
    mast_3 = 0
    mast_4 = 0
  boxsize = 
    x = 20.4007
    y = 48.2737
    z = 54.4767
  update_number = 30
  lasttgt = 0
  update_allow = 1
points = 6.9132500
shipmoney = 48093
wealth = 2626
items = 
  blade27+2 = 1
  pistol9+2 = 1
  pistolbullets = 1
equip = 
  blade = blade27+2
  gun = pistol9+2
seaai = 
  group = 
    name = egroup__2
  task = 1
    target = 0
isfantom = 1
features = 
  geraldsails = 0
tmpperks = 
  turn = 0
  basicdefence = 1
  advanceddefence = 0
  toughness = 0
  criticalhit = 1
  swordplayprofessional = 0
  rush = 1
  gunman = 1
  improveaiming = 1
  gunprofessional = 1
  gunfighter = 0
  improvepotions = 0
  defendpoison = 0
  shipturnrateup = 0
  shipspeedup = 0
  turn180 = 0
  sandbankmaneuver = 0
  stormprofessional = 0
  sailingprofessional = 0
  basicdamagecontrol = 0
  advanceddamagecontrol = 0
  professionaldamagecontrol = 0
  basicfirstaid = 0
  advancedfirstaid = 0
  rigging = 0
  riggingadvance = 0
  fastreload = 1
  immediatereload = 0
  hulldamageup = 1
  sailsdamageup = 1
  crewdamageup = 1
  criticalshoot = 0
  longrangeshoot = 0
  cannonprofessional = 0
  longrangegrappling = 0
  musketsshoot = 0
  grapplingprofessional = 0
  instantboarding = 0
  troopers = 1
  lightrepair = 1
  instantrepair = 0
  cooking = 0
  highstakes = 1
  disguiser = 0
  improvesmuggling = 0
  advancesmuggling = 0
  basiccommerce = 0
  advancedcommerce = 0
  trustworthy = 0
  basiclandowner = 0
  sharedexperience = 1
  ironwill = 1
  brander = 0
  cureinjuries = 0
  ammunitionrestock = 0
lastsailstate = 2
tmpskill = 
  commerce = 0.4000000
  leadership = 1.0000000
  sneak = 0.4000000
  defence = 0.4000000
  grappling = 0.5000000
  sailing = 1.0000000
  repair = 0.4000000
  fencing = 1.0000000
  accuracy = 0.8000000
  cannons = 0.9000000
curshipnum = 5
flags = 
seatime = 
  basecrewmorale = 80
  basecrewquantity = 449
  lastfired = 170
  timesincelast = 1
  tempmorale = 73.9272919
  lasthit = 187
locdate = 1819
relation = 
  2100 = 2
  2101 = 2
  2102 = 2
  2103 = 2
  0 = 2
  2104 = 0
  2105 = 0
  2106 = 0
  2107 = 0
  1487 = 2
  1486 = 2
canfiretime = 1.1736686
playernation = 1
playership = Model_US_Hannah
delayedxp = 
postevent = 
  skills = 
    cannons = 1506
    accuracy = 4717
status = dead
position = captive

This one was hired without a problem:
Code:
index = 2105
id = fenc_2105
model = offic_por_19
  entity = NPCharacter
  animation = man
  height = 1.8000000
location = 
  locator = 
  group = 
  stime = 0.0000000
  etime = 24.0000000
chr_ai = 
  group = guards
  type = guardian
    enemy = 
    etime = 0
    wait = 
    group = 
    locator = 
  tmpl = stay
  hp_max = 430.0000000
  hp = 430.0000000
  dmgbldmin = 20.0000000
  dmgbldmax = 40.0000000
  piercing = 0.4000000
  block = 0.4500000
  charge_max = 2
  charge = 2
  chargeprc = 1
  charge_dlt = 0.0357143
  dmggunmin = 47.5000000
  dmggunmax = 213.7500000
  accuracy = 0.6900000
nation = 5
  name = 5
  known = -2
sex = man
faceid = 120
headmodel = h_offic_por_19
fantomtype = war
reputation = 70
quest = 
  officertype = navy captain
  officerprice = 2726
rank = 36
name = Vicente
lastname = de Lima
old = 
  name = Vicente
  lastname = de Lima
  chr_ai = 
    group = 
skipsetfantom = 1
nodisarm = 1
dialog = 
  filename = Cabinfight_dialog.c
  currentnode = First time
greeting = Gr_Dark Teacher
experience = 1601848
  leadership = 22821
  fencing = 23672
  sailing = 32786
  accuracy = 31531
  cannons = 29977
  grappling = 2749
  repair = 11055
  defence = 7244
  commerce = 5290
  sneak = 11055
skill = 
  freeskill = 0
  leadership = 10
    importance = 320
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 10
    ship = 10
    shipclass = 4
    fleetsize = 1
  fencing = 8
    importance = 167
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 8
    ship = 8
    shipclass = 4
    fleetsize = 1
  sailing = 9
    importance = 242
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 9
    ship = 9
    shipclass = 4
    fleetsize = 1
  accuracy = 6
    importance = 83
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 6
    ship = 6
    shipclass = 4
    fleetsize = 1
  cannons = 7
    importance = 120
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 7
    ship = 7
    shipclass = 4
    fleetsize = 1
  grappling = 4
    importance = 17
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 4
    ship = 4
    shipclass = 4
    fleetsize = 1
  repair = 3
    importance = 17
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 3
    ship = 3
    shipclass = 4
    fleetsize = 1
  defence = 3
    importance = 14
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 3
    ship = 3
    shipclass = 4
    fleetsize = 1
  commerce = 4
    importance = 19
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 4
    ship = 4
    shipclass = 4
    fleetsize = 1
  sneak = 3
    importance = 14
    bonus = 1.0000000
    charmod = 0
    modifier = 0
    party = 3
    ship = 3
    shipclass = 4
    fleetsize = 1
money = 1685
loyality = 13
alignment = bad
homelocation = 
  group = 
  locator = 
homestate = guardian
skillimportancetotal = 1013
skillsetup = navy captain
officerprice = 0
fakelevels = 0
perks = 
  freepoints = 16
  list = 
    ironwill = 1
    sharedexperience = 1
    troopers = 1
    criticalhit = 1
    highstakes = 1
    rush = 1
    fastreload = 1
    hulldamageup = 1
    gunman = 1
    sailsdamageup = 1
  unlocked = 
    troopers = 1
  contributed = 
    basicdefence = 0
    advanceddefence = 0
    toughness = 0
    criticalhit = 1
    swordplayprofessional = 0
    rush = 1
    gunman = 1
    improveaiming = 0
    gunprofessional = 0
    gunfighter = 0
    improvepotions = 0
    defendpoison = 0
    shipturnrateup = 0
    shipspeedup = 0
    turn180 = 0
    sandbankmaneuver = 0
    stormprofessional = 0
    sailingprofessional = 0
    basicdamagecontrol = 0
    advanceddamagecontrol = 0
    professionaldamagecontrol = 0
    basicfirstaid = 0
    advancedfirstaid = 0
    rigging = 0
    riggingadvance = 0
    fastreload = 1
    immediatereload = 0
    hulldamageup = 1
    sailsdamageup = 1
    crewdamageup = 0
    criticalshoot = 0
    longrangeshoot = 0
    cannonprofessional = 0
    longrangegrappling = 0
    musketsshoot = 0
    grapplingprofessional = 0
    instantboarding = 0
    troopers = 1
    lightrepair = 0
    instantrepair = 0
    cooking = 0
    highstakes = 1
    disguiser = 0
    improvesmuggling = 0
    advancesmuggling = 0
    basiccommerce = 0
    advancedcommerce = 0
    trustworthy = 0
    basiclandowner = 0
    sharedexperience = 1
    ironwill = 1
    brander = 0
    cureinjuries = 0
    ammunitionrestock = 0
  contributers = 
    basicdefence = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    advanceddefence = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    toughness = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    criticalhit = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    swordplayprofessional = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    rush = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    gunman = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    improveaiming = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    gunprofessional = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    gunfighter = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    improvepotions = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    defendpoison = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    shipturnrateup = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    shipspeedup = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    turn180 = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    sandbankmaneuver = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    stormprofessional = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    sailingprofessional = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    basicdamagecontrol = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    advanceddamagecontrol = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    professionaldamagecontrol = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    basicfirstaid = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    advancedfirstaid = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    rigging = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    riggingadvance = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    fastreload = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    immediatereload = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    hulldamageup = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    sailsdamageup = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    crewdamageup = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    criticalshoot = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    longrangeshoot = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    cannonprofessional = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    longrangegrappling = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    musketsshoot = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    grapplingprofessional = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    instantboarding = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    troopers = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    lightrepair = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    instantrepair = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    cooking = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    highstakes = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    disguiser = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    improvesmuggling = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    advancesmuggling = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    basiccommerce = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    advancedcommerce = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    trustworthy = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    basiclandowner = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    sharedexperience = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    ironwill = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    brander = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    cureinjuries = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
    ammunitionrestock = 
      chridx = 2105
      officertype = navy captain
      freepoints = 16
bonussetup = 1
perktypes = 560
  combat = 61
  sailing = 90
  sea combat = 64
  sea defence = 36
  boarding = 48
  merchant = 38
  daring = 42
  party = 51
  repair = 30
  misc = 100
  special = 0
  highest = 9
completeinit = 1
ship = 
  type = RN_Surprise
  name = Boa Viagem
  idx = 202
  cannons = 
    borts = 
      cannonf = 
        qty = 2
        curqty = 2
        maxfiredistance = 479.088
        chargeratio = 1
      cannonb = 
        qty = 2
        curqty = 2
        maxfiredistance = 296.039
        chargeratio = 1
      cannonl = 
        qty = 14
        curqty = 14
        maxfiredistance = 547.547
        chargeratio = 0.912532
      cannonr = 
        qty = 14
        curqty = 14
        maxfiredistance = 205.349
        chargeratio = 1
    charge = 
      type = 2
    type = 3
    speedv0 = 134.6282349
    fireangmax = 1.0000000
    fireangmin = 1.0000000
  sp = 163.9255676
  hp = 3123.8073730
  crew = 
    quantity = 215
    morale = 57
    minratio = 1.0000000
  cargo = 
    goods = 
      ration = 165
      rum = 47
      balls = 609
      grapes = 337
      knippels = 202
      bombs = 0
      gunpowder = 4116
      sailcloth = 6
      planks = 8
      gold = 0
      silver = 0
      cinnamon = 0
      chocolate = 0
      coffee = 0
      wheat = 0
      medicines = 0
      paprika = 30
      wine = 0
      sandal = 10
      ebony = 10
      mahogany = 0
      sugar = 0
      tobacco = 0
      ale = 0
      silk = 10
      linen = 0
      fruits = 0
      clothes = 0
      bricks = 0
      oil = 30
      cotton = 0
      copra = 0
      leather = 0
    load = 1090
    recalculatecargoload = 0
  sails = 184
    gerald = 1
    rey_c2 = 
      4 = 
        hc = 2
        hd = 514
        mhc = 12
        sp = 0.0496982
        dmg = 2.4848123
    mast4 = 
      4 = 
        hc = 4
        hd = 306
        mhc = 10
        sp = 0.0230919
        dmg = 1.9980000
    mast3 = 
      3 = 
        hc = 2
        hd = 18
        mhc = 10
        sp = 0.0218563
        dmg = 1.3112756
    rey_a5 = 
      0 = 
        hc = 2
        hd = 40
        mhc = 12
        sp = 0.0731513
        dmg = 3.6574669
    rey_a3 = 
      5 = 
        hc = 2
        hd = 2049
        mhc = 12
        sp = 0.1652050
        dmg = 8.2601500
    rey_b4 = 
      8 = 
        hc = 2
        hd = 1088
        mhc = 12
        sp = 0.0736152
        dmg = 3.6806579
    mast1 = 
      2 = 
        hc = 2
        hd = 48
        mhc = 10
        sp = 0.0398187
        dmg = 2.3890235
    rey_b2 = 
      3 = 
        hc = 1
        hd = 1024
        mhc = 12
        sp = 0.1130925
        dmg = 3.7696490
    rey_c4 = 
      7 = 
        hc = 1
        hd = 32
        mhc = 12
        sp = 0.0316493
        dmg = 1.0548782
    rey_b3 = 
      6 = 
        hc = 1
        hd = 1024
        mhc = 12
        sp = 0.1421280
        dmg = 4.7375011
    rey_a2 = 
      2 = 
        hc = 1
        hd = 16
        mhc = 12
        sp = 0.1167491
        dmg = 2.7310066
  tune = 
    cplates = 
      on = 0
    bcannons = 
      on = 0
    gchasers = 
      on = 0
    nsails = 
      on = 1
      speedrate = 0.4309014
      sails = 0.1000000
    ltopmasts = 
      on = 0
    stays = 
      on = 0
    rhull = 
      on = 1
      hp = 1.4453566
      incaliber = 1
    flushed = 
      on = 0
    tack = 0
    tackmod = 0
  stats = 
    nation = 5
    maxcaliber = 18
    weight = 26098
    capacity = 1771
    maxcrew = 337
    mincrew = 65
    speedrate = 13.8386345
    turnrate = 40.0505486
    price = 229328
    hp = 3701
    origspeed = 13.4077330
    orighp = 3700
  ang = 
    y = -1.84955
    x = -0.0312415
    z = -0.0361804
  impulse = 
    rotate = 
      x = 0.0000000
      y = 0.0000000
      z = 0.0000000
    speed = 
      x = 0.0000000
      y = 0.0000000
      z = 0.0000000
  lastballcharacter = 0
  speed = 
    z = 5.31408
    y = -0.0147323
    x = 0
  strand = 0
    sndid = 0
  stopped = 0
  pos = 
    mode = 0
    x = -274.979
    y = 1.57127
    z = 131.766
  maxspeedz = 8.6829748
  maxspeedy = 0.0270870
  correctimmersion = 0.6154715
  immersion = 0.6154715
  blots = 256
    b000 = 
      rnd = 17421
      x = -4.3147
      y = 2.42376
      z = -7.33521
      vx = 0.8361
      vy = 0.0183854
      vz = 0.548268
      time = 0
    b001 = 
      rnd = 288
      x = -3.41256
      y = 4.9606
      z = -16.5363
      vx = 0.991455
      vy = 0.0681979
      vz = -0.111202
      time = 0
    b002 = 
      rnd = 30106
      x = -4.49254
      y = 3.92023
      z = -14.2158
      vx = 0.979429
      vy = 0.0135855
      vz = -0.20133
      time = 0
  masts = 
    mast1 = 0
    mast2 = 0
    mast3 = 0
    mast4 = 0
  boxsize = 
    x = 14.508
    y = 46.5315
    z = 62.5926
  update_number = 19
  lasttgt = 0
  update_allow = 1
points = 6.5244999
shipmoney = 32365
wealth = 5339
items = 
  bladec35 = 1
  pistol9-1 = 1
  pistolbullets = 1
equip = 
  blade = bladec35
  gun = pistol9-1
seaai = 
  group = 
    name = egroup__2
  task = 1
    target = 1487
isfantom = 1
features = 
  geraldsails = 0
tmpperks = 
  turn = 0
  basicdefence = 0
  advanceddefence = 0
  toughness = 0
  criticalhit = 1
  swordplayprofessional = 0
  rush = 1
  gunman = 1
  improveaiming = 0
  gunprofessional = 0
  gunfighter = 0
  improvepotions = 0
  defendpoison = 0
  shipturnrateup = 0
  shipspeedup = 0
  turn180 = 0
  sandbankmaneuver = 0
  stormprofessional = 0
  sailingprofessional = 0
  basicdamagecontrol = 0
  advanceddamagecontrol = 0
  professionaldamagecontrol = 0
  basicfirstaid = 0
  advancedfirstaid = 0
  rigging = 0
  riggingadvance = 0
  fastreload = 1
  immediatereload = 0
  hulldamageup = 1
  sailsdamageup = 1
  crewdamageup = 0
  criticalshoot = 0
  longrangeshoot = 0
  cannonprofessional = 0
  longrangegrappling = 0
  musketsshoot = 0
  grapplingprofessional = 0
  instantboarding = 0
  troopers = 1
  lightrepair = 0
  instantrepair = 0
  cooking = 0
  highstakes = 1
  disguiser = 0
  improvesmuggling = 0
  advancesmuggling = 0
  basiccommerce = 0
  advancedcommerce = 0
  trustworthy = 0
  basiclandowner = 0
  sharedexperience = 1
  ironwill = 1
  brander = 0
  cureinjuries = 0
  ammunitionrestock = 0
lastsailstate = 2
tmpskill = 
  commerce = 0.4000000
  leadership = 1.0000000
  sneak = 0.3000000
  defence = 0.3000000
  grappling = 0.4000000
  sailing = 0.9000000
  repair = 0.3000000
  fencing = 0.8000000
  accuracy = 0.6000000
  cannons = 0.7000000
curshipnum = 6
flags = 
seatime = 
  basecrewmorale = 60
  basecrewquantity = 282
  timesincelast = 2
  tempmorale = 57.0000000
  lastfired = 82
  lasthit = 115
  lastcrew = 282.0000000
locdate = 1819
relation = 
  2100 = 2
  0 = 2
  2101 = 2
  2102 = 2
  2103 = 2
  2104 = 0
  2105 = 0
  2106 = 0
  2107 = 0
  1487 = 2
playernation = 1
playership = Model_US_Hannah
canfiretime = 1.1527756
delayedxp = 
postevent = 
  skills = 
    cannons = 559
    accuracy = 1749
status = dead
position = captive
 
Last edited:
From what I can see by captains it happens after this piece of code is execute in the cabinfight dialog:
Code:
NPChar.quest.meeting = NPC_Meeting;
            //Captains have some special perks so let's use them and never generate a new officer out of it. You can later assign them to a role if you want.
            TIH_OfficerHiredProcess(NPChar, false, false, true, false, false);// bLowSalary, bAutoAssign, bPurgeCrud, bSetType, bCreateOfficer
            DialogExit();
            trace("dialog exit done");
            DialogMain(NPChar);//MAXIMUS
            trace("dialog main done");

            boarding_enemy.status = "live";
            boarding_enemy.position = "officer";
            trace("dialog status en position set done");
            if(CheckAttribute(PChar, "TalkWithSurrenderedCaptain")) DeleteAttribute(PChar, "TalkWithSurrenderedCaptain"); // KK
            trace("dialog attribute deleted");
            LAi_EnableReload();// manual reload (allows looting of cabin before leaving)
            trace("dialog reload done");

I still get the "dialog reload done" trace message.
But the enc_officer_dialog isn't loaded. I placed a trace message there and it didn't show.
For now for captains it seems to be a bit random. sometimes it happens on the first captain but this time it took me 8 captains before I got a error.

I did see these errors sometimes:
Code:
RUNTIME ERROR - file: dialog.c; line: 414
incorrect argument index
COMPILE ERROR - file: dialog.c; line: 414
file not found: dialogs\English\dialoh
COMPILE ERROR - file: dialog.c; line: 414
file not found: dialogs\dialog

RUNTIME ERROR - file: dialog.c; line: 414
incorrect argument index
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 781
missed attribute: abordagemode
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 781
no rAP data
RUNTIME ERROR - file: Loc_ai\LAi_boarding.c; line: 781
missed attribute: abordagemode
 
Okay I've boarded about 9 ships in a row without getting a CTD while normally it happens after 3. I think i've found the problem, it's the same problem as in the enc_walker after all.
Calling DialogMain() from within a dialog results in the error.
For the captains I could just remove it. For the enc_walker something else has to be done. I sugest creating a questcase which makes the enc_walker talk to the pchar and have this trigger, or does someone else know a better way?
@Grey Roger ?
 
No idea. I once tried to figure out what was going on with walkers by putting trace statements all over the place and didn't get any useful information, so I gave up. As for captains, I've almost never tried hiring one right after boarding; usually I take them prisoner, then later on decide whether to release, ransom or recruit them. The exception is if the captain surrendered on deck, I have enough Leadership to be able to take a prize ship, but I don't have any spare officers of my own to use as a captain, and that's not a common situation. If I'm advanced enough that the enemy captain chooses to surrender rather than duel, and if I have Leadership 5, then by that time I usually have spare officers to put onto prize ships.

It certainly ought to be possible to trigger a quest case for a walker. The exchange goes like this:
Him: "Greetings. Not often do I encounter such respectable persons here. You must be a captain?"
You: "Yes, what can I do for you?"
Him: "Wait a second, then ask me again. I must straighten my collar..."
This is case "enlist_me" in "Enc_walker.c", which changes the dialog filename and then spawns a new dialog. It could just as easily trigger a quest case which does the same thing. It should also be easy to modify "Enc_walker.c" to always have the other character ask to become an officer so you can test this.
 
No idea. I once tried to figure out what was going on with walkers by putting trace statements all over the place and didn't get any useful information, so I gave up. As for captains, I've almost never tried hiring one right after boarding; usually I take them prisoner, then later on decide whether to release, ransom or recruit them. The exception is if the captain surrendered on deck, I have enough Leadership to be able to take a prize ship, but I don't have any spare officers of my own to use as a captain, and that's not a common situation. If I'm advanced enough that the enemy captain chooses to surrender rather than duel, and if I have Leadership 5, then by that time I usually have spare officers to put onto prize ships.

It certainly ought to be possible to trigger a quest case for a walker. The exchange goes like this:
Him: "Greetings. Not often do I encounter such respectable persons here. You must be a captain?"
You: "Yes, what can I do for you?"
Him: "Wait a second, then ask me again. I must straighten my collar..."
This is case "enlist_me" in "Enc_walker.c", which changes the dialog filename and then spawns a new dialog. It could just as easily trigger a quest case which does the same thing. It should also be easy to modify "Enc_walker.c" to always have the other character ask to become an officer so you can test this.
Seems I will have some time left today so I think I can fix this. Should be done in 10 hours from now tops. So if you can wait that long with making a new zip that would be nice.
 
Back
Top