OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
importacdt.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESSIMPORT_ACDT_H
2 #define OPENMW_ESSIMPORT_ACDT_H
3 
4 #include <string>
5 
7 
8 #include "importscri.hpp"
9 
10 namespace ESM
11 {
12  class ESMReader;
13 }
14 
15 namespace ESSImport
16 {
17 
18  enum ACDTFlags
19  {
21  Attacked = 0x100,
22  Unknown = 0x200
23  };
24  enum ACSCFlags
25  {
26  Dead = 0x2
27  };
28 
30 #pragma pack(push)
31 #pragma pack(1)
32  struct ACDT
33  {
34  // Note, not stored at *all*:
35  // - Level changes are lost on reload, except for the player (there it's in the NPC record).
36  unsigned char mUnknown[12];
37  unsigned int mFlags;
38  float mBreathMeter; // Seconds left before drowning
39  unsigned char mUnknown2[20];
40  float mDynamic[3][2];
41  unsigned char mUnknown3[16];
42  float mAttributes[8][2];
43  float mMagicEffects[27]; // Effect attributes: https://wiki.openmw.org/index.php?title=Research:Magic#Effect_attributes
44  unsigned char mUnknown4[4];
45  unsigned int mGoldPool;
46  unsigned char mCountDown; // seen the same value as in ACSC.mCorpseClearCountdown, maybe
47  // this one is for respawning?
48  unsigned char mUnknown5[3];
49  };
50  struct ACSC
51  {
52  unsigned char mUnknown1[17];
53  unsigned char mFlags; // ACSCFlags
54  unsigned char mUnknown2[22];
55  unsigned char mCorpseClearCountdown; // hours?
56  unsigned char mUnknown3[71];
57  };
58  struct ANIS
59  {
60  unsigned char mGroupIndex;
61  unsigned char mUnknown[3];
62  float mTime;
63  };
64 #pragma pack(pop)
65 
66  struct ActorData : public ESM::CellRef
67  {
68  bool mHasACDT;
70 
71  bool mHasACSC;
73 
74  int mSkills[27][2]; // skills, base and modified
75 
76  // creature combat stats, base and modified
77  // I think these can be ignored in the conversion, because it is not possible
78  // to change them ingame
79  int mCombatStats[3][2];
80 
81  std::string mSelectedSpell;
82  std::string mSelectedEnchantItem;
83 
85 
86  bool mHasANIS;
87  ANIS mANIS; // scripted animation state
88 
89  void load(ESM::ESMReader& esm);
90  };
91 
92 }
93 
94 #endif
unsigned char mUnknown5[3]
Definition: importacdt.hpp:48
ACSC mACSC
Definition: importacdt.hpp:72
SCRI mSCRI
Definition: importacdt.hpp:84
float mBreathMeter
Definition: importacdt.hpp:38
unsigned int mGoldPool
Definition: importacdt.hpp:45
unsigned char mGroupIndex
Definition: importacdt.hpp:60
Definition: importacdt.hpp:22
Definition: importacdt.hpp:26
float mMagicEffects[27]
Definition: importacdt.hpp:43
unsigned char mUnknown[12]
Definition: importacdt.hpp:36
Definition: esmreader.hpp:21
unsigned char mUnknown2[20]
Definition: importacdt.hpp:39
float mDynamic[3][2]
Definition: importacdt.hpp:40
bool mHasANIS
Definition: importacdt.hpp:86
float mTime
Definition: importacdt.hpp:62
ACDTFlags
Definition: importacdt.hpp:18
unsigned int mFlags
Definition: importacdt.hpp:37
unsigned char mUnknown3[71]
Definition: importacdt.hpp:56
unsigned char mCountDown
Definition: importacdt.hpp:46
unsigned char mCorpseClearCountdown
Definition: importacdt.hpp:55
unsigned char mUnknown4[4]
Definition: importacdt.hpp:44
ACSCFlags
Definition: importacdt.hpp:24
unsigned char mUnknown2[22]
Definition: importacdt.hpp:54
Local variable assignments for a running script.
Definition: importscri.hpp:17
std::string mSelectedSpell
Definition: importacdt.hpp:81
int mSkills[27][2]
Definition: importacdt.hpp:74
Definition: importacdt.hpp:21
bool mHasACSC
Definition: importacdt.hpp:71
Definition: importacdt.hpp:58
int mCombatStats[3][2]
Definition: importacdt.hpp:79
Definition: importacdt.hpp:66
float mAttributes[8][2]
Definition: importacdt.hpp:42
std::string mSelectedEnchantItem
Definition: importacdt.hpp:82
unsigned char mUnknown3[16]
Definition: importacdt.hpp:41
unsigned char mUnknown[3]
Definition: importacdt.hpp:61
Definition: cellref.hpp:34
bool mHasACDT
Definition: importacdt.hpp:68
Actor data, shared by (at least) REFR and CellRef.
Definition: importacdt.hpp:32
unsigned char mFlags
Definition: importacdt.hpp:53
Definition: importacdt.hpp:20
ANIS mANIS
Definition: importacdt.hpp:87
Definition: importacdt.hpp:50
unsigned char mUnknown1[17]
Definition: importacdt.hpp:52
void load(ESM::ESMReader &esm)
Definition: importacdt.cpp:10
ACDT mACDT
Definition: importacdt.hpp:69