Faction Requirements Not Met

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Post Reply
ghales
Posts: 41
Joined: 25 Jul 2014, 00:25

Faction Requirements Not Met

Post by ghales »

It looks like my little girl made it to Master Wizard without meeting the faction requirements. She needed one skill at 80 - that would have been Alchemy, and two at 30. But, she only had one other favourite Mage Guild skill that high - Enchant. I checked UESP Wiki and the manual, but they're not really clear that it has to be a faction favourite skill. Is this a bug, or am I missing something?
TwoSkillsOf 30.jpg
TwoSkillsOf 30.jpg (125.92 KiB) Viewed 2525 times
User avatar
Atahualpa
Posts: 1176
Joined: 09 Feb 2016, 20:03

Re: Faction Requirements Not Met

Post by Atahualpa »

Correct me if I'm wrong, but it looks like we treat the primary skill as one of the two other required skills:

See /apps/openmw/mwmechanics/npcstats.cpp, lines 387ff; the error is in line 418.

Code: Select all

bool MWMechanics::NpcStats::hasSkillsForRank (const std::string& factionId, int rank) const
{
    // [...]
    
    if (*iter<rankData.mSkill1)
        return false;

    if (skills.size() < 2)
        return true;

    return *++iter>=rankData.mSkill2;  // <= Here!
}
We should check if there are exactly two favoured skills and use the existing return statement in that case. If there are more than two favoured skills, the iterator should be advanced by 2 and then checked against "rankData.mSkill2".
ghales
Posts: 41
Joined: 25 Jul 2014, 00:25

Re: Faction Requirements Not Met

Post by ghales »

OK, since it's not just me being confused, I've opened a bug report.
User avatar
Atahualpa
Posts: 1176
Joined: 09 Feb 2016, 20:03

Re: Faction Requirements Not Met

Post by Atahualpa »

For reference: Issue #5499.
Post Reply