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

Planned Feature Officer Loyalty

What is the difference between "alignment" and "reputation" - I thought they were the same thing, but am now getting a bit confused.:confused:

:drunk
 
They are, to some extent. Reputation is what the game actually records, varying from "Horror of the High Seas" (extreme evil) to "Hero" (extreme good). Alignment is just my word for which side of neutral you are - "Horror of the High Seas", "Bloody Terror", "Swindler" and "Rascal" are all evil alignment, while "Hero", "Dashing", "Matey" and "Bloke" are all good alignment. If you're good and you put an evil officer in charge of a companion ship (or vice versa) then that ship will lose morale and eventually mutiny.

Which means...
Actually, alignment isn't actually shown anywhere and my personal preference would be to keep it that way.
Some characters may be inherently evil, some good and maybe even some who don't particularly care either way.
That is all part of their personality which is something you wouldn't know when you first hire them.
This is something that should become apparent during play afterwards.
... this is not entirely correct. An officer's reputation is shown on the "Character" screen, including when you examine the officer's stats to see if he's any use. So you'll know his reputation, and therefore his alignment, right away. ;)
 
Actually, alignment isn't actually shown anywhere and my personal preference would be to keep it that way.
Some characters may be inherently evil, some good and maybe even some who don't particularly care either way.
That is all part of their personality which is something you wouldn't know when you first hire them.
This is something that should become apparent during play afterwards.


I interpreted this to mean that someone may have a bad reputation - but be trying to become good ( i.e. raise their reputation to hero etc). So they have a good alignment

Alternatively someone may start of with a good reputation, and wish to do bad things, so that their reputation drops. So they have a bad alignment.

At least that is how I interpreted what @Pieter Boelen wrote - so the way a character's reputation changes is is their alignment. :unsure

:drunk
 
Alignment is a stock game feature that applies to certain quest officers only and is NOT linked to reputation whatsoever.
Then there is the loyalty counter that goes with it.
That goes up for each quest officer if your actions in specific quests agree with his alignment and goes down in the opposite case.
If the counter reaches zero, the officer will resign.
That is as far as that stock game feature goes.

This has always been in place, but invisible to the player.
There are so few quests that actually trigger the required officer reaction update, that apparently nobody actually noticed this feature is even there.

It would be my hope that we can get this operational and have it play an actual part in the game.
Probably some link with reputation will be required for that, but right now they're two completely independent systems.
 
To expand on the above, the "evil officer as companion Captain for a good player character" is mod added functionality that was begun by @konradk and implemented as it is now by myself.
This indeed IS linked to reputation and has nothing to do with the alignment and loyalty system I described above.

Of course it only makes sense to merge the two at some point.
After all, what is the point of having so many independent systems, one of which effectively serves no purpose at the moment?
 
This sounds similar to what was implemented in COAS by Seaward.

From COAS manual:-

"An officers loyalty is determined by his reputation and the hero's (players) actions. Virtuous men will grow distant if you commit "dirty deeds", and vice versa. If the Loyalty indicator in the F2 > Character screen falls to zero the officer will leave the hero (player) at the first opportunity, and you will have no recourse to stop him."


Perhaps they were starting to work out how to code this in PotC.

:checklist:type1
 

Attachments

  • CoaS Officer Honourable.jpg
    CoaS Officer Honourable.jpg
    177.9 KB · Views: 120
  • CoaS Officer Scoundrel.jpg
    CoaS Officer Scoundrel.jpg
    174 KB · Views: 148
This sounds similar to what was implemented in COAS by Seaward.
I recall CoAS has something like that and of course that was based on PotC.
And the unmodded PotC already had something too, so that does sound very likely.
They obviously built on that since then though. :onya
 
Indeed they did. You need to pay attention to what kind of officer you are hiring and I do not hire 3/4ths of the officers I investigate.
 
I do like the idea of having officer loyalty and we could add it in the interface. there is still room for it.
But we do need a good system for it and it should work for everyone.
A simple system for example would be:
Each time your reputation goes up while your officer is lower then you his loyalty will drop and if hes lower then you and your reputation decreases his loyalty goes up.
If officers have a fixed reputation this will ask the player to think about the loyalty of the officers too.
But this is just a very simplified example. I hope we can come up with something better
 
