• 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 Officers are erased when they shouldn't be

Hylie Pistof

Curmudgeon
QA Tester
Storm Modder
Pirate Legend
I was on a treasure quest in Hispaniola where you have to fight your way through a cave. All went normally until I left the first cave to go on the cliff trail to the next one.

All my shore party disappeared! I didn't realize they were gone until I landed at the next island. Then I backtracked to where they took off. Oh, there was no treasure this time.
POTC new 2015-07-04 13-11-10-58.jpg POTC new 2015-07-04 13-18-57-55.jpg

This has never happened to me before, and the only thing I have done differently is that I tried that "task manager and reset POTC.exe to realtime" thingy. It did nothing that I can tell.
 

Attachments

  • -=Player=- Hispaniola.7z
    559 KB · Views: 109
  • compile.log
    20.6 KB · Views: 84
  • error.log
    100 KB · Views: 110
  • system.log
    29.4 KB · Views: 117
I'm guessing the became a victim of @Pieter Boelen 's delete character function :p.
 
Well, I saved my crew by going back to the last place they existed and removing them from my shore party, then continuing on alone.
 
Waaaaa???? Does that always happen at the same point in the game?
Do you have a save from prior to that for me to test with?

Two things to try:

1. In PROGRAM\Locations\Locations_loader.c comment out this line:
Code:
LogoffCharactersFromLocation(loc);                   // PB: Permanently erase certain characters
That is a call to this function I added and that is intended to erase all unhired officers:
Code:
void LogoffCharactersFromLocation(ref loc)
{
   int i;
   ref chr;
   string locID = loc.id;
   for (i = 0; i < MAX_CHARACTERS; i++)
   {
     chr = &Characters[i];
     if (!CheckAttribute(chr, "location"))   continue;
     if (chr.location != locID)         continue;
     if (HasSubStr(chr.id, "Enc_Officer_") && !bAllies(chr)) DeleteCharacter(chr);
   }
}

2. In PROGRAM\Characters\characters.c find:
Code:
bool DeleteCharacter(ref character)
{
   // PB: Completely erase attributes -->
   int index  = character.index;
   string id  = character.id;
   string entity = character.model.entity;
   DeleteClass(character);
   DeleteAttribute(character, "");
   character.index = index;
   character.id = id;
   character.model.entity = entity;
   character.location = "none";
   character.location.locator = "";
   character.location.group = "";
   // PB: Completely erase attributes <--
   return true;
}
Replace with:
Code:
bool DeleteCharacter(ref character)
{
   DeleteClass(character);
   return true;
}
If indeed my code change for that is the cause, the first might solve it and the second definitely will.
Question does remain why that happens though.
 
The included save is from before they disappear. I landed and went through the jungle to the cave and that save is just before the fight in there. Just lobe the stink bomb in there and be patient. When you leave that cave the officers will be gone.
 
Fixed in the ZIP I just posted here: http://www.piratesahoy.net/threads/build-14-beta-3-5-internal-wip-for-testing.24817

Turns out in *some* cases DeleteCharacter was used to just temporarily not have certain characters in a location.
But other times it was used to completely clear an unused character so that slot can be used for a new one.
Having it ALWAYS erase the character therefore had some unintended side-effects.

I have now applied a much safer solution: My rewritten function is now called ClearCharacter and DeleteCharacter has gone back to its original state.
ClearCharacter is now only called in instances where I reckon that is actually a good idea.
So your officers do stay with you now.
 
During the "Help the Lady" side quest, I talked to Armand Delacroix, and when I'd finished, this was what my "Passengers" screen looked like:
blanks.jpg

Also, my then current companion officers were replaced by blank entries in the "Characters" screen. Enclosed are log files and a savegame.

A similar problem occurred during the "Silver Train" side quest when I talked to the prisoner in the mine. So I've enclosed a savegame from there, too. The savegames are from just before you do the talking which results in the error.
 

Attachments

  • compile.log
    6.1 KB · Views: 97
  • error.log
    14.9 KB · Views: 101
  • system.log
    3.1 KB · Views: 119
  • -=Player=- Nuestra Señora de las Nieves.zip
    748 KB · Views: 101
  • -=Player=- Petit Tabac.zip
    819.8 KB · Views: 101
Well started Master & Commander and at the beggining you have officers with you but in time my gunner has 1 in all skills and abilities that i selected are no longer avaible, i have the "share experience" thing so there are times in "X" situation that "xxxxxxx has gained a level" pops up and i guess it means my "ghost officer" that was lvl 10 has gained a lvl (from 1 to 2) but it never does they always stay in lvl 1.
 

Attachments

  • compile.log
    98.1 KB · Views: 110
  • error.log
    64.2 KB · Views: 96
  • system.log
    257.6 KB · Views: 124
  • ghost officer.png
    ghost officer.png
    1.8 MB · Views: 94
Do you have the zip from the link in my signature?
If not, get it IMMEDIATELY! :wp
 
@lucho1392 can you confirm this is done in the newest version of the game?

Or can anyone else replicate this problem?
 
No, Pieter means the first item in the "download" line. The one that was updated a week or so ago.
 
No, Pieter means the first item in the "download" line. The one that was updated a week or so ago.
Aye i have it. And have found more issues but will post them later :p

P.D: Save game uploaded (is a free play save game but has the same problem)
 

Attachments

  • Save game.zip
    703.8 KB · Views: 74
Last edited:
2 Jul is definitely out of date already.
You need also the zip file attached in the post linked in my signature.
 
Ok missed the zip cuz it is at the post end hahaha
So do i have to put the zip file inside a carpet with the archives and .exe?
 
Extract the contents to your main game folder as last step in the process.
I'm pretty sure that is already explained in the first post linked to in my signature.
 
Back
Top