OpenMW
Classes | Functions
anonymous_namespace{npc.cpp} Namespace Reference

Classes

struct  CustomData

Functions

const Ogre::Radian kOgrePi (Ogre::Math::PI)
const Ogre::Radian kOgrePiOverTwo (Ogre::Math::PI/Ogre::Real(2.0))
void autoCalculateAttributes (const ESM::NPC *npc, MWMechanics::CreatureStats &creatureStats)
void autoCalculateSkills (const ESM::NPC *npc, MWMechanics::NpcStats &npcStats)
 autoCalculateSkills

Function Documentation

void anonymous_namespace{npc.cpp}::autoCalculateAttributes ( const ESM::NPC npc,
MWMechanics::CreatureStats creatureStats 
)
void anonymous_namespace{npc.cpp}::autoCalculateSkills ( const ESM::NPC npc,
MWMechanics::NpcStats npcStats 
)

autoCalculateSkills

Skills are calculated with following formulae ( http://www.uesp.net/wiki/Morrowind:NPCs#Skills ):

Skills: (Level - 1) × (Majority Multiplier + Specialization Multiplier)

The Majority Multiplier is 1.0 for a Major or Minor Skill, or 0.1 for a Miscellaneous Skill.

The Specialization Multiplier is 0.5 for a Skill in the same Specialization as the class, zero for other Skills.

and by adding class, race, specialization bonus.

const Ogre::Radian anonymous_namespace{npc.cpp}::kOgrePi ( Ogre::Math::PI  )
const Ogre::Radian anonymous_namespace{npc.cpp}::kOgrePiOverTwo ( Ogre::Math::PI/Ogre::  Real2.0)