• 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 Transfer Crew Interface Error Log

Yeah, I kinda get how it works... it just seems to be a bit random sometimes and this is definitely one of those times.

I dunno, but I’m pretty sure this should work just fine...
Code:
if(CheckAttribute(refEnemyCharacter,"index") && tempnum2==sti(refEnemyCharacter.index)) continue;//MAXIMUS: companion will not be added
I still don’t get the point in it though, if the transfer window is open then there must be a second ship, and generally speaking whatever nCompanionIndex is it should be the same as refEnemyCharacter.index. At least I think that’s right.

Either way, it doesn’t look like that code even does anything at present so maybe any fix is safe. Why is it cycling the characters anyway?
 
Last edited:
I'll have a look this weekend.
At the moment I can't look at the full code.
 
This is the Beta 4 version:
Code:
     if(tempnum2>=0 && IsTrader(&characters[tempnum2]) == true) continue;//MAXIMUS: such companion will not be added // KK
     if(nCompanionIndex == -1) continue; // PB: Hopefully prevent an error on the next line
     if(CheckAttribute(newFriend,"index") && tempnum2==sti(newFriend.index)) continue;//MAXIMUS: companion will not be added

In the Beta 4.1 WIP, that line marked PB was removed again because it broke something else (see above).

I must have had that same error log in an earlier modpack version and tried to fix it.
But then apparently my fix broke something else.
 
Last edited:
@Talisman: Try this instead:
Code:
     tempnum2 = GetCompanionIndex(MainChar,tempnum1);
     if(tempnum2>=0 && IsTrader(&characters[tempnum2]) == true) continue;//MAXIMUS: such companion will not be added // KK
     if(nCompanionIndex != -1 && CheckAttribute(newFriend,"index") && tempnum2==sti(newFriend.index)) continue;//MAXIMUS: companion will not be added, PB: Fixed error log
     if (tempnum2 >= 0)

I think that might serve to fix it without breaking any functionality this time.
 
Can you still use the arrow buttons on the screen to switch to other companion ships?
If I understand correctly, that functionality exists in that interface, but my previous fix broke that.
See here: Low Priority - Crew Transfer interface issue | PiratesAhoy!

That is why the line was removed again for the Beta 4.1 WIP. I think it should be really OK this time though....

:shrug

I don't know - I only had / have one companion ship at a time - I just used the Save in Post # 31 to test it by transfering the crew from the companion ship before selling it.

:cheers
 
Last edited:
You can give yourself a companion through console:
Code:
         ch = CreateOfficer_Cheat(OFFIC_TYPE_CAPPIRATE, "DavyJones", 0, PIRATE, false);
         ch.name = "Davy";
         ch.lastname = "Jones";
         GiveShip2Character(ch, "CursedDutchman","Flying Dutchman",-1,PIRATE,true,true);
         SetCompanionIndex(pchar, -1, GetCharacterIndex(ch.id));
         RemovePassenger  (pchar,  CharacterFromID  (ch.id));
 
:ahoy


Seems to work OK - transfered crew between the 2 companions. Everything in game looked OK
 
Last edited:
Seems to work OK - transfered crew between the 2 companions. Everything in game looked OK
Thanks for confirming. I dare say this bug is now fixed properly without breaking something else! :woot

I merged all threads on this same subject together now to avoid confusing forum clutter.
 
No errors here either, but I still don’t see anything new which might suggest that function actually does something. xD
 
but I still don’t see anything new which might suggest that function actually does something. xD
What function? Whatever fix I did before, broke the "switch to other companion ship" button that apparently existed in that interface for forever (but I never knew of).
It seems my second version of the fix does not break that functionality anymore.
 
That’s just it, I don’t see any buttons to switch the companion and never have, which is why I thought it does nothing. :unsure
 
Last edited:
Code:
   SetNodeUsing("LEFTCHANGE_CHARACTER", bAbordageStarted && GetCompanionQuantity(GetMainCharacter())>1 && bShown);
   SetSelectable("LEFTCHANGE_CHARACTER", bAbordageStarted && GetCompanionQuantity(GetMainCharacter())>1 && bShown);
   SetNodeUsing("RIGHTCHANGE_CHARACTER", bAbordageStarted && GetCompanionQuantity(GetMainCharacter())>1 && bShown);
   SetSelectable("RIGHTCHANGE_CHARACTER", bAbordageStarted && GetCompanionQuantity(GetMainCharacter())>1 && bShown);
I enabled by the buttons by changing the bAbordage bit, but they don’t do anything. Is it ‘cos I navy?

Anyway, assuming it does work then why can this only be done on deck?
 
I have absolutely no clue.
I never even knew that feature existed until after I broke it.
Even now, I never did try myself.
Wished I could answer those questions, but I have no answers to give.
 
Back
Top