• 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

There being no agreed way forward for expanded implementation I don't see I will be doing anymore with this, - so an update on where it stands.

I have tested two cases Artois Voyesy and Nigel Blythe to check that on re-hire they resume their previous dialogue.

Voysey does revert to Enc_Officer at "hired" case - he is set at that when you first meet him (and hire him) by code modifications by KK - I presume that later on there is hard coding to revert his dialogue to his quest related stuff when appropriate for quest advancement but haven't checked the impact of a walkaway at that later sceneario (in my case he had been through it all and emerged with enc_officer dialogue anyway)..

Nigel Blythe does revert to the limited random officer response (Artois original worked the same way) within his dialogue if you let him kill Artois, hire him and then do enough good acts for a walkaway but then ask him back.

So I think in general it now works (with the change in anacleto_dialog discussed above and in the attached file - already included?).

I have also added a counter (in the other appended file) to only allow 1 resignation at a time - which stops multiple resignations (which didn't work) from potentially screwing up the other officer dialogues.

I have not put in a check against repeated rehiring.

Finally I have not checked the actual functionmg for other characters with home locators set eg Edgar Attwood,, Lucas De Saldanha, Baldewyn Coffier or Leborio Drago. However Gervasio Serraio just seems an aggressive gentleman who could join your crew but with no other current quest usage once hired - so I don't know wht he would need home locators.

The two main characters you might want affected Peter Blood and Claire Larrouse are paradoxically not included. Peter Blood does not join you, just follows you everywhere - which is presumably why he stands unscathed and unaffected in the middle of any fights not directly in the quest to save his crew - I did think that odd at the time. Claire joins you as a companion, so as previously noted is also not affect by OfficersReaction calls.

So in summary - with the two file changes probably fully functional (as far as it goes) but will be almost impossible to trigger by normal play as it stands but a determined effort using exactly the right choices could trigger it. Any particular case of interest will require close inspection on expanded implementation.
 
Can you post your latest work on this? I'd like to include it in my game for future development.

As for further implementation, I'd suggest the following:
- Tie a call to Officers Reaction together with Change Reputation but only for LARGE changes
(Eventually I want to do some reworking there to get both good guy and bad guy play to be supported; probably after the Beta 4 release though)
- Set a random alignment and loyalty value for randomly generated officers
(Possibly with some logic in place, but for initial testing purposes, it could just be just random)
- See how this affects your passengers and get them to leave permanently when they resign

I think that would be the minimum of functionality to have this play a notable rope in gameplay.
Once that is all in place, it can be tweaked and made more fancy, right?
 
Yep referred to but forgot to add the two files - here they are - Not that world shattering of changes!
 

Attachments

  • anacleto_dialog.c
    6.4 KB · Views: 152
  • OfficersReaction.c
    1.2 KB · Views: 149
As for further implementation, I'd suggest the following:
- Tie a call to Officers Reaction together with Change Reputation but only for LARGE changes
(Eventually I want to do some reworking there to get both good guy and bad guy play to be supported; probably after the Beta 4 release though)
- Set a random alignment and loyalty value for randomly generated officers
As I said earlier I quite like the current impact when a specific decision can piss off the officers who are up close without the world at large (ie no effect on your reputation) being affected it just needs a lot more value judgements plugged in there, that's not to say that as you suggest large changes in reputation (in either direction) shouldn't also impact on your officers view of you and thereby their loyality (sic)
 
I'm not saying officer reaction should influence reputation, but I am suggesting that a link the other way would make sense.
Would also immediately work it into the existing game systems. Otherwise you'd probably end up seeing an officer reaction line together with a large reputation change in many spots.
Might as well join them. :shrug

Plus it only makes sense that bad officers won't like seeing you do massive good and vice versa which is what changes in reputation are meant to indicate.

Of course the numbers for those reputation changes that trigger this would need to be tweaked.
But that is something that will probably need doing anyway.
 
I'm not saying officer reaction should influence reputation, but I am suggesting that a link the other way would make sense.
Would also immediately work it into the existing game systems. Otherwise you'd probably end up seeing an officer reaction line together with a large reputation change in many spots.
Might as well join them. :shrug

Plus it only makes sense that bad officers won't like seeing you do massive good and vice versa which is what changes in reputation are meant to indicate.

Of course the numbers for those reputation changes that trigger this would need to be tweaked.
But that is something that will probably need doing anyway.

Yes I think we actually agreed there.:)
 
@pedrwyth, can you post your code change that prevents multiple resignations at the same time?
I think that should complete this feature as far as Beta 4 is concerned. Hopefully after the release, we can work on making proper use of it! :cheers
 
Already did. :yes

If you check the officersReaction file above - it has officersReaction function call and that's what the slight change change in it is about - needs putting into the appropriate file (Quests_common.c)
 
Already did. :yes

If you check the officersReaction file above - it has officersReaction function call and that's what the slight change change in it is about - needs putting into the appropriate file (Quests_common.c)
Thanks! I managed to totally miss that post. :shock
 
