OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
importplayer.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESSIMPORT_PLAYER_H
2 #define OPENMW_ESSIMPORT_PLAYER_H
3 
4 #include <vector>
5 #include <string>
6 
10 
11 #include "importacdt.hpp"
12 
13 namespace ESM
14 {
15  class ESMReader;
16 }
17 
18 namespace ESSImport
19 {
20 
22 struct REFR
23 {
25 
26  std::string mRefID;
29 
30  void load(ESM::ESMReader& esm);
31 };
32 
34 struct PCDT
35 {
36  int mBounty;
37  std::string mBirthsign;
38 
39  std::vector<std::string> mKnownDialogueTopics;
40 
42  {
58  };
59 
60 #pragma pack(push)
61 #pragma pack(1)
62  struct FNAM
63  {
64  unsigned char mRank;
65  unsigned char mUnknown1[3];
67  unsigned char mFlags; // 0x1: unknown, 0x2: expelled
68  unsigned char mUnknown2[3];
70  };
71 
72  struct PNAM
73  {
74  struct MarkLocation
75  {
76  float mX, mY, mZ; // worldspace position
77  float mRotZ; // Z angle in radians
78  int mCellX, mCellY; // grid coordinates; for interior cells this is always (0, 0)
79  };
80 
81  int mPlayerFlags; // controls, camera and draw state
82  unsigned int mLevelProgress;
83  float mSkillProgress[27]; // skill progress, non-uniform scaled
84  unsigned char mSkillIncreases[8]; // number of skill increases for each attribute
85  int mTelekinesisRangeBonus; // in units; seems redundant
86  float mVisionBonus; // range: <0.0, 1.0>; affected by light spells and Get/Mod/SetPCVisionBonus
87  int mDetectKeyMagnitude; // seems redundant
88  int mDetectEnchantmentMagnitude; // seems redundant
89  int mDetectAnimalMagnitude; // seems redundant
91  unsigned char mUnknown3[40];
92  unsigned char mSpecIncreases[3]; // number of skill increases for each specialization
93  unsigned char mUnknown4;
94  };
95 
96  struct ENAM
97  {
98  int mCellX;
99  int mCellY;
100  };
101 
102  struct AADT // 44 bytes
103  {
104  int animGroupIndex; // See convertANIS() for the mapping.
105  unsigned char mUnknown5[40];
106  };
107 #pragma pack(pop)
108 
109  std::vector<FNAM> mFactions;
111 
112  bool mHasMark;
113  std::string mMNAM; // mark cell name; can also be sDefaultCellname or region name
114 
115  bool mHasENAM;
116  ENAM mENAM; // last exterior cell
117 
118  bool mHasAADT;
120 
121  void load(ESM::ESMReader& esm);
122 };
123 
124 }
125 
126 #endif
unsigned char mRank
Definition: importplayer.hpp:64
ESM::NAME32 mFactionName
Definition: importplayer.hpp:69
PlayerFlags
Definition: importplayer.hpp:41
bool mHasMark
Definition: importplayer.hpp:112
Definition: importplayer.hpp:44
unsigned char mSkillIncreases[8]
Definition: importplayer.hpp:84
int mCellX
Definition: importplayer.hpp:98
Definition: importplayer.hpp:62
std::string mRefID
Definition: importplayer.hpp:26
Definition: esmreader.hpp:21
Definition: importplayer.hpp:72
void load(ESM::ESMReader &esm)
Definition: importplayer.cpp:19
unsigned char mUnknown1[3]
Definition: importplayer.hpp:65
int animGroupIndex
Definition: importplayer.hpp:104
int mDetectKeyMagnitude
Definition: importplayer.hpp:87
int mBounty
Definition: importplayer.hpp:36
ActorData mActorData
Definition: importplayer.hpp:24
unsigned char mUnknown3[40]
Definition: importplayer.hpp:91
std::vector< std::string > mKnownDialogueTopics
Definition: importplayer.hpp:39
float mY
Definition: importplayer.hpp:76
int mCellY
Definition: importplayer.hpp:99
Definition: cellref.hpp:14
Definition: importplayer.hpp:48
bool mHasENAM
Definition: importplayer.hpp:115
bool mHasAADT
Definition: importplayer.hpp:118
Definition: importacdt.hpp:66
float mRotZ
Definition: importplayer.hpp:77
Definition: importplayer.hpp:102
unsigned char mUnknown5[40]
Definition: importplayer.hpp:105
int mTelekinesisRangeBonus
Definition: importplayer.hpp:85
std::string mMNAM
Definition: importplayer.hpp:113
int mPlayerFlags
Definition: importplayer.hpp:81
float mX
Definition: importplayer.hpp:76
int mReputation
Definition: importplayer.hpp:66
PNAM mPNAM
Definition: importplayer.hpp:110
int mCellY
Definition: importplayer.hpp:78
unsigned char mUnknown4
Definition: importplayer.hpp:93
AADT mAADT
Definition: importplayer.hpp:119
Definition: importplayer.hpp:55
ENAM mENAM
Definition: importplayer.hpp:116
Definition: importplayer.hpp:74
void load(ESM::ESMReader &esm)
Definition: importplayer.cpp:8
Definition: importplayer.hpp:49
Definition: importplayer.hpp:46
unsigned char mSpecIncreases[3]
Definition: importplayer.hpp:92
Definition: importplayer.hpp:51
float mZ
Definition: importplayer.hpp:76
unsigned char mUnknown2[3]
Definition: importplayer.hpp:68
float mVisionBonus
Definition: importplayer.hpp:86
int mDetectEnchantmentMagnitude
Definition: importplayer.hpp:88
Definition: defs.hpp:38
Definition: importplayer.hpp:50
int mDetectAnimalMagnitude
Definition: importplayer.hpp:89
Definition: importplayer.hpp:96
std::vector< FNAM > mFactions
Definition: importplayer.hpp:109
Player-agnostic player data.
Definition: importplayer.hpp:22
ESM::Position mPos
Definition: importplayer.hpp:27
MarkLocation mMarkLocation
Definition: importplayer.hpp:90
Definition: importplayer.hpp:47
int mCellX
Definition: importplayer.hpp:78
ESM::RefNum mRefNum
Definition: importplayer.hpp:28
Other player data.
Definition: importplayer.hpp:34
unsigned char mFlags
Definition: importplayer.hpp:67
Definition: importplayer.hpp:45
float mSkillProgress[27]
Definition: importplayer.hpp:83
unsigned int mLevelProgress
Definition: importplayer.hpp:82
std::string mBirthsign
Definition: importplayer.hpp:37