• 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!

Solved Disappearing Officer

But, but, but...every guy that joins my crew is automatically on my passengers list. He only wasn't part of the shore company. And I am sure I gave him a bunch of junk like a compas, spyglass, a book, etc, since he is a navigator and would need such items (even if the game does not require him to have them). And such disappearances have occured previously too with other officers. Never had anything such happen in previous versions of the mod...
 
I always immediately put a surrendered officer on my pasenger list so I can clean him out and equip him properly and have never had the problem Triglav has.
Except hired officers always go onto the Passengers list. No manual action required.

I did have some "disappearing officer" effect before, but that was when I was talking to a surrendered Mutinous Companion.
That was caused by this code in PROGRAM\Dialog_func.c:
Code:
int FindFreeRandomOfficer()
{
   // this function rewritten by KAM so new officers don't keep overwriting captains on shore leave [changes made by MAXIMUS 07.10.2007]

   for(int tempnum=0; tempnum<=NUM_RANDOM_OFFICERS; tempnum++) // NK 05-03-30 we now use char not exist to stop loop, so we can have any number of enc_off.
   {
     string tempid = "Enc_Officer_" + tempnum;
     int tempidx = GetCharacterIndex(tempid);
     if(tempidx==-1) break; // NK 05-03-30 ditto
     ref tempChar = GetCharacter(tempidx);

     if(bAllies(tempChar)) { continue; }
     if(tempChar.location == loadedLocation.id) { continue; } // PB: To prevent mutinous companions from disappearing when you're talking to them

     DeleteCharacter(tempChar);

     return tempidx;
   }

   return -1;
}
So I added that line marked "PB" to prevent this in the future.

That is the only vaguely related change made in Beta 3 that I can think of. But this one should make it less likely that stuff like this happens; not more likely. :modding
 
I just looked again and that officer was equipped like you say. So this does happen in your game, but I have not done it in any of mine and I have been playing beta 3 most every day for months.

What is the difference that could cause this?
 
Are there any settings you changed from the default? Petros suggested that might be what causes your sea battle weirdness and perhaps it makes a difference on this too?
 
in the transfer_characters interface file there are some lines of code which remove officers. maybe there are some conditions met to make these run.
 
What have I changed...hmm...

1. A bit of fiddling with ingame game options, nothing radical.