Yep referred to but forgot to add the two files - here they are - Not that world shattering of changes!
What modpack version are you currently on? That anacleto_dialog.c file looks ANCIENT!
Is that Beta 3.4 without my additional ZIP-fix?

EDIT: In any case, that change to OfficersReaction should help for sure as I was still missing that!
For your reference, I changed it to use a bool now instead:
Code:
void OfficersReaction(string alignment)
{
   int iPassenger;
   ref PChar;
   PChar = GetMainCharacter();
   bool officerLeft = false; // PW
   for (int io = 0; io<GetPassengersQuantity(pchar); io++)
   {
     iPassenger = GetPassenger(pchar, io);
     if(CheckAttribute(characters[iPassenger], "loyality"))
     {
       if (characters[iPassenger].alignment == alignment)
       {
         characters[iPassenger].loyality = makeint(characters[iPassenger].loyality) + 1;
       }
       else
       {
         characters[iPassenger].loyality = makeint(characters[iPassenger].loyality) - 1;

         if(makeint(characters[iPassenger].loyality) < 1)
         {
           if (!officerLeft) // PW
           {
             PlaceCharacter(&characters[iPassenger], "goto");
             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";
             LAi_SetActorType(&characters[iPassenger]);
             LAi_ActorDialog(&characters[iPassenger], pchar, "player_back", 2.0, 1.0);
             LAi_SetStayType(pchar);
             officerLeft = true;
           }
         }
       }
     }
   }
}
That seems to be what you intend, right?
 
yes those are from 3.4 that's why I pulled the case out for the other file. I have version 4 too but had lots of good saves for testing in 3.4. Sorry should have checked and adjusted it forward.:oops:
 
I have version 4 too but had lots of good saves for testing in 3.4. Sorry should have checked and adjusted it forward.:oops:
Doesn't actually matter. The anacleto file wasn't so heavily modified that I got lost.
And your excerpt from quests_common.c was clear enough too. So no worries there. :doff
 
@pedrwyth's changes to this are now included in here: Mod Release - Build 14 Beta 4 Internal WIP For Testing | PiratesAhoy!

This should set this stock game functionality to proper working order, though still extremely difficult (near impossible) to trigger during gameplay.
It certainly helps to have this confirmed and done so we know we can build on it for the next update.
I have marked this as "Planned Feature" for Beta 5 accordingly. :woot
 
Just a quick question @pedrwyth I'm going to add bonusses to officers very soon (hopefully this Weekend). If you want I could add a base loyalty or something like that already, so this Information is already there and it might use the System already. Or would that screw up things?
If not, what should be added to characters?
 
I reckon all characters should get an alignment ("good"/"bad") or perhaps have some characters without alignment altogether.
Plus a random number as "loyalty" for all characters too. That could be replaced by something not random that fits for that character later.

However, adding "loyalty" to a random character should immediately enable the "Officer Loyalty" functionality for that character.
Except that hasn't yet been confirmed working for random NPCs, so it is a bit risky.
But as it is virtually impossible to trigger right now, there should be little harm in setting something up in advance. :onya
 
Okay, which attributes have to be exactly set or is there an character in the init which is set up right so I can check that one to see how its done?
 
Okay, which attributes have to be exactly set or is there an character in the init which is set up right so I can check that one to see how its done?
Check for example Artois Voysey.
 
Just a quick question @pedrwyth I'm going to add bonusses to officers very soon (hopefully this Weekend). If you want I could add a base loyalty or something like that already, so this Information is already there and it might use the System already. Or would that screw up things?
If not, what should be added to characters?

It shouldn't screw anything up and if it came into play too much , because of a low generated loyalty number just boosting the base would hide its effect again for now.
I reckon all characters should get an alignment ("good"/"bad") or perhaps have some characters without alignment altogether.
Plus a random number as "loyalty" for all characters too. That could be replaced by something not random that fits for that character later.

However, adding "loyalty" to a random character should immediately enable the "Officer Loyalty" functionality for that character.
Except that hasn't yet been confirmed working for random NPCs, so it is a bit risky.
But as it is virtually impossible to trigger right now, there should be little harm in setting something up in advance. :onya

I'd say set all up as good, bad or neutral (everyone has a personality even if it's "not bothered") then in due course you wouldn't have to test whether the attribute was there for a character - not sure from memory if that is done but I presume so. With Loyality (sic) all would get a number but only those acts that cause "everyone" to drop loyalty would affect the neutral case. I would have a minimum loyalty (which could be changed in balancing) currently quest characters lowest is seven so maybe around 4 plus a random element of up to 3 -again will be adjustable in balancing (or 7 plus or minus about 3 - giving a larger swing).

Remembering the ranks of passengers I accumulated, you could imagine walkaways becoming too frequent - so a larger base figure and wider variation would help address that in adjusting the frequency of it happening.

Voysey also has home locators so if he leaves you can get him back. NPCs for now would just disappear (not sure if they gradually clog up the game performance) because at the moment I think they would just go to a none location, not be deleted so presumably still get called in character checking loops etc
 
Last edited:
Back
Top