CommonLibSSE (Parapets fork)
AIProcess.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/A/ActorPackage.h"
4 #include "RE/B/BSSimpleList.h"
5 #include "RE/B/BSTArray.h"
6 
7 namespace RE
8 {
9  enum class RESET_3D_FLAGS;
10  class Actor;
11  class bhkCharacterController;
12  class HighProcess;
13  class TESForm;
14  struct HighProcessData;
15  struct MiddleHighProcessData;
16 
17  enum class PROCESS_TYPE
18  {
19  kNone = static_cast<std::underlying_type_t<PROCESS_TYPE>>(-1),
20  kHigh = 0,
21  kMiddleHigh = 1,
22  kMiddleLow = 2,
23  kLow = 3
24  };
25 
27  {
28  public:
29  // members
30  std::int32_t hourPackageEvaluated; // 0
31  };
32  static_assert(sizeof(MiddleLowProcessData) == 0x4);
33 
35  {
36  public:
37  // members
38  bool dirty; // 0
39  std::uint8_t pad1; // 1
40  std::uint16_t pad2; // 2
41  float value; // 4
42  };
43  static_assert(sizeof(CachedValueData) == 0x8);
44 
45  struct CachedValues
46  {
47  public:
48  enum class Flags
49  {
50  kNone = 0,
51  kRadius = 1 << 0,
52  kWidth = 1 << 1,
53  kLength = 1 << 2,
54  kDPS = 1 << 3,
56  kEyeLevel = 1 << 9,
57  kConditionPreventsRun = 1 << 10,
58  kForwardLength = 1 << 11,
59  kActorIsGhost = 1 << 20,
60  kHealthDamaged = 1 << 21,
61  kMagickaPointsDamaged = 1 << 22,
62  kStaminaDamaged = 1 << 23,
63  kOwnerIsNPC = 1 << 25,
64  kOwnerIsUndead = 1 << 26,
66  };
67 
68  enum class BooleanValue
69  {
70  kNone = 0,
71  kConditionPreventsRun = 1 << 0,
72  kOwnerIsNPC = 1 << 1,
73  kOwnerIsUndead = 1 << 2,
75  };
76 
77  float cachedRadius; // 00
78  float cachedWidth; // 04
79  float cachedLength; // 08
80  float cachedForwardLength; // 0C
81  float cachedDPS; // 10
82  float cachedEyeLevel; // 14
83  float cachedWalkSpeed; // 18
84  float cachedRunSpeed; // 1C
85  float cachedJogSpeed; // 20
86  float cachedFastWalkSpeed; // 24
91  };
92  static_assert(sizeof(CachedValues) == 0x60);
93 
95  {
96  public:
97  // members
98  std::uint64_t unk00; // 00
99  std::uint64_t unk08; // 08
100  std::uint64_t unk10; // 10
101  std::uint64_t unk18; // 18
102  std::uint64_t unk20; // 20
103  };
104  static_assert(sizeof(ObjectstoAcquire) == 0x28);
105 
106  class AIProcess
107  {
108  public:
109  enum class LowProcessFlags : std::uint8_t
110  {
111  kNone = 0,
112  kAlert = 1 << 3,
113  };
114 
115  struct Hands
116  {
117  enum Hand : std::uint32_t
118  {
121  kTotal
122  };
123  };
124  using Hand = Hands::Hand;
125 
126  struct Data0B8
127  {
128  public:
129  // members
130  void* unk00; // 00
131  Data0B8* unk08; // 08
132  void* unk10; // 10
133  void* unk18; // 18
134  std::uint64_t unk20; // 20
135  void* unk28; // 28
136  std::uint32_t unk30; // 30
137  std::uint32_t pad34; // 34
138  };
139  static_assert(sizeof(Data0B8) == 0x38);
140 
141  void ClearFurniture(RE::Actor* a_actor);
142  float GetCachedHeight() const;
147  [[nodiscard]] bool GetIsSummonedCreature() const noexcept;
149  bool InHighProcess() const;
150  bool InMiddleHighProcess() const;
151  bool InMiddleLowProcess() const;
152  bool InLowProcess() const;
153  bool IsArrested() const;
154  bool IsGhost() const;
155  void SetArrested(bool a_arrested);
156  void SetCachedHeight(float a_height);
158  void Update3DModel(Actor* a_actor);
159 
160  // members
165  float unk048; // 048
166  std::uint32_t unk04C; // 04C
168  std::int32_t numberItemsActivate; // 058
169  std::uint32_t pad05C; // 05C
174  float essentialDownTimer; // 090
175  float deathTime; // 094
176  float trackedDamage; // 098
177  std::uint32_t pad09C; // 09C
179  Data0B8 unk0B8; // 0B8
180  TESForm* equippedObjects[Hand::kTotal]; // 0F0
181  std::uint64_t unk100; // 100
182  std::uint64_t unk108; // 108
183  std::uint32_t unk110; // 110
185  std::uint64_t unk118; // 118
186  std::uint64_t unk120; // 120
187  std::uint64_t unk128; // 128
188  std::uint32_t unk130; // 130
189  std::uint16_t unk134; // 134
193  bool ignoringCombat; // 139
194  bool endAlarmOnActor; // 13A
195  bool escortingPlayer; // 13B
196  std::uint32_t pad13C; // 13C
197 
198  protected:
199  void Update3DModel_Impl(Actor* a_actor);
200  };
201  static_assert(sizeof(AIProcess) == 0x140);
202 }
Definition: AIProcess.h:107
CachedValues * cachedValues
Definition: AIProcess.h:167
float deathTime
Definition: AIProcess.h:175
std::uint32_t pad09C
Definition: AIProcess.h:177
float GetCachedHeight() const
bool endAlarmOnActor
Definition: AIProcess.h:194
std::int32_t numberItemsActivate
Definition: AIProcess.h:168
void SetCachedHeight(float a_height)
std::uint32_t unk130
Definition: AIProcess.h:188
TESForm * equippedObjects[Hand::kTotal]
Definition: AIProcess.h:180
TESForm * GetEquippedRightHand()
MiddleLowProcessData * middleLow
Definition: AIProcess.h:161
BSTArray< TESForm * > forms
Definition: AIProcess.h:178
stl::enumeration< PROCESS_TYPE, std::uint8_t > processLevel
Definition: AIProcess.h:191
bool ignoringCombat
Definition: AIProcess.h:193
bool GetIsSummonedCreature() const noexcept
float unk048
Definition: AIProcess.h:165
bool InMiddleHighProcess() const
ObjectstoAcquire * savedAcquireObject
Definition: AIProcess.h:173
std::uint64_t unk118
Definition: AIProcess.h:185
Data0B8 unk0B8
Definition: AIProcess.h:179
bool skippedTimeStampForPathing
Definition: AIProcess.h:192
BSSimpleList< TESObjectREFR * > genericLocations
Definition: AIProcess.h:171
bool InLowProcess() const
bool escortingPlayer
Definition: AIProcess.h:195
ActorPackage currentPackage
Definition: AIProcess.h:164
void ClearFurniture(RE::Actor *a_actor)
bool InMiddleLowProcess() const
ObjectstoAcquire * acquireObject
Definition: AIProcess.h:172
void Update3DModel_Impl(Actor *a_actor)
std::uint64_t unk128
Definition: AIProcess.h:187
BSSimpleList< ObjectstoAcquire * > objects
Definition: AIProcess.h:170
std::uint32_t unk110
Definition: AIProcess.h:183
bool IsGhost() const
bhkCharacterController * GetCharController()
std::uint64_t unk108
Definition: AIProcess.h:182
ObjectRefHandle GetOccupiedFurniture() const
RefHandle target
Definition: AIProcess.h:184
std::uint16_t unk134
Definition: AIProcess.h:189
float trackedDamage
Definition: AIProcess.h:176
std::uint32_t unk04C
Definition: AIProcess.h:166
stl::enumeration< LowProcessFlags, std::uint8_t > lowProcessFlags
Definition: AIProcess.h:190
bool InHighProcess() const
std::uint64_t unk120
Definition: AIProcess.h:186
MiddleHighProcessData * middleHigh
Definition: AIProcess.h:162
std::uint32_t pad05C
Definition: AIProcess.h:169
std::uint32_t pad13C
Definition: AIProcess.h:196
LowProcessFlags
Definition: AIProcess.h:110
void Set3DUpdateFlag(RESET_3D_FLAGS a_flags)
float essentialDownTimer
Definition: AIProcess.h:174
std::uint64_t unk100
Definition: AIProcess.h:181
HighProcessData * high
Definition: AIProcess.h:163
void Update3DModel(Actor *a_actor)
ActorHandle GetCommandingActor() const
TESForm * GetEquippedLeftHand()
bool IsArrested() const
void SetArrested(bool a_arrested)
Definition: ActorPackage.h:12
Definition: Actor.h:134
Definition: BSSimpleList.h:10
Definition: BSTArray.h:377
Definition: AIProcess.h:27
std::int32_t hourPackageEvaluated
Definition: AIProcess.h:30
Definition: TESForm.h:34
Definition: TESObjectREFR.h:105
Definition: bhkCharacterController.h:66
Definition: AbsorbEffect.h:6
RESET_3D_FLAGS
Definition: MiddleHighProcessData.h:42
PROCESS_TYPE
Definition: AIProcess.h:18
std::uint32_t RefHandle
Definition: BSCoreTypes.h:6
Definition: PCH.h:73
enumeration(Args...) -> enumeration< std::common_type_t< Args... >, std::underlying_type_t< std::common_type_t< Args... >>>
Definition: NiBinaryStream.h:94
Definition: AIProcess.h:127
void * unk28
Definition: AIProcess.h:135
std::uint32_t unk30
Definition: AIProcess.h:136
std::uint64_t unk20
Definition: AIProcess.h:134
void * unk00
Definition: AIProcess.h:130
std::uint32_t pad34
Definition: AIProcess.h:137
void * unk18
Definition: AIProcess.h:133
Data0B8 * unk08
Definition: AIProcess.h:131
void * unk10
Definition: AIProcess.h:132
Definition: AIProcess.h:116
Hand
Definition: AIProcess.h:118
@ kRight
Definition: AIProcess.h:120
@ kLeft
Definition: AIProcess.h:119
@ kTotal
Definition: AIProcess.h:121
Definition: AIProcess.h:35
bool dirty
Definition: AIProcess.h:38
std::uint16_t pad2
Definition: AIProcess.h:40
std::uint8_t pad1
Definition: AIProcess.h:39
float value
Definition: AIProcess.h:41
Definition: AIProcess.h:46
float cachedDPS
Definition: AIProcess.h:81
stl::enumeration< Flags, std::uint32_t > flags
Definition: AIProcess.h:88
float cachedRunSpeed
Definition: AIProcess.h:84
BooleanValue
Definition: AIProcess.h:69
float cachedLength
Definition: AIProcess.h:79
stl::enumeration< BooleanValue, std::uint32_t > booleanValues
Definition: AIProcess.h:87
BSTArray< CachedValueData > actorValueCache
Definition: AIProcess.h:89
float cachedJogSpeed
Definition: AIProcess.h:85
Flags
Definition: AIProcess.h:49
BSTArray< CachedValueData > permanentActorValueCache
Definition: AIProcess.h:90
float cachedEyeLevel
Definition: AIProcess.h:82
float cachedFastWalkSpeed
Definition: AIProcess.h:86
float cachedForwardLength
Definition: AIProcess.h:80
float cachedWidth
Definition: AIProcess.h:78
float cachedRadius
Definition: AIProcess.h:77
float cachedWalkSpeed
Definition: AIProcess.h:83
Definition: HighProcessData.h:52
Definition: MiddleHighProcessData.h:195
Definition: AIProcess.h:95
std::uint64_t unk20
Definition: AIProcess.h:102
std::uint64_t unk00
Definition: AIProcess.h:98
std::uint64_t unk18
Definition: AIProcess.h:101
std::uint64_t unk10
Definition: AIProcess.h:100
std::uint64_t unk08
Definition: AIProcess.h:99