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

Included in Build Show Boardingmode in Passenger interface

There's a slight problem with the interface:
interface_boarding_icons.jpg
The crossed sword icon appears on squares which are not currently occupied. Would it not be better if an unoccupied slot was not marked as helping you in boarding? ;)
 
in the passangers.c (interface) file check this:
Code:
//Levis: Show Aboardagemode
void UpdateAboardageMode()
{
    int i,cn;
    ref refCurChar;
    string imgname;

    for(i=0; i<OFFICER_MAX; i++)
    {
        imgname = "BOARDINGMODE"+i;
        cn = GetOfficersIndex(_refCh,i);
        refCurChar = GetCharacter(cn);
        SetNodeUsing(imgname,false);
        if(cn==-1)
        {
            //Main Character
            SetNodeUsing(imgname,true);
        }
        else
        {
            //Officer
            if(CheckAttribute(refCurChar,"AbordageMode"))
            {
                if(refCurChar.AbordageMode==1)
                {
                    SetNodeUsing(imgname,true);
                }
            }
        }
    }
}
//Levis: End Show Aboardagemode
a if statement should probably be added which checks if the there is a officer at that spot. I don't know from the top of my head what GetofficersIndex returns if there is no officer.
 
First of all, where is "_refCh" set, or for that matter, declared? It does not seem to be declared within function "UpdateAboardageMode()".

As for 'GetOfficersIndex':
If i is 0 then it returns the index number of "_refCh". For any character, officer 0 is the character himself. Your officer 0 is you.
If officer i doesn't exist, i.e. it's a blank slot, then it returns -1.

So my guess is that you already have the required 'if' statement. It's that one 'if(cn==-1'). Character -1 is not the main character, it's an invalid character. ('GetOfficersIndex' also returns -1 if you give it an invalid slot number.) And if that's right, the reason that blank slots get the swords icon is because that bit should probably be:
Code:
       if(cn==-1)
       {
           //No Character
           SetNodeUsing(imgname,false);
       }
Except that there's already a 'SetNodeUsing(imgname,false);' line before the 'if'. So really, if I've got this right, that bit can disappear and the 'else' can become 'if(cn>=0)'
 
First of all, where is "_refCh" set, or for that matter, declared? It does not seem to be declared within function "UpdateAboardageMode()".
it's a global variable in the interface. I've copied this code from other similar functions in the interface and adapted it.
As for 'GetOfficersIndex':
If i is 0 then it returns the index number of "_refCh". For any character, officer 0 is the character himself. Your officer 0 is you.
If officer i doesn't exist, i.e. it's a blank slot, then it returns -1.

So my guess is that you already have the required 'if' statement. It's that one 'if(cn==-1'). Character -1 is not the main character, it's an invalid character. ('GetOfficersIndex' also returns -1 if you give it an invalid slot number.) And if that's right, the reason that blank slots get the swords icon is because that bit should probably be:
Code:
       if(cn==-1)
       {
           //No Character
           SetNodeUsing(imgname,false);
       }
Except that there's already a 'SetNodeUsing(imgname,false);' line before the 'if'. So really, if I've got this right, that bit can disappear and the 'else' can become 'if(cn>=0)'
I think you are right. Like I said I just copied this from other functions in the interface. If you (or someone) could try to see if that worked, that would be nice.
 
I applied the change to my version and tried it, and it does indeed work. Exhibit B:
interface_boarding_icons2.jpg

One officer is marked as joining in boarding. One is not - that's fine, I told him to sit out boardings. The empty square is also no longer marked as joining in. My own character is still marked with the boarding icon. I'd call that fixed. :)
 
Another thought:
The line about the boarding status makes the text part of the passenger interface rather cluttered:
boarding_text_large.jpg

Here's how it looks if the font for the boarding status is reduced:
boarding_text_small.jpg

As well as leaving the officer's name and position more prominent, the smaller font may be better for those players who don't do much boarding - merchant and smuggler types, for example. But the information is still there and clearly visible for those who find it useful.
 
Not to necro but what about having companions (subordinate ship captains) available as followers on shore. It makes sense that these would be among the player's must trusted associates but as it is now they sort of dissapear into limbo once they command their own ships and you never really see them again.
 
Not to necro but what about having companions (subordinate ship captains) available as followers on shore. It makes sense that these would be among the player's must trusted associates but as it is now they sort of dissapear into limbo once they command their own ships and you never really see them again.
Main issue with that: If the captain of a ship dies ashore, the ship dies too.
That's the way the game currently handles it and I can't think of a quick fix to that...
 
Main issue with that: If the captain of a ship dies ashore, the ship dies too.
That's the way the game currently handles it and I can't think of a quick fix to that...

Is there an essential system that would allow them to be knocked-out and not killed?
 
Is there an essential system that would allow them to be knocked-out and not killed?
There is probably a way around it, but it's not likely to be simple.
Even if the dying process is aborted so the captain remains alive, that would give a superpower to captains opposed to regular officers.

If you like seeing your captains, you can visit them in their own captain's cabins.
At the moment there is no reason to do so, but it is possible.
If a reason is added, that might fit your intentions and allow for a simpler solution.
 
Back
Top