I like the idea of alignment not necessarily being linked to reputation.
So you could indeed run into @Talisman's suggestion of a character who is known as bad but wants to be good or the other way around.
Though perhaps the chance of that should be relatively low.

If we then use my suggestion that their reputation moves towards yours only of they agree with your actions, then the player dis have a way of noticing in advance.

Not sure if we need to show the numbers in the interface.
Reducing personality to numbers doesn't seem very realistic, does it?
Of course that goes for many other things too. We'll have to think of how we want it to work. :yes
 
At the moment the intended code to restore his dialogue file and previous current dialogue node does not work - so a bit to do there. The other snag I need to tackle is that multiple resignations don't work properly .
The dialogue problem was partly because multiple resignations allowed the reset of dialogue file but not the resignation so when it did take place on next "bad" console call it saved the wrong dialogue file to restore on rehire. so dealing with multiple resignations as per
Maybe set a limit to only one officer resigning at the same time?
done that via a counter in the OfficersReaction call means only one resignation but the others loyality (sic) still goes zero so you can store up trouble if you continue to act against the alignment in question.

However Diag.TempNode was still screwing which dialogue case (or none) you got so I have forced that to equal current node at the point of reset in anacleto.dialogue.c. I'm not sure if that will be right for all instances yet.

Artois Voysey (already set to Enc.officer.dialogue.c in my save) now behaves as he should reverting to that dialogue, and correct case, on re-hire. I haven't yet limited that re-hire to a one chance only (should be simply a matter of wiping the homelocator attribute set once used I think - they will then disappear from the game on next walkaway).

At present you will still see no walkaway effect in the game, because the instances would be too rare I think, so triggering by console is required

Next I need to check how a quest character dropped mid-quest (ie still with their starting dialogue file) behaves on "re-hire" - the dialogue is quite clever to say "join me on my journeys" to cover any instances where they are just travelling with you and not really officer material.
 
Awesome, @pedrwyth! :cheers

You should be able to store the dialog.filename AND dialog.currentnode before the dialog starts so you can restore the character to that afterwards, right?

Generally an officer who resigns does so because he/she doesn't agree with your actions.
So either you are good and the officer is bad or you are bad and the officer is good.
One way or another, why should the officer want to join you again in the future?
I was thinking that perhaps a GOOD officer could just walk away and a BAD officer would challenge you to a duel.
Either way, they disappear for good afterwards.

Perhaps it should indeed be only quest officers to ever use the "being rehired" functionality.
Not because that makes sense because that allows you to resume their quests if necessary to prevent breaking them.

This is all of course VERY similar to the "companion mutiny" functionality, so perhaps those two features can be tied together.
If an officer decides to resign who is a companion of yours, that would trigger such a mutiny.
For officers who are in your shore party or just on your passengers list, you would get the stock game dialog instead.

At the moment the "companion mutiny" technically triggers on the morale on the companion ship.
While that is scaled by a "difference in reputation between player and companion", it isn't directly responsible.
So that does make it a bit more tricky to create a "one size fits all" solution. :facepalm
 
For me one of the plus points of Good/bad reaction at the moment is that it occurs as a result of specific behaviour in the quests - these are therefore one-off decisions which you can't repeat - there isn't the repeat opportunity of purse protection, bodyguarding, escort quests etc which go to build your reputation. But past deeds aren't held against you in the sense that if you behave generally in one moral direction from any point you will never have any trouble from officers who think that way - but you can also make occassional opposite choices with no effective action accruing.

