• 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 [WIP] Officers do not join in boarding

Grey Roger

Sea Dog
Staff member
Administrator
Storm Modder
In the established Build Mod, i.e. up to 28th July, officers who are in your party join you in boardings unless you've told them not to.

In the 23rd September version, my officers did not join in the boarding in the "Payroll Ship" section of "Ardent". I don't know if officers now start off being set not to join in, and you need to specifically order them to do so; if so, that won't work for quest officers who do not use the normal officer dialog. Otherwise, how do you get officers to join in boarding?
 
Character which are hired by the normal dialog should join in boarding by this line:
Code:
characters[makeint(Pchar.quest.FreeRandomOfficerIdx)].AbordageMode = makeint(1);

Do I understand right this isn't working anymore or doesn't it work for your officers anymore? If so how did you let them get hired?
 
They're quest officers. You get them right at the start of the storyline while you're escaping from Havana prison. They always joined in boarding up until, and including, 20th July.

Since installing the 28th July version plus the zip updates, I haven't played any of the side quests which assign you officers ("Missing Son of the Spanish Admiral", "Strange Things Going On", "Help the Boatswain"), so I've no idea if the same applies to those officers.
 
Just to be absolutely certain, could you try one tavern-hired officer as well?
Then at least we can rule out if that makes a difference or not.
 
They're quest officers. You get them right at the start of the storyline while you're escaping from Havana prison. They always joined in boarding up until, and including, 20th July.

