Let me see if I can figure out how the whole skill-calling system works:
- CalcCharacterSkill: Get character skill AND applies modifiers, then add a check to ensure the resulting number is between 1 and 10
- CalcSummOnSkillFromName: For the player, cycles through all passengers; for all other characters, call CalcEffectiveSkill
- ApplyFleetMali: Subtracts numbers from your skills if you have too large a ship; contains calls to CalcSummonSkillFromName for Leadership and Sailing.
Remember that this one checks all passengers too!
- GetCharacterSkill: Calls CalcCharacterSkill first, then applies "fleet mali"
- GetEffectiveSkill: Call GetCharacterSkill, then call GetEffectiveSkillByValue
Remember that GetCharacterSkill = CalcCharacterSkill + ApplyFleetMali
- CalcEffectiveSkill: Call CalcCharacterSkill, then call GetEffectiveSkillByValue
In other words, this is the same as GetEffectiveSkill, but skips the FleetMali
- GetEffectiveSkillByValue: Checks officer type to see what should be contributed and what not
The first thing that becomes immediately apparent is that all of this is CONFUSING AND CONVOLUTED!
Also, GetEffectiveSkill is the one that seems to get called a lot at sea.
(
EDIT: Sorry, it is CalcEffectiveSkill that gets called so often, so the one EXCLUDING fleet mali.)
So that means:
1. Get character skill AND applies modifiers, then add a check to ensure the resulting number is between 1 and 10
2. Check if you can handle your large ship by looping through all your passengers
apparently twice
3. For each passenger, get character skill AND applies modifiers, then add a check to ensure the resulting number is between 1 and 10
4. For each passenger, read officer type and apply whatever that type should be contributing
5. The number that results from here is then passed to GetEffectiveSkillByValue again, but probably this should be the player or a companion so no officer type checks are performed
However, that might be different for NPCs as they are NOT companions of the player.
While technically all this is all valid functionality, it becomes rather a pain when that is checked often for
every character in a 3D sailing mode scene.
So clearly there is some substantial work to be done here....