• 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 Skill Contribution with Auto Skill System OFF

Hotshot

Freebooter
Storm Modder
How is the "Summary Info" under Passengers calculated? Isn't that the cumulated skill info of all 3 active officers (+myself)? Or don't they have to be one of the 3 officers that accompany me to shore to add their skills and abilities when sailing/fighting/buying/selling? (-> see 4 included jpgs)
0-myskills.jpg 1-summary_no_officers.jpg 2-quartermaster.jpg 3-summary_with_quarterm.jpg
 
Last edited by a moderator:
All officers count for skill contribution. They only contribute those skills relevant to their job as indicated on the Passengers screen.
The highest skill is used, so they don't stack.

There is a factor 2 difference between carronades and long guns.
 
Last edited:
But why is my commerce skill "summary" at 7, when my Quartermaster has 9?
 
Last edited by a moderator:
You have a savegame with that skill weirdness?
Also, what numbers are you comparing?
If you have a quartermaster with 9 Commerce, that should show on the Ship and Passengers screens, but not the Character one.
 
Last edited:
Yep, is attached. The quartermaster is "Letitia Palmer".
Carpenter-Repair: works (8)
Surgeon-Defense: works (9)
Gunner-Accuracy/Cannons: works (5/6)​
 

Attachments

  • -=Player=- QuickSave 10.7z
    521.7 KB · Views: 130
Last edited by a moderator:
@Hotshot: Yep, you're right; this is definitely wrong.
It is easily resolved by changing Letitia Palmer's role to "First Mate" and then back to "Quartermaster".

However, that is not an actual fix. I remember @ANSEL had a savegame months ago as well that had something similar going on.
I know exactly the sort of situations where this can happen as this is related to my fix for game performance in 3D Sailing Mode.
But I already tackled most situations where this should update, so apparently something "slipped by".

Do you remember any specific details of how Letitia joined your crew and how she came to be Quartermaster?
 
These are her relevant character attributes:
Code:
quest = True
  meeting =
  officertype = quartermaster
  officerprice = 439
  officerpayowed = 302.5170288
reputation = 77
nation = 0
  name = 0
skill =
  leadership = 1
  charmod = 0
  importance = 15
  bonus = 1.0000000
  modifier = 0
  effective = 0
  officertype = quartermaster
  party = 1
  fencing = 1
  charmod = 0
  importance = 88
  bonus = 1.0000000
  modifier = 0
  effective = 1
  officertype = quartermaster
  sailing = 1
  charmod = 0
  importance = 37
  bonus = 1.0000000
  modifier = 0
  effective = 0
  officertype = quartermaster
  party = 1
  accuracy = 2
  charmod = 0
  importance = 34
  bonus = 1.0000000
  modifier = 0
  effective = 0
  officertype = quartermaster
  cannons = 1
  charmod = 0
  importance = 19
  bonus = 1.0000000
  modifier = 0
  effective = 0
  officertype = quartermaster
  grappling = 1
  charmod = 0
  importance = 20
  bonus = 1.0000000
  modifier = 0
  effective = 0
  officertype = quartermaster
  repair = 1
  charmod = 0
  importance = 164
  bonus = 1.0000000
  officertype = quartermaster
  modifier = 0
  effective = 1
  defence = 1
  charmod = 0
  importance = 19
  bonus = 1.0000000
  modifier = 0
  effective = 0
  officertype = quartermaster
  commerce = 9
  charmod = 0
  importance = 461
  bonus = 1.0000000
  officertype = quartermaster
  modifier = 0
  effective = 7
  sneak = 2
  charmod = 0
  importance = 222
  bonus = 1.0000000
  modifier = 0
  officertype = quartermaster
  effective = 0

Specifically this:
Code:
  commerce = 9
  charmod = 0
  importance = 461
  bonus = 1.0000000
  officertype = quartermaster
  modifier = 0
  effective = 7
Apparently her actual skills increased without her "effective" skill being recalculated.
So then the main question is: How exactly did her skills increase and how can that have failed to trigger this being recalculated?
 
