@ -11,8 +11,8 @@ namespace
void printAIPackage ( const ESM : : AIPackage & p )
{
std : : cout < < " AI Type: " < < aiTypeLabel ( p . mType )
< < " (" < < Misc : : StringUtils : : format ( " 0x%08X " , p . mType ) < < " ) " < < std : : endl ;
std : : cout < < " AI Type: " < < aiTypeLabel ( p . mType ) < < " ( " < < Misc : : StringUtils : : format ( " 0x%08X " , p . mType )
< < " ) " < < std : : endl ;
if ( p . mType = = ESM : : AI_Wander )
{
std : : cout < < " Distance: " < < p . mWander . mDistance < < std : : endl ;
@ -28,14 +28,14 @@ void printAIPackage(const ESM::AIPackage& p)
}
else if ( p . mType = = ESM : : AI_Travel )
{
std : : cout < < " Travel Coordinates: ( " < < p . mTravel . mX < < " , "
< < p . mTravel . mY < < " , " < < p . mTravel . mZ < < " ) " < < std : : endl ;
std : : cout < < " Travel Coordinates: ( " < < p . mTravel . mX < < " , " < < p . mTravel . mY < < " , " < < p . mTravel . mZ
< < " ) " < < std : : endl ;
std : : cout < < " Should repeat: " < < static_cast < bool > ( p . mTravel . mShouldRepeat ! = 0 ) < < std : : endl ;
}
else if ( p . mType = = ESM : : AI_Follow | | p . mType = = ESM : : AI_Escort )
{
std : : cout < < " Follow Coordinates: ( " < < p . mTarget . mX < < " , "
< < p . mTarget . mY < < " , " < < p . mTarget . mZ < < " ) " < < std : : endl ;
std : : cout < < " Follow Coordinates: ( " < < p . mTarget . mX < < " , " < < p . mTarget . mY < < " , " < < p . mTarget . mZ
< < " ) " < < std : : endl ;
std : : cout < < " Duration: " < < p . mTarget . mDuration < < std : : endl ;
std : : cout < < " Target ID: " < < p . mTarget . mId . toString ( ) < < std : : endl ;
std : : cout < < " Should repeat: " < < static_cast < bool > ( p . mTarget . mShouldRepeat ! = 0 ) < < std : : endl ;
@ -45,7 +45,8 @@ void printAIPackage(const ESM::AIPackage& p)
std : : cout < < " Name: " < < p . mActivate . mName . toString ( ) < < std : : endl ;
std : : cout < < " Should repeat: " < < static_cast < bool > ( p . mActivate . mShouldRepeat ! = 0 ) < < std : : endl ;
}
else {
else
{
std : : cout < < " BadPackage: " < < Misc : : StringUtils : : format ( " 0x%08X " , p . mType ) < < std : : endl ;
}
@ -76,29 +77,64 @@ std::string ruleString(const ESM::DialInfo::SelectStruct& ss)
func_str = std : : string ( ruleFunction ( func ) ) ;
break ;
case ' 2 ' :
if ( indicator = = ' s ' ) type_str = " Global short " ;
else if ( indicator = = ' l ' ) type_str = " Global long " ;
else if ( indicator = = ' f ' ) type_str = " Global float " ;
if ( indicator = = ' s ' )
type_str = " Global short " ;
else if ( indicator = = ' l ' )
type_str = " Global long " ;
else if ( indicator = = ' f ' )
type_str = " Global float " ;
break ;
case ' 3 ' :
if ( indicator = = ' s ' ) type_str = " Local short " ;
else if ( indicator = = ' l ' ) type_str = " Local long " ;
else if ( indicator = = ' f ' ) type_str = " Local float " ;
if ( indicator = = ' s ' )
type_str = " Local short " ;
else if ( indicator = = ' l ' )
type_str = " Local long " ;
else if ( indicator = = ' f ' )
type_str = " Local float " ;
break ;
case ' 4 ' :
if ( indicator = = ' J ' )
type_str = " Journal " ;
break ;
case ' 5 ' :
if ( indicator = = ' I ' )
type_str = " Item type " ;
break ;
case ' 6 ' :
if ( indicator = = ' D ' )
type_str = " NPC Dead " ;
break ;
case ' 7 ' :
if ( indicator = = ' X ' )
type_str = " Not ID " ;
break ;
case ' 8 ' :
if ( indicator = = ' F ' )
type_str = " Not Faction " ;
break ;
case ' 9 ' :
if ( indicator = = ' C ' )
type_str = " Not Class " ;
break ;
case ' A ' :
if ( indicator = = ' R ' )
type_str = " Not Race " ;
break ;
case ' B ' :
if ( indicator = = ' L ' )
type_str = " Not Cell " ;
break ;
case ' C ' :
if ( indicator = = ' s ' )
type_str = " Not Local " ;
break ;
default :
break ;
case ' 4 ' : if ( indicator = = ' J ' ) type_str = " Journal " ; break ;
case ' 5 ' : if ( indicator = = ' I ' ) type_str = " Item type " ; break ;
case ' 6 ' : if ( indicator = = ' D ' ) type_str = " NPC Dead " ; break ;
case ' 7 ' : if ( indicator = = ' X ' ) type_str = " Not ID " ; break ;
case ' 8 ' : if ( indicator = = ' F ' ) type_str = " Not Faction " ; break ;
case ' 9 ' : if ( indicator = = ' C ' ) type_str = " Not Class " ; break ;
case ' A ' : if ( indicator = = ' R ' ) type_str = " Not Race " ; break ;
case ' B ' : if ( indicator = = ' L ' ) type_str = " Not Cell " ; break ;
case ' C ' : if ( indicator = = ' s ' ) type_str = " Not Local " ; break ;
default : break ;
}
// Append the variable name to the function string if any.
if ( type ! = ' 1 ' ) func_str = rule . substr ( 5 ) ;
if ( type ! = ' 1 ' )
func_str = rule . substr ( 5 ) ;
// In the previous switch, we assumed that the second char was X
// for all types not qual to one. If this wasn't true, go back to
@ -110,19 +146,33 @@ std::string ruleString(const ESM::DialInfo::SelectStruct& ss)
std : : string oper_str = " ?? " ;
switch ( oper )
{
case ' 0 ' : oper_str = " == " ; break ;
case ' 1 ' : oper_str = " != " ; break ;
case ' 2 ' : oper_str = " > " ; break ;
case ' 3 ' : oper_str = " >= " ; break ;
case ' 4 ' : oper_str = " < " ; break ;
case ' 5 ' : oper_str = " <= " ; break ;
default : break ;
case ' 0 ' :
oper_str = " == " ;
break ;
case ' 1 ' :
oper_str = " != " ;
break ;
case ' 2 ' :
oper_str = " > " ;
break ;
case ' 3 ' :
oper_str = " >= " ;
break ;
case ' 4 ' :
oper_str = " < " ;
break ;
case ' 5 ' :
oper_str = " <= " ;
break ;
default :
break ;
}
std : : ostringstream stream ;
stream < < ss . mValue ;
std : : string result = Misc : : StringUtils : : format ( " %-12s %-32s %2s %s " , type_str , func_str , oper_str , stream . str ( ) ) ;
std : : string result
= Misc : : StringUtils : : format ( " %-12s %-32s %2s %s " , type_str , func_str , oper_str , stream . str ( ) ) ;
return result ;
}
@ -131,16 +181,15 @@ void printEffectList(const ESM::EffectList& effects)
int i = 0 ;
for ( const ESM : : ENAMstruct & effect : effects . mList )
{
std : : cout < < " Effect[ " < < i < < " ]: " < < magicEffectLabel ( effect . mEffectID )
< < " (" < < effect . mEffectID < < " ) " < < std : : endl ;
std : : cout < < " Effect[ " < < i < < " ]: " < < magicEffectLabel ( effect . mEffectID ) < < " ( " < < effect . mEffectID
< < " ) " < < std : : endl ;
if ( effect . mSkill ! = - 1 )
std : : cout < < " Skill: " < < skillLabel ( effect . mSkill )
< < " (" < < ( int ) effect . mSkill < < " ) " < < std : : endl ;
std : : cout < < " Skill: " < < skillLabel ( effect . mSkill ) < < " ( " < < ( int ) effect . mSkill < < " ) "
< < std : : endl ;
if ( effect . mAttribute ! = - 1 )
std : : cout < < " Attribute: " < < attributeLabel ( effect . mAttribute )
< < " ( " < < ( int ) effect . mAttribute < < " ) " < < std : : endl ;
std : : cout < < " Range: " < < rangeTypeLabel ( effect . mRange )
< < " ( " < < effect . mRange < < " ) " < < std : : endl ;
std : : cout < < " Attribute: " < < attributeLabel ( effect . mAttribute ) < < " ( " < < ( int ) effect . mAttribute
< < " ) " < < std : : endl ;
std : : cout < < " Range: " < < rangeTypeLabel ( effect . mRange ) < < " ( " < < effect . mRange < < " ) " < < std : : endl ;
// Area is always zero if range type is "Self"
if ( effect . mRange ! = ESM : : RT_Self )
std : : cout < < " Area: " < < effect . mArea < < std : : endl ;
@ -154,12 +203,10 @@ void printTransport(const std::vector<ESM::Transport::Dest>& transport)
{
for ( const ESM : : Transport : : Dest & dest : transport )
{
std : : cout < < " Destination Position: "
< < Misc : : StringUtils : : format ( " %12.3f " , dest . mPos . pos [ 0 ] ) < < " , "
std : : cout < < " Destination Position: " < < Misc : : StringUtils : : format ( " %12.3f " , dest . mPos . pos [ 0 ] ) < < " , "
< < Misc : : StringUtils : : format ( " %12.3f " , dest . mPos . pos [ 1 ] ) < < " , "
< < Misc : : StringUtils : : format ( " %12.3f " , dest . mPos . pos [ 2 ] ) < < " ) " < < std : : endl ;
std : : cout < < " Destination Rotation: "
< < Misc : : StringUtils : : format ( " %9.6f " , dest . mPos . rot [ 0 ] ) < < " , "
std : : cout < < " Destination Rotation: " < < Misc : : StringUtils : : format ( " %9.6f " , dest . mPos . rot [ 0 ] ) < < " , "
< < Misc : : StringUtils : : format ( " %9.6f " , dest . mPos . rot [ 1 ] ) < < " , "
< < Misc : : StringUtils : : format ( " %9.6f " , dest . mPos . rot [ 2 ] ) < < " ) " < < std : : endl ;
if ( ! dest . mCellName . empty ( ) )
@ -169,7 +216,8 @@ void printTransport(const std::vector<ESM::Transport::Dest>& transport)
}
namespace EsmTool {
namespace EsmTool
{
std : : unique_ptr < RecordBase > RecordBase : : create ( const ESM : : NAME type )
{
@ -431,8 +479,7 @@ void Record<ESM::Armor>::print()
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
if ( ! mData . mEnchant . empty ( ) )
std : : cout < < " Enchantment: " < < mData . mEnchant < < std : : endl ;
std : : cout < < " Type: " < < armorTypeLabel ( mData . mData . mType )
< < " ( " < < mData . mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Type: " < < armorTypeLabel ( mData . mData . mType ) < < " ( " < < mData . mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight < < std : : endl ;
std : : cout < < " Value: " < < mData . mData . mValue < < std : : endl ;
std : : cout < < " Health: " < < mData . mData . mHealth < < std : : endl ;
@ -440,8 +487,7 @@ void Record<ESM::Armor>::print()
std : : cout < < " Enchantment Points: " < < mData . mData . mEnchant < < std : : endl ;
for ( const ESM : : PartReference & part : mData . mParts . mParts )
{
std : : cout < < " Body Part: " < < bodyPartLabel ( part . mPart )
< < " ( " < < ( int ) ( part . mPart ) < < " ) " < < std : : endl ;
std : : cout < < " Body Part: " < < bodyPartLabel ( part . mPart ) < < " ( " < < ( int ) ( part . mPart ) < < " ) " < < std : : endl ;
std : : cout < < " Male Name: " < < part . mMale < < std : : endl ;
if ( ! part . mFemale . empty ( ) )
std : : cout < < " Female Name: " < < part . mFemale < < std : : endl ;
@ -457,8 +503,8 @@ void Record<ESM::Apparatus>::print()
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
std : : cout < < " Type: " < < apparatusTypeLabel ( mData . mData . mType )
< < " (" < < mData . mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Type: " < < apparatusTypeLabel ( mData . mData . mType ) < < " ( " < < mData . mData . mType < < " ) "
< < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight < < std : : endl ;
std : : cout < < " Value: " < < mData . mData . mValue < < std : : endl ;
std : : cout < < " Quality: " < < mData . mData . mQuality < < std : : endl ;
@ -470,11 +516,11 @@ void Record<ESM::BodyPart>::print()
{
std : : cout < < " Race: " < < mData . mRace < < std : : endl ;
std : : cout < < " Model: " < < mData . mModel < < std : : endl ;
std : : cout < < " Type: " < < meshTypeLabel ( mData . mData . mType )
< < " (" < < ( int ) mData . mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Type: " < < meshTypeLabel ( mData . mData . mType ) < < " ( " < < ( int ) mData . mData . mType < < " ) "
< < std : : endl ;
std : : cout < < " Flags: " < < bodyPartFlags ( mData . mData . mFlags ) < < std : : endl ;
std : : cout < < " Part: " < < meshPartLabel ( mData . mData . mPart )
< < " (" < < ( int ) mData . mData . mPart < < " ) " < < std : : endl ;
std : : cout < < " Part: " < < meshPartLabel ( mData . mData . mPart ) < < " ( " < < ( int ) mData . mData . mPart < < " ) "
< < std : : endl ;
std : : cout < < " Vampire: " < < ( int ) mData . mData . mVampire < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -529,11 +575,10 @@ void Record<ESM::Cell>::print()
std : : cout < < " Region: " < < mData . mRegion < < std : : endl ;
std : : cout < < " Flags: " < < cellFlags ( mData . mData . mFlags ) < < std : : endl ;
std : : cout < < " Coordinates: " < < " ( " < < mData . getGridX ( ) < < " , "
< < mData . getGridY ( ) < < " ) " < < std : : endl ;
std : : cout < < " Coordinates: "
< < " ( " < < mData . getGridX ( ) < < " , " < < mData . getGridY ( ) < < " ) " < < std : : endl ;
if ( mData . mData . mFlags & ESM : : Cell : : Interior & &
! ( mData . mData . mFlags & ESM : : Cell : : QuasiEx ) )
if ( mData . mData . mFlags & ESM : : Cell : : Interior & & ! ( mData . mData . mFlags & ESM : : Cell : : QuasiEx ) )
{
if ( mData . hasAmbient ( ) )
{
@ -554,7 +599,6 @@ void Record<ESM::Cell>::print()
std : : cout < < " Water Level Int: " < < mData . mWaterInt < < std : : endl ;
std : : cout < < " RefId counter: " < < mData . mRefNumCounter < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
template < >
@ -564,18 +608,18 @@ void Record<ESM::Class>::print()
std : : cout < < " Description: " < < mData . mDescription < < std : : endl ;
std : : cout < < " Playable: " < < mData . mData . mIsPlayable < < std : : endl ;
std : : cout < < " AutoCalc: " < < mData . mData . mCalc < < std : : endl ;
std : : cout < < " Attribute1: " < < attributeLabel ( mData . mData . mAttribute [ 0 ] )
< < " (" < < mData . mData . mAttribute [ 0 ] < < " ) " < < std : : endl ;
std : : cout < < " Attribute2: " < < attributeLabel ( mData . mData . mAttribute [ 1 ] )
< < " (" < < mData . mData . mAttribute [ 1 ] < < " ) " < < std : : endl ;
std : : cout < < " Specialization: " < < specializationLabel ( mData . mData . mSpecialization )
< < " ( " < < mData . mData . mSpecialization < < " ) " < < std : : endl ;
std : : cout < < " Attribute1: " < < attributeLabel ( mData . mData . mAttribute [ 0 ] ) < < " ( " < < mData . mData . mAttribute [ 0 ]
< < " ) " < < std : : endl ;
std : : cout < < " Attribute2: " < < attributeLabel ( mData . mData . mAttribute [ 1 ] ) < < " ( " < < mData . mData . mAttribute [ 1 ]
< < " ) " < < std : : endl ;
std : : cout < < " Specialization: " < < specializationLabel ( mData . mData . mSpecialization ) < < " ( "
< < mData . mData . mSpecialization < < " ) " < < std : : endl ;
for ( int i = 0 ; i ! = 5 ; i + + )
std : : cout < < " Minor Skill: " < < skillLabel ( mData . mData . mSkills [ i ] [ 0 ] )
< < " (" < < mData . mData . mSkills [ i ] [ 0 ] < < " ) " < < std : : endl ;
std : : cout < < " Minor Skill: " < < skillLabel ( mData . mData . mSkills [ i ] [ 0 ] ) < < " ( " < < mData . mData . mSkills [ i ] [ 0 ]
< < " ) " < < std : : endl ;
for ( int i = 0 ; i ! = 5 ; i + + )
std : : cout < < " Major Skill: " < < skillLabel ( mData . mData . mSkills [ i ] [ 1 ] )
< < " (" < < mData . mData . mSkills [ i ] [ 1 ] < < " ) " < < std : : endl ;
std : : cout < < " Major Skill: " < < skillLabel ( mData . mData . mSkills [ i ] [ 1 ] ) < < " ( " < < mData . mData . mSkills [ i ] [ 1 ]
< < " ) " < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -589,15 +633,14 @@ void Record<ESM::Clothing>::print()
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
if ( ! mData . mEnchant . empty ( ) )
std : : cout < < " Enchantment: " < < mData . mEnchant < < std : : endl ;
std : : cout < < " Type: " < < clothingTypeLabel ( mData . mData . mType )
< < " (" < < mData . mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Type: " < < clothingTypeLabel ( mData . mData . mType ) < < " ( " < < mData . mData . mType < < " ) "
< < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight < < std : : endl ;
std : : cout < < " Value: " < < mData . mData . mValue < < std : : endl ;
std : : cout < < " Enchantment Points: " < < mData . mData . mEnchant < < std : : endl ;
for ( const ESM : : PartReference & part : mData . mParts . mParts )
{
std : : cout < < " Body Part: " < < bodyPartLabel ( part . mPart )
< < " ( " < < ( int ) ( part . mPart ) < < " ) " < < std : : endl ;
std : : cout < < " Body Part: " < < bodyPartLabel ( part . mPart ) < < " ( " < < ( int ) ( part . mPart ) < < " ) " < < std : : endl ;
std : : cout < < " Male Name: " < < part . mMale < < std : : endl ;
if ( ! part . mFemale . empty ( ) )
std : : cout < < " Female Name: " < < part . mFemale < < std : : endl ;
@ -631,8 +674,8 @@ void Record<ESM::Creature>::print()
std : : cout < < " Original: " < < mData . mOriginal < < std : : endl ;
std : : cout < < " Scale: " < < mData . mScale < < std : : endl ;
std : : cout < < " Type: " < < creatureTypeLabel ( mData . mData . mType )
< < " (" < < mData . mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Type: " < < creatureTypeLabel ( mData . mData . mType ) < < " ( " < < mData . mData . mType < < " ) "
< < std : : endl ;
std : : cout < < " Level: " < < mData . mData . mLevel < < std : : endl ;
std : : cout < < " Attributes: " < < std : : endl ;
@ -652,12 +695,9 @@ void Record<ESM::Creature>::print()
std : : cout < < " Combat: " < < mData . mData . mCombat < < std : : endl ;
std : : cout < < " Magic: " < < mData . mData . mMagic < < std : : endl ;
std : : cout < < " Stealth: " < < mData . mData . mStealth < < std : : endl ;
std : : cout < < " Attack1: " < < mData . mData . mAttack [ 0 ]
< < " - " < < mData . mData . mAttack [ 1 ] < < std : : endl ;
std : : cout < < " Attack2: " < < mData . mData . mAttack [ 2 ]
< < " - " < < mData . mData . mAttack [ 3 ] < < std : : endl ;
std : : cout < < " Attack3: " < < mData . mData . mAttack [ 4 ]
< < " - " < < mData . mData . mAttack [ 5 ] < < std : : endl ;
std : : cout < < " Attack1: " < < mData . mData . mAttack [ 0 ] < < " - " < < mData . mData . mAttack [ 1 ] < < std : : endl ;
std : : cout < < " Attack2: " < < mData . mData . mAttack [ 2 ] < < " - " < < mData . mData . mAttack [ 3 ] < < std : : endl ;
std : : cout < < " Attack3: " < < mData . mData . mAttack [ 4 ] < < " - " < < mData . mData . mAttack [ 5 ] < < std : : endl ;
std : : cout < < " Gold: " < < mData . mData . mGold < < std : : endl ;
for ( const ESM : : ContItem & item : mData . mInventory . mList )
@ -687,8 +727,7 @@ void Record<ESM::Creature>::print()
template < >
void Record < ESM : : Dialogue > : : print ( )
{
std : : cout < < " Type: " < < dialogTypeLabel ( mData . mType )
< < " ( " < < ( int ) mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Type: " < < dialogTypeLabel ( mData . mType ) < < " ( " < < ( int ) mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
// Sadly, there are no DialInfos, because the loader dumps as it
// loads, rather than loading and then dumping. :-( Anyone mind if
@ -711,8 +750,7 @@ void Record<ESM::Door>::print()
template < >
void Record < ESM : : Enchantment > : : print ( )
{
std : : cout < < " Type: " < < enchantTypeLabel ( mData . mData . mType )
< < " ( " < < mData . mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Type: " < < enchantTypeLabel ( mData . mData . mType ) < < " ( " < < mData . mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Cost: " < < mData . mData . mCost < < std : : endl ;
std : : cout < < " Charge: " < < mData . mData . mCharge < < std : : endl ;
std : : cout < < " Flags: " < < enchantmentFlags ( mData . mData . mFlags ) < < std : : endl ;
@ -725,10 +763,10 @@ void Record<ESM::Faction>::print()
{
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Hidden: " < < mData . mData . mIsHidden < < std : : endl ;
std : : cout < < " Attribute1: " < < attributeLabel ( mData . mData . mAttribute [ 0 ] )
< < " (" < < mData . mData . mAttribute [ 0 ] < < " ) " < < std : : endl ;
std : : cout < < " Attribute2: " < < attributeLabel ( mData . mData . mAttribute [ 1 ] )
< < " (" < < mData . mData . mAttribute [ 1 ] < < " ) " < < std : : endl ;
std : : cout < < " Attribute1: " < < attributeLabel ( mData . mData . mAttribute [ 0 ] ) < < " ( " < < mData . mData . mAttribute [ 0 ]
< < " ) " < < std : : endl ;
std : : cout < < " Attribute2: " < < attributeLabel ( mData . mData . mAttribute [ 1 ] ) < < " ( " < < mData . mData . mAttribute [ 1 ]
< < " ) " < < std : : endl ;
for ( int skill : mData . mData . mSkills )
if ( skill ! = - 1 )
std : : cout < < " Skill: " < < skillLabel ( skill ) < < " ( " < < skill < < " ) " < < std : : endl ;
@ -736,16 +774,11 @@ void Record<ESM::Faction>::print()
if ( ! mData . mRanks [ i ] . empty ( ) )
{
std : : cout < < " Rank: " < < mData . mRanks [ i ] < < std : : endl ;
std : : cout < < " Attribute1 Requirement: "
< < mData . mData . mRankData [ i ] . mAttribute1 < < std : : endl ;
std : : cout < < " Attribute2 Requirement: "
< < mData . mData . mRankData [ i ] . mAttribute2 < < std : : endl ;
std : : cout < < " One Skill at Level: "
< < mData . mData . mRankData [ i ] . mPrimarySkill < < std : : endl ;
std : : cout < < " Two Skills at Level: "
< < mData . mData . mRankData [ i ] . mFavouredSkill < < std : : endl ;
std : : cout < < " Faction Reaction: "
< < mData . mData . mRankData [ i ] . mFactReaction < < std : : endl ;
std : : cout < < " Attribute1 Requirement: " < < mData . mData . mRankData [ i ] . mAttribute1 < < std : : endl ;
std : : cout < < " Attribute2 Requirement: " < < mData . mData . mRankData [ i ] . mAttribute2 < < std : : endl ;
std : : cout < < " One Skill at Level: " < < mData . mData . mRankData [ i ] . mPrimarySkill < < std : : endl ;
std : : cout < < " Two Skills at Level: " < < mData . mData . mRankData [ i ] . mFavouredSkill < < std : : endl ;
std : : cout < < " Faction Reaction: " < < mData . mData . mRankData [ i ] . mFactReaction < < std : : endl ;
}
for ( const auto & reaction : mData . mReactions )
std : : cout < < " Reaction: " < < reaction . second < < " = " < < reaction . first < < std : : endl ;
@ -799,9 +832,8 @@ void Record<ESM::DialInfo>::print()
if ( ! mData . mSound . empty ( ) )
std : : cout < < " Sound File: " < < mData . mSound < < std : : endl ;
std : : cout < < " Quest Status: " < < questStatusLabel ( mData . mQuestStatus )
< < " ( " < < mData . mQuestStatus < < " ) " < < std : : endl ;
std : : cout < < " Quest Status: " < < questStatusLabel ( mData . mQuestStatus ) < < " ( " < < mData . mQuestStatus < < " ) "
< < std : : endl ;
std : : cout < < " Unknown1: " < < mData . mData . mUnknown1 < < std : : endl ;
std : : cout < < " Unknown2: " < < ( int ) mData . mData . mUnknown2 < < std : : endl ;
@ -838,13 +870,14 @@ void Record<ESM::Ingredient>::print()
for ( int i = 0 ; i ! = 4 ; i + + )
{
// A value of -1 means no effect
if ( mData . mData . mEffectID [ i ] = = - 1 ) continue ;
std : : cout < < " Effect: " < < magicEffectLabel ( mData . mData . mEffectID [ i ] )
< < " ( " < < mData . mData . mEffectID [ i ] < < " ) " < < std : : endl ;
std : : cout < < " Skill: " < < skillLabel ( mData . mData . mSkills [ i ] )
< < " ( " < < mData . mData . mSkills [ i ] < < " ) " < < std : : endl ;
std : : cout < < " Attribute: " < < attributeLabel ( mData . mData . mAttributes [ i ] )
< < " ( " < < mData . mData . mAttributes [ i ] < < " ) " < < std : : endl ;
if ( mData . mData . mEffectID [ i ] = = - 1 )
continue ;
std : : cout < < " Effect: " < < magicEffectLabel ( mData . mData . mEffectID [ i ] ) < < " ( " < < mData . mData . mEffectID [ i ]
< < " ) " < < std : : endl ;
std : : cout < < " Skill: " < < skillLabel ( mData . mData . mSkills [ i ] ) < < " ( " < < mData . mData . mSkills [ i ] < < " ) "
< < std : : endl ;
std : : cout < < " Attribute: " < < attributeLabel ( mData . mData . mAttributes [ i ] ) < < " ( "
< < mData . mData . mAttributes [ i ] < < " ) " < < std : : endl ;
}
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -874,8 +907,7 @@ void Record<ESM::CreatureLevList>::print()
std : : cout < < " Flags: " < < creatureListFlags ( mData . mFlags ) < < std : : endl ;
std : : cout < < " Number of items: " < < mData . mList . size ( ) < < std : : endl ;
for ( const ESM : : LevelledListBase : : LevelItem & item : mData . mList )
std : : cout < < " Creature: Level: " < < item . mLevel
< < " Creature: " < < item . mId < < std : : endl ;
std : : cout < < " Creature: Level: " < < item . mLevel < < " Creature: " < < item . mId < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -886,8 +918,7 @@ void Record<ESM::ItemLevList>::print()
std : : cout < < " Flags: " < < itemListFlags ( mData . mFlags ) < < std : : endl ;
std : : cout < < " Number of items: " < < mData . mList . size ( ) < < std : : endl ;
for ( const ESM : : LevelledListBase : : LevelItem & item : mData . mList )
std : : cout < < " Inventory: Level: " < < item . mLevel
< < " Item: " < < item . mId < < std : : endl ;
std : : cout < < " Inventory: Level: " < < item . mLevel < < " Item: " < < item . mId < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -969,8 +1000,7 @@ void Record<ESM::LandTexture>::print()
template < >
void Record < ESM : : MagicEffect > : : print ( )
{
std : : cout < < " Index: " < < magicEffectLabel ( mData . mIndex )
< < " ( " < < mData . mIndex < < " ) " < < std : : endl ;
std : : cout < < " Index: " < < magicEffectLabel ( mData . mIndex ) < < " ( " < < mData . mIndex < < " ) " < < std : : endl ;
std : : cout < < " Description: " < < mData . mDescription < < std : : endl ;
std : : cout < < " Icon: " < < mData . mIcon < < std : : endl ;
std : : cout < < " Flags: " < < magicEffectFlags ( mData . mData . mFlags ) < < std : : endl ;
@ -991,16 +1021,15 @@ void Record<ESM::MagicEffect>::print()
std : : cout < < " Area Static: " < < mData . mArea < < std : : endl ;
if ( ! mData . mAreaSound . empty ( ) )
std : : cout < < " Area Sound: " < < mData . mAreaSound < < std : : endl ;
std : : cout < < " School: " < < schoolLabel ( mData . mData . mSchool )
< < " (" < < mData . mData . mSchool < < " ) " < < std : : endl ;
std : : cout < < " School: " < < schoolLabel ( mData . mData . mSchool ) < < " ( " < < mData . mData . mSchool < < " ) "
< < std : : endl ;
std : : cout < < " Base Cost: " < < mData . mData . mBaseCost < < std : : endl ;
std : : cout < < " Unknown 1: " < < mData . mData . mUnknown1 < < std : : endl ;
std : : cout < < " Speed: " < < mData . mData . mSpeed < < std : : endl ;
std : : cout < < " Unknown 2: " < < mData . mData . mUnknown2 < < std : : endl ;
std : : cout < < " RGB Color: " < < " ( "
< < mData . mData . mRed < < " , "
< < mData . mData . mGreen < < " , "
< < mData . mData . mBlue < < " ) " < < std : : endl ;
std : : cout < < " RGB Color: "
< < " ( " < < mData . mData . mRed < < " , " < < mData . mData . mGreen < < " , " < < mData . mData . mBlue < < " ) "
< < std : : endl ;
}
template < >
@ -1042,7 +1071,8 @@ void Record<ESM::NPC>::print()
std : : cout < < " Rank: " < < ( int ) mData . mNpdt . mRank < < std : : endl ;
std : : cout < < " Gold: " < < mData . mNpdt . mGold < < std : : endl ;
}
else {
else
{
std : : cout < < " Level: " < < mData . mNpdt . mLevel < < std : : endl ;
std : : cout < < " Reputation: " < < ( int ) mData . mNpdt . mReputation < < std : : endl ;
std : : cout < < " Disposition: " < < ( int ) mData . mNpdt . mDisposition < < std : : endl ;
@ -1060,8 +1090,7 @@ void Record<ESM::NPC>::print()
std : : cout < < " Skills: " < < std : : endl ;
for ( int i = 0 ; i ! = ESM : : Skill : : Length ; i + + )
std : : cout < < " " < < skillLabel ( i ) < < " : "
< < ( int ) ( mData . mNpdt . mSkills [ i ] ) < < std : : endl ;
std : : cout < < " " < < skillLabel ( i ) < < " : " < < ( int ) ( mData . mNpdt . mSkills [ i ] ) < < std : : endl ;
std : : cout < < " Health: " < < mData . mNpdt . mHealth < < std : : endl ;
std : : cout < < " Magicka: " < < mData . mNpdt . mMana < < std : : endl ;
@ -1109,8 +1138,7 @@ void Record<ESM::Pathgrid>::print()
for ( const ESM : : Pathgrid : : Point & point : mData . mPoints )
{
std : : cout < < " Point[ " < < i < < " ]: " < < std : : endl ;
std : : cout < < " Coordinates: ( " < < point . mX < < " , "
< < point . mY < < " , " < < point . mZ < < " ) " < < std : : endl ;
std : : cout < < " Coordinates: ( " < < point . mX < < " , " < < point . mY < < " , " < < point . mZ < < " ) " < < std : : endl ;
std : : cout < < " Auto-Generated: " < < ( int ) point . mAutogenerated < < std : : endl ;
std : : cout < < " Connections: " < < ( int ) point . mConnectionNum < < std : : endl ;
std : : cout < < " Unknown: " < < point . mUnknown < < std : : endl ;
@ -1132,11 +1160,8 @@ void Record<ESM::Pathgrid>::print()
template < >
void Record < ESM : : Race > : : print ( )
{
static const char * sAttributeNames [ 8 ] =
{
" Strength " , " Intelligence " , " Willpower " , " Agility " ,
" Speed " , " Endurance " , " Personality " , " Luck "
} ;
static const char * sAttributeNames [ 8 ]
= { " Strength " , " Intelligence " , " Willpower " , " Agility " , " Speed " , " Endurance " , " Personality " , " Luck " } ;
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Description: " < < mData . mDescription < < std : : endl ;
@ -1149,8 +1174,8 @@ void Record<ESM::Race>::print()
std : : cout < < ( male ? " Male: " : " Female: " ) < < std : : endl ;
for ( int j = 0 ; j < 8 ; + + j )
std : : cout < < " " < < sAttributeNames [ j ] < < " : "
< < mData . mData . mAttributeValues [ j ] . getValue ( male ) < < std : : endl ;
std : : cout < < " " < < sAttributeNames [ j ] < < " : " < < mData . mData . mAttributeValues [ j ] . getValue ( male )
< < std : : endl ;
std : : cout < < " Height: " < < mData . mData . mHeight . getValue ( male ) < < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight . getValue ( male ) < < std : : endl ;
@ -1159,10 +1184,8 @@ void Record<ESM::Race>::print()
for ( int i = 0 ; i ! = 7 ; i + + )
// Not all races have 7 skills.
if ( mData . mData . mBonus [ i ] . mSkill ! = - 1 )
std : : cout < < " Skill: "
< < skillLabel ( mData . mData . mBonus [ i ] . mSkill )
< < " ( " < < mData . mData . mBonus [ i ] . mSkill < < " ) = "
< < mData . mData . mBonus [ i ] . mBonus < < std : : endl ;
std : : cout < < " Skill: " < < skillLabel ( mData . mData . mBonus [ i ] . mSkill ) < < " ( "
< < mData . mData . mBonus [ i ] . mSkill < < " ) = " < < mData . mData . mBonus [ i ] . mBonus < < std : : endl ;
for ( const std : : string & power : mData . mPowers . mList )
std : : cout < < " Power: " < < power < < std : : endl ;
@ -1230,13 +1253,12 @@ void Record<ESM::Script>::print()
template < >
void Record < ESM : : Skill > : : print ( )
{
std : : cout < < " ID: " < < skillLabel ( mData . mIndex )
< < " ( " < < mData . mIndex < < " ) " < < std : : endl ;
std : : cout < < " ID: " < < skillLabel ( mData . mIndex ) < < " ( " < < mData . mIndex < < " ) " < < std : : endl ;
std : : cout < < " Description: " < < mData . mDescription < < std : : endl ;
std : : cout < < " Governing Attribute: " < < attributeLabel ( mData . mData . mAttribute )
< < " ( " < < mData . mData . mAttribute < < " ) " < < std : : endl ;
std : : cout < < " Specialization: " < < specializationLabel ( mData . mData . mSpecialization )
< < " ( " < < mData . mData . mSpecialization < < " ) " < < std : : endl ;
std : : cout < < " Governing Attribute: " < < attributeLabel ( mData . mData . mAttribute ) < < " ( "
< < mData . mData . mAttribute < < " ) " < < std : : endl ;
std : : cout < < " Specialization: " < < specializationLabel ( mData . mData . mSpecialization ) < < " ( "
< < mData . mData . mSpecialization < < " ) " < < std : : endl ;
for ( int i = 0 ; i ! = 4 ; i + + )
std : : cout < < " UseValue[ " < < i < < " ]: " < < mData . mData . mUseValue [ i ] < < std : : endl ;
}
@ -1247,8 +1269,7 @@ void Record<ESM::SoundGenerator>::print()
if ( ! mData . mCreature . empty ( ) )
std : : cout < < " Creature: " < < mData . mCreature < < std : : endl ;
std : : cout < < " Sound: " < < mData . mSound < < std : : endl ;
std : : cout < < " Type: " < < soundTypeLabel ( mData . mType )
< < " ( " < < mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Type: " < < soundTypeLabel ( mData . mType ) < < " ( " < < mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -1258,8 +1279,7 @@ void Record<ESM::Sound>::print()
std : : cout < < " Sound: " < < mData . mSound < < std : : endl ;
std : : cout < < " Volume: " < < ( int ) mData . mData . mVolume < < std : : endl ;
if ( mData . mData . mMinRange ! = 0 & & mData . mData . mMaxRange ! = 0 )
std : : cout < < " Range: " < < ( int ) mData . mData . mMinRange < < " - "
< < ( int ) mData . mData . mMaxRange < < std : : endl ;
std : : cout < < " Range: " < < ( int ) mData . mData . mMinRange < < " - " < < ( int ) mData . mData . mMaxRange < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}
@ -1267,8 +1287,7 @@ template<>
void Record < ESM : : Spell > : : print ( )
{
std : : cout < < " Name: " < < mData . mName < < std : : endl ;
std : : cout < < " Type: " < < spellTypeLabel ( mData . mData . mType )
< < " ( " < < mData . mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Type: " < < spellTypeLabel ( mData . mData . mType ) < < " ( " < < mData . mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Flags: " < < spellFlags ( mData . mData . mFlags ) < < std : : endl ;
std : : cout < < " Cost: " < < mData . mData . mCost < < std : : endl ;
printEffectList ( mData . mEffects ) ;
@ -1303,8 +1322,7 @@ void Record<ESM::Weapon>::print()
std : : cout < < " Script: " < < mData . mScript < < std : : endl ;
if ( ! mData . mEnchant . empty ( ) )
std : : cout < < " Enchantment: " < < mData . mEnchant < < std : : endl ;
std : : cout < < " Type: " < < weaponTypeLabel ( mData . mData . mType )
< < " ( " < < mData . mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Type: " < < weaponTypeLabel ( mData . mData . mType ) < < " ( " < < mData . mData . mType < < " ) " < < std : : endl ;
std : : cout < < " Flags: " < < weaponFlags ( mData . mData . mFlags ) < < std : : endl ;
std : : cout < < " Weight: " < < mData . mData . mWeight < < std : : endl ;
std : : cout < < " Value: " < < mData . mData . mValue < < std : : endl ;
@ -1313,14 +1331,11 @@ void Record<ESM::Weapon>::print()
std : : cout < < " Reach: " < < mData . mData . mReach < < std : : endl ;
std : : cout < < " Enchantment Points: " < < mData . mData . mEnchant < < std : : endl ;
if ( mData . mData . mChop [ 0 ] ! = 0 & & mData . mData . mChop [ 1 ] ! = 0 )
std : : cout < < " Chop: " < < ( int ) mData . mData . mChop [ 0 ] < < " - "
< < ( int ) mData . mData . mChop [ 1 ] < < std : : endl ;
std : : cout < < " Chop: " < < ( int ) mData . mData . mChop [ 0 ] < < " - " < < ( int ) mData . mData . mChop [ 1 ] < < std : : endl ;
if ( mData . mData . mSlash [ 0 ] ! = 0 & & mData . mData . mSlash [ 1 ] ! = 0 )
std : : cout < < " Slash: " < < ( int ) mData . mData . mSlash [ 0 ] < < " - "
< < ( int ) mData . mData . mSlash [ 1 ] < < std : : endl ;
std : : cout < < " Slash: " < < ( int ) mData . mData . mSlash [ 0 ] < < " - " < < ( int ) mData . mData . mSlash [ 1 ] < < std : : endl ;
if ( mData . mData . mThrust [ 0 ] ! = 0 & & mData . mData . mThrust [ 1 ] ! = 0 )
std : : cout < < " Thrust: " < < ( int ) mData . mData . mThrust [ 0 ] < < " - "
< < ( int ) mData . mData . mThrust [ 1 ] < < std : : endl ;
std : : cout < < " Thrust: " < < ( int ) mData . mData . mThrust [ 0 ] < < " - " < < ( int ) mData . mData . mThrust [ 1 ] < < std : : endl ;
std : : cout < < " Deleted: " < < mIsDeleted < < std : : endl ;
}