• 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 Officer role changes with men at arms

Tingyun

Corsair
Storm Modder
Men at arms officers change their party roles to "fighter" under odd circumstances, like when party composition changes.

Tonight I encountered this when my man at arms role officer was knocked out in a tavern brawl (couldn't get to them on the stairs), she became a fighter when she woke up.

What made this odd is that I normally get them back to man at arms by "removing profession" which usually replaces the fighter with man at arms, or changing role to something else and removing profession.

Today, when I did this, she instead became listed as "comrade at arms" as profession, and the passanger screen is glitchy where it lags heavily whenever I open it up, presumably because of her odd profession.

I have a saved game if helpful, but I had to get off computer before I could upload it (on mobile device now). If you need the saved game let me know and I will post it in the morning, but wanted to write the bug report while still fresh in my mind.
 
please upload the savegame and error log file from when it happened (if you still have it)
 
What should happen is that a character is "comrade in arms" if he's on your passengers list without an active role and without being in your shore party.
"Master at arms" is the same, but with the character in your shore party.
The "fighter" text should be only an internal code name that doesn't show in the game.

I've always been a bit confused on that myself as well though.
Can never seem to remember what is what with those officer type names. :facepalm
 
at least something is going very wrong here. it seems the code which knocks a person out removes it from your party ... and when it gets added back it doesn't get its officertype back ...
 
Yes, after the fight she was still listed on the party, with "fighter" as her ingame text for her role. I have also gotten the same thing to happen when I hire a new man at arms character for the party, the old man at arms who was in my active party sometimes changes to "fighter" (not sure if happens 100% of the time, but I've noticed it twice. I got the impression it has something to do with the slots the new character is filling, might have nothing to do with the new character role).

So then the "comrade at arms" part is not an erorr itself, though the glitchy passanger screen with it probably is.

I will post the saved game in a few hours then, not at computer now. I will probably create another one, by loading and picking another fight and getting her knocked out, where she is still a fighter and post both.
 
There might be a problem in here:
Code:
void SetCharacterRole(string officerType)
{
    string curName = GetCurrentNode();

    int idx = -1;
    if(nCurScrollNum >= 0)
    {
        idx = GetPassenger(_refCh, nCurScrollNum);
    }
    else
    {
        if(nFourImageNum >= 0)
        {
            idx = GetOfficersIndex(_refCh, nFourImageNum);
        }
    }

    if(idx >= 0)
    {
        ref chr = GetCharacter(idx);

        if(officerType == OFFIC_TYPE_ABORDAGE)
        {
            bool del = true;
            for(int i = 0; i < OFFICER_MAX; i++)
            {
                if(idx == GetOfficersIndex(_refCh, i))
                {
                    chr.quest.officertype = OFFIC_TYPE_ABORDAGE;
                    del = false;
                    break;
                }
            }

            if(del && CheckAttribute(chr, "quest.officertype"))
            {
                DeleteAttribute(chr, "quest.officertype");
            }
        }
        else
        {
            chr.quest.officertype = officerType;
        }

        SetChrSkillData(chr);
    }

    SetSelectDialogUsing(false);
}
from passengers.c
it deletes the officertype here while it shouldn't do it ...
 
Thanks!

Officer role name is indeed supposed to change depending on if the character is or isn't in your shore party.

Deleting the officer attribute used to be quite normal there.
That changed with @Levis' Leveling System though.
 
so do we still want the officertype to be changed if the character is not in your shore party? I guess not because it's already incorperated in the contributing etc, so if they aren't in your shore party they shouldn't contribute to the ship already etc.
 
Contributions are probably fine. Salary should differ though.
It does help if the officer type could mention if the officer is completely inactive or is in your shore party as extra muscle.
 
Contributions are probably fine. Salary should differ though.
It does help if the officer type could mention if the officer is completely inactive or is in your shore party as extra muscle.
true, but on the other hand if you have a gunner for example. it's actually realstic to have him on the ship only (and actually contribute altough he is not in your party ... hmmm.....) I need to think about this more
 
Hi,

Here are the saves.

1 is in the tavern, with Gentile about to wake up from being knocked out. Notice she is now a fighter (she was man at arms before). Still in the party. Similar effect can be achieved by hiring new officers, especially man at arms it seems. I usually use "remove officer" and then she is man at arms again, since there is no button to make them a man at arms.

2 is outside the pirate for. Notice Gentile is now comrade at arms, everytime I switch to and from her on the passanger screen portrait selection, the game glitches for a second and lags. Try switching back and forth with Dayman and her on the passanger screen, and you will see it.
 

Attachments

  • FreePlay.rar
    1.1 MB · Views: 124
I've seen this happen as well, but can't predict when it's about to happen so I can't provide a savegame with a master at arms about to change into a fighter.

One thing I have found out is how to change him back. You go to the "Passengers" interface", change his role, and remove him from his post. Master at Arms seems to be an officer who has no post. So at some point he decides that he's been doing a lot of fighting, so his post is Fighter.
 
true, but on the other hand if you have a gunner for example. it's actually realstic to have him on the ship only (and actually contribute altough he is not in your party ... hmmm.....) I need to think about this more
Yes it is and it already world's like that.
If you decide to take your Gunner ashore add extra muscle as well, he is still the Gunner.
You can do that, of course, at the risk of your Gunner being killed ashore.
But that's up to the player.

Nothing needs to be changed there compared to how it already works. :no
 
@Tingyun and others could you test this for me?
I think this should fix the problem you have. Please try to remove officers and place them back etc and let me know what happens. Also keep an eye on your compile.log. If an ERROR is displayed there please let me know.

place in \PROGRAM\interface
 

Attachments

  • passengers.c
    37.7 KB · Views: 86
Last edited:
Levis i did some tests and its (i think fixed) cuz i had two fighter in my passengers list i removed them then replaced them then their skill were changed and bonuses were given to swordsmanship rather then only one having it and the other grappling thanks i think it works:drunk !!! great job Levis:thumbs1!!
 
Levis i did some tests and its (i think fixed) cuz i had two fighter in my passengers list i removed them then replaced them then their skill were changed and bonuses were given to swordsmanship rather then only one having it and the other grappling thanks i think it works:drunk !!! great job Levis:thumbs1!!
what officertype did they show to be after you removed them?
 
what officertype did they show to be after you removed them?
they were both fighters but their skills "lvl" wasn't correct for them and their bonuses for skills weren't correct as well but after using your fix everything looks normal and fixed they have higher skills in their field then others and have bonuses in melee not in other field that's what i meant and they still were fighters
 
Last edited:
@Levis

Ran the following tests:

1) got man at arms knocked out in tavern brawl.

2) hired new men at arms with current roster full of them

In both cases, all officers properly preserved their men at arms role. No error log created so far.

I couldn't replicate Imado's statement about still having "fighters" among his officers. Maybe they were already fighters in his saved game? Starting from fresh saved games where no fighters were present, all officers stayed men at arms throughout my tests.

So, it looks fixed! :)
 
Back
Top