• 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 Levelling: "Perks" Without Type

Yep, I just confirmed this WAS my doing. Sorry 'bout that. :facepalm

I'm changing that section of code back to:
Code:
//returns fame. If iNation == -1, interprets this as getting fame for general purposes (i.e. crew)
float GetFame(ref pchar, int iNation)
{
   bool crew = (iNation == -1);
   int rank = sti(pchar.rank);
   int i;
   int PerkIron;
   int PerkChar;
   int PerkWC;
   int skillLead;
   int skillLuck;
   float nrank = 1.0;
   int numnat;
   if(crew)
   {
     PerkIron  = GetOfficersPerkUsing(pchar,"IronWill");
     //PerkChar  = GetOfficersPerkUsing(pchar,"Charisma"); //to be added, prereq iron will //Removed by Levis untill is't well done
     //PerkWC  = GetOfficersPerkUsing(pchar,"WitCharm"); //to be added, prereq charisma //Removed by Levis untill is't well done
     skillLead = GetShipSkill(pchar,SKILL_LEADERSHIP);
     skillLuck = GetShipSkill(pchar,SKILL_SNEAK);
     nrank = 0;
     numnat = 0;
     for(i = 0; i < NATIONS_QUANTITY; i++)
     {
       if(GetRank(pchar, i))
       {
         numnat++;
         nrank += makefloat(GetRank(pchar, i))/24.0;
       }
     }
     if(numnat>0) { nrank = (nrank / makefloat(numnat)) * sqrt(numnat); }
     else { nrank = 0; }
   }
   else
   {
     PerkIron  = CheckPerkForSingleCharacter(pchar,"IronWill");
     //PerkChar  = CheckPerkForSingleCharacter(pchar,"Charisma"); //to be added, prereq iron will //Removed by Levis untill is't well done
     //PerkWC  = CheckPerkForSingleCharacter(pchar,"WitCharm"); //to be added, prereq charisma //Removed by Levis untill is't well done
     skillLead = CalcCharacterSkill(pchar,SKILL_LEADERSHIP);
     skillLuck = CalcCharacterSkill(pchar,SKILL_SNEAK);
That is in line with how it used to work until Beta 3.4 as well.
I'll probably end up changing all this some time; but after the Beta 4 public release.
 
And @Levis: Is GetOfficersPerkUsing truly the correct one to use there?
I see a recent change of yours dealing with CheckOfficersPerk instead. What's the difference?
 
And @Levis: Is GetOfficersPerkUsing truly the correct one to use there?
I see a recent change of yours dealing with CheckOfficersPerk instead. What's the difference?
No difference at all. They redirect to each ohter.
 
:rofl :rofl :rofl

Should I do a "search and replace" so only one of them is used?
Later maybe, for now just let it be :p.
But if you look at perks.c in the perks folder you will see there are multiple functions now all redirecting to one function which governs all. So if you feel like it you could tackle them. but for now it works fine. I had planned to only do that after the public release so if something breaks we can then look at it closely.
 
Back
Top