Because it is only quest characters that currently have an alignment (in the loyalty system) regular players would soon get to know (or check in character.init) what each character is and avoid those who are likely to get disgruntled as officers. The balance is strongly in favour of good at the moment with very few bad characters and very few bad behaviour instances (another reason why it isn't visible in the game - mostly good characters with good behaviours so loyality (sic) keeps increasing).

At present it also works sort of opposite to reputation for captains in that if you put someone with opposite moral tendencies to your behaviour as a companion captain he is happy (ie unaffected by the officers reaction calls, keeps a static loyality level so won't walkaway) - as long as his reputation isn't out of sync with yours.He's captain of his ship and as long as the money rolls in he doesn't need to worry about your eccentric moral behaviour.

Officers/passengers are different they are on your ship and have to witness your deeds firsthand and react accordingly (I've still to check what happens if you appoint them as officers on a companion ship).EDIT -Hmm.. can you do this?

I don't see showing the alignment as a sensible idea since as @Hylie Pistof points out for COAS it is easy to just avoid the interplay by only taking those on one side of the alignment. This effectively just puts a slight obstacle in the way of the player (ie the delay involved in finding a suitable officer) but then has no other impact. If you don't know good/bad at point of hire you can't avoid it

One idea I would put forward is that if it is to be added to non-quest officers it is only to those where you ask at the tavern for a specific type. Getting exactly the officer type you want seems too convenient to me and a possible (unknown) problem with loyalty seems a fair trade off for the good fortune of what you need being to hand. Truly random officers whom you train to a role could then be seen to react by being so grateful they remain truly loyal (ie no officers reaction problems)

The dialogue will need some adjustment since it mentions bloodthirsty but many of the acts are not necessarily violent but a matter of moral perspective.

Points at which it ought perhaps to have a larger impact is when changing your nation allegiance, signing articles or joing the pirates -any of which may be a shock to them and not suit your officers views

I think for me reputation is how the world at large regards you, character loyalty is closer to home and is how those really in the know see you because they are party to most of your actions -regardless of the wider view..

If you want offiers reputation to count for something you could introduce an impact on reducing your reputation level (like an inverse skill item) if you have a number of opposite reputation officers. Effectively people thinking "well he seems like a hero but look at that mottley crew of miscreants he employs - no smoke without fire" or "he's a horror but those nice officers work for him, so he can't be that bad"
 
Last edited:
You should be able to store the dialog.filename AND dialog.currentnode before the dialog starts so you can restore the character to that afterwards, right?

:facepalm

Right ,that's what the current code does, BUT it resets them both to that saved within a dialogue so that when that dialogue exits the tempnode reset is called altering the pointer for the next time. The other sets of dialogue are within quests_common.c so aren't affected by this
 
My thinking would be to DO trigger an OfficersReaction when your reputation changes, but only when a LARGE change occurs.
That fits in with @Grey Roger's earlier suggestion and my own intention to make it harder to get far away from "Neutral".
You shouldn't be able to become a Hero by telling dozens of people their wallets are about to fall out of their pockets. :facepalm

Indeed I noticed the whole game is skewed very much in favour of "good and respectable" characters.
While I am very much for that in real life, it doesn't make for the best role-playing.
So I'd hope that our upcoming changes can make "playing as an evil character" equally feasible, but of course decidedly different.

I agree on keeping alignment hidden from the player. While for quest officers, of course, you can see the initial numbers in the code.
But for random officers, it could be randomly generated so players just wouldn't know.
That should all add to the fun as that will hopefully seem more like "people" rather than "3D models and numbers".

Not sure about distinguishing between random officers from a tavern and the ones you specifically ask for.
The reason why I added that feature is to get past the whole "tavern in/out" trick to find who you want and can only be used once a day on purpose.
While does generate an officer of your desired type, his/her skills and reputation are still random so you might still not want to hire.
Especially not if there end up being a strong correlation between reputation, alignment and loyalty.

The random officers can be equally good or perhaps even more-so than the ones you specifically ask for.
I could even easily reduce the level for the specific ones, so that the random ones are usually better, just perhaps not what you were looking for.
Either way, my personal preference would be to try and handle all sorts of officers as equally as possible.
Include prisoners and beaten enemy captains in that too.

Not sure how officers' reputation should affect you own. That sounds like it could become real complicated real quick.
Would that be reflect directly on your own reputation? Perhaps simply do a +1 reputation for hiring a nice guy and a -1 for the opposite, for example?
Or would there be an "effective" reputation based on which NPCs treat you that is calculated as the average reputation of all your officers?
That latter would make it REALLY hard to be considered a Hero or Terror,
but might also make the system so un-transparent that players can no longer figure out how it works....

One thing is for sure though: A LOT is possible in a lot of different ways and it could be made as complicated as we want and/or have time for. :cheeky
 
Right ,that's what the current code does, BUT it resets them both to that saved within a dialogue so that when that dialogue exits the tempnode reset is called altering the pointer for the next time. The other sets of dialogue are within quests_common.c so aren't affected by this
If I understand correctly, it works like this:
Code:
           characters[iPassenger].selfdialog.filename = characters[iPassenger].dialog.filename;
           characters[iPassenger].selfdialog.currentnode = characters[iPassenger].dialog.currentnode;
           characters[iPassenger].dialog.filename = "anacleto_dialog.c";
           characters[iPassenger].dialog.currentnode = "remove";
Then the dialog occurs, which uses its own nodes and stuff, but should NOT affect the "selfdialog" attributes.
When it completes, the dialog is set up so you can hire again:
Code:
NPChar.Dialog.CurrentNode = "hired_again";
Finally, the dialog should be reset to what it used to be before resigning:
Code:
       npchar.dialog.filename = npchar.selfdialog.filename;
       npchar.dialog.currentnode = npchar.selfdialog.currentnode;
But that last part may not work entirely right, I imagine?

Would it work if you handle that OUTSIDE the dialog afterwards?
In anacleto_dialog.c:
Code:
    case "hired_again_2":
       dialog.snd = "Voice\ANAC\ANAC012";
       dialog.text = DLG_TEXT[24];
       link.l1 = DLG_TEXT[25];
       link.l1.go = "exit";
       pchar.add_officer = GetCharacterIndex(npchar.id); // This
       AddDialogExitQuest("add_officer"); // And this
     break;
Plus a new quest case in quests_common.c:
Code:
    case "add_officer":
       NPChar = GetCharacter(sti(Pchar.add_officer));
       AddPassenger(Pchar, NPChar, 0);
       NPChar.loyality = 1;
       NPChar.dialog.filename = NPChar.selfdialog.filename;
       NPChar.dialog.currentnode = NPChar.selfdialog.currentnode;
     break;
I don't see why that shouldn't work. o_O
 
Would it work if you handle that OUTSIDE the dialog afterwards?
In anacleto_dialog.c:
Code:
    case "hired_again_2":
       dialog.snd = "Voice\ANAC\ANAC012";
       dialog.text = DLG_TEXT[24];
       link.l1 = DLG_TEXT[25];
       link.l1.go = "exit";
       pchar.add_officer = GetCharacterIndex(npchar.id); // This
       AddDialogExitQuest("add_officer"); // And this
     break;
Plus a new quest case in quests_common.c:
Code:
    case "add_officer":
       NPChar = GetCharacter(sti(Pchar.add_officer));
       AddPassenger(Pchar, NPChar, 0);
       NPChar.loyality = 1;
       NPChar.dialog.filename = NPChar.selfdialog.filename;
       NPChar.dialog.currentnode = NPChar.selfdialog.currentnode;
     break;
I don't see why that shouldn't work. o_O

Neither do I

what I did was add 1 line in "hired_again_2"

Code:
case "hired_again_2":
            dialog.snd = "Voice\ANAC\ANAC012";
            dialog.text = DLG_TEXT[24];
            link.l1 = DLG_TEXT[25];
            link.l1.go = "exit";
            AddPassenger(Pchar, npchar, 0);
            npchar.loyality = 1;
            npchar.dialog.filename = npchar.selfdialog.filename;
            npchar.dialog.currentnode = npchar.selfdialog.currentnode;
             Diag.TempNode = Diag.CurrentNode;

which also seems to work by ensuring the reset on exit puts back what is required
 
Last edited:
what I did was add 1 line in "hired_again_2"

Code:
case "hired_again_2":
            dialog.snd = "Voice\ANAC\ANAC012";
            dialog.text = DLG_TEXT[24];
            link.l1 = DLG_TEXT[25];
            link.l1.go = "exit";
            AddPassenger(Pchar, npchar, 0);
            npchar.loyality = 1;
            npchar.dialog.filename = npchar.selfdialog.filename;
            npchar.dialog.currentnode = npchar.selfdialog.currentnode;
             Diag.TempNode = Diag.CurrentNode;

which also seems to work by ensuring the reset on exit puts back what is required but may have a problem if any quest character dialogues use the NextDiag format
Indeed setting Diag.TempNode during a dialog is quite a common method of setting the next node when starting a new dialog with the character.
You should be able to get rid of this line then:
Code:
npchar.dialog.currentnode = npchar.selfdialog.currentnode;
 
The random officers can be equally good or perhaps even more-so than the ones you specifically ask for.
I could even easily reduce the level for the specific ones, so that the random ones are usually better, just perhaps not what you were looking for.
That pretty much defeats the purpose of the specific officers. As I recall, the idea was supposed to be that you'd get one chance at a high quality officer, otherwise you take your chances with the random drinkers. If the random officers are going to be better than there's no reason to go for the specific one; just keep trying random officers until you get the right type.

Either way, my personal preference would be to try and handle all sorts of officers as equally as possible.
Include prisoners and beaten enemy captains in that too.
On the contrary, prisoners and enemy captains should be the least loyal of the lot! Unless there's a really good reason for him to switch sides, the enemy captain is going to want to escape. An honourable enemy officer will either refuse to join you, or only pretend to join you so he can escape or capture your ship. A dishonourable enemy officer is more likely to switch sides and betray his country, though being dishonourable, he's just as likely to do it again later and betray you too...

"To escape, your Excellency, is the duty of every British officer." - Horatio Hornblower
"Me? I'm dishonest, and a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for, because you can never predict when they're going to do something incredibly... stupid." - Jack Sparrow

As for reaction based on alignment and you doing something the officer doesn't like: perhaps base the reaction on "Leadership". If your "Leadership" is higher than his then you have a better chance of winning him round and gradually converting his alignment to yours. If his is higher then you aren't as convincing and he's more likely to lose loyalty. Factor in the "Iron Will" perk as well. You really want a loyal first mate, partly because he's likely to have a high "Leadership" backed up by "Iron Will", and partly because you're probably getting your effective "Leadership" and "Iron Will" from him. So you're never going to convince him to change to your alignment, but if he's the same as you then he's a major asset in convincing everyone else.
 
That pretty much defeats the purpose of the specific officers. As I recall, the idea was supposed to be that you'd get one chance at a high quality officer, otherwise you take your chances with the random drinkers. If the random officers are going to be better than there's no reason to go for the specific one; just keep trying random officers until you get the right type.
As far as I'm concerned, both types can be equally good for all I care.
The point was to allow players a way to get a potential officer candidate without "forcing" them to use the completely silly "tavern in/out" trick.

The specific ones are being generated close to the player level with each level of player leadership making them a bit better in quite a simple fashion.
But it looks like that intention may be overridden before it takes effect, because the following is executed for EVERY officer before hiring:
Code:
LAi_Create_Officer(0, NPChar);
The 0 means "around player rank".
I am adding a line of code for the next update to hopefully make the the leadership number from tavern.c actually be taken into account:
Code:
CreateOfficerType(OFFIC_TYPE_BOATSWAIN, sti(PChar.skill.Leadership));
We'll see with the next update if that actually makes a difference.

Anyway, if we can't decide, we can just treat both equally with a rank around the player one.
Not better, not worse. That will leave it purely to chance. :shrug

On the contrary, prisoners and enemy captains should be the least loyal of the lot! Unless there's a really good reason for him to switch sides, the enemy captain is going to want to escape. An honourable enemy officer will either refuse to join you, or only pretend to join you so he can escape or capture your ship. A dishonourable enemy officer is more likely to switch sides and betray his country, though being dishonourable, he's just as likely to do it again later and betray you too...
My point is that those officers should be included in the system and handled similarly.
Of course giving them a lower loyalty value so that they'll resign quicker if they don't agree with your actions certainly makes sense.
When this system applies to them same as for any other type of officers, that should be possible. :yes

As for reaction based on alignment and you doing something the officer doesn't like: perhaps base the reaction on "Leadership". If your "Leadership" is higher than his then you have a better chance of winning him round and gradually converting his alignment to yours. If his is higher then you aren't as convincing and he's more likely to lose loyalty. Factor in the "Iron Will" perk as well. You really want a loyal first mate, partly because he's likely to have a high "Leadership" backed up by "Iron Will", and partly because you're probably getting your effective "Leadership" and "Iron Will" from him. So you're never going to convince him to change to your alignment, but if he's the same as you then he's a major asset in convincing everyone else.
One thing at a time, perhaps? Maybe that will make sense at some point.
But bringing more and more factors into the same functionality could just as well make it seem like a fancy "random number generator".
I'm sure we'll see how to tweak the system once there is a simple system to tweak. :cheeky
 
Back
Top