2. Enabled sidestepping as it is needed to get unstuck in many situations (there is one particularly unpleasant ship boarding scene when one of your guys blocks the stairs and you can only watch the battle cause you can't get near the action)

3. Checked this again in internalsettings.h , and it's set to cause hostilities, no? Yet no hostility occurs:

#define USE_REAL_CANNONS 1
#define EXTRA_HIT_CHECK 1 // BOOL - Enable stray shot hits on friendlyships to cause hostility
//
USE_REAL_CANNONS must be set to 1 for this setting to take effect
// 1: Yes,when a ship is hit, reduce relation to you
// 0: No, accidental hits won't cause hostilities


4. I rename officers with mine and my friends names ingame...that shouldn't matter, should it?
 
2. That should be fine.

3. Looks OK to me.

4. Shouldn't matter, no. :no

So.... still at a loss here. And I don't have the time to look into it anymore.
 
I'm a bit at lost here. Is the problem solved now?
So when does it exactly happen?
 
So everytime you add a officer one gets removed or what?
did the new update already fix this?
 
Triglav is the only one with this problem. It happened to me in his save, but I can not make it happen in my games. He has gone quiet so I don't know if he still has this problem.
 
well the old savegames have gone incompatible with the new update. Could very well be it has something to do with the updates. I close this for now, if the problem reappears please tell.
 
I haven't touched this problem. The new update requiring a new game is unrelated to this issue.
 
Well it is somewhat related if its just a fluke which happened once it isn't a problem anymore :p. And I can't check the savegame anymore now because its incompatible.
 
Just set IS_SGV to 14.888 again in PROGRAM\globals.c . That doesn't actually seem to do any harm and allows you to load "older" savegames.
 
Ahoy, ye mighty capns of the High Seas! :cheers

My LVL 19 Surgeon with 10 Defense/Defence, a Musket, a Gilded Cuirass, 10 Bandages, 2 Cauterization Kits and an Excellent Swept Hilt Rapier just disappeared into Oblivion/Nirwana/Hell/Whatever, just because I hired a new Officer at the tavern.
The Surgeon was on the passengers list, not assigned to a ship, not in the land party group.

I have 3 officers accompany me, 1 cap and 3 officers on my 2nd ship and maybe 6 or 7 or 8 more on my passenger list...

Could it be, that 15 or 16 Officers might be a critical number considering that strange "Officer Disappearing Bug"?

I can confirm that bug to also have happened in another campaign that I played earlier.
I suppose it was also related to a "high count" of Officers, also around 16, I guess.

Best regards,
El Rapido
 
Last edited:
The only related code I can find at the moment is this in PROGRAM\Dialog_func.c:
Code:
int FindFreeRandomOfficer()
{
   // this function rewritten by KAM so new officers don't keep overwriting captains on shore leave [changes made by MAXIMUS 07.10.2007]

   for(int tempnum=0; tempnum<=NUM_RANDOM_OFFICERS; tempnum++) // NK 05-03-30 we now use char not exist to stop loop, so we can have any number of enc_off.
   {
     string tempid = "Enc_Officer_" + tempnum;
     int tempidx = GetCharacterIndex(tempid);
     if(tempidx==-1) break; // NK 05-03-30 ditto
     ref tempChar = GetCharacter(tempidx);

     if(bAllies(tempChar)) { continue; }
     if(tempChar.location == loadedLocation.id) { continue; } // PB: To prevent mutinous companions from disappearing when you're talking to them

     DeleteCharacter(tempChar);

     return tempidx;
   }

   return -1;
}
However, NUM_RANDOM_OFFICERS is defined as 50 in InternalSettings.h:
Code:
#define NUM_RANDOM_OFFICERS         50     // INT - number of encounter (tavern) officers.
So those numbers don't quite match up. :modding
 
Ahoy, ye mighty capns of the High Seas! :cheers

My LVL 19 Surgeon with 10 Defense/Defence, a Musket, a Gilded Cuirass, 10 Bandages, 2 Cauterization Kits and an Ecellent Swept Hilt Rapier just disappeared into Oblivion/Nirwana/Hell/Whatever, just because I hired a new Officer at the tavern.
The Surgeon was on the passengers list, not assigned to a ship, not in the land party group.

I have 3 officers accompany me, 1 cap and 3 officers on my 2nd ship and maybe 6 or 7 or 8 more on my passenger list...

Could it be, that 15 or 16 Officers might be a critical number considering that strange "Officer Disappearing Bug"?

I can confirm that bug to also have happened in another campaign that I played earlier.
I suppose it was also related to a "high count" of Officers, also around 16, I guess.
Did you have any prisoners as well?

16 is not high. I've got 32 officers. :D Some of my officers disappeared the same way yours did a long time ago. I do know that one of the absentees was one that I had previously had active, equipped and taken on boarding actions as well as on land. It hasn't happened since, and the reason I have 32 officers is that I hired another one recently. Nobody disappeared this time.

There's an absolute limit of 36 characters, be they officers, yourself or prisoners. If you have 36 total and an enemy captain surrenders, you won't get the options to take him prisoner or take him on as an officer - you either release him or kill him and his crew. And if you sell a ship when you have that many characters, you don't get back the officer you put in command of that ship. That one dates back to at least Build 13, which is why the first thing I do when I dock is dump all prisoners.

Yes, I know, you don't need that many officers. But it does mean I get to join in this conversation and report that 16 officers should not be a problem. :)
 
Indeed you're right, there ARE the following defines in PROGRAM\Characters\characters.h:
Code:
#define PASSENGERS_MAX   32
#define COMPANION_MAX   4
 
Back
Top