• 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 Master Gunfighter Perk Always Available

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
@Levis, why is the Master Gunfighter perk visible in the Jean Lafitte storyline?
Considering this init entry, I don't think it should be:
Code:
  //JRH BB6 ->
   ChrPerksList.list.GunFighter.descr = "perkGunFighter";
   ChrPerksList.list.GunFighter.condition.GunProfessional = true;
   ChrPerksList.list.GunFighter.condition.BasicDefence = true;
   ChrPerksList.list.GunFighter.condition.IronWill = true;
   ChrPerksList.list.GunFighter.disable.StorylineVar = "GUNFIGHTER_PERK";
   ChrPerksList.list.GunFighter.cost = 1; // Levis
  //<-- JRH
Additionally, we really don't want it to be there either. It should be in the Woodes Rogers storyline only.
 
Also checked in Bartolomeu storyline and it is there as well. Confirmed bug. :(
 
reply because of your changes here:
Code:
case "iRealismMode":
                if(REALISTIC_ABILITIES == 1 && iRealismMode>=sti(GetAttributeValue(arCur)))        { return false; } // PB: To allow REALISTIC_ABILITIES to override the Realism Mode
            break;
           
            case "REALISTIC_ABILITIES":
                if(REALISTIC_ABILITIES == 1 && iRealismMode == 0)                                { return true;  } // PB: To ensure Arcade Game Mode does override the Build Default
                if(REALISTIC_ABILITIES >= sti(GetAttributeValue(arCur)))                        { return false; }
            break;
           
            case "StorylineVar":
                if(sti(GetStorylineVar(FindCurrentStoryline(), GetAttributeValue(arCur))) < 1)    { return false; }
            break;

It returns on the realistic abilities already.
 
Wha? But... how?

For testing, I just replaced that section with this:
Code:
    switch(needName)
     {
/*       case "iRealismMode":
         if(REALISTIC_ABILITIES == 1 && iRealismMode>=sti(GetAttributeValue(arCur)))     { return false; } // PB: To allow REALISTIC_ABILITIES to override the Realism Mode
       break;
      
       case "REALISTIC_ABILITIES":
         if(REALISTIC_ABILITIES == 1 && iRealismMode == 0)                 { return true;  } // PB: To ensure Arcade Game Mode does override the Build Default
         if(REALISTIC_ABILITIES >= sti(GetAttributeValue(arCur)))             { return false; }
       break;*/
      
       case "StorylineVar":
         if(sti(GetStorylineVar(FindCurrentStoryline(), GetAttributeValue(arCur))) < 1)   { return false; }
       break;
     }
And it still shows up. So that is disabling all realism mode code.

Also perkGunFighter does not HAVE an iRealismMode or REALISTIC_ABILITIES attribute, so those return statements should never be executed for this perk!

Pretty sure it only showed up recently too and I changed that code months back. o_O
 
Removed something for performance sake but seems my logic was flawed. I overlooked something.
Placed the check back now. This should make sure gunman wont show up again.
 

Attachments

  • perks.c
    16.5 KB · Views: 76
Back
Top