holy smokes, unfortunately no ;-(
But at the added savegame, there are several officers with this issue... maybe that helps?
  • Neva - Navigator - Sailing = 9 (9 on summary)
  • Matthyssen - Gunner - Accuracy = 5 (5)
  • Matthyssen - Gunner - Cannons = 8 (6)
  • Simona - Boatswain - Grappling = 10 (10)
  • Augustos - Carpenter - Repair = 10 (8)
  • Boudeken - Surgen - Defense = 10 (9)
  • Letitia - Quartermaster - Commerce = 10 (7)
And yes, your fix does work!

On a side note: might it be possible to make the skill "cell" more visible, that is "active" for the respective officer? Like "Melee" (which is everyone), "Repair"&"Defense" (Carpenter).
To clarify, here is the screen I mean: officers_skills.jpg
 

Attachments

  • -=Player=- Eleuthera.zip
    830.3 KB · Views: 137
This doesn't have anything to do with me spending my and their skill points manually?
It shouldn't do as I thought that worked OK. But I don't remember testing that myself.

Quick test suggests there is definitely something going wrong there.
I'll need to look into this further. But probably not today....
 
On second thought, this turned out to be a more obvious quick fix than I expected.

In PROGRAM\Characters\skills\skill_utils.c find:
Code:
//Simpel Increase of base skill
void IncreaseBaseSkill(ref character, string skillName, int inc)
{
   character.Skill.(skillName) = GetCharacterBaseSkill(character, skillName) + inc;
}
Replace with:
Code:
//Simple Increase of base skill
void IncreaseBaseSkill(ref character, string skillName, int inc)
{
   character.Skill.(skillName) = GetCharacterBaseSkill(character, skillName) + inc;
   ResetEffectiveSkill(character, skillName); // PB: Need to recalculate this
}
With that addition, if I manually assign another skill point, the numbers in the Passengers Interface DO increase.

Of course this won't fix existing characters. To do that, the easiest is to change their officer role back and forth so that it updates correctly.

@ANSEL: Do you not usually play with Auto Skill System OFF as well?
If so, you'll definitely be wanting this fix!

On a side note: might it be possible to make the skill "cell" more visible, that is "active" for the respective officer? Like "Melee" (which is everyone), "Repair"&"Defense" (Carpenter).
The colour coding is meant to do that already.
Green means 100% contribution and Orange/Gold means 50% contribution.
You probably didn't recognize it as such because of this bug that was confusing everything. :facepalm
 
Ahhh... indeed, now I see what those colors mean :D

But if there is only 1 point in this skill, it's marked as green, even though it might be a secondary skill (like a Boatswain having 1 point in Leadership: it's marked as green)
 
But if there is only 1 point in this skill, it's marked as green, even though it might be a secondary skill (like a Boatswain having 1 point in Leadership: it's marked as green)
Indeed I can see why the code would do that. If you look at the section posted below, you probably understand it too. ;)
For reference:
GetEffectiveSkill is the skill a character actually contributes (depends on officer type)
CalcCharacterSkill is that character's actual skill (including item modifiers)

In PROGRAM\INTERFACE\passengers.c find:
Code:
void SetChrSkillData(ref chref)
{
   string skill;
   int n;
   for(n = 0; n < 10; n++)
   {
     skill = GetSkillName(n);
     int skillval = GetEffectiveSkill(chref,skill);
     int modval = CalcCharacterSkill(chref,skill);
     int color = COLOR_NORMAL;
     skill = "skill"+skill;
     GameInterface.strings.(skill) = modval;
     if(skillVal >= modval) color = COLOR_GREEN;
     if(skillVal <  modval) color = COLOR_MONEY;
     if(skillVal==0) color = COLOR_GRAY;
     ChangeStringColor(skill,color);
   }
Replace with:
Code:
void SetChrSkillData(ref chref)
{
   string skill;
   int n;
   for(n = 0; n < 10; n++)
   {
     skill = GetSkillName(n);
     int skillval = GetEffectiveSkill(chref,skill);
     int modval = CalcCharacterSkill(chref,skill);
     int color = COLOR_NORMAL;
     if(GetOfficerSkillFactor(chref,skill) == 2)   color = COLOR_GREEN; // PB: was if(skillVal >= modval)
     if(GetOfficerSkillFactor(chref,skill) == 1)   color = COLOR_MONEY; // PB: was if(skillVal <  modval)
     if(skillVal==0) color = COLOR_GRAY;
     skill = "skill"+skill;
     GameInterface.strings.(skill) = modval;
     ChangeStringColor(skill,color);
   }
Note that I didn't just edit some existing lines, but I had to change the order of them too.

That should ensure it really DOES mean Green = 100% and Yellow = 50%.
Might make these sort of bugs less obvious, but then.... they weren't too obvious to begin with. :facepalm

-------------------------------------------------------------------

Also, did you notice your player's skills show RED?
upload_2016-6-13_22-59-34.png

That means your skill increases aren't actually working! :shock

You can't change your own officer type as easily as those of your officers, so instead run this through console:
Code:
ResetSkillModifierAll(pchar);
See here point #4 for how: Tutorial - Modding Tips & Tricks | PiratesAhoy!
 
First off: thanks for all your effort (all around)!
I've added both your fixes :)

But I somehow don't have any skills in red? At least not on my pc... I even got rid off all officers to see only my skill summary, but even then, everything checks out o_O
 
But I somehow don't have any skills in red? At least not on my pc... I even got rid off all officers to see only my skill summary, but even then, everything checks out o_O
I didn't at first either. But after some of my fixes, suddenly I did.
Not sure why it happened, but executing that console command cannot possibly do any harm anyway.
All that does is to force the game to recalculate the correct values.

The game has to read those values VERY often as it was 1 time per second for every skill and every captain at sea.
Recalculating those values that frequently caused nasty performance issues, so now the game should recalculate it ONLY when it actually changes.
But it is easy to miss a spot where it changes, in which case discrepancies can occur.
 
Back
Top