Since installing the 28th July version plus the zip updates, I haven't played any of the side quests which assign you officers ("Missing Son of the Spanish Admiral", "Strange Things Going On", "Help the Boatswain"), so I've no idea if the same applies to those officers.
I think I know what causes it.
Open Leveling.c and look for this
Code:
void CheckCharacterSetup(ref chref)
{
    if (!CheckAttribute(chref,"id")) {chref.id = "without_id"; }
    if (!CheckAttribute(chref,"Experience")) {chref.Experience = 1; }
    if (!CheckAttribute(chref,"nation")) {trace("NO NATION!");}
    if (!CheckAttribute(chref,"perks.FreePoints")){chref.perks.FreePoints = 1; }
    if (!CheckAttribute(chref,"skill.freeskill")){chref.skill.freeskill = 0; }

add this line after it
Code:
if (!CheckAttribute(ch, "AbordageMode")) ch.AbordageMode = 1;
 
No such luck. :( For one thing, that crashed the game - it should, of course, be "chref", not "ch". ;) With that corrected, it did not solve the problem; officers still did not join in boarding.

I guessed that function is called when the character is initially created and possibly when he levels up. So, to see if setting the "AbordageMode" attribute has any effect, I put it into "console.c":
Code:
   ch = CharacterFromId("Two Dogs")
   if (!CheckAttribute(ch,"AbordageMode")) ch.AbordageMode = 1;
logit("Two Dogs: Abordagemode = " + characters[getCharacterIndex("Two Dogs")].AbordageMode);
The 'logit' confirmed that Two Dogs did indeed now have the attribute set, and he still failed to show up in the boarding. Incidentally, there was a problem with "console.c" - I don't recall the exact message now but it was somewhere in switch case 3, and as I didn't have time to check it in detail, I just commented out the entire case 3 block.

I also tried this:
Code:
   ch = CharacterFromId("Two Dogs")
   if (CheckAttribute(ch,"AbordageMode")) logit("Two Dogs: Abordagemode = " + characters[getCharacterIndex("Two Dogs")].AbordageMode);
   else logit("Two Dogs: AbordageMode not set");
That showed Two Dogs already having 'AbordageMode' set to 1 - either the function in "Leveling.c" had been called anyway, or it was already set at character creation.

Just to be absolutely certain, could you try one tavern-hired officer as well?
Then at least we can rule out if that makes a difference or not.
I'm not sure if the boatswain was a tavern or a random walker, but he certainly isn't a quest officer. So I assigned him to the party, replacing one of the quest officers. He didn't appear during boarding either.

Attached: "console.c" with the command to set "AbordageMode", and a savegame standing on Playa de Sierra Maestra beach about to put to sea and attack the payroll ship.
 

Attachments

  • console.c
    34.6 KB · Views: 279
  • -=Player=- Cuba.zip
    732.7 KB · Views: 270
I'm not sure if the boatswain was a tavern or a random walker, but he certainly isn't a quest officer. So I assigned him to the party, replacing one of the quest officers. He didn't appear during boarding either.
Thanks for that. Sounds like it is a general bug then; not just related to quest officers.
 
Put to sea. You'll be under a false Spanish flag. Sail close to the "SP_CastelF" which is nearby, hoist a Pirate flag, and board it if it doesn't board you first. Be quick about it because you're in sight of Santiago fort, which will react as you'd expect when you hoist the Pirate flag. (Any flag hostile to Spain will do to initiate hostilities - Pirate is just the most appropriate for the story. :rpirate)

I haven't seen a mutiny, but this seems to be the exact opposite of that problem. There, the officers appear and the crew doesn't. Here, it's the other way round - crew are there, officers aren't. The enemy are fine, both crew and the captain in the final battle in the cabin all appear.
 
I will test it tonigh after I'm home from work (and friday afternoon drink XD) but you (or someone else) could help me a bit by using this function during boarding
Code:
for(i = 0; i < LAi_numloginedcharacters; i++)
{
if(LAi_loginedcharacters[i] != sti(pchar.index))
{
ch = GetCharacter(LAi_loginedcharacters[i]);
logit("is on board:"+ch.id);
}
}

it will log (show on screen) which characters are logged into the location. See if the officers are loaded. i suspect there are some locator problems. Do you know if this ship uses shipdeck6 ?
Could you maybe see if you board another ship if they also don't appear?
 
Why would there be locator problems now if it worked before? Locator files weren't changed, were they? o_O
the locators themselfs might be fine, it might have something todo with the assignment to the locators.
In case of the boarding at least it's a locator problem for sure, it's still on my todolist as it only seems to happen on 1 type of deck which isn't used that often.
 
The boarding action starts on "DeckLowVSMedium". On their own, judging by "Ships_init.c", the SP_CastelF uses "ShipDeck5" and the Shnyava2 (snow brig) uses "ShipDeck4".

I won't be able to test the game for a while - you'll probably get to it before I do.
 
Update: sorry, I forgot to add that extra bit of code. :oops: But I did remember to get a 'DumpAttribute' of both my own character and Lucia de la Vega, who at this point is now an officer. (I've got the 'DumpAttribute' commands permanently in my version of "console.c" - very useful for when Lucia and Edmundo don't behave themselves. :D)

Officer (including Lucia) fail to show up in any boarding. During various boardings of various targets, no officers ever showed up. The attached "compile.log" shows that Lucia should be on the same ship deck as me. (And has "abordagemode" set to 1.)

Officers do show up in dungeons. Non-quest officers who have been told to sit out boardings will not join you in dungeons either, so whatever is wrong, it's not a matter of them thinking they're not supposed to join in.
 

Attachments

  • compile.log
    237.7 KB · Views: 257
@Grey Roger the command I gave should show some info on the screen. It didn't show the officers in there?
 
And a further Question, why aren't my officers boarding with me?

And an observation, loading screens are very sloooooow.
 
And a further Question, why aren't my officers boarding with me?

And an observation, loading screens are very sloooooow.

The officers not boarding is a known bug. Hopefully will be fixed soon,

If loading screens have slowed down, you should certainly open a bug report for that. Try to include which version change you noticed it occur in (ie, if it changed when you updated to the latest levis fixes, or before).

There have been some changes, in how perk catagories work, and the perk system as a whole, so this is definitaelly worthy of a bug report if a slowdown has been created as a result, so that the source of the slowdown can be found and fixed.
 
Back
Top