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

Bug Items on officers not contributing to skills

Hylie Pistof

Curmudgeon
QA Tester
Storm Modder
Pirate Legend
My officers have a problem using items when I give them to them. Specifically, when I give them things like a compass, sextant, and microscope to make them better Captains they often do not use them and their skills do not increase.
If I go into their inventory and release and then equip them they will show up, then disappear again. This makes building a fleet difficult.
 
Compasses ARE being equipped now. The code for it is right there in the item transfer interface:
Code:
  if(!g_bIBoxUsed)
   {
     // Aconcagua:
     UpdateSkillModifiers(g_refItems);
     //for(s = 0; s < 10; s++) GetCharacterSkill(g_refItems, GetSkillName(s)); // NK/GZ items mod to force refresh of modifiers.

     DeleteAttribute(&g_refItems, "skiprecalcskill");
     if( GetCharacterSkill(g_refItems,"fencing") > 0 )
     {
       EquipCharacterByItem(g_refItems, FindCharacterItemByGroup(g_refItems,BLADE_ITEM_TYPE));
       EquipCharacterByItem(g_refItems, FindCharacterItemByGroup(g_refItems,GUN_ITEM_TYPE));
       EquipCharacterByItem(g_refItems, FindCharacterItemByGroup(g_refItems,ARMOR_ITEM_TYPE));     // NK
       EquipCharacterByItem(g_refItems, FindCharacterItemByGroup(g_refItems,FLASK_ITEM_TYPE));     //JRH
       EquipCharacterByItem(g_refItems, FindCharacterItemByGroup(g_refItems,POUCH_ITEM_TYPE));     //JRH
     }
     EquipCharacterByItem(g_refItems, FindCharacterItemByGroup(g_refItems,LOCKPICK_ITEM_TYPE));   // PB
     EquipCharacterByItem(g_refItems, FindCharacterItemByGroup(g_refItems,CLOCK_ITEM_TYPE));     // PB
     EquipCharacterByItem(g_refItems, FindCharacterItemByGroup(g_refItems,COMPASS_ITEM_TYPE));   // PB
   }
Sextant and microscope are not even equippable, so just carrying those should work straight away.

In other words: You're having some ODD effects there! :shock
 
Maybe I said it wrong. The items are there and equipped, but they have no effect on the skill rating.

One thing. I made Mr. Gibbs a Captain and now those items give him their skills. Could it be those items don't add skills until they are used?
 
Nope, that's not possible.

What is the skill level of the character who isn't using them? Both before and after the items taken into account?
Note that you can never get more than +4 out of your items, even if you have a lot of different skill-enhancing items.
 
Anything and everything is possible. It is a basic rule of the multiverse. :nerbz

Gibbs has the compass equipped and also the microscope and sextant. He should have +1 for leadership and +2 for sailing, but he has +1 for leadership and +1 for sailing as a Captain. One sailing item is not working, and I'm guessing it is the compass.
Coffier has the same equipment and gets no increases at all.
 
Really strange. Does it not update after opening the transfer interface with them?
 
might have something to do with how the skills are calculated in different interfaces?
On which interfaces DOES it show right and which ones DOESN'T it??
 
My officers have a problem using items when I give them to them. Specifically, when I give them things like a compass, sextant, and microscope to make them better Captains they often do not use them and their skills do not increase.
If I go into their inventory and release and then equip them they will show up, then disappear again. This makes building a fleet difficult.
Topic split from original topic
 
Interface?

beta3 2013-11-14 09-48-13-95.jpg
In this interface they do not show. Leadership should be 3-4 and sailing should be 2-4. But in his picture it says he is rated for a class 5 ship which he would not be if those items were not working. I just now noticed this.
In that screenie if I click on "inventory" and look at his items, they are there and the normal compass is equipped.

So now it looks like the items are working but not showing up in this interface.
 
Could you check if in the ship to ship transfer interface the skills are shown right? They use another function there so maybe we have to change it for the normal character interface.

Edit: I'm quite sure this is the problem because it uses CheckAttribute() which doesn't give the modified skill while it should be using GetCharacterSkill() or CalcCharacterSkill()

Edit2: Do you use autoskill or not?

Edit 3: Please try this version of \PROGRAM\INTERFACE\character.c and let me know if it does anything.
 

Attachments

  • character.c
    57.8 KB · Views: 138
Last edited:
In the ship to ship interface the skills are also shown wrong.

Yes, I use autoskill.

:dance
 
Awshit. I just installed that character.c and things are all messed up. We all have way too much skills in all interfaces.
 
The SetSkillShow function already uses the GetCharacterSkill function. And that one calls CalcCharacterSkill and applies the fleet penalty.
That is for the second row of numbers on that interface. So that should already be correct.

The officer skills system is coded a bit peculiarly to prevent it from causing a too great hit on performance.
For that reason, all skill modifiers are added together and stored in ch.Skill." + skillName + ".modifier .
The only reason I could think of for skill items not showing properly is because that modifier value has not been updated.
But that is weird, because it IS being called in the IDoExit function of the itemsbox.c interface through the UpdateSkillModifiers function.

Perhaps Aconcagua could shed some light on this one. He did a lot of the work on the skills code.

Awshit. I just installed that character.c and things are all messed up. We all have way too much skills in all interfaces.
I had a look at that file, but I'm afraid it won't work. Not sure why it would influence other interfaces than the F2>Character one though.
 
could you upload the right file pieter? seems my backup got erased :S
 
Ok I'll put the old one back in.

The officers have been like this since your last fix. It used to be that when you gave them things, the ones that you don't have to equip would work but the ones you have to equip they would not, so you had to go into his inventory and manually equip it.
Now things are being equipped but not showing correctly.

Here is my old one.
 

Attachments

  • character.7z
    9.7 KB · Views: 139
So any news on this? The problem still occurs or not?
 
A fair bit of officer-related code has been changed with the new version. So perhaps it works again now?
*crossing fingers*
 
Back
Top