CommonLibSSE NG
Loading...
Searching...
No Matches
AIProcess.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/A/ActorPackage.h"
5#include "RE/B/BSTArray.h"
6#include "RE/B/BSTList.h"
8
9namespace RE
10{
11 enum class RESET_3D_FLAGS;
12 class Actor;
13 class bhkCharacterController;
14 class BipedAnim;
15 class HighProcess;
16 class NiAVObject;
17 class NiPoint3;
18 class TESForm;
19 class TESShout;
20 struct HighProcessData;
21 struct MiddleHighProcessData;
22
23 enum class PROCESS_TYPE
24 {
25 kNone = static_cast<std::underlying_type_t<PROCESS_TYPE>>(-1),
26 kHigh = 0,
27 kMiddleHigh = 1,
28 kMiddleLow = 2,
29 kLow = 3
30 };
31
33 {
34 public:
35 // members
36 std::int32_t hourPackageEvaluated; // 0
37 };
38 static_assert(sizeof(MiddleLowProcessData) == 0x4);
39
41 {
42 public:
43 // members
44 bool dirty; // 0
45 std::uint8_t pad1; // 1
46 std::uint16_t pad2; // 2
47 float value; // 4
48 };
49 static_assert(sizeof(CachedValueData) == 0x8);
50
52 {
53 public:
54 enum class Flags
55 {
56 kNone = 0,
57 kRadius = 1 << 0,
58 kWidth = 1 << 1,
59 kLength = 1 << 2,
60 kDPS = 1 << 3,
62 kEyeLevel = 1 << 9,
63 kConditionPreventsRun = 1 << 10,
64 kForwardLength = 1 << 11,
65 kActorIsGhost = 1 << 20,
66 kHealthDamaged = 1 << 21,
67 kMagickaPointsDamaged = 1 << 22,
68 kStaminaDamaged = 1 << 23,
69 kOwnerIsNPC = 1 << 25,
70 kOwnerIsUndead = 1 << 26,
72 };
73
74 enum class BooleanValue
75 {
76 kNone = 0,
77 kConditionPreventsRun = 1 << 0,
78 kOwnerIsNPC = 1 << 1,
79 kOwnerIsUndead = 1 << 2,
81 };
82
83 float cachedRadius; // 00
84 float cachedWidth; // 04
85 float cachedLength; // 08
87 float cachedDPS; // 10
88 float cachedEyeLevel; // 14
89 float cachedWalkSpeed; // 18
90 float cachedRunSpeed; // 1C
91 float cachedJogSpeed; // 20
97 };
98 static_assert(sizeof(CachedValues) == 0x60);
99
101 {
102 public:
103 // members
104 std::uint64_t unk00; // 00
105 std::uint64_t unk08; // 08
106 std::uint64_t unk10; // 10
107 std::uint64_t unk18; // 18
108 std::uint64_t unk20; // 20
109 };
110 static_assert(sizeof(ObjectstoAcquire) == 0x28);
111
113 {
114 public:
115 enum class LowProcessFlags : std::uint8_t
116 {
117 kNone = 0,
118 kTargetActivated = 1 << 0,
119 kCurrentActionComplete = 1 << 1,
120 kAlert = 1 << 3,
121 kFollower = 1 << 4,
122 kPackageDoneOnce = 1 << 5,
123 kPackageIdleDone = 1 << 6
124 };
125
126 struct Hands
127 {
128 enum Hand : std::uint32_t
129 {
132 kTotal
133 };
134 };
136
137 struct Data0B8
138 {
139 public:
140 // members
141 void* unk00; // 00
143 void* unk10; // 10
144 void* unk18; // 18
145 std::uint64_t unk20; // 20
146 void* unk28; // 28
147 std::uint32_t unk30; // 30
148 std::uint32_t pad34; // 34
149 };
150 static_assert(sizeof(Data0B8) == 0x38);
151
152 void ClearActionHeadtrackTarget(bool a_defaultHold);
154 float GetCachedHeight() const;
161 [[nodiscard]] bool GetIsSummonedCreature() const noexcept;
166 float GetVoiceRecoveryTime() const;
168 bool InHighProcess() const;
170 bool InMiddleLowProcess() const;
171 bool InLowProcess() const;
172 bool IsArrested() const;
173 bool IsGhost() const;
174 void KnockExplosion(Actor* a_actor, const NiPoint3& a_location, float a_magnitude);
175 bool PlayIdle(Actor* a_actor, TESIdleForm* a_idle, TESObjectREFR* a_target);
176 void SetActorsDetectionEvent(Actor* a_actor, const NiPoint3& a_location, std::int32_t a_soundLevel, TESObjectREFR* a_ref);
177 void SetArrested(bool a_arrested);
178 void SetCachedHeight(float a_height);
179 void SetHeadtrackTarget(Actor* a_owner, NiPoint3& a_targetPosition);
181 bool SetupSpecialIdle(Actor* a_actor, DEFAULT_OBJECT a_action, TESIdleForm* a_idle, bool a_arg5, bool a_arg6, TESObjectREFR* a_target);
182 void StopCurrentIdle(Actor* a_actor, bool a_forceIdleStop);
183 void Update3DModel(Actor* a_actor);
184
185 // members
190 float unk048; // 048
191 std::uint32_t unk04C; // 04C
193 std::int32_t numberItemsActivate; // 058
194 std::uint32_t pad05C; // 05C
199 float essentialDownTimer; // 090
200 float deathTime; // 094
201 float trackedDamage; // 098
202 std::uint32_t pad09C; // 09C
206 std::uint64_t unk100; // 100
207 std::uint64_t unk108; // 108
210 std::uint64_t unk118; // 118
211 std::uint64_t unk120; // 120
212 std::uint64_t unk128; // 128
213 std::uint32_t unk130; // 130
214 std::uint16_t unk134; // 134
215 stl::enumeration<LowProcessFlags, std::uint8_t> lowProcessFlags; // 136
216 stl::enumeration<PROCESS_TYPE, std::uint8_t> processLevel; // 137
218 bool ignoringCombat; // 139
219 bool endAlarmOnActor; // 13A
220 bool escortingPlayer; // 13B
221 std::uint32_t pad13C; // 13C
222
223 protected:
224 void Update3DModel_Impl(Actor* a_actor);
225 };
226 static_assert(sizeof(AIProcess) == 0x140);
227}
Definition AIProcess.h:113
CachedValues * cachedValues
Definition AIProcess.h:192
float deathTime
Definition AIProcess.h:200
std::uint32_t pad09C
Definition AIProcess.h:202
float GetCachedHeight() const
bool endAlarmOnActor
Definition AIProcess.h:219
std::int32_t numberItemsActivate
Definition AIProcess.h:193
void KnockExplosion(Actor *a_actor, const NiPoint3 &a_location, float a_magnitude)
void SetCachedHeight(float a_height)
std::uint32_t unk130
Definition AIProcess.h:213
TESForm * equippedObjects[Hand::kTotal]
Definition AIProcess.h:205
MiddleLowProcessData * middleLow
Definition AIProcess.h:186
BSTArray< TESForm * > forms
Definition AIProcess.h:203
NiAVObject * GetMagicNode(const BSTSmartPointer< BipedAnim > &a_biped) const
stl::enumeration< PROCESS_TYPE, std::uint8_t > processLevel
Definition AIProcess.h:216
bool ignoringCombat
Definition AIProcess.h:218
bool GetIsSummonedCreature() const noexcept
RefHandle followTarget
Definition AIProcess.h:208
float unk048
Definition AIProcess.h:190
bool InMiddleHighProcess() const
ObjectRefHandle GetHeadtrackTarget() const
ObjectstoAcquire * savedAcquireObject
Definition AIProcess.h:198
std::uint64_t unk118
Definition AIProcess.h:210
Data0B8 unk0B8
Definition AIProcess.h:204
bool skippedTimeStampForPathing
Definition AIProcess.h:217
BSSimpleList< TESObjectREFR * > genericLocations
Definition AIProcess.h:196
bool InLowProcess() const
bool escortingPlayer
Definition AIProcess.h:220
ActorPackage currentPackage
Definition AIProcess.h:189
bool InMiddleLowProcess() const
ObjectstoAcquire * acquireObject
Definition AIProcess.h:197
TESShout * GetCurrentShout()
void Update3DModel_Impl(Actor *a_actor)
Actor * GetUserData() const
bhkCharacterController * GetCharController()
float GetVoiceRecoveryTime() const
std::uint64_t unk128
Definition AIProcess.h:212
BSSimpleList< ObjectstoAcquire * > objects
Definition AIProcess.h:195
void ClearActionHeadtrackTarget(bool a_defaultHold)
TESForm * GetEquippedRightHand()
bool PlayIdle(Actor *a_actor, TESIdleForm *a_idle, TESObjectREFR *a_target)
void ClearMuzzleFlashes()
void SetActorsDetectionEvent(Actor *a_actor, const NiPoint3 &a_location, std::int32_t a_soundLevel, TESObjectREFR *a_ref)
bool IsGhost() const
TESForm * GetEquippedLeftHand()
std::uint64_t unk108
Definition AIProcess.h:207
ObjectRefHandle GetOccupiedFurniture() const
void SetHeadtrackTarget(Actor *a_owner, NiPoint3 &a_targetPosition)
RefHandle target
Definition AIProcess.h:209
std::uint16_t unk134
Definition AIProcess.h:214
TESPackage * GetRunningPackage() const
bool SetupSpecialIdle(Actor *a_actor, DEFAULT_OBJECT a_action, TESIdleForm *a_idle, bool a_arg5, bool a_arg6, TESObjectREFR *a_target)
float trackedDamage
Definition AIProcess.h:201
std::uint32_t unk04C
Definition AIProcess.h:191
stl::enumeration< LowProcessFlags, std::uint8_t > lowProcessFlags
Definition AIProcess.h:215
bool InHighProcess() const
std::uint64_t unk120
Definition AIProcess.h:211
MiddleHighProcessData * middleHigh
Definition AIProcess.h:187
std::uint32_t pad05C
Definition AIProcess.h:194
std::uint32_t pad13C
Definition AIProcess.h:221
void StopCurrentIdle(Actor *a_actor, bool a_forceIdleStop)
LowProcessFlags
Definition AIProcess.h:116
void Set3DUpdateFlag(RESET_3D_FLAGS a_flags)
NiAVObject * GetWeaponNode(const BSTSmartPointer< BipedAnim > &a_biped) const
float essentialDownTimer
Definition AIProcess.h:199
std::uint64_t unk100
Definition AIProcess.h:206
HighProcessData * high
Definition AIProcess.h:188
void Update3DModel(Actor *a_actor)
ActorHandle GetCommandingActor() const
bool IsArrested() const
void SetArrested(bool a_arrested)
Definition Actor.h:131
Definition ActorPackage.h:12
Definition BSTList.h:10
Definition BSTArray.h:377
Definition BSTSmartPointer.h:36
Definition BipedAnim.h:42
Definition AIProcess.h:33
std::int32_t hourPackageEvaluated
Definition AIProcess.h:36
Definition NiAVObject.h:50
Definition NiPoint3.h:6
Definition TESForm.h:35
Definition TESIdleForm.h:37
Definition TESObjectREFR.h:112
Definition TESPackage.h:248
Definition TESShout.h:18
Definition bhkCharacterController.h:66
Definition PCH.h:223
Definition AbsorbEffect.h:6
RESET_3D_FLAGS
Definition MiddleHighProcessData.h:40
PROCESS_TYPE
Definition AIProcess.h:24
std::uint32_t RefHandle
Definition BSCoreTypes.h:6
Definition PCH.h:74
Definition ActorValueList.h:28
Definition AIProcess.h:138
void * unk28
Definition AIProcess.h:146
std::uint32_t unk30
Definition AIProcess.h:147
std::uint64_t unk20
Definition AIProcess.h:145
void * unk00
Definition AIProcess.h:141
std::uint32_t pad34
Definition AIProcess.h:148
void * unk18
Definition AIProcess.h:144
Data0B8 * unk08
Definition AIProcess.h:142
void * unk10
Definition AIProcess.h:143
Definition AIProcess.h:127
Hand
Definition AIProcess.h:129
@ kRight
Definition AIProcess.h:131
@ kLeft
Definition AIProcess.h:130
@ kTotal
Definition AIProcess.h:132
Definition AIProcess.h:41
bool dirty
Definition AIProcess.h:44
std::uint16_t pad2
Definition AIProcess.h:46
std::uint8_t pad1
Definition AIProcess.h:45
float value
Definition AIProcess.h:47
Definition AIProcess.h:52
float cachedDPS
Definition AIProcess.h:87
stl::enumeration< Flags, std::uint32_t > flags
Definition AIProcess.h:94
float cachedRunSpeed
Definition AIProcess.h:90
BooleanValue
Definition AIProcess.h:75
float cachedLength
Definition AIProcess.h:85
stl::enumeration< BooleanValue, std::uint32_t > booleanValues
Definition AIProcess.h:93
BSTArray< CachedValueData > actorValueCache
Definition AIProcess.h:95
float cachedJogSpeed
Definition AIProcess.h:91
Flags
Definition AIProcess.h:55
BSTArray< CachedValueData > permanentActorValueCache
Definition AIProcess.h:96
float cachedEyeLevel
Definition AIProcess.h:88
float cachedFastWalkSpeed
Definition AIProcess.h:92
float cachedForwardLength
Definition AIProcess.h:86
float cachedWidth
Definition AIProcess.h:84
float cachedRadius
Definition AIProcess.h:83
float cachedWalkSpeed
Definition AIProcess.h:89
DEFAULT_OBJECT
Definition BGSDefaultObjectManager.h:12
Definition HighProcessData.h:59
Definition MiddleHighProcessData.h:132
Definition AIProcess.h:101
std::uint64_t unk20
Definition AIProcess.h:108
std::uint64_t unk00
Definition AIProcess.h:104
std::uint64_t unk18
Definition AIProcess.h:107
std::uint64_t unk10
Definition AIProcess.h:106
std::uint64_t unk08
Definition AIProcess.h:105